Populous AI Script Syntax List
by Alacn, with additions by CDplayer
Version date: 9 February 2006
Index
Commands:
There are two types of comments, line comments and block comments.
Line comments: any code followed by a double forward slash ( // ) until the end of line is ignored by the compiler.
Block comment: a block comment begins with /* and end with */, any code between them is ignored by the compiler. A block comment can span multiple lines. Blank lines are ignored.
Example:
some code // thats a line
comment
some code 2
/*
thats a block
comment
*/
some /* another block comment
*/ code 3
A code block begins with {, and ends with }.
The script must end with Script_End. Any code after it is ignored.
Example:
{
// some
code
}
SCRIPT_END
Variables can be used to store values that can be changed at a later time.
To use a variable just use the $ as prefix, it can be up to 32 chars length and can't contain space. The maximum number of user variables permitted is 64.
Example:
$thats_a_variable
Constant is a fixed number in the code.
Example:
1
2
50
300
73
Internal Variables are variables that contain information on the state of the game, such as how many followers a player has. Only Attribute Variables can be changed, using the SET command.
The number of game turns elapsed to date
INT_GAME_TURN
The number of followers for each player
INT_MY_NUM_PEOPLE
INT_BLUE_PEOPLE
INT_RED_PEOPLE
INT_YELLOW_PEOPLE
INT_GREEN_PEOPLE
The number of followers killed by Blue to date
INT_MY_NUM_KILLED_BY_HUMAN
INT_RED_KILLED_BY_HUMAN
INT_YELLOW_KILLED_BY_HUMAN
INT_GREEN_KILLED_BY_HUMAN
The number of wilds remaining on the map
INT_WILD_PEOPLE
The amount of mana held by each player
INT_BLUE_MANA
INT_RED_MANA
INT_YELLOW_MANA
INT_GREEN_MANA
INT_MY_MANA
The mana cost for one charge of each type of spell
INT_M_SPELL_BLAST_COST
INT_M_SPELL_LIGHTNING_COST
INT_M_SPELL_TORNADO_COST
INT_M_SPELL_SWARM_COST
INT_M_SPELL_INVISIBILITY_COST
INT_M_SPELL_HYPNOTISM_COST
INT_M_SPELL_FIRESTORM_COST
INT_M_SPELL_GHOST_ARMY_COST
INT_M_SPELL_EROSION_COST
INT_M_SPELL_SWAMP_COST
INT_M_SPELL_LAND_BRIDGE_COST
INT_M_SPELL_ANGEL_OF_DEATH_COST
INT_M_SPELL_EARTHQUAKE_COST
INT_M_SPELL_FLATTEN_COST
INT_M_SPELL_VOLCANO_COST
INT_M_SPELL_SHIELD_COST
Number of complete buildings of each type for current player
INT_M_BUILDING_SMALL_HUT
INT_M_BUILDING_MEDIUM_HUT
INT_M_BUILDING_LARGE_HUT
INT_M_BUILDING_DRUM_TOWER
INT_M_BUILDING_TEMPLE
INT_M_BUILDING_SPY_TRAIN
INT_M_BUILDING_WARRIOR_TRAIN
INT_M_BUILDING_FIREWARRIOR_TRAIN
INT_M_BUILDING_BOAT_HUT
INT_M_BUILDING_AIRSHIP_HUT
INT_M_BUILDING_BOAT_HUT
INT_M_BUILDING_AIRSHIP_HUT
Number of complete buildings of each type for Blue
INT_B_BUILDING_SMALL_HUT
INT_B_BUILDING_MEDIUM_HUT
INT_B_BUILDING_LARGE_HUT
INT_B_BUILDING_DRUM_TOWER
INT_B_BUILDING_TEMPLE
INT_B_BUILDING_SPY_TRAIN
INT_B_BUILDING_WARRIOR_TRAIN
INT_B_BUILDING_FIREWARRIOR_TRAIN
INT_B_BUILDING_BOAT_HUT
INT_B_BUILDING_AIRSHIP_HUT
Number of complete buildings of each type for Red
INT_R_BUILDING_SMALL_HUT
INT_R_BUILDING_MEDIUM_HUT
INT_R_BUILDING_LARGE_HUT
INT_R_BUILDING_DRUM_TOWER
INT_R_BUILDING_TEMPLE
INT_R_BUILDING_SPY_TRAIN
INT_R_BUILDING_WARRIOR_TRAIN
INT_R_BUILDING_FIREWARRIOR_TRAIN
INT_R_BUILDING_BOAT_HUT
INT_R_BUILDING_AIRSHIP_HUT
Number of complete buildings of each type for Yellow
INT_Y_BUILDING_SMALL_HUT
INT_Y_BUILDING_MEDIUM_HUT
INT_Y_BUILDING_LARGE_HUT
INT_Y_BUILDING_DRUM_TOWER
INT_Y_BUILDING_TEMPLE
INT_Y_BUILDING_SPY_TRAIN
INT_Y_BUILDING_WARRIOR_TRAIN
INT_Y_BUILDING_FIREWARRIOR_TRAIN
INT_Y_BUILDING_BOAT_HUT
INT_Y_BUILDING_AIRSHIP_HUT
Number of complete buildings of each type for Green
INT_G_BUILDING_SMALL_HUT
INT_G_BUILDING_MEDIUM_HUT
INT_G_BUILDING_LARGE_HUT
INT_G_BUILDING_DRUM_TOWER
INT_G_BUILDING_TEMPLE
INT_G_BUILDING_SPY_TRAIN
INT_G_BUILDING_WARRIOR_TRAIN
INT_G_BUILDING_FIREWARRIOR_TRAIN
INT_G_BUILDING_BOAT_HUT
INT_G_BUILDING_AIRSHIP_HUT
Number of each type of follower for current player
INT_M_PERSON_BRAVE
INT_M_PERSON_WARRIOR
INT_M_PERSON_RELIGIOUS
INT_M_PERSON_SPY
INT_M_PERSON_FIREWARRIOR
INT_M_PERSON_SHAMAN
Number of each type of follower for Blue
INT_B_PERSON_BRAVE
INT_B_PERSON_WARRIOR
INT_B_PERSON_RELIGIOUS
INT_B_PERSON_SPY
INT_B_PERSON_FIREWARRIOR
INT_B_PERSON_SHAMAN
Number of each type of follower for Red
INT_R_PERSON_BRAVE
INT_R_PERSON_WARRIOR
INT_R_PERSON_RELIGIOUS
INT_R_PERSON_SPY
INT_R_PERSON_FIREWARRIOR
INT_R_PERSON_SHAMAN
Number of each type of follower for Yellow
INT_Y_PERSON_BRAVE
INT_Y_PERSON_WARRIOR
INT_Y_PERSON_RELIGIOUS
INT_Y_PERSON_SPY
INT_Y_PERSON_FIREWARRIOR
INT_Y_PERSON_SHAMAN
Number of each type of follower for Green
INT_G_PERSON_BRAVE
INT_G_PERSON_WARRIOR
INT_G_PERSON_RELIGIOUS
INT_G_PERSON_SPY
INT_G_PERSON_FIREWARRIOR
INT_G_PERSON_SHAMAN
Number of enemy followers killed by ai player
INT_BLUE_KILLED_BY_ME
INT_RED_KILLED_BY_ME
INT_YELLOW_KILLED_BY_ME
INT_GREEN_KILLED_BY_ME
Number of ai followers killed
INT_MY_NUM_KILLED_BY_BLUE
INT_MY_NUM_KILLED_BY_RED
INT_MY_NUM_KILLED_BY_YELLOW
INT_MY_NUM_KILLED_BY_GREEN
Spell identifiers
INT_BLAST
INT_LIGHTNING
INT_TORNADO
INT_SWARM
INT_INVISIBILITY
INT_HYPNOTISM
INT_FIRESTORM
INT_GHOST_ARMY
INT_EROSION
INT_SWAMP
INT_LAND_BRIDGE
INT_ANGEL_OF_DEATH
INT_EARTHQUAKE
INT_FLATTEN
INT_VOLCANO
INT_WRATH_OF_GOD (Armageddon)
INT_SHIELD
INT_CONVERT
INT_TELEPORT
INT_BLOODLUST
Follower type identifiers
INT_BRAVE
INT_WARRIOR
INT_RELIGIOUS
INT_SPY
INT_FIREWARRIOR
INT_SHAMAN
Building type identifiers
INT_SMALL_HUT
INT_MEDIUM_HUT
INT_LARGE_HUT
INT_DRUM_TOWER
INT_TEMPLE
INT_SPY_TRAIN
INT_WARRIOR_TRAIN
INT_FIREWARRIOR_TRAIN
INT_BOAT_HUT
INT_AIRSHIP_HUT
Generic identifiers
INT_NO_SPECIFIC_PERSON
INT_NO_SPECIFIC_BUILDING
INT_NO_SPECIFIC_SPELL
Shaman specified as target
INT_TARGET_SHAMAN
Vehicle identifiers
INT_M_VEHICLE_BOAT
INT_M_VEHICLE_AIRSHIP
INT_B_VEHICLE_BOAT
INT_B_VEHICLE_AIRSHIP
INT_R_VEHICLE_BOAT
INT_R_VEHICLE_AIRSHIP
INT_Y_VEHICLE_BOAT
INT_Y_VEHICLE_AIRSHIP
INT_G_VEHICLE_BOAT
INT_G_VEHICLE_AIRSHIP
???
INT_CP_FREE_ENTRIES
Random number between 0 - 99
INT_RANDOM_100
Number of followers defending the ai shaman
INT_NUM_SHAMEN_DEFENDERS
Current camera position and orientaion
INT_CAMERA_ANGLE
INT_CAMERA_X
INT_CAMERA_Z
These may be given numerical values using the SET command.
INT_ATTR_ATTACK_PERCENTAGE | 0-255 |
INT_ATTR_AWAY_BRAVE | Determines the proportion of braves used in an attacking force raised using the ATTACK command (0-100). |
INT_ATTR_AWAY_FIREWARRIOR | Determines the proportion of firewarriors used in an attacking force raised using the ATTACK command (0-100) |
INT_ATTR_AWAY_RELIGIOUS | Determines the proportion of preachers used in an attacking force raised using the ATTACK command (0-100) |
INT_ATTR_AWAY_SHAMAN | Determines whether the shaman is used in an attacking force raised using the ATTACK command (0-1) |
INT_ATTR_AWAY_SPY | Determines the proportion of spies used in an attacking force raised using the ATTACK command (0-100) |
INT_ATTR_AWAY_WARRIOR | Determines the proportion of warriors used in an attacking force raised using the ATTACK command (0-100) |
INT_ATTR_BASE_UNDER_ATTACK_RETREAT | Normally set to 0 or 1. |
INT_ATTR_BOAT_HOUSE_BROKEN | Not used in Bullfrog scripts. |
INT_ATTR_COUNT_PREACH_DAMAGE | Normally set to 1, sometimes 0. |
INT_ATTR_DEFENSE_RAD_INCR | Normally set between 0 and 15. |
INT_ATTR_DONT_AUTO_TRAIN_PREACHERS | Rarely used, can be 0 or 1. |
INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSE | Not used in Bullfrog scripts. |
INT_ATTR_DONT_GROUP_AT_DT | Used to control whether followers gather at CoR or drum tower before an ATTACK (0 allows grouping) |
INT_ATTR_DONT_USE_BOATS | Normally 0 or 1. |
INT_ATTR_EMPTY_AT_WAYPOINT | When attacking using balloon, causes followers to leave it when they reach the intermediate waypoint during an attack and then continue on foot. |
INT_ATTR_ENEMY_SPY_MAX_STAND | Normally 128 or 255. |
INT_ATTR_EXPANSION | |
INT_ATTR_FIGHT_STOP_DISTANCE | Normally set to 0, 24 or 26. |
INT_ATTR_GROUP_OPTION | Normally set to 0, 2 or 3. |
INT_ATTR_HOUSE_PERCENTAGE | |
INT_ATTR_MAX_ATTACKS | |
INT_ATTR_MAX_BUILDINGS_ON_GO | |
INT_ATTR_MAX_DEFENSIVE_ACTIONS | |
INT_ATTR_MAX_SPY_ATTACKS | |
INT_ATTR_MAX_TRAIN_AT_ONCE | |
INT_ATTR_PEOPLE_PER_BALLOON | |
INT_ATTR_PEOPLE_PER_BOAT | |
INT_ATTR_PREF_BALLOON_DRIVERS | |
INT_ATTR_PREF_BALLOON_HUTS | |
INT_ATTR_PREF_BOAT_DRIVERS | |
INT_ATTR_PREF_BOAT_HUTS | |
INT_ATTR_PREF_FIREWARRIOR_PEOPLE | |
INT_ATTR_PREF_FIREWARRIOR_TRAINS | |
INT_ATTR_PREF_RELIGIOUS_PEOPLE | |
INT_ATTR_PREF_RELIGIOUS_TRAINS | |
INT_ATTR_PREF_SPY_PEOPLE | |
INT_ATTR_PREF_SPY_TRAINS | |
INT_ATTR_PREF_WARRIOR_PEOPLE | |
INT_ATTR_PREF_WARRIOR_TRAINS | |
INT_ATTR_RANDOM_BUILD_SIDE | Usually 0, can be 1. |
INT_ATTR_RETREAT_VALUE | |
INT_ATTR_SHAMEN_BLAST | Controls the damage done by the ai Shaman's blast. Normal values are 0,32,64 or 128. At 0 she would take 6-8 blasts to kill an enemy shaman; at 256 she could do it with 2-3. |
INT_ATTR_SPARE | Not used in Bullfrog scripts. Maybe could be used as an additional user variable to extend the limit of 64. |
INT_ATTR_SPELL_DELAY | Not used in Bullfrog scripts. |
INT_ATTR_SPY_CHECK_FREQUENCY | |
INT_ATTR_SPY_DISCOVER_CHANCE | |
INT_ATTR_USE_PREACHER_FOR_DEFENCE | See DO STATE_DEFEND_BASE |
Assign a value to an variable or internal attributes.
Syntax:
SET Var Value
Var: variable or internal attributes.
Value: constant, variable or internal.
Example:
SET $my_variable 3
SET INT_ATTR_PREF_RELIGIOUS_TRAINS
2
SET INT_ATTR_PREF_WARRIOR_TRAINS $my_variable
Add a value to a variable or internal var.
Syntax:
INCREMENT Var Value
Var: variable or internal attributes.
Value: constant, variable or internal.
Example:
INCREMENT $my_variable 3
INCREMENT
INT_ATTR_PREF_RELIGIOUS_TRAINS 2
INCREMENT INT_ATTR_PREF_WARRIOR_TRAINS
$my_variable
Subtract a value to a variable or internal var.
Syntax:
DECREMENT Var Value
Var: variable or internal attributes.
Value: constant, variable or internal.
Example:
DECREMENT $my_variable 3
DECREMENT
INT_ATTR_PREF_RELIGIOUS_TRAINS 2
DECREMENT INT_ATTR_PREF_WARRIOR_TRAINS
$my_variable
Multiply a field by a field and put the result on a variable or internal attributes.
Syntax:
MULTIPLY Result Field Field
Result: variable or internal attributes.
Field: constant, variable or internal.
Example:
MULTIPLY $resulting_var INT_R_BUILDING_LARGE_HUT 2
Divide a field by a field and put the result on a variable or internal attributes.
Syntax:
DIVIDE Result Field Field
Result: variable or internal attributes.
Field: constant, variable or internal.
Example:
DIVIDE $resulting_var INT_R_BUILDING_LARGE_HUT 2
Compare a field with a field.
Syntax:
IF ( Field Comparation Field )
{
// some code
}
ELSE
{
// some code
}
ENDIF
IF (
Field Comparation Field Logic Field Comparation Field )
{
// some code
}
ENDIF
Field: constant, variable or internal.
Comparation: can be one of comparation operators:
equal to: ==
not equal to: !=
greater than: >
less than: <
greater than or equal to: >=
less than or equal to: <=
Logic: can be one of logic operators:
and: &&
or: ||
Example:
IF ( 121 == $var1 && $var1 != $var2 && $var2
> 5 )
{
// do
something
}
ELSE
{
// do another
thing
}
ENDIF
Repeat the commands after the specified interval. Value 1 gives the repeat time in game turns. There are about 8 game turns per second. Value 2 gives the offset, which is subracted from the first period. For example, if the values were 256 12, the command would trigger after 244 turns and thereafter every 256 turns. It would always trigger 10 turns before the command EVERY 256 2. This is useful for ensuring that actions always happen in the correct sequence or are staggered.
Syntax:
EVERY Value1
EVERY Value1 Value2
Value1: one of fallowing constant values: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192.
Value2: constant value.
Example:
EVERY 2
{
//
code
}
EVERY 128 53
{
//
code
}
Execute a command.
Syntax:
DO command state
state: ON or OFF
command: one of the fallowing codes:
AUTO_MESSAGES | |
EXTRA_WOOD_COLLECTION | |
FLYBY_ALLOW_INTERRUPT | |
GIVE_UP_AND_SULK | Causes all remaining followers to guard the shaman and sends her to the Blue CoR. |
SET_AUTO_BUILD | |
SET_AUTO_HOUSE | |
SET_BUCKET_USAGE | |
SET_REINCARNATION | |
STATE_AUTO_ATTACK | |
STATE_BRING_NEW_PEOPLE_BACK | |
STATE_BUILD_VEHICLE | |
STATE_CONSTRUCT_BUILDING | |
STATE_DEFEND_BASE | When set to ON, 8 warriors plus firewarriors (normally 4 of each) will patrol the Circle of Reincarnation in circles. If any are killed they will not be replaced automatically. Requires STATE_FIREWARRIOR_DEFEND to also be set ON and INT_ATTR_USE_PREACHER_FOR_DEFENCE to be SET to a non zero number. Example: DO STATE_DEFEND_BASE ON DO STATE_FIREWARRIOR_DEFEND ON SET INT_ATTR_USE_PREACHER_FOR_DEFENCE 1 |
STATE_DEFEND | All followers not at markers or in huts defend the shaman. See also DO DEFEND_SHAMEN |
STATE_FETCH_FAR_VEHICLE | |
STATE_FETCH_LOST_PEOPLE | |
STATE_FETCH_LOST_VEHICLE | |
STATE_FETCH_WOOD | |
STATE_FIREWARRIOR_DEFEND | See STATE_DEFEND_BASE |
STATE_HOUSE_A_PERSON | |
STATE_POPULATE_DRUM_TOWER | |
STATE_PREACH | |
STATE_SEND_GHOSTS | |
STATE_SHAMAN_GET_WILDS | |
STATE_TRAIN_PEOPLE | |
TURN_PUSH | Not normally used in Bullfrog scripts. |
Example:
DO STATE_FETCH_WOOD OFF
The major command for making the shaman or followers attack an enemy. See Attack tutorial for details.
Syntax:
DO ATTACK team num_ppl target_type attack_model damage spell1 spell2 spell3 attack_type bring_back_vehicles marker1 marker2 marker3
team: BLUE, RED, YELLOW, GREEN or a field
num_ppl: field
target_type: ATTACK_MARKER, ATTACK_BUILDING, ATTACK_PERSON
attack_model: field, can be an internal var person or building
damage: field
spell1, spell2, spell3: field, can be an internal var spell
attack_type: ATTACK_NORMAL, ATTACK_BY_BOAT, ATTACK_BY_BALLOON
bring_back_vehicles: 1 for true and 0 for false
marker1, marker2, marker3: a field with the marker index
Example:
DO ATTACK BLUE 8 ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 981 INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL INT_NO_SPECIFIC_SPELL ATTACK_NORMAL 0 5 -1 -1
Causes the Shaman to cast the chosen spell at the indexed marker position.
Syntax:
DO SPELL_ATTACK spell marker direction
spell: field, can be an internal var spell
marker: a field with the marker index
direction: a field
Example:
DO SPELL_ATTACK INT_ANGEL_OF_DEATH 70 0
Syntax:
DO RESET_BASE_MARKER
Syntax:
DO SET_BASE_MARKER marker
marker: a field with the marker index
Example:
DO SET_BASE_MARKER 30
Syntax:
DO SET_BASE_RADIUS rad
rad: a field
Example:
DO SET_BASE_RADIUS 15
Returns the number of followers of the defined team within a given radius of a marker.
Syntax:
DO COUNT_PEOPLE_IN_MARKER team marker radius var
team: BLUE, RED, YELLOW, GREEN or a field
marker: a field with the marker index
radius: a field
var: a variable
Example:
DO COUNT_PEOPLE_IN_MARKER BLUE 3 6 $blue_ppl_in_marker
Sets the x and z co-ordinates for the main drum tower. This is the point at which followers congregate before an attack. If no drum tower position is set, they will congregate at the COR. If the position cannot be reached from the COR (e.g on an island) then the position will be set at the nearest accessible point. Note that a drum tower will automatically be built unless DELAY_MAIN_DRUM_TOWER has been run. For ordinary drum towers, use the BUILD_AT or BUILD_DRUM_TOWER commands.
Syntax:
DO SET_DRUM_TOWER_POS x z
x: a field with x position of the map
z: a field with z position of the map
Example:
DO SET_DRUM_TOWER_POS 230 46
Syntax:
DO CONVERT_AT_MARKER marker
marker: a field with the marker index
Example:
DO CONVERT_AT_MARKER 14
Syntax:
DO PREACH_AT_MARKER marker
marker: a field with the marker index
Example:
DO PREACH_AT_MARKER 14
Returns the number of times a specific spell has been cast by the chosen team.
Syntax:
DO GET_SPELLS_CAST team spell var
team: BLUE, RED, YELLOW, GREEN or a field
spell: field, can be an internal var spell
var: a variable
Example:
DO GET_SPELLS_CAST BLUE INT_EROSION $erosion_cast_by_blue
Returns the number of spells of a given type which the team has charged and ready for use.
Syntax:
DO GET_NUM_ONE_OFF_SPELLS team spell var
team: BLUE, RED, YELLOW, GREEN or a field
spell: field, can be an internal var spell
var: a variable
Example:
DO GET_NUM_ONE_OFF_SPELLS 0 INT_HYPNOTISM $hypno_spell
The specified variable may (or may not) be altered by the ai during or after an attack. The exact mechanism is unknown. This need further study.
Syntax:
DO SET_ATTACK_VARIABLE var
var: a variable
Example:
DO SET_ATTACK_VARIABLE $attack_var
Syntax:
DO BUILD_DRUM_TOWER x z
x: a field with x position of the map
z: a field with z position of the map
Example:
DO BUILD_DRUM_TOWER 204 136
Sets up followers to guard in a circle around a designated marker. The same thing can be accomplished using SET_MARKER_ENTRY, which seems to be the method preferred by Bullfrog.
Syntax:
DO GUARD_AT_MARKER marker braves warriors firewarriors preachers guard
marker: a field with the marker index
braves: a field
warriors: a field
firewarriors: a field
preachers: a field
guard: GUARD_NORMAL
Example:
DO GUARD_AT_MARKER 18 0 7 0 0 GUARD_NORMAL
Sets up followers to guard between two designated markers. The same thing can be accomplished using SET_MARKER_ENTRY, which seems to be the method preferred by Bullfrog.
Syntax:
DO GUARD_BETWEEN_MARKERS marker1 marker2 braves warriors firewarriors preachers guard
marker1, marker2: a field with the marker index
braves: a field
warriors: a field
firewarriors: a field
preachers: a field
guard: GUARD_NORMAL
Example:
DO GUARD_BETWEEN_MARKERS 28 29 0 7 0 0 GUARD_NORMAL
Sets the default x and z co-ordinates which the shaman will occupy. If state is ON, shaman will defend herself.
Syntax:
DO STATE_SPELL_DEFENCE x z state
x: a field with x position of the map
z: a field with z position of the map
state: ON or OFF
Example:
DO STATE_SPELL_DEFENCE 36 130 ON
Returns the land height at the x and z coordinate position given. Useful for determining if water has been bridged.
Syntax:
DO GET_HEIGHT_AT_POS marker var
marker: a field with the marker index
var: a variable
Example:
DO GET_HEIGHT_AT_POS 21 $pos_1
Syntax:
DO SEND_ALL_PEOPLE_TO_MARKER marker
marker: a field with the marker index
Example:
DO SEND_ALL_PEOPLE_TO_MARKER 17
Set up the mix of followers which you want to guard a marker (or between two markers). Once set up, the command can be activated using DO MARKER_ENTRIES.
Syntax:
DO SET_MARKER_ENTRY entry marker1 marker2 braves warriors firewarriors preachers
entry: a field
marker1, marker2: a field with the marker index
braves: a field
warriors: a field
firewarriors: a field
preachers: a field
Example:
DO SET_MARKER_ENTRY 3 7 8 0 0 4 0
Activates up to 4 marker entries previously defined using DO SET_MARKER_ENTRY. Use the command DO ONLY_STAND_AT_MARKERS if you don't want your followers to walk around and use DO CLEAR_GUARDING_FROM to cancel the guards.
Syntax:
DO MARKER_ENTRIES entry1 entry2 entry3 entry4
entry1, entry2, entry3, entry4: a field
Example:
DO MARKER_ENTRIES 1 2 3 -1
Cancels previously activated guard marker entries. See DO MARKER_ENTRIES.
Syntax:
DO CLEAR_GUARDING_FROM entry1 entry2 entry3 entry4
entry1, entry2, entry3, entry4: a field
Example:
DO CLEAR_GUARDING_FROM 18 19 -1 -1
Sets the direction that new buildings will face. If left unset, new buildings will face in random directions.
Syntax:
DO SET_BUILDING_DIRECTION dir
dir: a field
Example:
DO SET_BUILDING_DIRECTION 4
Syntax:
DO TRAIN_PEOPLE_NOW num_ppl model
num_ppl: a field
model: field, can be an internal var person
Example:
DO TRAIN_PEOPLE_NOW 5 INT_RELIGIOUS
Syntax:
DO PRAY_AT_HEAD num_ppl marker
num_ppl: a field
marker: a field with the marker index
Example:
DO PRAY_AT_HEAD 1 9
Put a specified type of follower in the drum tower at the location given.
Syntax:
DO PUT_PERSON_IN_DT person_type x z
person_type: field, can be an internal var person
x: a field with x position of the map
z: a field with z position of the map
Example:
DO PUT_PERSON_IN_DT INT_RELIGIOUS 46 34
Counts the number of charged spells available of the specified type.
Syntax:
DO I_HAVE_ONE_SHOT type model var
type: SPELL_TYPE, BUILDING_TYPE
model: field, can be an internal var spell or building
var: a variable
Example:
DO I_HAVE_ONE_SHOT SPELL_TYPE INT_TORNADO $i_have_X_tornados
Syntax:
DO VEHICLE_PATROL num_ppl marker1 marker2 marker3 marker4 vehicle
num_ppl: a field
marker1, marker2, marker3, marker4: a field with the marker index
vehicle: BOAT_TYPE, BALLOON_TYPE
Example:
DO VEHICLE_PATROL 5 31 30 31 30 BOAT_TYPE
Guard the shaman with the number of followers specified (equivalent to the 'G' command when playing). See also SEND_SHAMEN_DEFENDERS_HOME and DO STATE_DEFEND
Syntax:
DO DEFEND_SHAMEN num_ppl
num_ppl: a field
Example:
DO DEFEND_SHAMEN 10
Stop guarding the shaman (see DEFEND_SHAMEN).
Syntax:
DO SEND_SHAMEN_DEFENDERS_HOME
Syntax:
DO IS_BUILDING_NEAR building x z team radius var
building: field, can be an internal var building
x: a field with x position of the map
z: a field with z position of the map
team: BLUE, RED, YELLOW, GREEN or a field
radius: a field
var: a variable
Example:
DO IS_BUILDING_NEAR INT_DRUM_TOWER 136 246 RED 5 $result
Place a building plan of the specified type at the coordinates given. If that land is not available, it will be placed as near as possible. The final parameter may control the direction in which the new building will face.
Syntax:
DO BUILD_AT x z building 0
x: a field with x position of the map
z: a field with z position of the map
building: field, can be an internal var building
Example:
DO BUILD_AT 8 38 INT_DRUM_TOWER 0
Enables a spell for the ai shaman to use. The spells are numberd from 0 upwards (using 'entry'). The spell and its mana cost are defined using internal variables (such as INT_BLAST and INT_M_BLAST_COST). The frequency parameter does not appear to control the rate of use of the spell or the time it takes to cast - more work needed. The spell will only be cast if the specified number of enemy people are within range (including the shaman). If 'base' is set to 1, the spell will only be used in the base area, if 0, only outside the base.
Syntax:
DO SET_SPELL_ENTRY entry spell mana frequency ppl base
entry: a field
spell: field, can be an internal var spell
mana: a field
frequency: a field
ppl: a field
base: a field
Example:
DO SET_SPELL_ENTRY 1 INT_SWARM INT_M_SPELL_SWARM_COST 128 2 1
Prevents the braves from building the main drum tower (see SET_DRUM_TOWER_POS). This can be reversed by using BUILD_MAIN_DRUM_TOWER.
Syntax:
DO DELAY_MAIN_DRUM_TOWER
Restarts building of the main drum tower after it has been halted with DO DELAY_MAIN_DRUM_TOWER. See also SET_DRUM_TOWER_POS
Syntax:
DO BUILD_MAIN_DRUM_TOWER
Syntax:
DO ZOOM_TO x y angle
x: a field with x position of the map
y: a field
angle: a field
Example:
DO ZOOM_TO 166 130 1096
User inputs will be ignored until the ENABLE_USER_INPUTS command is given.
Syntax:
DO DISABLE_USER_INPUTS
Resumes user control after inputs have been disabled with DISABLE_USER_INPUTS
Syntax:
DO ENABLE_USER_INPUTS
Syntax:
DO OPEN_DIALOG idx
idx: a field
Example:
DO OPEN_DIALOG 123
Immediately makes one spell of the specified type available for casting.
Syntax:
DO GIVE_ONE_SHOT spell team
spell: field, can be an internal var spell
team: BLUE, RED, YELLOW, GREEN or a field
Example:
DO GIVE_ONE_SHOT INT_LIGHTNING BLUE
Syntax:
DO CLEAR_STANDING_PEOPLE
Prevents followers from walking around at activated marker entries. See DO MARKER_ENTRIES.
Syntax:
DO ONLY_STAND_AT_MARKERS
Checks to see whether followers specified for an attack can actually reach the target. Returns 1 in var if ok, 0 otherwise.
Syntax:
DO NAV_CHECK team target_type model remember var
team: BLUE, RED, YELLOW, GREEN or a field
target_type: ATTACK_MARKER, ATTACK_BUILDING, ATTACK_PERSON
model: field, can be an internal var person or building
remember: a field
var: a variable
Example:
DO NAV_CHECK BLUE ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 0
$res1
DO NAV_CHECK GREEN ATTACK_MARKER 7 0 $res2
Syntax:
DO TARGET_FIREWARRIORS
Syntax:
DO DONT_TARGET_FIREWARRIORS
Syntax:
DO TARGET_BLUE_SHAMAN
Syntax:
DO DONT_TARGET_BLUE_SHAMAN
Syntax:
DO TARGET_BLUE_DRUM_TOWERS
Syntax:
DO DONT_TARGET_BLUE_DRUM_TOWERS
Syntax:
DO GET_HEAD_TRIGGER_COUNT x z var
x: a field with x position of the map
z: a field with z position of the map
var: a variable
Example:
DO GET_HEAD_TRIGGER_COUNT 32 18 $res
Moves the shaman to the specified marker. See also STATE_SPELL_DEFENCE
Syntax:
DO MOVE_SHAMAN_TO_MARKER marker
marker: a field with the marker index
Example:
DO MOVE_SHAMAN_TO_MARKER 123
Camera follows the Blue shaman. The angle specifies the direction in which the camera is pointing in degrees clockwise from North (marked by the white arrow on the Control Panel map).
Syntax:
DO TRACK_SHAMAN_TO_ANGLE angle
angle: a field
Example:
DO TRACK_SHAMAN_TO_ANGLE 33
Is Shaman Available for Attack
Returns 1 in var if shaman is able to cast a spell, 0 otherwise.
Syntax:
DO IS_SHAMAN_AVAILABLE_FOR_ATTACK var
var: a variable
Example:
DO IS_SHAMAN_AVAILABLE_FOR_ATTACK $4
Update the internal building counts to include part-built and damaged buildings (e.g. INT_B_BUILDING_SMALL_HUT)
Syntax:
DO PARTIAL_BUILDING_COUNT
Syntax:
DO SEND_BLUE_PEOPLE_TO_MARKER marker
marker: a field with the marker index
Example:
DO SEND_BLUE_PEOPLE_TO_MARKER 12
Syntax:
DO GIVE_MANA_TO_PLAYER team mana
team: BLUE, RED, YELLOW, GREEN or a field
mana: a field
Example:
DO GIVE_MANA_TO_PLAYER RED 500000
Syntax:
DO IS_PLAYER_IN_WORLD_VIEW var
var: a variable
Example:
DO IS_PLAYER_IN_WORLD_VIEW $result
Syntax:
DO DESELECT_ALL_BLUE_PEOPLE
Puts a flashing white border around the specified position on the left-hand panel. For instance, 16 refers to the shaman graphic, 14 refers to the hut tab. Used in the tutorial.
Syntax:
DO FLASH_BUTTON idx state
idx: a field
state: ON or OFF
Example:
DO FLASH_BUTTON 16 ON
Activates the panel defined by idx for the human player.
Syntax:
DO TURN_PANEL_ON idx
idx: a field where 0 = People, 1 = Spells and 2 = Buildings.
Example:
DO TURN_PANEL_ON 2
Syntax:
DO GIVE_PLAYER_SPELL team spell
team: BLUE, RED, YELLOW, GREEN or a field
spell: field, can be an internal var spell
Example:
DO GIVE_PLAYER_SPELL 0 INT_LIGHTNING
Syntax:
DO TRIGGER_THING marker
marker: a field with marker idx
Example:
DO TRIGGER_THING 4
Syntax:
DO TRACK_TO_MARKER marker
marker: a field with the marker index
Example:
DO TRACK_TO_MARKER 9
Syntax:
DO CAMERA_ROTATION speed
speed: a field
Example:
DO CAMERA_ROTATION -10
Syntax:
DO STOP_CAMERA_ROTATION
Count the number of Blue building plans, excluding partially competed or damaged buildings.
Syntax:
DO COUNT_BLUE_SHAPES var
var: a variable
Example:
DO COUNT_BLUE_SHAPES $count
Syntax:
DO COUNT_BLUE_IN_HOUSES var
var: a variable
Example:
DO COUNT_BLUE_IN_HOUSES $count
Syntax:
DO COUNT_BLUE_WITH_BUILD_COMMAND var
var: a variable
Example:
DO COUNT_BLUE_WITH_BUILD_COMMAND $result
Syntax:
DO REMOVE_PLAYER_THING team spell
team: BLUE, RED, YELLOW, GREEN or a field
spell: field, can be an internal var spell
Example:
DO REMOVE_PLAYER_THING 0 INT_LIGHTNING
Syntax:
DO SET_WOOD_COLLECTION_RADII min max x z
min: a field
max: a field
x: a field with x position of the map
z: a field with z position of the map
Example:
DO SET_WOOD_COLLECTION_RADII 5 40 0 0
Syntax:
DO GET_NUM_PEOPLE_BEING_PREACHED team var
team: BLUE, RED, YELLOW, GREEN or a field
var: a variable
Example:
DO GET_NUM_PEOPLE_BEING_PREACHED BLUE $result
Syntax:
DO TRIGGER_LEVEL_LOST
Syntax:
DO TRIGGER_LEVEL_WON
Syntax:
DO REMOVE_HEAD_AT_POS x z
x: a field with x position of the map
z: a field with z position of the map
Example:
DO REMOVE_HEAD_AT_POS 194 218
Syntax:
DO SET_BUCKET_COUNT_FOR_SPELL spell mult
spell: field, can be an internal var spell
mult: a field
Example:
DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO 320
Drops a narrative message tag (open book symbol) onto the LHS of the players screen. When the player clicks on it, the game is paused, the message displayed.
Syntax:
DO CREATE_MSG_NARRATIVE idx
idx: a field
Example:
DO CREATE_MSG_NARRATIVE 173
Drops an information message tag (green 'i') onto the LHS of the players screen. When the player clicks on it, the game is paused, the message displayed.
Syntax:
DO CREATE_MSG_INFORMATION idx
idx: a field
Example:
DO CREATE_MSG_INFORMATION 161
Drops a zoom information message tag (green 'i' with a small white triangle in the top right corner) onto the LHS of the players screen. When the player clicks on it, the game is paused, the message displayed and the camera moves to the position specified. When the player clicks ok, the message closes and the camera returns to its previous position.
Syntax:
DO CREATE_MSG_INFORMATION_ZOOM idx x z angle
idx: a field
x: a field with x position of the map
z: a field with z position of the map
angle: a field
Example:
DO CREATE_MSG_INFORMATION_ZOOM 165 18 250 71
Sets a time interval, after which messages on the stack are deleted.
Syntax:
DO SET_MSG_TIMEOUT time
time: a field
Example:
DO SET_MSG_TIMEOUT 256
Delete the message from the stack when the player clicks 'ok'.
Syntax:
DO SET_MSG_DELETE_ON_OK
Automatically opens the latest message and freezes the game.
Syntax:
DO SET_MSG_AUTO_OPEN_DLG
Syntax:
DO FIX_WILD_IN_AREA x z rad
x: a field with x position of the map
z: a field with z position of the map
rad: a field
Example:
DO FIX_WILD_IN_AREA 6 88 14
Syntax:
DO COUNT_ANGELS team var
team: BLUE, RED, YELLOW, GREEN or a field
var: a variable
Example:
DO COUNT_ANGELS 0 $count
Syntax:
DO SET_NO_BLUE_REINC
Syntax:
DO IS_SHAMAN_IN_AREA team rad var
team: BLUE, RED, YELLOW, GREEN or a field
rad: a field
var: a variable
Example:
DO IS_SHAMAN_IN_AREA BLUE 15 2 $result
Syntax:
DO SET_DEFENCE_RADIUS rad
rad: a field
Example:
DO SET_DEFENCE_RADIUS 5
Syntax:
DO DELETE_SMOKE_STUFF x z rad
x: a field with x position of the map
z: a field with z position of the map
rad: a field
Example:
DO DELETE_SMOKE_STUFF 92 194 5
Start the timer which will then appear at top-right on the player's screen.
Syntax:
DO SET_TIMER_GOING time
time: a field
Example:
DO SET_TIMER_GOING 900
Remove the timer from the player's screen.
Syntax:
DO REMOVE_TIMER
Syntax:
DO HAS_TIMER_REACHED_ZERO var
Example:
DO HAS_TIMER_REACHED_ZERO $result
Syntax:
DO FLYBY_CREATE_NEW
Syntax:
DO FLYBY_START
Syntax:
DO FLYBY_STOP
Syntax:
DO FLYBY_SET_EVENT_POS x z angle duration
x: a field with x position of the map
z: a field with z position of the map
angle: a field
duration: a field
Example:
DO FLYBY_SET_EVENT_POS 60 202 360 50
Syntax:
DO FLYBY_SET_EVENT_ANGLE angle angle duration
angle: a field
duration: a field
Example:
DO FLYBY_SET_EVENT_ANGLE 2000 371 50
Syntax:
DO FLYBY_SET_EVENT_ZOOM zoom angle duration
zoom: a field
angle: a field
duration: a field
Example:
DO FLYBY_SET_EVENT_ZOOM 0 208 132
Syntax:
DO FLYBY_SET_EVENT_TOOLTIP x z code start duration
x: a field with x position of the map
z: a field with z position of the map
code: a field
start: a field
duration: a field
Example:
DO FLYBY_SET_EVENT_TOOLTIP 96 136 1 100 40
Syntax:
DO FLYBY_SET_END_TARGET x z angle zoom
x: a field with x position of the map
z: a field with z position of the map
angle: a field
zoom: a field
Example:
DO FLYBY_SET_END_TARGET 60 202 2000 0
Syntax:
DO KILL_TEAM_IN_AREA x z rad
x: a field with x position of the map
z: a field with z position of the map
rad: a field
Example:
DO KILL_TEAM_IN_AREA 32 80 5
Syntax:
DO CLEAR_ALL_MSG
Syntax:
DO IS_PRISON_ON_LEVEL var
var: a variable
Example:
DO IS_PRISON_ON_LEVEL $result