Experimenting with changing items stats at runtime. The script below doesn't work because at every game reload [without quitting to desktop] the book values aren't restored to vanilla, so they will eventually increase to stellar values. How is this supposed to be done?
Scriptname TEST_ItemsStats extends ReferenceAlias
formlist property TEST_FLSTSpellTomes auto
function OnPlayerLoadGame()
self.SetSpellTomesWeight()
endFunction
function SetSpellTomesWeight()
Int i = TEST_FLSTSpellTomes.GetSize()
while i > 0
i -= 1
TEST_FLSTSpellTomes.GetAt(i).SetWeight(2.000000)
TEST_FLSTSpellTomes.GetAt(i).SetGoldValue( TEST_FLSTSpellTomes.GetAt(i).GetGoldValue() * 3)
endWhile
endFunction
edit: apparently I solved this by taking advantage of this behavior, I've added a weight check on a fake item before running the function. So strange though.