I'm worried that if I modify their Levelled Lists (eg LItemApothecaryIngredienstRare75) it will block other mods from adding similar items.
Is there a bette way to do this? Will my changes clobber other mods?
Event OnInit() RegisterForSingleUpdate(1)EndEventEvent OnUpdate() If bGetGameLoaded(EmptyLeveledItemWithUseAllFlagTicked, UnplayableArmor, Game.GetPlayer()) ; Code in here will iterate once per save load VanillaLeveledItem.AddForm(YourFormProperty) ; etc. EndIf RegisterForSingleUpdate(15)EndEventBool Function bGetGameLoaded(LeveledItem akLeveledItem = None, Form akForm = None, ObjectReference akContainer = None) akContainer.AddItem(akLeveledItem, 1, True) If akContainer.GetItemCount(akForm) akContainer.RemoveItem(akForm, akContainer.GetItemCount(akForm), True) Return False Else akLeveledItem.AddForm(akForm, 1, 1) Return True EndIfEndFunction
; A SCRIPT THAT RUNS ON EACH GAME LOAD:; Apparently we cannot save changes to formLists across saves. Therefore a little trickery is required to force-feed the levelledItems; we want our vendors to sell into their levelled lists. This script is attached to any item in any cell in the game.; At OnInit (only happens once, ever), we try to add an item from an empty list to the players inventory. Since the list starts out; empty, the call fails - telling us the game just loaded for the very first time since our mod was installed. We can now do any special startup; routines. However, we also add a bogus item to the empty list, and set up a timer to recursively check this "on load" command every 15 seconds; for the rest of the game (this timer persists through savegames).; During subsequent calls to the Update, the list is no longer empty and the player ends up with a boot in his backpack, which tells us he has not just; loaded the game. The boot is removed and the script ends until the next recursion.; From now on, whenever we load the game, the recursive event fires within 1-15 seconds. Since lists are not saved, the very first time this is called; after loading, the list will be empty, and again we know to fire off our "onLoad" routines. Wash rinse repeat. Form Property FishingNetUnplayableArmor Auto LeveledItem Property FishingNetEmptyLeveledItemWithUseAllFlagTicked Auto LeveledItem Property LItemMiscVendorMiscItems75 Auto LeveledItem Property LItemFishingNet Auto Event OnInit() RegisterForSingleUpdate(1)EndEvent  Event OnUpdate() If bGetGameLoaded(FishingNetEmptyLeveledItemWithUseAllFlagTicked, FishingNetUnplayableArmor, Game.GetPlayer()) ; Lets add a net to each vendor selling generic junk items: LItemMiscVendorMiscItems75.AddForm(LItemFishingNet, 1, 1 ) EndIf RegisterForSingleUpdate(15)EndEvent Bool Function bGetGameLoaded(LeveledItem akLeveledItem = None, Form akForm = None, ObjectReference akContainer = None) akContainer.AddItem(akLeveledItem, 1, True) If akContainer.GetItemCount(akForm) akContainer.RemoveItem(akForm, akContainer.GetItemCount(akForm), True) Return False Else akLeveledItem.AddForm(akForm, 1, 1) Return True EndIfEndFunction