-
Notifications
You must be signed in to change notification settings - Fork 134
Dynamic Map Tiles Extended Triggers
Triggers are (mostly) events that trigger an action.
When adding map properties directly (as opposed to adding a field to the DMT dictionary), the format of the map property key should be:
DMT/{ActionName}{_Once/Swap}{TriggerName}
Once and Swap are optional.
DMT currently recognizes the following triggers (actions are listed here):
- Action - Triggers when the player acts on a tile.
- CropHarvest - Triggers when a crop, flower, or forage-crop has been harvested.
- CropPlanted - Triggers when a crop, flower, or forage-crop has been planted.
- Enter - Triggers when the player enters a location.
- Explode - Triggers when the tile is within the blast radius of an explosion.
- Item - Triggers when the player is holding a specified item when they interact with the tile.
- Load - Triggers when the map is first loaded.
- MonsterSlain - Triggers when the player slays a monster.
- ObjectClicked - Triggers when a specified item has finished producing an item, and the produced item is collected.
- ObjectPlaced - Triggers when a specified item is placed.
- ObjectRemoved - Triggers when a specified item that can be removed using a tool is removed.
- Off - Triggers when the player steps off a tile.
- On - Triggers when the player steps on a tile.
- Push - Triggers when a tile is pushed.
- Pushed - Triggers when a tile is done being pushed.
- Talk - Triggers when the player talks to an NPC.
- Tool - Triggers when a certain tool is used on a tile
A trigger for when the player acts on a tile.
Also: CropHarvest({unqualified seed/crop item ID or name})
A trigger for when a crop, flower, or forage-crop has been harvested. For example, parsnip seeds would be CropHarvest(472) and parsnip would be CropHarvest(24).
Also: CropPlanted({unqualified seed/crop item ID or name})
A trigger for when a crop, flower, or forage-crop has been planted. For example, parsnip seeds would be CropPlanted(472) and parsnip would be CropPlanted(24).
A trigger for when the player enters a location.
A trigger for when the tile is within the blast radius of an explosion.
Usage: Item({qualified item ID or name}-{optional quality requirement})
A trigger for when the player is holding a specified item when they interact with the tile.
Example: "DMT/changeIndex_Item((O)276-3)" or "DMT/sound_Item((O)74)"
Possible quality values: 0 (normal), 1 (silver), 2 (gold), 3 (iridium). The quality option can also have an optional plus ('+') or minus ('-') modifier to make the quality accept higher and lower qualities respectfully on top of the requested value.
A trigger without a condition (exclusive to EditData, and the player must enter another map to initiate the trigger.)
Also: MonsterSlain({target monster's internal name})
A trigger for when the player slays a monster.
Example: "DMT/explosion_MonsterSlain" or "DMT/explosion_MonsterSlain(Ghost)"
The name must match the unique internal name of the monster to avoid conflicts. Possible monster class names in the vanilla code: Bat, BigSlime, BlueSquid, Bug, DinoMonster, Duggy, DustSpirit, DwarvishSentry, Fly, Ghost, GreenSlime, Grub, HotHead, LavaLurk, Leaper, MetalHead, Mummy, RockCrab, RockGolem, Serpent, ShadowBrute, ShadowGirl, ShadowGuy, ShadowShaman, Shooter, Skeleton, Spiker, and SquidKid.
Also: ObjectClicked({qualified item ID or name})
A trigger for when a specified item (e.g., big craftable) has finished producing an item, and the produced item is collected.
Also: ObjectPlaced({qualified item ID or name})
A trigger for when a specified item (e.g., big craftable, furniture) is placed.
Also: ObjectRemoved({qualified item ID or name})
A trigger for when a specified item that can be removed (e.g., big craftable, object, debris, etc.) using a tool (e.g., pickaxe) is removed. (Items such as furniture cannot be removed using a tool.)
A trigger for when the player steps on a tile.
A trigger for when the player steps off a tile.
A trigger for when a tile is pushed.
A trigger for when a tile is done being pushed.
Also: Talk({target NPC's internal name})
A trigger for when the player talks to an NPC.
Example: "DMT/animate_Talk" or "DMT/animate_Talk(Demetrius)"
The name must match the unique internal name of the NPC to avoid conflicts.
Usage: Tool({tool type name})
A trigger for when a certain tool is used on a tile
Example: "DMT/changeIndex_Tool(WateringCan)"
Possible tool class names in the vanilla code: Axe, FishingRod, GenericTool (trash can), Hoe, MeleeWeapon, MilkPail, Pan, Pickaxe, Shears, Slingshot, Wand, WateringCan.