I have a remote container that is activated via message box choice. I want to refill it anytime it's been used, such that it will always contain one each of its 69 items.
Each of those 69 items is scripted to remove itself if there is more than one in the container. These scripts work fine when the items are added to/removed from local containers and actor inventories. However, "onAdd" and "ondrop" scripts don't run on items added to persistent remote containers (see the CS Wiki article on http://cs.elderscrolls.com/constwiki/index.php/Script_Processing).
Here's what I've tried to make this scenario work:
Heartbeating the container, as described in the Script Processing article, using their example script and a half dozen variations of it. This seems to have no practical effect on whether onAdd or ondrop scripts run on the items placed in them - they still don't run at all. I have also tried using a quest script to ping the container by setting new variable values every frame, instead of the container itself changing the values - also to no avail.
Moving the container to the player temporarily - this kind of works, but has risks (Oblivion gates, etc). Sending the container back to its home cell in the first frame of gamemode would avoid that risk sufficiently, but wouldn't allow enough time for a full refill.
Adding the items to the container one-by-one with a script with no conditions - does refill the container, but leaves duplicates every time, because the onAdd block of the items' script doesn't run.
Adding the items to the container one-by-one with a script with GetItemCount conditions - the script quits after a dozen or so items. I've tried it as an activator script, a quest script, putting it directly in the messagebox script - just about every arrangement I can think of, still having the early stopping issue. I did double-check the script where it tends to stop to make sure I didn't flub it up, and it doesn't appear that I have.
I'm fried now. Any suggestions? Thank you.