Age of Wonders II Heaven Julia with Gameplay background

Scenario Design
    Scripting Manual

SHADOW MAGIC SCRIPTING
Conditions Manual

by Talon-Thorn

List of Conditions

* New event       ** Old event no longer available (but see notes)

 
All Allied
DESCRIPTION: Condition based on the diplomatic relations of a player.
EFFECTIVE: When specified player is allied with all other players still in the game.

 

SETTINGS:

 

 

PlayerA

 

 

 

Any one player in the game.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One player, trigger player

 

NOTES:

 

- This condition has not been fully tested.

 

Return to the Top

Area Visible

DESCRIPTION: Condition based on the "explored" status of an area.
EFFECTIVE: The first time (only) any part of the specified area is explored (viewed, removing the black map covering). This condition is true even if the area is completely covered by fog-of-war. This condition can never be reset (see notes).

 

SETTINGS:

 

 

Players

 

 

 

List of players to which the condition applies.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player, independents

 

 

XYL

 

 

 

A location on the map.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Valid (X, Y, Level) coordinates

 

 

Radius

 

 

 

Radius distance in hexagons around the target location (where zero is the target hexagon only).

 

 

 

 

Required : No (default zero, or target hexagon only)

 

 

 

 

Valid Values : Positive number

 

NOTES:

 

-

If trail of darkness is fixed, it may allow resetting of this condition. Currently trail of darkness (which obscures map areas with the "unexplored" black cover) does not seem to work. (Has not been tested for patch 1.2+)

 

-

Usefulness of specifying "independents" is questionable.

 

Return to the Top

Counter
DESCRIPTION: Counter value condition.
EFFECTIVE: When counter value is within range.

 

SETTINGS:

 

 

DayMin

 

 

 

User-defined value for identifying counter.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Positive number

 

 

CounterMin

 

 

 

Min value for counter-range

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Positive number

 

 

CounterMax

 

 

 

Max value for counter-range

 

 

 

 

Required : No

 

 

 

 

Valid Values : Number

 

NOTES:

 

-

This condition has not been fully tested.

 

Return to the Top

Day
DESCRIPTION: Day-range condition.
EFFECTIVE: On the specified day or during a day-range (see notes).

 

SETTINGS:

 

 

DayMin

 

 

 

First day of day-range

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Positive number

 

 

DayMax

 

 

 

Last day of day-range

 

 

 

 

Required : No

 

 

 

 

Valid Values : Number

 

NOTES:

 

- If DayMax is less than DayMin, the condition will only be true on DayMin.

 

Return to the Top

Diplomatic Relation
DESCRIPTION: Condition based on the diplomatic relations between two players.
EFFECTIVE: Every time the diplomatic relation between the two specified players matches any of the Relation settings.

 

SETTINGS:

 

 

PlayerA

 

 

 

One of the two players in the diplomatic relation.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One player, trigger player

 

 

PlayerB

 

 

 

One of the two players in the diplomatic relation.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One player, trigger player

 

 

Relations

 

 

 

The current diplomatic relation between the two players.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Pre-defined diplomatic relations. Choose one or more from: drPeace, drWar, drAlliance, drUnknown.

 

NOTES:

 

- PlayerA and PlayerB can not both be set to "trigger player."

 

Return to the Top

Flagged
DESCRIPTION: Condition based on the true/false status of an internal flag.
EFFECTIVE: Every time the flag represented by FlagID is "True," but see notes.

 

SETTINGS:

 

 

FlagID

 

 

 

User-defined value for identifying flag variable.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : positive number

 

NOTES:

 

- Do not confuse this event with flags on structures and cities. This is purely a programming tool for keeping track of things.
- See "Control flag" event for more information.
- See article,   How Shadow Magic v1.2+ Flags Work with Triggers.

Return to the Top

Game Over
DESCRIPTION: Condition based on game being over for one player.
EFFECTIVE: On turn when game is over for the player.

 

SETTINGS:

 

 

Player

 

 

 

Any one player in the game.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One player

 

NOTES:

 

-

This condition has not been fully tested.

Return to the Top

Gold
DESCRIPTION: Condition based on the amount of gold that one or more players currently have.
EFFECTIVE: Every time any player listed has the specified amount of gold.

 

SETTINGS:

 

 

Players

 

 

 

List of players which must have this condition.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player, independents

 

 

GoldMin

 

 

 

Minimum amount of gold for condition to be true.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Number

 

 

GoldMax

 

 

 

Maximum amount of gold for condition to be true.

 

 

 

 

Required : No (see notes)

 

 

 

 

Valid Values : Number

 

NOTES:

 

-

If GoldMax is less than GoldMin, then each player must have exactly GoldMin.

 

-

Usefulness of specifying "independents" is questionable.

 

Return to the Top

Item In Area
DESCRIPTION: Condition based on a specific item being in a specific area.
EFFECTIVE: Every time the item is in the specified area.

 

SETTINGS:

 

 

XYL

 

 

 

A location on the map.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Valid (X, Y, Level) coordinates

 

 

Radius

 

 

 

Radius distance in hexagons around the target location (where zero is the target hexagon only).

 

 

 

 

Required : No (default zero, or target hexagon only)

 

 

 

 

Valid Values : Positive number

 

 

ItemID

 

 

 

ID number of an item.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any item in the items list

 

Return to the Top

Item Owned
DESCRIPTION: Condition based on a specific item being "owned" by a player.
EFFECTIVE: Every time the item is currently being held by a hero or wizard of any one of the specified players.

 

SETTINGS:

 

 

Players

 

 

 

List of players which can have heroes or wizard holding the item.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player, independents

 

 

ItemID

 

 

 

ID number of an item.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any item in the items list

 

NOTES:

 

-

Usefulness of specifying "independents" has not been tested.

 

Return to the Top

Mana
DESCRIPTION: Condition based on the amount of mana that one or more players currently have.
EFFECTIVE: Every time any player listed has the specified amount of mana.

 

SETTINGS:

 

 

Players

 

 

 

List of players which must have this condition.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player, independents

 

 

ManaMin

 

 

 

Minimum amount of mana for condition to be true.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Number

 

 

ManaMax

 

 

 

Maximum amount of mana for condition to be true.

 

 

 

 

Required : No (see notes)

 

 

 

 

Valid Values : Number

 

NOTES:

 

-

If ManaMax is less than ManaMin, then each player must have exactly ManaMin.

 

-

Usefulness of specifying "independents" is questionable.

 

Return to the Top

Player Type
DESCRIPTION: Condition based on the type of player controlling the wizard.
EFFECTIVE: When player type controlling the wizard is in the selection set.

 

SETTINGS:

 

 

Player

 

 

 

One of the players in the game.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One player, trigger player

 

 

PlayerTypes

 

 

 

The player types allowed.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Pre-defined diplomatic relations. Choose one or more from: eptHuman, eptPeasant, eptWarrior, eptKnight, eptLord, eptKing, eptEmperor.

 

Return to the Top

Random
DESCRIPTION: A random roll against a percent chance.
EFFECTIVE: Every time the random roll is equal to or less than the value in Percentage.

 

SETTINGS:

 

 

Percentage

 

 

 

Value representing the percent chance of the condition being true.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Number between (and including) 0 and 100.

 

Return to the Top

Structure Flagged
DESCRIPTION: Condition based on a specific structure having a player's flag.
EFFECTIVE: Every time the structure is currently flagged by any one of the specified players.

 

SETTINGS:

 

 

Players

 

 

 

List of players which can flag the structure for the condition to be true.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player, independents

 

 

StructureID

 

 

 

ID number of the structure.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any city, tower, node, or resource site on the map

 

Return to the Top

Structure Owned
DESCRIPTION: This is a AoW2:WT event. It is converted to a "Structure Flagged" event when loaded into AoW:SM.
NOTES:

 

-

See Structure Flagged event for AoW:SM application.

 

-

See AoW2:WT reference for original event details.

 

-

AoW:SM converts this condition directly into the Structure Flagged event, which is identical in structure.

 

Return to the Top

Structure Razed
DESCRIPTION: Condition based on a specific structure being in a destroyed state.
EFFECTIVE: Every time the structure is currently destroyed (in a "razed" state).

 

SETTINGS:

 

 

StructureID

 

 

 

ID number of the structure.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any city, tower, node, or resource site on the map

 

Return to the Top

Unit In Area
DESCRIPTION: Condition based on a specific unit being in a specific area.
EFFECTIVE: Every time the unit (or hero) is currently in the specified area.

 

SETTINGS:

 

 

XYL

 

 

 

A location on the map.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : Valid (X, Y, Level) coordinates

 

 

Radius

 

 

 

Radius distance in hexagons around the target location (where zero is the target hexagon only).

 

 

 

 

Required : No (default zero, or target hexagon only)

 

 

 

 

Valid Values : Positive number

 

 

UnitID

 

 

 

ID number of a unit.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any unit placed on the map or of a hero defined in the heroes list.

 

NOTES:

 

- Unfortunately, there is no way to determine the ID of a unit unless it is placed on the map. Spawned units can not be IDed.

 

- A hero can be specified even if it has not been placed on the map. The hero is not considered dead until after it has been killed (imagine that), and is not considered dead just because it has not spawned or been placed on the map.

 

-

In perhaps what is a related feature, when a wizard unit is killed it is not absent from the world if it has at least one wizard tower; thus, it isn't possible to "detect" the absence of a killed wizard by use of this condition.

 

Return to the Top

Unit Killed
DESCRIPTION: Condition based on a specific unit being dead.
EFFECTIVE: Every time after the specified unit is killed.

 

SETTINGS:

 

 

UnitID

 

 

 

ID number of a unit.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : ID of any unit placed on the map or of a hero defined in the heroes list.

 

NOTES:

 

- Unfortunately, there is no way to determine the ID of a unit unless it is placed on the map. Spawned units can not be IDed.

 

- A hero can be specified even if it has not been placed on the map. The hero is not considered dead until after it has been killed (imagine that), and is not considered "dead" just because it has not spawned or been placed on the map.

 

-

In perhaps what is a related feature, a wizard unit is not considered to be "killed" if it has a wizard tower to respawn at after death. Thus, this condition does not work for detecting the killing of a wizard unit unless the player owns no cities with wizard towers. Furthermore, when the wizard is killed he is not absent from the world if he has at least one wizard tower; thus, it isn't possible to "detect" the killing of a wizard by use of the "unit in area" condition.

 

Return to the Top

Unit Visible
DESCRIPTION: Condition based on a specific unit being visible to the specified players.
EFFECTIVE: Every time the structure is currently flagged by any one of the specified players.

 

SETTINGS:

 

 

Players

 

 

 

List of players to check for seeing the unit.

 

 

 

 

Required : Yes

 

 

 

 

Valid Values : One or more players, trigger player

 

 

UnitID

 

 

 

ID number of a unit

 

 

 

 

Required : Yes

 

 

 

 

Valid Val