Jump to content

I'm working on a mod with addon capabilities. The addons work, but not without a disablemod-savethegame-enablemod-reloadthegame procedure.


monsto

Recommended Posts

It's a mannequin mod. The base mod has 5 types. In a separate esp, I have a bunch more types, and may make more types down the road. I want to be able to add new types to the process willy-nilly.


The mannequin types are put in a formlist, and the choose/drop menu populates a UIExtensions Listmenu. It's clear that the formlist isn't being updated, and that the disablemod-savethegame-enablemod-reloadthegame procedure basically purges then makes a new formlist, but it's obviously unwieldy.


How should I go about updating the formlist that drives the listmenu?

Link to comment
Share on other sites

In the addon mods, write up a small script on a start game enabled quest that uses AddForm in the OnInit event to add whatever you need to the base mod's formlist(s). That way when an addon is added, it will add its forms as needed.

 

There's a script that's part of the base mod, "packscript". The addon esps have a quest > refalias > "packscript", with the properties and all that adds a formlist from the addon to the formlist in the basemod.

 

And now you've made me want to check if it's "enabled on start" and also not "run once" just to dbl check.

Edited by monsto
Link to comment
Share on other sites

In the addon mods, write up a small script on a start game enabled quest that uses AddForm in the OnInit event to add whatever you need to the base mod's formlist(s). That way when an addon is added, it will add its forms as needed.

 

I checked... I've 2 addons, and they're both 'start enabled' and 'run once' . . . i figure 'run once' is correct, because I only want it to run the one time that it's installed and then not again.

Link to comment
Share on other sites

On the base mod, whatever you have managing this menu thing does it start and stop?

 

My experience with formlists that have things added to them by script seems to indicate that the formlist needs to stay in memory in order to retain the additions. To put it another way, imagine Quest A has a formlist property and Quest B adds to it via script with AddForm. While Quest A is active the formlist will reflect the additions. But if Quest A is stopped and restarted it will pull the formlist data from the ESP as it no longer has memory of the additions made via script by Quest B.

 

Posting your scripts might help. As I am a little confused on how you are trying to do it already.

Link to comment
Share on other sites

On the base mod, whatever you have managing this menu thing does it start and stop?

 

My experience with formlists that have things added to them by script seems to indicate that the formlist needs to stay in memory in order to retain the additions. To put it another way, imagine Quest A has a formlist property and Quest B adds to it via script with AddForm. While Quest A is active the formlist will reflect the additions. But if Quest A is stopped and restarted it will pull the formlist data from the ESP as it no longer has memory of the additions made via script by Quest B.

 

Posting your scripts might help. As I am a little confused on how you are trying to do it already.

 

Actually, what you say makes a lot of sense as far as papyrus is concerned.

 

2ndly, I was also trying to figure out a way to make the menu one time, and then refer to that whenever I use the menu. As it stands, the menu is rebuilt from the formlist everytime it's accessed. There's ~1 sec delay per ~25 menu items. So I was thinking to put the aggregate formlist, along with the menu variables, on a quest based player refalias. That seems to be as about as persistent as you can get. The built menu array would remain as well as taking care of your suggestion.

 

Thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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