» Wed Jul 28, 2010 9:07 pm
Ok, I figured out why the chilled beverage and food spoilage features weren't working. If you attach a script to an object via a mod, or change its existing script, any instances of that object already in the gameworld will ignore the change. So any items already in your inventory, or in NPC inventories, or in containers, in cells that you've already visited, will act as if there was no script. If you drop an item from your inventory the instance of it that is in your inventory is deleted and a new one is spawned in the gameworld - so dropping everything from your inventory and into the gameworld, and then picking it back up, would fix it. Or if I wrote a script that removed all of the foods from the players inventory, and then re-added them all again (which would be tedious as hell to write). The feature would work perfectly with new games though.
Also, I've verified that variables in object scripts don't get reset when you leave the cell that they're in, execution of the script just pauses until you return. So the feature will work as intended.