So I tried to figure out the code for mod dependencies, but unless I am missing something it seem to only be able to do the opposite of what I need.
I need my mod Meaner Monster, to specify that if present, DREAM has to be listed BELOW my mod.
From what I've found of options, I am only able to specify that DREAM should be listed above. Which is the opposite of what I want.
Meaner monsters changes sprite sizes. If it DREAM loads first, it also reverts those sprites to vanilla sprites.
I believe Villager Immersion Overhaul has the same problem. It needs to be listed above DREAM in the mod list. But it seems only DREAM can specify this. Maybe to avoid conflicts if both mods specify the opposite load order?
[0.10.21] XML files are incorrectly retrieved as Texture2D when provided alone
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Mod Dependencies options
Load order is the same as in Skyrim and other Bethesda games, so you want to run your mod after DREAM to override its xml files (if any). In other words, if B depends on A then you need to "install" A before you "install" B. This is why i used the word dependency.
Maybe you know this already, but the documentation can be found here.
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mod Dependencies options
Unless I am misunderstanding: "Above" means above it in the list. Not above it in load order?
The goal here is for the DREAM sprite to be used. With the two load orders, this is the results:
Meaner Monsters BELOW:
Meaner Monsters ABOVE:
Maybe the real problem here is how xml files are loaded?
The goal here is for the DREAM sprite to be used. With the two load orders, this is the results:
Meaner Monsters BELOW:
Meaner Monsters ABOVE:
Maybe the real problem here is how xml files are loaded?
Last edited by Ralzar on Wed Mar 11, 2020 6:22 pm, edited 1 time in total.
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Mod Dependencies options
If you place Meaner Monsters after DREAM, Meaner Mosters overrides DREAM. If DREAM only contains textures and Meaner Monsters only contains xml files, everything works together no matter the load order. If both contain the same asset, the last mod in the load order overrides everything before it.
If your mod is shipping vanilla textures you simply need to stop doing it and only provide xml files. If this is causing issues i'm happy to give a look as i said in another topic.
If your mod is shipping vanilla textures you simply need to stop doing it and only provide xml files. If this is causing issues i'm happy to give a look as i said in another topic.
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mod Dependencies options
Now you made me doubt myselfTheLacus wrote: ↑Wed Mar 11, 2020 6:22 pm If you place Meaner Monsters after DREAM, Meaner Mosters overrides DREAM. If DREAM only contains textures and Meaner Monsters only contains xml files, everything works together no matter the load order. If both contain the same asset, the last mod in the load order overrides everything before it.
If your mod is shipping vanilla textures you simply need to stop doing it and only provide xml files. If this is causing issues i'm happy to give a look as i said in another topic.
So, I extracted the files from the exact modfile I was using in the pictures above. I am not supplying any sprites in my mod. There is just one .cs file and a bunch of .xml files to change the sprite scale. Attached extracted dfmod file below.
Edit: and yes, this is the old version where I have an xml frame for every single frame. I have a newer version with only the needed xml files. I just built a mod of that and recreated the same behaviour.
- Attachments
-
- MeanerMonsters.dfmod.zip
- (901 Bytes) Downloaded 109 times
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Mod Dependencies options
Is it not that the xml files are in both mods? Dunno maybe I am not following here.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mod Dependencies options
Yes, but XML files only change the size, so should, at worst, make the dream sprites deformed. Instead they make them revert to classic when the mods are loaded in the order that should lead to dream loading over my xml files.
It only works correctly when they're loaded the opposite way of what is expected, which is why I was wondering if I was misunderstanding the load order.
Maybe what is happening is that my mod defines the xmls and then the dream sprites do not get loaded because there's a limit to how many times you can load the same xml? And then the corresponding sprite isn't loaded either?
Edit: no wait, that's not right since it works when my xml files get loaded last. Loading over the dream xml files. (If dream has xml files)?
Edit2: DREAM-SPRITES only loads sprites. Not xml files.
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: Mod Dependencies options
Might be a cast issue because textures and xml files shares the same name. Unity API allows to seek for a specific name and type combination, but our internal code may not be as robust and try to use whatever asset is found first as a texture. I'll see what i can do to avoid this situation.
EDIT: Fixed with #1752.
EDIT: Fixed with #1752.