Jump to content

Workshop menu scripts tied to .esp name?


Dubbyk

Recommended Posts

Personally, I would have to carefully inspect the scripts themselves before I could know whether it depended on other scripts.

I would say that this is the only right answer.

 

Audit all of the code and, if necessary, rewrite some bits of it. If you aren't comfortable doing that you're out of luck.

Link to comment
Share on other sites

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.

 

CWSS Redux has a special bit of script that will remain in your save, briefly, after the esp is disabled. It checks if "CWSS Redux.esp" is present, and if it isn't, it automatically cleans your workshop menus to ensure that your furniture menu won't disappear if you forgot to uninstall the mod using the holotape. Thus you must not rename the CWSS esp file at all, or it will erase the CWSS menus from your game.

 

EDIT: in fact, it is stated clearly in the first entry of the CWSS FAQ:

 

 

Q: I think I installed and enabled the mod correctly but the CWSS categories don't appear in the Furniture menu.

A: Firstly, make sure you have "CWSS Redux.esp", "CWSS Redux - Main.ba2" and "CWSS Redux - Textures.ba2" in your game's Data folder, and that the mod is activated in your load order. NEVER EVER change the mod's file names or merge it with other mods, it will break the mod. Also, make sure you haven't left any "missing menu fixer" mods in your load order, they reset menus and some will erase categories added by other mods. They are meant to be used only once then deactivated. If that wasn't your issue, then the CWSS quest might not be running for some reason.

 

:)

Edited by steve40
Link to comment
Share on other sites

CWSS Redux has a special bit of script that will remain in your save, briefly, after the esp is disabled. It checks if "CWSS Redux.esp" is present, and if it isn't, it automatically cleans your workshop menus to ensure that your furniture menu won't disappear if you forgot to uninstall the mod using the holotape. Thus you must not rename the CWSS esp file at all, or it will erase the CWSS menus from your game.

 

EDIT: in fact, it is stated clearly in the first entry of the CWSS FAQ:

 

 

Q: I think I installed and enabled the mod correctly but the CWSS categories don't appear in the Furniture menu.

A: Firstly, make sure you have "CWSS Redux.esp", "CWSS Redux - Main.ba2" and "CWSS Redux - Textures.ba2" in your game's Data folder, and that the mod is activated in your load order. NEVER EVER change the mod's file names or merge it with other mods, it will break the mod. Also, make sure you haven't left any "missing menu fixer" mods in your load order, they reset menus and some will erase categories added by other mods. They are meant to be used only once then deactivated. If that wasn't your issue, then the CWSS quest might not be running for some reason.

 

:smile:

 

 

Assuming you are speaking of something like this snippet of code (which IIRC you are the original author of):

 

;Checks if your plugin is still active. If not removes every none value from the vanilla formlists.
Function checkForUninstall()
	;we only want the loop once
	if (!uninstallCheckRunning)
		uninstallCheckRunning = true
		;TODO - replace YourMod.esp with the name of your esp
		while (Game.IsPluginInstalled("YourMod.esp"))
			Utility.wait(60) ;waits 60 seconds until the condition is checked again
		endwhile
		;The plugin is no longer active. Now we have to remove every none value from the edited formlists.

		;TODO - Do this with every vanilla menu you edited
		removeNoneValues(VanillaWorkshopMenu)
		;...
		uninstallCheckRunning = false
	endif 
EndFunction

My suggestion to anyone attempting to merge a mod containing that (or something derived from it) would be to nuke it from orbit. It does not work as intended. Additionally, using the removeNoneValues function included in the same file will only clobber whatever formlist you call it on (it calls revert without adding anything back to the formlist).

 

If this sort of "automatic uninstall" feature is the only thing standing between you and merging something, just throw it away.

Link to comment
Share on other sites

 

CWSS Redux has a special bit of script that will remain in your save, briefly, after the esp is disabled. It checks if "CWSS Redux.esp" is present, and if it isn't, it automatically cleans your workshop menus to ensure that your furniture menu won't disappear if you forgot to uninstall the mod using the holotape. Thus you must not rename the CWSS esp file at all, or it will erase the CWSS menus from your game.

 

EDIT: in fact, it is stated clearly in the first entry of the CWSS FAQ:

 

 

Q: I think I installed and enabled the mod correctly but the CWSS categories don't appear in the Furniture menu.

A: Firstly, make sure you have "CWSS Redux.esp", "CWSS Redux - Main.ba2" and "CWSS Redux - Textures.ba2" in your game's Data folder, and that the mod is activated in your load order. NEVER EVER change the mod's file names or merge it with other mods, it will break the mod. Also, make sure you haven't left any "missing menu fixer" mods in your load order, they reset menus and some will erase categories added by other mods. They are meant to be used only once then deactivated. If that wasn't your issue, then the CWSS quest might not be running for some reason.

 

:smile:

 

 

Assuming you are speaking of something like this snippet of code (which IIRC you are the original author of):

 

;Checks if your plugin is still active. If not removes every none value from the vanilla formlists.
Function checkForUninstall()
	;we only want the loop once
	if (!uninstallCheckRunning)
		uninstallCheckRunning = true
		;TODO - replace YourMod.esp with the name of your esp
		while (Game.IsPluginInstalled("YourMod.esp"))
			Utility.wait(60) ;waits 60 seconds until the condition is checked again
		endwhile
		;The plugin is no longer active. Now we have to remove every none value from the edited formlists.

		;TODO - Do this with every vanilla menu you edited
		removeNoneValues(VanillaWorkshopMenu)
		;...
		uninstallCheckRunning = false
	endif 
EndFunction

My suggestion to anyone attempting to merge a mod containing that (or something derived from it) would be to nuke it from orbit. It does not work as intended. Additionally, using the removeNoneValues function included in the same file will only clobber whatever formlist you call it on (it calls revert without adding anything back to the formlist).

 

If this sort of "automatic uninstall" feature is the only thing standing between you and merging something, just throw it away.

 

 

Nope, you assume wrong.

Link to comment
Share on other sites

 

 

CWSS Redux has a special bit of script that will remain in your save, briefly, after the esp is disabled. It checks if "CWSS Redux.esp" is present, and if it isn't, it automatically cleans your workshop menus to ensure that your furniture menu won't disappear if you forgot to uninstall the mod using the holotape. Thus you must not rename the CWSS esp file at all, or it will erase the CWSS menus from your game.

 

EDIT: in fact, it is stated clearly in the first entry of the CWSS FAQ:

 

 

Q: I think I installed and enabled the mod correctly but the CWSS categories don't appear in the Furniture menu.

A: Firstly, make sure you have "CWSS Redux.esp", "CWSS Redux - Main.ba2" and "CWSS Redux - Textures.ba2" in your game's Data folder, and that the mod is activated in your load order. NEVER EVER change the mod's file names or merge it with other mods, it will break the mod. Also, make sure you haven't left any "missing menu fixer" mods in your load order, they reset menus and some will erase categories added by other mods. They are meant to be used only once then deactivated. If that wasn't your issue, then the CWSS quest might not be running for some reason.

 

:smile:

 

 

Assuming you are speaking of something like this snippet of code (which IIRC you are the original author of):

 

;Checks if your plugin is still active. If not removes every none value from the vanilla formlists.
Function checkForUninstall()
	;we only want the loop once
	if (!uninstallCheckRunning)
		uninstallCheckRunning = true
		;TODO - replace YourMod.esp with the name of your esp
		while (Game.IsPluginInstalled("YourMod.esp"))
			Utility.wait(60) ;waits 60 seconds until the condition is checked again
		endwhile
		;The plugin is no longer active. Now we have to remove every none value from the edited formlists.

		;TODO - Do this with every vanilla menu you edited
		removeNoneValues(VanillaWorkshopMenu)
		;...
		uninstallCheckRunning = false
	endif 
EndFunction

My suggestion to anyone attempting to merge a mod containing that (or something derived from it) would be to nuke it from orbit. It does not work as intended. Additionally, using the removeNoneValues function included in the same file will only clobber whatever formlist you call it on (it calls revert without adding anything back to the formlist).

 

If this sort of "automatic uninstall" feature is the only thing standing between you and merging something, just throw it away.

 

 

Nope, you assume wrong.

 

 

Not to derail the thread, but MonitorMod in CWSS_Add_Categories_Script reads, roughly, as follows:

function MonitorMod()
  if(!bMonitorLocked)
    bMonitorLocked = True
    if (bCategoryAdded)
      while (game.IsPluginInstalled("CWSS Redux.esp"))
        utility.Wait(10)
      endwhile

      formlist j = WorkshopMenu01Furniture
      WorkshopMenu01Furniture.Revert()
      int i = 0
      while (i < j.getSize())
        if (j.getAt(i))
          WorkshopMenu01Furniture.AddForm(j.getAt(i))
        endif
      endwhile
      MonitorMod2()
      debug.Trace("[CWSS]Mod has been uninstalled and the workshop categories have been restored.")
      bCategoryAdded = False
      bMonitorLocked = False
    endif
  endif
endfunction

I say roughly because the source wasn't distributed with it and that file was likely complied with caprica -- champillion wasn't happy decompiling it. A few minutes with the output of the disassembler gets us the above code, but I wouldn't be surprised if the the bCategoryAdded conditional is slightly wrong. My assumption looks to be correct.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...