★ wanayoo — archive 1999 http://runesword.com/triggers.htmlNouvelle recherche | Portail wanayoo


Latest News
What is RuneSword?
Screen Shots
Message Board
Download
Known Bugs
News Archives
Links


Rune World


Creatures & Items
Themes & Encounters
Maps & TileSets
General Triggers
Sound FX & Music
Pictures
Tips and Techniques



CrossCut Games Logo

Great games
against the grain


Question & Answer
FAQ
About Spells
About Triggers
About Statements

Overview

One of the differences between RuneSword and previous attempts at RPG construction sets is the object-oriented, click and go nature of RS. Pull something out of the library, plug it into your tome, and away you go. You can alter the object a little to make it unique.

So why is there a language reference? In a word, power. With a few lines of code, you can do most anything.

Triggers are snippets of code that control much of RuneSword’s behavior. If we didn’t allow access to the underlying script, you wouldn’t be able to create anything you wanted to. This is a power creator document.

This document is a language reference for the script. As characters travel around your world, fighting, searching, picking up stuff, talking, etc., they’re triggering RuneSword events. Every trigger is attached to an event.

For example, when you attack a monster with a sword, a bunch of events occur: Pre-roll-to-hit, post-roll-to-hit, pre-attacked, and others. A normal sword wouldn’t need any triggers at all, so nothing special would happen as all these events occur. But what if you wanted a sword of Goblin Slaying that stunned any goblin that it successfully damaged, but was a normal sword in other respects? You would attach a post-damage trigger to the sword, and in that trigger, you check to see if the damaged target is a goblin, and if so, you’d stun it for 1-4 turns.

If you read this document and the RuneSword Events Reference document, and you follow the golden rule (when in doubt, rip off other people’s creations and modify them), you’ll become a RuneSword Master Creator quickly. Play the game and look at the stuff first, then reference these documents when you don’t understand something.

Map Triggers

Name: Post-EnterEncounter
Applies To: EncounterNow (Just after the Party steps into an Encounter.)
Typical Use: Fire up some descriptions or events. Typically, these Triggers have just one charge so the first time a Party steps in, they get a lengthly intro.

Name: Pre-Search
Applies To: EncounterNow, Encounter.Creatures, Tome.Creatures, Tome
Fires: Just before you see the list of Items in the Encounter. If you set Local.Fail = True, the dialog will *not* appear at all (it stops the search).
Typical Use: Checking things to see if the PC is allowed to search or alert Creatures that a search is happening so they can do something.

Name: Post-Search
Applies To: EncounterNow (need to Add Encounter.Creatures, Tome.Creatures, Tome)
Fires: Just after you select Cancel or *after* a Search for Traps completes.
Typical Use: Maybe alter a Giant that you've been rustling through his stuff.

Name: Pre-Take
Applies To: EncounterNow, Encounter.Items
Fires: When you drag an Item to a Creature in the Party, this fires before he/she gets the Item. If you set Local.Fail = True, you can't take the Item.
Typical Use: Stop a character from taking an Item ("The gold is in a vat of acid. You can't take it.").

Name: Post-Take
Applies To: EncounterNow, Encounter.Items
Fires: Just after you take an Item.
Typical Use: Have an Item change or do something just after you pick it up. ("Roll me a d20....")

Name: On-Ignore
Applies To: EncounterNow
Fires: When click Ignore in the Encounter dialog box.
Typical Use: Set up some situations in the Encounter if they ignored what they saw.

Name: On-Listen
Applies To: EncounterNow
Fires: When you click Listen (this command only appears if you're standing next to a door).
Typical Use: Let's the Party hear something before they enter a room or unexpected place. Also a good way to pique interest in solving a puzzle ("You hear some moaning behind the iron door. But you can't open it without a key of some kind.")

Name: Post-StepEncounter
Applies To: EncounterNow
Fires: Just after the Party takes a step on an Encounter. For new Encounters (they first step into it), it fires just *before* Post-EnterEncounter above.
Typical Use: Only if you want to do several things inside a single Encounter. Poison gas in a hallway or such. Every step does something to the Party. Or for checking how close the Party is to that trap....

Inventory Triggers

Name: Pre-DropItem
Applies To: ItemNow
Fires: Just before you Drop an Item in Inventory or Trade the Item with another Party member. If you set Local.Fail = True, the Drop/Trade fails.
Typical Use: Cursed items that can't be gotten rid of.

Name: Post-DropItem
Applies To: ItemNow
Fires: Just after you Drop an Item in Inventory or Trade the Item with another Party member.
Typical Use: Make things explode or such. If you drop a piece of food in the rat room, they spill out of that crack in the wall....

Name: Pre-Examine
Applies To: ItemNow
Fires: Just before you examine an Item. Examine normally reports the Item's description (if checked) or "You notice nothing unusual about the [Item.Name].". If you set Local.Fail = True, then this default description does not appear.
Typical Use: The first time you look at the Item, something happens. Note: this also applies to Encounter Items. So if you examine the Giant's bed, you might find a key or something. But everytime after, "You notice nothing unusual."

Name: Post-Examine
Applies To: ItemNow
Fires: Just after you examine an Item. This fires after Pre-Examine and the default description.
Typical Use: Do something secret after the character examines an item. You noticed nothing unusal, but looking into that Mirror was not a good idea.

Name: Pre-Combine
Applies To: ItemNow, ItemTarget (both Items attempting to combine)
Fires: Just before two Items attempt to combine. If you set Local.Fail = True, the combine does not happen.
Typical Use: Determine if you have all the right stuff to make these two rods combine.

Name: On-Combine
Applies To: ItemNow, ItemTarget (both Items attempting to combine)
Fires: Instead of the default combine action (making 10 arrows plus 5 arrows = 15 arrows), this Trigger fires.
Typical Use: Creating a new Item out of two. Normally, this Trigger would be attached to one of the two Items that are combined. Then you'd do a CopyItem and destroy ItemNow and ItemTarget. Allows you to make two rods combine into a silver staff.

Name: Post-Combine
Applies To: ItemNow (the resulting Item).
Fires: Just after a default combine has happened ((making 10 arrows plus 5 arrows = 15 arrows). Note: This does *not* fire when an On-Combine was triggered. It only works on a successful default combine situation.
Typical Use: Another way to make something happen when you combine things. Combining poison arrows might make a newer, deadlier poison.

Nanme: Pre-Ready
Applies To: CreatureNow, ItemNow
Fires: Just before you equip ItemNow. If you set Local.Fail = True, the Item will not equip.
Typical Use: To stop an Item from being equipped ("You're not a Wizard, so you can't use this.")

Name: Post-Ready
Applies To: CreatureNow, ItemNow
Fires: Just after you sucessfully equip ItemNow.
Typical Use: Activate an effect for an Item ("After you put on the helm, it glows a bright blue.")

Name: Pre-UnReady
Applies To: CreatureNow, ItemNow
Fires: Just before you unequip ItemNow. Also fires if you drop/trade an equipped ItemNow. If you set Local.Fail = True, you cannot unequip the item.
Typical Use: Curses and the like. You can prevent an character from taking off a really bad piece of armor.

Name: Post-UnReady
Applies To: CreatureNow, ItemNow
Fires: Just after you sucessfully unequip ItemNow. Also fires if you drop/trade an equipped ItemNow.
Typical Use: Turn off an effect for an Item ("As you remove the helm, the blue light dims.")

Use Item Triggers

Name: Pre-UseOnCreature
Applies To: CreatureTarget
Fires: Just before the On-UseOnCreature fires. If you set Local.Fail = True, the On-UseOnCreature does not work.
Typical Use: Counter some type of Item effect. The evil Mage points his wand of death at you, but you're just to quick. Use this to interact with the item pointing at you.

Name: On-UseOnCreature
Applies To: ItemNow
Fires: When have ItemNow in hand and click Use. If an Item has this type of Trigger, it fires instead of On-UseOnItem, On-UseInEncounter and any default functionality.
Typical Use: Any magical effect item. Wands and the like.

Name: Post-UseOnCreature
Applies To: CreatureTarget
Fires: Just after On-UseOnCreature.
Typical Use: Very similar to Pre-UseOnCreature.

Name: Pre-UseOnItem
Applies To: ItemTarget
Fires: Just before the On-UseItem fires. If you set Local.Fail = True, the On-UseOnItem does not work.
Typical Use: Counter some type of On-UseOnItem effect. You can evaluate the ItemNow being used on an ItemTarget.

Name: On-UseOnItem
Applies To: ItemNow
Fires: Fires when have ItemNow in hand and click Use. Does not fire if ItemNow also has an On-UseOnCreature. Fires instead of On-UseInEncounter and any default functionality.
Typical Use: Any magical effect item. Like enchanting another item by using this item.

Name: Post-UseOnItem
Applies To: ItemTarget
Fires: Just after On-UseOnItem.
Typical Use: Very similar to Pre-UseOnItem, but fires after the ItemNow has performed it's On-UseOnItem.

Name: Pre-UseInEncounter
Applies To: EncounterNow
Fires: Just before On-UseInEncounter. This fires even if the Item does not have an On-UseInEncounter trigger. So you could have a "normal" (triggerless) item and the Encounter does all the checking and the like. In such a case, it prevents any other default functionality of the item.
Typical Use: Before you use an Item in this room, you can do something else.

Name: On-UseInEncounter
Applies To: ItemNow
Fires: Lacking a On-UseOnCreature and On-UseOnItem, this trigger fires when you put the item in hand and click use. It fires instead of any default functionality.
Typical Use: Magic items and the like. Evaluate/Change the Encounter and stuff in the Encounter.

Name: Post-UseInEncounter
Applies To: EncounterNow
Fires: Just after On-UseInEncounter.
Typical Use: After On-UseInEncounter fires, you can do something.

Combat Triggers

Name: Pre-Attacked
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just after targeted and CreatureNow is within range to unleash an attack on you, just before d20 is rolled to hit (but before Pre-RollToHit).
Typical Use: Evaluate incoming attack and change Global.HitRoll (will add/subtract from the roll). Note: Changing Global.DamageRoll here does nothing. To alter the damage, use a Pre-ApplyDamage Trigger.

Name: Pre-RollToHit
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just before roll dice to determine if hit or not.
Typical Use: Change Global.HitRoll to a number which will add/subtract from the die roll (appears as a little +/- number above the d20).

Name: Post-RollToHit
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just after roll dice to determine if hit or not and just before determine if sucessfully hit.
Typical Use: Change/Evaluate Global.HitRoll vs. CreatureTarget.ToHit. Note: If you change Global.HitRoll, it will NOT be displayed (the dice has already rolled) but WILL be used in determinging if you hit or not.

Name: Post-Attacked
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just after Post-RollToHit (before determined if actually hit or not).
Typical Use: This is the best place to change Global.HitRoll from an incoming attack. Even though the dice has already rolled and displayed, you can still fudge it behind the scenes and make the attack miss.

Name: Pre-RollArmorChit
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just before roll for armor chit location.
Typical Use: Change Global.ArmorRoll to 1 thru 8. Whatever you make it, that's where it will hit --- it overrides the upcoming roll.

Name: Post-RollArmorChit
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just after roll for armor chit location.
Typical Use: Change/Evaluate Global.ArmorRoll. This does change where you actually apply damage, but does NOT display that way (the armor chit has already been rolled).

Name: Pre-RollDamage
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just before roll dice to determine amount of damage. This happens just after Post-RollArmorChit but before the dice actually rolls.
Typical Use: Change Global.DamageRoll to a number which will add/subtract (set a "bonus") from the die roll (appears as a little +/- number above the last die rolled for damage).

Name: Post-RollDamage
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: Just after roll dice to determine amount of damage. This happens before adjust damage for Vulnerable/Invulnerable of Creature and before damage is applied.
Typical Use: Change/Evaluate Global.DamageRoll.

Name: Pre-ApplyDamage
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just before Global.DamageRoll is taken away from CreatureTarget.HPNow and after all bonuses have been added to Global.DamageRoll.
Typical Use: Change Global.DamageRoll.

Name: Post-ApplyDamage
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just after Global.DamageRoll is taken away from Target.HPNow
Typical Use: Can check Target.HPNow and adjust or set some retaliation stuff ("Hey! That hurt! Now I'm REALLY mad....")

Name: Pre-Death
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just after damage is applied and HPNow < 1 but before play death sound.
Typical Use: Make somebody run away because they're about to die or change Target's HP to some number rather than < 1 (keep them from dying).

Name: Post-Death
Applies To: CreatureTarget, CreatureTarget.Items (Ready)
Fires: Just after damage is applied, HPNow < 1 and death sound has been played.
Typical Use: Do something to the Creature just after it dies.

Name: On-Attack
Applies To: CreatureNow
Fires: On DM Controlled Creatures when their turn comes up in Combat. If more than one On-Attack is assigned to the Creature, a random one is chosen to fire.
Typical Use: Make Monster's attack the Party.

Name: Pre-CombatMove
Applies To: EncounterNow, CreatureNow, CreatureNow.Items (Ready)
Fires: Just after set CreatureTarget (moving toward), but before actually move CreatureNow. If you set Local.Fail = True, then CreatureTarget does not move. Note: this fires before any movement, not before each grid space.
Typical Use: Checking where a creature is, spells which make the creature stumble, dizzy. frozen or such.

Name: Post-CombatMove
Applies To: EncounterNow, CreatureNow, CreatureNow.Items (Ready)
Fires: Just after CreatureNow has sucessfully moved his full distance. Note: so this is not a grid space by grid space trigger.
Typical Use: Checking where CreatureNow is in the combat grid and doing something. Pit traps, switch plates, things like that.

Other Triggers

Name: Pre-Topic
Applies To: TopicNow
Fires: Just before Topic lists in the conversation dialog. If you set Local.Fail = True, then the Topic will not list out (and so can't be selected).
Typical Use: Checking the PC who is talking or the creature being talked to and decide if a reply should list.

Name: Post-Topic
Applies To: TopicNow
Fires: Just after you click a Topic.
Typical Use: Do something as a result of the PC choosing a reply (You ask the Wizard for the wand and he gives it to you.)

Name: On-Turn
Applies To: TriggerNow
Fires: A Skill Trigger is attached to Creatures only and is indicated by clicking the Skill check box on the Trigger style. When make the TriggerType On-Turn, the skill is only activated when you click it. When you click a Skill like this, it takes the Creature's turn.
Typical Use: For any Skill which needs to be activated in order to work.

Name: Post-TurnCycle
Applies To: Tome, Tome.Creatures (the Party), Tome.Creatures.Items (the Party's Ready Items), Encounter, Encounter.Creatures, Encounter.Creatures.Items (Ready)
Fires: Every turn cycle. This happens every combat cycle (everybody gets a turn, then these triggers fire), every 10 steps on the Map and when some Party member takes two turns (they use a Skill and then use the Skill again --- the TurnCycle happens). This is because Party members on the Map are not restricted to a sequential turn set, but can take them in any order.
Typical Use: A wide variety of effects which need to take place each turn such as restoring/taking away HP or any other "turn based" event.

Name: On-Cast
Applies To: CreatureNow, CreatureNow.Items (Ready)
Fires: When the Runes in the Rune statement match, the trigger fires. This is checked just after you click Invoke in the Sorcery dialog or fire the SorceryQueRunes statement. If there is no Rune statement in the trigger or the Runes listed in the Rune statement do not match, it will not fire.
Typical Use: Only used for spells. Note that you can have a focus item (such as a Staff or Hat) that contains the Spells instead of attaching them to the Creature.

Name: Polymorph
Applies To: All
Fires: When any attribute is read from the thing. Instead of the "real" value being read and evaluated, the Polymorph trigger can change the value. When you do a Put statement inside a Polymorph, it doesn't change the actual value, but instead changes a temporary value.
Typical Use: To change (usually temporarily) some attribute of a Creature or Item. For example, to make the Creature's hitpoints higher than they really are for a few turns. Or change the damage done by an Item for awhile.

Name: Post-EnterTome
Applies To: Tome
Fires: Just after begin a Tome --- not when you continue from a saved position. If Local.Fail = True then Party fails to enter the Tome.
Typical Use: To introduce the Tome or otherwise prep the Party for their adventure. Also used to prevent certain types of Characters from entering the Tome.

Name: Pre-ExitTome
Applies To: Tome, EncounterNow
Fires: Just before you Exit a Tome from an EntryPoint that returns the Party to the Main Menu. If Local.Fail = True then the Party fails to exit.
Typical Use: Removing Tome specific Items or other changes to a Party before they are released to enter other Tomes.

Name: None
Applies To: TriggerNow
Fires: Doesn't fire at all.
Typical Use: On sub-triggers (called with the ExeTrigger Statement). Basically, this is the default for a Trigger.


All Graphics & Text ©1998 CrossCut Games, Inc.