Thursday, April 12, 2012

[FA][REL]Mod load order fix (Last release: 8-14-10)

[:1]Right, update time!!
What this does: It enables the use of the before{}/after{} fields that are found within mod_info.lua within all mod manageable mods. This is a tool to make life easier on mod creators, but will be required by everyone to enjoy. It will allow one mod to specify if it should be loaded before or after another in order for the changes it was meant to do to be applied correctly (seems how some mods can overwrite the changes made by another). **WARNING: THIS WILL MOST LIKELY CAUSE DESYNCS IN MULTIPLAYER/LAN IF EVERYONE DOESN'T HAVE IT!!**
I have it working to 95%! The current issues that it cannot solve:
Straight up contradictions (this will never be solvable). Ex:
  • Mod A says it comes before{} Mod B. Mod B says it comes before{} Mod A.
  • Mod A says it comes before{} Mod B and after{} Mod C, while Mod B says it before{} Mod C. So, Mod A wants an order of C-A-B, and Mod B wants B-C.
Some instances of long daisy chains. Ex:
Mod A comes after{} Mod B, Mod B comes after{} Mod C, etc. Some cases of this it will handle fine. Others it will loose track after 3 iterations. Still looking into making it fool proof.
Poll: Do people want this integrated into the Bug Fix mods? It is a bug fix only. The pros are as listed above. The cons are simple: The Bug Fix mod will become an .scd in order for this to work. While the main portion of the Bug Fix mod will be Mod Manager compatible, this portion for the mod load order fix will not be and as such you will not be able to turn it off without removing the .scd file. Personally, considering what the benefit is, I see no reason to turn it off unless playing with someone who doesn't have it... but then again, maybe they should be getting it. ;)
Here you go:
http://www.filefront.com/17200995/modorderloadfix.scd/
To modders:
If you start using the before{}/after{} fields and use this mod, you cannot specify a requires{} for this. You have to have it in your install notes to include this one as well.|||UPDATE!!!!!!!!|||Sorry to necro this thread, but I'm thinking of using this to make sure the multiplayer save mods load before BlackOps ACUs. Two questions:
1) If I understand your notes above correctly, if I use the before/after fields in a given mod, I cannot use the requires field?
2) Does this mod require it be made into a .scd file, and would that scd file have to have a UID that would ensure it loads before anything else?
Thanks|||1) No, no, sorry. You can still use the require{} field as you normally would... you just can't stick the UID for modloadorderfix in there... as modloadorderfix does not have a UID....
2)modorderloadfix is the only mod that requires being an .scd. I caution use of it, though, with other .scd mods. If they modify the same file, which ever one is later in the alphabetical order (by mod name) will win out. I ran into this issue when testing with campaign mod enabler.|||I'm sorry, but I'm still confused... :oops:
I downloaded your .zip file, and it only contains a 'schook' directory. So I really don't have a .scd file to use at this point? If I create a .scd file from this content, wouldn't I have to then make a mods directory, a mod with UID, and then put this schook directory into this mod to create the .scd file for it?
Or, can I just use this code and put it in an existing mod to enable the use of the before/after fields? Would I need this code in every mod that makes use of these fields?|||Err, sorry.... I can't remember how I uploaded it and (unfortunately) no longer have access to the upload site (work changed its web filtering policies...). If it's coming down as a zip file, then change the .zip to .scd and drop it into your gamedata directory. Done. No UID required or usable. Being an schook, it loads at game start, thus is not mod manager compatible and thus no UID.|||ahhh...ok...makes sense now. Thanks for the clarification, I'm going to give it a try.|||One more question...since I have my own custom mod that I use with my friends, I could integrate this schook directory into my mod, and then all mods would have the capability of using the before/after fields?
My custom mod loads last...would this matter? It would be the same as the poll where the mod would have been integrated into the bug fix mod?|||Correct. If you integrate it, your custom mod would have to be .scd (if it isn't already) and the schook folder would go on the same level as the hook folder from your custom mod (not inside it). As I noted for the poll, once integrated, modorderloadfix will always be active, regardless of the state of your mod in mod manager unless you remove it from gamedata, or simply rename the .scd extension.
The order in which your mod loads will not affect the loading of modorderloadfix.|||Great! Thanks so much for the help in understanding this! :D|||Hey, np!|||HTKatzmarek

No comments:

Post a Comment