Dubbyk Posted October 4, 2017 Share Posted October 4, 2017 Hello, just to be upfront most of the topics on this forum are above my knowledge base but I felt this question was a little out of place in the mod help thread. So my question is; what is the difference between scripts that seem to need to refer to a specific .esp by name and others that do not? I am attempting to merge workshop mods and I am having issues with the ones that use script injecting. Some of them work just fine while merged but others seem to NEED to be tied to their esp, and obviously if you are merging many .esps they can't all contain every name. This would make more sense to me if EVERY script injected mod worked this way, I would just write it off as a limitation of scripts, but some work, and as far as scripts go I have several big quest mods merged and they work just fine with WAY more complex scripts then just a simple menu injector. As for how do I know for sure it's an issue tied to the .esp name, here is an a scaled down example of what happened to my merge, let's just use two plugins that fit both examples: CWSS Redux.esp and SettleObjExpandPack.esp They are then merged into Workshopmerge1.esp All assets are packed into BA2 files (Main and Textures) and then added to a .7z and added to NMM. Old plugins are disabled and a new CLEAN game is started, open workshop and SOE menu is present but CWSS menu is not. Both of these mods use script injecting. Now I exit Fallout and rename my Workshopmerge1.esp to CWSS Redux.esp (also renaming the BA2s) and now the SOE and the CWSS menu show up in game, so obviously the merging process did not harm the CWSS scripts in anyway as they resume function if they can find the correctly named .esp. Can anyone tell me why one works and the other does not? I can name dozens of other examples but I thought best to keep it sort. An other solution to my problem would be if someone could tell me what part of the script is looking for the name? Could it be a simple as finding the script, and just swapping out the name of the original plug in for the name of the merged one? I've seen tutorials for modders on how to apply a pre made menu injector via Xedit, if I removed the original mods injector and replaced it with this generic menu injector on the merge plugin could this work? Thanks to anyone who can help me with this, if I find a way around this problem I could save 50+ .esp slots in my load order and greatly reduce my data folder size with nice neat BA2 files. Link to comment Share on other sites More sharing options...
kitcat81 Posted October 4, 2017 Share Posted October 4, 2017 I think it might be because some authors check if the plugin Someplugin.esp is installed and then install the menu.if (Game.IsPluginInstalled("DLC1.esm"))Debug.Trace("The player has installed DLC1 - let's do some fun stuff!")endIf So if you rename the plugin, the script will think that the plugin is not installed. Link to comment Share on other sites More sharing options...
BlahBlahDEEBlahBlah Posted October 5, 2017 Share Posted October 5, 2017 Kitcat's right and, in my case (APC and Tank Turrets you commented on, Dubby that is), the install script does just that (in concept, if not exact code, of course). I do provide the source scripts though, so in *my* case, you can go to CK, load the mod, search for the "install" quest (...I think I named it that), open it up and find the tab with the script on it, "edit source" it, you'll see the line pointing to the esp pretty easily, change that line to point to whatever new names.esp, "Compile" it, "Save" it, close that little Edit window, save the mod, and be on your merry way. =) Not everyone provides their source scripts though (which is not wrong of them, just different). Link to comment Share on other sites More sharing options...
Dubbyk Posted October 6, 2017 Author Share Posted October 6, 2017 Thanks for the info Blah, now I just need to get my CK to actually open, It has always CTD when ever I attempt to open it, and I have dreaded "varying files" as it has asked me to do, because if it restores all of Fallout 4 files to stock tons of my mods would explode, I will attempt to set up the CK on my room mates computer with a clean install of fall out, search for these scripts, edit them and move them over to my PC. I take it non of the scripts you are talking about can be edited in this way with Xedit and must be done in CK correct? And if anyone else is looking here and would like a list of script injected mods I HAVE been able to merge with no script editing here it is: Creative ClutterThematic and PracticalSnappy House KitsEasy Home BuilderSettlement Objects ExpandedHouse KeepingG2M WorkshopBasement LivingNorthLand DiggersInvisible FurnitureOffice and Store Buildings All of the mods listed above are all working in ONE .esp and neatly packed into 2 BA2 files. I have the MAIN BA2 uncompressed as that seems to help scripts function although I have no idea why. Link to comment Share on other sites More sharing options...
JonathanOstrus Posted October 6, 2017 Share Posted October 6, 2017 Being that I've done some of the scripting for Creative Clutter so I have a particular insight about it. Let me just say this. Don't merge it! And don't merge any mod that it supports or all of the 3rd party mod support will disappear just like you see previously. You will have all sorts of problems. Everything about how it detects the other mods and adds support is all scripting using a similar function to that mentioned above. The simple gist is that while you can modify the code to support a different plugin name, it has something like 300 (possibly more, I didn't count them) hard coded form ids matching up with the plugin names. That's a lot of code changing you'd need to do. I'm pretty sure the publishing authors did not include the sources in the downloadable mod package so you would need to decompile the scripts to try and tweak them yourself which will potentially produce more issues. Link to comment Share on other sites More sharing options...
Dubbyk Posted October 6, 2017 Author Share Posted October 6, 2017 Um I guess it just hasn't had time to explode on me yet, it is madding that while script injecting solved a lot of hard edit conflicts it apparently kills any attempt at merging? I could fix hard menu conflicts :-( darn new newfangled mods! Link to comment Share on other sites More sharing options...
Dubbyk Posted October 6, 2017 Author Share Posted October 6, 2017 For script injected mods that have loose files can I at least pack them into BA2 files? Or will the scripts fumble with the change in file format as well? Link to comment Share on other sites More sharing options...
kitcat81 Posted October 6, 2017 Share Posted October 6, 2017 It`s not necessary related to script injected menus. Mods that do not add any menus still can contain a script that uses the function to check for some plugin name. Renaming the plugin will make this function and all depened functions fail. In your case the depended function is the one that adds the menu. I just think if a mod uses such function, it`s usually for a reason. You can still merge a lot of mods that have no scripts. Though it would be cool if nexus added some tag or something else that could help modders and users detect mods that should not be merged or renamed. Link to comment Share on other sites More sharing options...
Dubbyk Posted October 6, 2017 Author Share Posted October 6, 2017 How do you think this would work out in your opinion if a script injected mod such as Wild planets farming that has several patches for things such as VIS, and these patches have no scripts what so ever *Farm.esp (this .esp is the scripted one) *Farm_CP_ScrapEverything_UE.esp *Farm_CP_VIS.esp *Farm_CP_NorthlandDiggers.esp Do you think if I took the 3 .esps below the farm.esp and merge them into the farm.esp but kept the name of the the merge "Farm.esp" it would collapse the scripts? Link to comment Share on other sites More sharing options...
aquilegia Posted October 9, 2017 Share Posted October 9, 2017 (edited) IsPluginInstalled is not the only script function which requires the plugin name - GetFormFromFile also requires the name. (Though you always first check if it's installed before using GetFormFromFile - I think you get crashes otherwise, when it is not installed.) How do you think this would work out in your opinion if a script injected mod such as Wild planets farming that has several patches for things such as VIS, and these patches have no scripts what so ever *Farm.esp (this .esp is the scripted one) *Farm_CP_ScrapEverything_UE.esp *Farm_CP_VIS.esp *Farm_CP_NorthlandDiggers.esp Do you think if I took the 3 .esps below the farm.esp and merge them into the farm.esp but kept the name of the the merge "Farm.esp" it would collapse the scripts? Personally, I would have to carefully inspect the scripts themselves before I could know whether it depended on other scripts. The FO4Edit team (Elminster, probably) used to provide another utility besides the edit one with a *Dump.exe name. That let you rather easily look for bits of text in a plugin's definition. Sadly, I do not think this has ever been available for fallout 4. (Where, personally, I would really like not only the dump mechanism but a way of turning the dump back into the plugin if sane edits had been made to the text.) Edited October 9, 2017 by aquilegia Link to comment Share on other sites More sharing options...
Recommended Posts