Item actions
Item actions are conceptually identical to room actions, but belong to an item rather than a room. An action is defined on the item template and becomes available on every item spawned from that template.
Item actions can be triggered only while the item is on the ground. It is therefore often useful to attach them to items that cannot be picked up.
Open an item template’s Actions section to create one. Item actions have the same Action, button visibility, room commands, conditions, failure messages, and shared Action Cooldown as room actions. The item supplies the action, but the live room executes its commands; use {{ actor }} for the player who triggered it.
Precedence and duplicates
Section titled “Precedence and duplicates”The engine checks ground-item actions before room actions, quest completion actions, and ordinary commands. If a fishing item defines fish, entering fish will use that item action even if the room defines another fish action.
Only one live item from each template is needed to expose its template’s actions. Loading five identical fishing spots into one room does not create five buttons or five independent action copies. Different item templates may still define the same text; make those conditions mutually exclusive or give the actions distinct phrases.
Example: fishing
Section titled “Example: fishing”Suppose you want players to be able to fish at several lakes and shorelines. You could define a room action in every fishing location, but that would mean maintaining one action per location.
Instead, create a single non-pickable item with a description such as “A school of fish swims beneath the surface.” Attach a fish action to its template, then load the item everywhere players should be able to fish.
For a repeatable interaction:
- Make the item non-pickable so players cannot carry the action away.
- Add
fishas the action and keep Display Action in Room enabled. - Add conditions for any required pole, bait, skill mark, or cooldown state.
- Use commands to message and reward
{{ actor }}. - Load the item into every fishing location, preferably through a loader when it must return after a reset.
Test the item while it is on the ground, after attempting to pick it up, and in two different rooms created from the same template. Saving an item action does not inject it into existing live copies; create a fresh copy with /load item <template_id> when checking a saved change.