User Tools

Site Tools



The first of a pair of scripts that allow you to have persistant containers. To make an object carry over, create a ScriptParams link with data CarryOver from the container object to the item, or its archetype. When a mission ends, contained items that inherit from one of the carry-over archetypes will be recorded as campaign quest variables. The variables will be named inv_ plus the name of the archetype. If the parameter inv_code is set, then that will also be added before each name so you can have multiple carry-overs. The value of each variable will be the stack count of the object, which may be 0. To make the script work on objects in the player’s inventory, set the parameter inv_player. In that case, the ScriptParams links will be read from the script object to tell which archetypes will be recorded, but it will get the contained items from the Player object. The player’s inventory will also be used if the script is on the starting point marker.

Any properties placed on the concrete object will be lost. This is mostly an issue with loot objects. If you want to carry-over loot from the player’s inventory, you should use the LastMissionLoot script. Loot in other containers will work, but you have to set the loot amount on the archetype, not the created object.

Messages Sim
Links ScriptParams(CarryOver)
Parameters inv_code (string) Optional code to identify a container.
inv_player (boolean) Use items in the player’s inventory.

See Also

tnhscript/invcarryover.txt · Last modified: 2010/11/22 19:11 (external edit)