Jump to content

Permanent List Addition Functions


PushTheWinButton

Recommended Posts

Just wondering if anyone knows some intricacies behind the GECK's default list addition functions (AddFormToFormList, AddCreatureToLeveledList, AddNPCToLeveledList, and AddItemToLeveledList).

 

What exactly happens when the added objects no longer exist? E.g. if I make a mod which has a new armour item, and I add that armour to a vanilla leveled and form list using the above functions, what will happen when the mod is removed? Are the new list entries automatically deleted when loading a game or is there some lingering effect such as save bloat, etc?

 

I assume that because the additions are permanent, there's also some increase in save size due to it (albeit very small) as the change has to be logged to the save. Does the game automatically delete references to objects that no longer exist or do they remain in some shape or form?

 

And before anyone mentions it, yes I know that FOSE's form list functions are preferable I'm asking out of curiosity mainly.

 

EDIT: also wondering the same in regard to containers.

Edited by PushTheWinButton
Link to comment
Share on other sites

I used AddFormToFormList in a mod once to allow people to categorize clothing items, so as to be able to have their choices persist in saves. It was then picked up by sen4mi and given a better, MCM-based interface. It's been up for years at LL and I've never seen anybody complain about bloat beyond the ordinary. Between all the records the game keeps of which tin cans you tripped over along your journey, an addition to a formlist is negligible, imo. I assume the forms/refs are deleted from the formlist when they no longer exist in the game on load, but don't remember if/how I tested it at the time. It shouldn't be too difficult to set up a test for that though, a simple ListGetCount after removing the mod containing the form should tell you all you need.

 

I've never used the leveled list variants. Sure, the geck seems to advise against using them, but doesn't give much of a reason for it other than that you can't undo it, presumably because there was no 'remove' counterpart in vanilla or nvse.

 

Fairly certain inv refs to objects removed from the game are removed from containers, although again, that's really just a guess, based on the game detecting that objects are missing and warning you about it on load, and the fact I've never heard anyone say anything to the contrary, and what with all the clothing and weapon mods that stick things in containers you'd assume to have heard about something like that after all this time.

Link to comment
Share on other sites

Yeah, I wasn't thinking any bloat would be major. I mean people cry about globals being inefficient, but considering the vanilla game has hundreds, I don't think a few mod-added ones are a problem.

 

The thing with the leveled list function is: if you add a vanilla item, the change will persist even after your mod is uninstalled, but there's nothing to stop you putting said item in a new leveled list (with a chance none of 0) and then simply adding that new leveled list to the original leveled list. The end result should be the same, and since the new leveled list will be removed along with your mod, the change won't persist.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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