AOK:Effects
From GenieWiki
This article lists the trigger effects available in Age of Empires II, and provides a summary of how they function and what they can be used for. Effects added in The Conquerors Expansion are marked as such. If the sections become too long they should be made into a separate article, with a simpler version here. However, separate effect articles should not be created unless they are too big for this page. For further discussion please visit the talk page
Effects in Age of Kings
Change diplomacy
Changes the diplomatic stance of a Source Player towards a Target Player to Ally, Neutral or Enemy.
Ally: the source player's military units won't attack the target player.
Neutral: the source player's military units will attack any military units that belong to the target player if they enter their line of sight. Buildings and villagers are only attacked if the units are ordered to do so.
Enemy: the source player's military units will attack any of the target player's units/buildings that enters their line of sight.
Research technology
Researches the specified technology for the specified player. Note that a technology cannot be researched if the civilisation is not entitled to it unless 'Full Tech Tree' is turned on via the Options menu.
Send chat
Displays a text message about halfway down the left hand side of the screen. The player must be specified (only player 1 will enable the message to be seen), and a sound can be played. In addition, the message can appear in colour. For instructions on this, as well as reasons why this effect is generally considered inferior to Display Instructions see the latter.
Play sound
The play sound effect is used to add sound effects and other audio such as background music into a scenario. This effect is the most direct and straightforward way to place sounds in a scenario, and although it was used very little in the Ensemble Studios campaigns, it's main function is adding audio without having to use Display Instructions or Send Chat effects. These other effects can add sounds too, but they also have unique properties that deliver the sound differently.
The play sound effect plays a sound file for a specific player. To set this effect inside a trigger, first select the sound file that you want played from the drop-down menu labeled Sound File. Next, select the player position you want to hear the sound (e.g., Player 1). Player 1 is the default player position for single player scenarios. So, it's important that we set the player position correctly, and in all instances that we want a specific player position to hear the sounds. Timing is important when adding sound to a scenario too, and a Trigger that uses the Play Sound effect must be logically set in regard to it's Starting State, and Conditions.
Moreover, the play sound effect can be used for mixing, or to play sounds simultaneously while the Display Instructions, and Send Chat sounds are being played. This mixing of sounds or overdubbing can also be done with other Play Sound effects, making it the perfect choice for adding sounds in most circumstances.
Note: Some scenarios and campaigns have custom background music or soundtracks. In order to provide custom background music we have to inform the player to turn the standard game music off in our instructions, otherwise the two tracks will clash.
See also
- Sound Files FAQ
- Adding sounds to a scenario by Jerkers Widow (Tsuniversity)
Tribute
As it suggests this effect is used to tribute a resource from one player to another. The resource, quantity, donor (source) and recipient (target) players must be specified. Normally a message will appear on screen when a tribute is made, but this can be avoided by tributing to Gaia either a positive amount (to lose resources) or a negative amount (to gain resources).
Unlock gate
Unlocks a previously locked gate. It cannot unlock gates that were created by triggers.
There are workarounds, though, for those who want to lock and unlock gates, but make them look like they were created by triggers: The Invisibility Cloak (created by newIdea), or The Invisible Tile (created by Berserker Jerker). Both of these tricks make any unit invisible, and revealable when necessary.
Lock gate
Locks a gate that was previously unlocked. It cannot lock gates that were created by triggers.
There are workarounds, though, for those who want to lock and unlock gates, but make them look like they were created by triggers: The Invisibility Cloak (created by newIdea), or The Invisible Tile (created by Berserker Jerker). Both of these tricks make any unit invisible, and revealable when necessary.
Activate trigger
Turns on a trigger if its Starting State was originally set to Off. It also turns on triggers that were already fired and fulfilled, but that can be used again. Last but not least, it also turns on looping triggers and objectives, even if they were deactivated.
Deactivate trigger
Unlike most think when they have their first look at it, deactivate trigger doesn't undo a previously fired trigger.
Instead, it turns off triggers that were supposed to loop (fire whenever their condition (if any is set) is fulfilled). It also removes objectives (that were accomplished or not) from the Objectives List.
AI script goal
This effect provides a way of communicating between triggers and the AI. The player and a trigger number from 1 to 256 must be specified. For example, if the effect AI Trigger 1 is activated then a signal is sent to the AI. This would activate an AI rule with the parameter (condition) 'event-detected trigger 1' as a result of which the AI can be instructed to do something. It can be particularly useful if you want to make the enemy attack at a particular time or every so often or change the way the enemy attacks, all things which are easier to manipulate using AI than with triggers. See also AI Signal.
Create object
Automatically creates a unit, a building or object at a non-obstructed point. The designer must set the desired unit and the source player.
Task object
Tasks or moves a unit to a location. The player owning the unit, the unit (or type of unit) and location must be specified. Instead of selecting a unit, an area on the map can be specified which means any unit belonging to the player in that area will move to the location. After setting them, it's advisable to click on the 'Go to Objects/Area' and 'Go to Location' buttons to check they have been registered by the computer, otherwise the game is likely to crash. Task object can do a variety of other things: a villager tasked to a foundation will build the building, a villager tasked to a damaged building will repair it (resources permitting), and a villager tasked to a tree will chop it down (similarly for other resources).
Declare victory
Automatically declares one player victorious. It can also be used to make several players victorious at once, by setting several simultaneous effects, one for each player.
Some said that by declaring victory to GAIA ("player 0") all players would automatically lose. However, when victory is given to GAIA nothing happens.
Kill object
The kill object effect causes certain objects to be destroyed. Like a lot of other effects, an area of destruction can be layed out or the entire population of a certain unit wiped out.
However, there is a small bug involving the this effect: if you set a House or a Palisade/Stone/Fortified Wall to be "trigger-killed", its HP will be wiped out, but the building will remain, with no HP, and will collapse when under attack and/or targeted by a Player 1 unit.
The workaround: instead of killing houses and/or walls with the Kill Object effect, do so using Damage Object.
Remove object
Much like kill object but leaves no trace of the remains of the unit or building. Instead the removed object disappears entirely from the map.
Change view
This will centre the view on the specified location (specify player one). If the view is changed a long way from its original position then the game may crash so it's advisable to break the move up into several shorter moves. If the trigger is looped, the view will return to the set point whenever the player moves away.
Unload
Unloads garrisoned units from the specified unit (or unit type or units in area) at the specified location. A transport ship or ram will move to the location before unloading. For a building, the location should be set adjacent to the building.
Change ownership
Changes ownership of the specified unit (or unit type or units in area) from one player ('Source') to another ('Target'). If too many units (which includes buildings) are transferred at one time the game can crash so if this happens it's advisable to break it up into several different triggers or effects.
Patrol
Orders an unit (or group of units) to patrol a certain area. The unit walks back and forth from its intial location to a point chosen by the designer.
If the patrolling unit(s) finds an enemy, it will fight, and then restore its patrolling route if it survives the fight.
This effect can be used to make several computer units walk in formation. In order to have them stopped, you can either activate a looping Stop Unit effect (and deactivate it afterwards), or change their ownership to another player (preferably of the same color), and then change it back to the original player.
Display instructions
Display instructions is chiefly used to show text-based messages to players. Any text which is written in the map editor will appear at the top left corner of the screen in the font Georgia 11pt when the condition fires.
It is the preferred method of displaying dialogue and other message in the scenario design community due primarily to its greater character limit. In fact, using the Send Chat effect to display dialogue is considered crude and unprofessional. (See AoKH thread Random Tips to Improving Your Campaign/Scenario by zyxomma100.) Display Instructions's clearer and more prominent display of text also gives it an advantage over Send Chat. Another advantage for creating dialogue is that the effect can include a custom sound file as well, instead of having to use the Play Sound effect. One advantage of the Send Chat effect, however, is that new messages don't overwrite previous ones, as older messages are just bumped down the page.
The Conquerors Expansion adds to ability to color the text, which adds an extra dimension to the Display Instruction effect. All the scenarios of the Age of Empires II campaigns use the Display Instructions effect.
The effect is primarily used with the Timer condition to make a realistic conversation.
Properties
The message displayed can be altered in several ways:
- Timer: The length of time in which the message stays onscreen can be changed from the default 10 seconds to suit the nature of the message. e.g. objectives that are displayed for the whole game or brief interjections lasting only a few seconds.
- Number: Entering a number will change the "slot" the message sits in at the top left corner of the screen. The slots to choose from are 0 at the top, 1 in the middle, and 2 at the bottom.
- Sound File: the designer can create or use accompanying sound files for the message. Throughout the Age of Empires II campaigns every message has a narration. Ensemble Studios believed this would further draw the player into the game and enhance the interactive experience for their players.
- Colour: A colour code can be written at the beginnging of the message to change it from the normal white. E.g writing <BLUE> at the start of the message in the map editor will change the text to blue without displaying the actual code. Possible colors are BLUE, RED, GREEN, YELLOW, AQUA, PURPLE, GREY, and ORANGE.
See Display Instruction Techniques by Aro for more information.
Freeze unit
Unlike some might think given a first look, Freeze Unit does not halts an unit's movement temporarily. Instead, it puts the unit in "No Attack Stance", therefore it won't attack automatically, only when ordered by triggers. This effect does not affect villagers, monks or kings, only military "offensive" units that can actually be put on "No Attack Stance".
Castles and Towers can be prevented from firing by looping a trigger with no conditions and a Freeze effect.
In AoK there was actually no way to halt an unit temporarily. Along with the Conquerors Expansion came the Stop Unit effect, finally allowing designers to do so.
Use advanced buttons
This effect will turn on the use of the advanced buttons for the player, which allows for different unit stances (such as Defensive or Stand Ground) to be set, and turns on different viewing options for the minimap. This effect is the equivalent of pressing F8 when advanced commands are off, or clicking the appropriate button next to the minimap.
Effects added in The Conquerors
Damage object
Damages an unit/building. It can be healed/repaired afterwards. You can damage a group of units/buildings, provided that they belong to the same player.
You can also heal an unit by typing a negative amount into the box (to add a "-" sign, paste it by right-clicking the box and pressing paste). This is also useful to add "extra" HP. For example, an unit has 65 HP, and it isn't wounded. You damage it by "-7". Its HP will then be "72/65". It just gained 7 extra hitpoints, that cannot be recovered afterwards unless you repeat the trigger.
There is one problem with this "extra HP" trigger: if a friendly Monk (that belongs to you or an allied player) targets your unit, it will proceed to heal your unit, and will restore the unit's original HP by removing the extra points.
By using the Damage Object effect, you can also make an unit heal itself like a Hero.
Place foundation
Places a foundation for a building if the building's size fits the surroundings of the foundation's coordinate. For example: a Barracks is a 3x3 building, so it must be placed into a 3x3 (or bigger) area.
Not only the buildings that are buildable by villagers can have their foundations placed. You can also set it for buildings like Cathedrals, Yurts and even Mosques, Pavilions, The Accursed Tower... any building, regardless if its section in the editor is Buildings or Others.
If you place a foundation of an unit or hero, the unit will be created, just as in Create Object.
Change object name
The change object name Effect in Age of Kings, The Conquerors Expansion is relatively easy to set inside a Trigger. However the ability to change names is a wonderful tool for scenario design. A name can add resonance, meaning, implication, and even irony to a scenario's story or game plot. Also, naming (renaming) Unit's and Objects in a scenario adds depth, lends to the originality of a scenario, and greatly enhances the player's experience.
The Change Object Name effect changes the name of specific Objects or Units. To set this effect inside a trigger, first select the Unit's or Object's player position (e.g. Player 1, or Gaia) in the Units List (i.e., the player position that the unit belongs to), then add the text (name change). Next, press the Set Objects button, and select the Object or Unit that you want to change the name of.
To test, use cursor to move your view away from the Unit or Object and press the Go To Objects button. If the view shifts back to the Unit or Object then the effect is set. If all goes well the Effect and the Trigger will be highlighted green, but always test effects to ensure they are working properly in Test mode.
Also, we can rename multiple Units (up to 40) of a group of same Units, or a group of entirely different Units with one Change Object Name effect. To rename multiple Units with one effect, first select the Units' player position (e.g. Player 1, Player 2, etc.) in the Units List (i.e., select the player position that the units belong to), then add the text (name change). Next, press the Set Objects button, and using the cursor, drag a box (the white line selector box) around the units (rename up to 40 different or same units with one effect). Also, [for same Units only] hold down the ctrl key, and double click the Units (rename up to 40 same units with one effect). Now notice the green life bars over the Units as they should be highlighted, and selecting the Trigger and Effect should change them to highlighted green too. To test follow the instructions above.
Moreover, we can also add or group many Change Object Name effects inside one trigger for convenience, and to have many Objects or Units named (renamed) in a timely fashion or at an opportune moment (e.g., at the start of the game, or before the player can select them).
To learn more about the Change Object Name effect see the Tsuniversity article: Everything You Wanted To Know About The Change Object Name Effect
Change object HP
Adds a certain amount of HP to the unit's original one. It can also be used to subtract HP by pasting a "-" sign into the box (to paste, right-click it and press paste). If you add or subtract HP, the new value will be displayed.
You can change HP of several units at once, provided that they belong to the same player.
Note: do not attempt to subtract an amount of HP that is bigger than the original value unit because the unit will die.
Change object attack
Adds a certain amount of attack to the unit's original one. It can also be used to subtract attack by pasting a "-" sign into the box (to paste, right-click it and press paste). However, unlike Change Unit HP, even if an unit's attack is reduced, the display will show the original value. If you add attack, the display will show (original + added) instead of a single value.
You can change the attack of several units at once, provided that they belong to the same player.
Stop unit
Halts a unit, whether it's walking, attacking or gathering resources (if it is a Villager). You cannot prevent a King from automatically garrisoning in a building unless you loop this effect.
For more information see Stopping the King garrisoning by Berserker Jerker

