Jump to content

Questions on AddForm & Revert script functions on LeveledItem


PJMail

Recommended Posts

As there are no Console/F4SE functions to read a LeveledItem list (unlike SSE) can someone confirm/deny the following please?

 

- The change to a leveledItem List via LeveledItemlist.AddForm(LLform,lvl,cnt) persists through a game restart.

- As you cannot set the 'chance' in this function, I assume it is treated as 0.

- If that LLform (with the same lvl and cnt) already exists then it is not duplicated in the list.

- If the mod (script) that added the LLform is removed then the LeveledItemlist is uneffected (as long as the LLForm is still valid).

- If the LLform is removed (it's mod is removed), its entry in the Leveleditemlist is removed by the game (no Null left).

- If a new mod redefines the contents of this LeveledItemList record then in-game it becomes that record PLUS all the current script added entries (like what happens with FormLists).

- If LeveledItemList.Revert() is called then ALL script added entrys (from all mods) are removed (i.e. reverts to winning mod's definition of that record).

 

Most discussions/info on this I have found refer to Skyrim...

 

Thanks again!

PJM

Link to comment
Share on other sites

No responce so I did some tests:

 

- The change to a leveledItem List via LeveledItemlist.AddForm(LLform,lvl,cnt) persists through a game restart. YES

- As you cannot set the 'chance' in this function, I assume it is treated as 0. Appears to be YES

- If that LLform (with the same lvl and cnt) already exists then it is not duplicated in the list. NO it is duplicated - this is a potention problem!.

- If the mod (script) that added the LLform is removed then the LeveledItemlist is uneffected (as long as the LLForm is still valid). Appears to be YES

- If the LLform is removed (it's mod is removed), its entry in the Leveleditemlist is removed by the game (no Null left). YES

- If a new mod redefines the contents of this LeveledItemList record then in-game it becomes that record PLUS all the current script added entries (like what happens with FormLists). YES

- If LeveledItemList.Revert() is called then ALL script added entrys (from all mods) are removed (i.e. reverts to winning mod's definition of that record). Not tested.

 

As 'Leveled List injection scripts' cannot test if what they are adding has already been done, there is a serious possibility of polluting such lists with duplicate entries - which will then skew the chance of getting the injected item. Each duplicated entry will increase the chance or number of the injected item (such as a weapon if this is a new weapon mod).

 

Could this explain why some 'new weapon' mods seem to end up with every NPC having the weapon?

 

"Run once on install" style solutions are fine as long as you are injecting a Leveled Item that only exists in that mod (as re-installing the mod will clean the List before it re-runs) - but if the leveled item is in the base game, or the player can re-run the injection script - watch out...

 

Wish F4SE had the same extensions as SKSE does (GetNthForm etc).

Edited by PJMail
Link to comment
Share on other sites

  • Recently Browsing   0 members

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