Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Force-respawning a remote container


Khettienna
 Share

Recommended Posts

Here's my situation:

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 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.

Link to comment
Share on other sites

This may be a dumb idea, but here goes: Set the container to respawn. Place the remote container in it's own special cell. When using a script to open the container, have it first reset the container's special cell. When a cell resets, so does the inventory of any respawning container within it so this should ensure that your container always has 1 of each item.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...