I'm not sure if it was in the last patch or in a previous one (nobody seem to haved checked it since 1.6). The thing is that I tried this script in a container and worked perfectly (I checked the same script in 1.5 without any luck):
Scriptname Name_of_the_script extends ObjectReference Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if aksourcecontainer == game.getplayer() My_FormList.addform(akbaseitem) endifEndEvent Event OnItemremoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) if akDestContainer == game.getplayer() My_FormList.removeaddedform(akbaseitem) endifEndEvent Event OnClose(ObjectReference akActionRef) if akActionRef == game.getplayer() && game.getplayer().issneaking() My_FormList.revert() EndIf game.getplayer().additem( My_FormList, 1, false)EndEvent Event OnOpen(ObjectReference akActionRef) debug.notification(My_FormList.getsize())EndEventFormList Property My_FormList Auto
I added and removed items for a while and even saved and loadded the save to continue playing with the chest and it worked like charm. Each time I opened the chest, the expected item count was shown and each time I exited it, the expected set of items were added to my character's inventory.
I didn't used a property but a GetFormFromFile function, but I posted here with a property to simplify.
To think the huge ammount of formlists I used on Vilja without this function! Now using fomlists will be way easier! I'm so happy!