Age of Empires II (2013) Guide

SpoOky's Guide to Triggers for Age of Empires II (2013)

SpoOky’s Guide to Triggers

Overview

This guide will try to fully explain how triggers work, how to make one, and explain their usefulness.(New Guide for DE found Here.)https://steamcommunity.com/sharedfiles/filedetails/?id=1913776309

Map Editor – Triggers Menu

Before you attempt anything with triggers, let’s start with the very basics. You need to know where it’s at. If you have not already, create/open a scenario, and click the tab marked “Triggers”. (Blue Box.) By default, it will be in a list of buttons at the top left. It will be the last one on the bottom right. Refer to the image above if you get lost.

Map Editor – Triggers Menu – Overview

Here, I created a few default triggers. One with a few effects/condition. You will also notice the dropdown box as well on the UI. What are these different things? Let me explain.

  • Orange Box/Scenario Triggers: This is where all your triggers goes. You can create, delete, or view them as well.
  • Yellow Box/Conditions & Effects: This is what is inside that trigger. You can add/remove Conditions/Effects as well. More on this later.
  • Green Box/UI Area: This is where Triggers/Conditions/Effects gets edited. More on this later.

For example, if I click on Trigger 3, (Dark Blue Box.) click on Effect 4, (Dark Purple Box) I will get a new area to edit. (Light Blue Box) Remember it like this:

Scenario Triggers is/are a box/container. (An Array/Table/Etc. for Programmers.) Within that box/container are “Conditions & Effects” boxes/containers. (More Arrays/Tables/Etc.) If you need a visual tree structure to explain, here is one.

  • Scenario Triggers
    • Trigger 1
      • Condition 1
      • Effect 1

    • Trigger 2
      • Condition 1
      • Condition 2
      • Effect 1
      • Effect 2

    • Trigger 3
      • Effect 1
      • Effect 2
      • Effect 3

————————————————————————————————————————–

Now if you look at the bottom UI area, I put a box around 3 areas with Trigger 0. Here is some info about these areas:

  • Red Box: Trigger Name, String TableID, and Description Order. I will explain them below:
    • Trigger Name: Rename the trigger whatever you like. Name it something meaningful to help you remember what it does.
    • String TableID: You generally want to leave this alone. This has to do with language translations.
    • Description Order: This refers to the Objectives text order. Lower/Higher will order the goals/objectives differently. Useful for scenarios.

  • Orange Box: A great place to fully explain what this trigger does. Not required but, helpful.
    Update: This is also how objectives are made. Describe your goal/objective and use it with: “Display as Objective”. Which is mentioned below in the Yellow Box.

  • Yellow Box: This controls how the trigger works. I will explain each one below:
    • Display as Objective: Sets if this trigger will be displayed as a game objective.
    • Trigger Starting State: Sets Trigger enabled or disabled.
    • Trigger Looping: Sets Trigger Looping or Only Once.

As for Conditions & Effects, they are all different. I will explain this in a different section.

————————————————————————————————————————–

Important Note: If you reorder triggers, conditions, or effects, (Green/Blue Boxes) they will NOT function in that order. It always defaults to number order/creation order. Keep this in mind when creating triggers.

Map Editor – Triggers Menu – Conditions/Effects


Now comes the complex part of Triggers. Conditions and Effects. (Red Boxes.) I will try to explain everything I can here. Let’s start with Conditions:

  • Conditions
    • None: Pretty much null/No Condition. Not useful unless changing/resetting Condition.
    • Bring Object to Area: If you bring a specific object to a/an area, the condition passes.
    • Bring Object to Object: If you bring a specific object to another object, the condition passes.
    • Own Objects: If you/someone else owns X object(s), the condition passes.
    • Own Fewer Objects: If you/someone else owns less than X object(s), the condition passes.
    • Objects in Area: If you/someone else owns X object(s) within a/an area, the condition passes.
    • Destroy Object: If you destroy a specific object, the condition passes.
    • Capture Object: If you capture a gaia object, the condition passes.
    • Accumulate Attribute: If Attribute is X, the condition passes.
    • Research Technology: If you research a specific technology, the condition passes.
    • Timer: If the timer is triggered, the condition passes.
    • Object Selected: If you select a specific object, the condition passes.
    • AI Signal: If a custom AI Signal is triggered, the condition passes.
    • Player Defeated: If a specific player is defeated, the condition passes.
    • Object Has Target: If a specific object has targeted another specific object, the condition passes.
    • Object Visible: If a specific object is visible, the condition passes.
    • Object Not Visible: If a specific object is not visible, the condition passes.
    • Researching Tech: If a specific tech by a specific player is being researched, the condition passes.
    • Units Garrisoned: If a specific object has X garrisoned inside it, the condition passes.
    • Difficulty Level: If a specific difficulty level is set, the condition passes.
    • Chance: If the random chance is triggered, the condition passes.

  • Effects
    • None: Pretty much null/No Effect. Not useful unless changing/resetting Effect.
    • Change Diplomacy: Change a specific players diplomacy to another specific player.
    • Research Technology: Researches a specific technology for free/instantly for a specific player.
    • Send Chat: Send a message to a specific player. (Optional sound file as well.)
    • Play Sound: Send a sound file to a specific player.
    • Tribute: Send X resources from a specific player to a specific player.
    • Unlock Gate: Unlocks a specific Gate.
    • Lock Gate: Locks a specific Gate.
    • Activate Trigger: Enable a specific trigger.
    • Deactivate Trigger: Disable a specific trigger.
    • AI Script Goal: Sets a specific AI Goal.
    • Create Object: Create a specific object, at a specific location, for a specific player.
    • Task Object: Task (a) specific object(s), at a specific location, to a specific location.
    • Declare Victory: A specific player wins. (Also checks Ally Victory.)
    • Kill Object: Kills a specific object, in a specific area, for a specific player.
    • Remove Object: Removes a specific object, in a specific area, for a specific player.
    • Change View: Change the view of a specific player.
    • Unload: Unloads a specific object, in a specific area, to a specific location, for a specific player.
    • Change Ownership: Changes a player-specific object, in a specific area, to another player.
    • Patrol: Patrols a specific object, in a specific area, to a specific location, with a specific player.
    • Display Instructions: Displays a message at the top left of the map for a specific time. (Optional Sound file as well.)
    • Clear Instructions: Removes a specific instructions on the top left of map.
    • Freeze Unit: Freezes a specific unit, in a specific area, for a specific player.
    • Use Advanced Buttons: Uhh… Enable/Disable Advanced Buttons Menu? Not sure…
    • Damage Object: Damages a specific object, in a specific area, for a specific player.
    • Place Foundation: Place/Train a specific Building Foundation/Unit.
    • Change Object Name: Changes a specific objects name in a specific area, for a specific player.
    • Change Object HP: Changes a specific objects hitpoints in a specific area, for a specific player.
    • Change Object Attack: Changes a specific objects attack in a specific area, for a specific player.
    • Stop Unit: Stop a specific unit in a specific area, for a specific player.
    • Attack Move: Move/Attack a specific unit in a specific area, to a specific location, for a specific player.
    • Change Unit Armor: Change a specific units armor in a specific area, to a specific player.
    • Change Unit Range: Change a specific units range in a specific area, to a specific player.
    • Change Unit Speed: Change a specific units speed in a specific area, to a specific player.
    • Heal: Heals a specific units in a specific area, to a specific player.
    • Teleport Object: Teleports a specific units in a specific area, to a specific location, of a specific player.
    • Change Unit Stance: Changes a specific units Stance in a specific location, of a specific player.

————————————————————————————————————————–

Note: It is important to note that some of these arguments/conditions/options are optional. Such as Set Object, Set Area, Etc. If a trigger/condition/effect is green, it’s allowed. If it’s red, you are missing something required.

Note: Another important note is for Conditions. The game assumes “and”. Meaning that all conditions are added to the condition to be true/false. Example:

  • Condition 1: True
  • Condition 2: True
  • Condition 3: True
  • All Conditions passed. Run effects.

  • Condition 1: True
  • Condition 2: False
  • Condition 3: True
  • Not all conditions passed. Don’t run Effects..

Note: Looping triggers are useful if you want to repeat something over and over again. Adding conditions helps preventing it from doing something repeatedly though. I recommend adding at least one condition. Although, not required.

Note: Some conditions have a “Inverse Condition”. These are for the opposite condition. (‘Not’ for programmers.) Basically, true becomes false and false becomes true.

————————————————————————————————————————–

Here is a example trigger from my Jurassic Park Scenario:

  • Objective: No
  • State: Off
  • Looping: Yes

  • C0: Timer
  • C1: Own Fewer Objects
  • E0: Remove Object
  • E1: Create Object
  • E2: Change Object HP
  • E3: Change Object Attack
  • E4: Change Object Name

I activate this trigger later on in the scenario based on timers. This trigger spawns units. It first removes any units in it’s way, creates the new unit, and applies some stat changes. Note: I task my objects in a seperate trigger. It’s a good idea if you want a looping trigger like this.

SteamSolo.com