In the recent days, I made good progress with converting my Black Horse Courier questmod to a real .dfmod, thanks to the help of Hazelnut. My quests and my custom locations are working just fine, but I have problems to get my custom books to work.
The custom books were created in DFBOOEDT and work fine when used as loose files, but they do not work when in the .dfmod.
I have of course a mapping file, and I also made sure that I change the file extension from .txt to .txt.bytes before importing them as assets, but they are not recognized in game. I have no idea what I can do more.
My mod is in a folder "blackhorsecourier" inside daggerfall-unity-master -> Mods.
According to the modding documentation, I have a subfolder "Assets" in my mod folder, and there are the other relevant folders (Books, Quests, Scripts, WorldData).
Here is a screenshot of my folder structure:
And here is a screenshot of my mod builder, showing settings and all added assets:
Maybe a second or third pair of eyes can see something I am too blind now.
Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
It might be an issue running mod virtually inside the editor. If you didn't already, can you try to build the mod?
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
I actually did only try the built mod in the actual game so far.
(Because I am not sure how even start the game within the editor... pressing the "Play" button in Unity editor does not do anything...)
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
The main difference from my book is the extra Assets folder in the path, but that shouldn't make any difference.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
The "Assets" folder is suggested in the readme file that comes in the "Game/mods" folder in the DFU master branch. I tried both with and without the extra "Assets" folder, but it made no difference.
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
Ok, they should be seeked automatically when you build a mod but try to define them explicitly and see if it makes any difference. This is an alternative to use standard paths so you can place book files anywhere. You need to open the mod manifest (.dfmod.json file) and add a property named Contributes if missing, with the content shown here:
Code: Select all
{
// ...
"Contributes": {
"BooksMapping": [
"MDBHCBooksPack"
]
}
}
- haloterm
- Posts: 391
- Joined: Sat Feb 16, 2019 5:21 am
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Custom Books work as loose files, but not in .dfmod (no, not the .bytes issue)
That's great!
You need to drag DaggerfallUnityStartup scene (from Assets/Scenes) to the hierarchy window and make sure is the only scene there. Feel free to ask if you want further help about this.