Populous AI Script Syntax List


by Alacn, with additions by CDplayer
Version date: 9 February 2006

 

Index

Comments

Begin, End, Script_End


Fields:

Variables

Constants

Internal Variables

Internal Game Vars

Internal Attributes Vars


Commands:

Set

Increment

Decrement

Multiply

Divide

IF, Else, EndIF

Every

Do

State Commands


Attack

Build At

Build Drum Tower

Build Main Drum Tower

Camera Rotation

Clear All Msg

Clear Guarding From

Clear Standing People

Convert at Marker

Count Angels

Count Blue in Houses

Count Blue Shapes

Count Blue With Build Command

Count People in Marker

Create Msg Information Zoom

Create Msg Information

Create Msg Narrative

Defend Shamen

Delay Main Drum Tower

Delete Smoke Stuff

Deselect All Blue People

Disable User Inputs

Dont Target Blue Drum Towers

Dont Target Blue Shaman

Dont Target FireWarriors

Enable User Inputs

Fix Wild in Area

Flash Button

FlyBy Create New

FlyBy Set End Target

FlyBy Set Event Angle

FlyBy Set Event Pos

FlyBy Set Event ToolTip

FlyBy Set Event Zoom

FlyBy Stop

Get Head Trigger Count

Get Height at Pos

Get Num One Off Spells

Get Num People Begin Preached

Get Spells Cast

Give Mana to Player

Give One Shot

Give Player Spell

Guard at Marker

Guard Between Markers

Has Timer Reached Zero

I Have one Shot

Is Building Near

Is Player in World View

Is Prison on Level

Is Shaman Available for Attack

Is Shaman in Area

Kill Team in Area

Marker Entries

Move Shaman to Marker

Nav Check

Only Stand at Markers

Open Dialog

Partial Building Count

Pray at Head

Preach at Marker

Put Person in DT

Remove Head at Pos

Remove Player Thing

Remove Timer

Reset Base Marker

Send All People to Marker

Send Blue People to Marker

Send Shamen Defenders Home

Set Attack Variable

Set Base Marker

Set Base Radius

Set Bucket Count for Spell

Set Building Direction

Set Defence Radius

Set Drum Tower Pos

Set Marker Entry

Set Msg Auto Open Dlg

Set Msg Delete on OK

Set Msg TimeOut

Set No Blue Reinc

Set Spell Entry

Set Timer Going

Set Wood Collection RadII

Spell Attack

State Spell Defence

Stop Camera Rotation

Target Blue Drum Towers

Target Blue Shaman

Target FireWarriors

Track Shaman to Angle

Track to Marker

Train People Now

Trigger Level Lost

Trigger Level Won

Trigger Thing

Turn Panel ON

Vehicle Patrol

Zoom to

 

 

 

Comments

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

 

 

 

Begin, End, Script_End

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

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

 

 

 

Constants

Constant is a fixed number in the code.

 

Example:

1
2
50
300
73

 

 

 

Internal Variables

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.

 

Internal Game Vars

Internal Attributes Vars

 

Internal Game Vars


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

 

Internal Attributes Vars

These may be given numerical values using the SET command.

INT_ATTR_ATTACK_PERCENTAGE0-255
INT_ATTR_AWAY_BRAVEDetermines the proportion of braves used in an attacking force raised using the ATTACK command (0-100).
INT_ATTR_AWAY_FIREWARRIORDetermines the proportion of firewarriors used in an attacking force raised using the ATTACK command (0-100)
INT_ATTR_AWAY_RELIGIOUSDetermines the proportion of preachers used in an attacking force raised using the ATTACK command (0-100)
INT_ATTR_AWAY_SHAMANDetermines whether the shaman is used in an attacking force raised using the ATTACK command (0-1)
INT_ATTR_AWAY_SPYDetermines the proportion of spies used in an attacking force raised using the ATTACK command (0-100)
INT_ATTR_AWAY_WARRIORDetermines the proportion of warriors used in an attacking force raised using the ATTACK command (0-100)
INT_ATTR_BASE_UNDER_ATTACK_RETREATNormally set to 0 or 1.
INT_ATTR_BOAT_HOUSE_BROKENNot used in Bullfrog scripts.
INT_ATTR_COUNT_PREACH_DAMAGENormally set to 1, sometimes 0.
INT_ATTR_DEFENSE_RAD_INCRNormally set between 0 and 15.
INT_ATTR_DONT_AUTO_TRAIN_PREACHERSRarely used, can be 0 or 1.
INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSENot used in Bullfrog scripts.
INT_ATTR_DONT_GROUP_AT_DTUsed to control whether followers gather at CoR or drum tower before an ATTACK (0 allows grouping)
INT_ATTR_DONT_USE_BOATSNormally 0 or 1.
INT_ATTR_EMPTY_AT_WAYPOINTWhen 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_STANDNormally 128 or 255.
INT_ATTR_EXPANSION 
INT_ATTR_FIGHT_STOP_DISTANCENormally set to 0, 24 or 26.
INT_ATTR_GROUP_OPTIONNormally 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_SIDEUsually 0, can be 1.
INT_ATTR_RETREAT_VALUE 
INT_ATTR_SHAMEN_BLASTControls 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_SPARENot used in Bullfrog scripts. Maybe could be used as an additional user variable to extend the limit of 64.
INT_ATTR_SPELL_DELAYNot used in Bullfrog scripts.
INT_ATTR_SPY_CHECK_FREQUENCY 
INT_ATTR_SPY_DISCOVER_CHANCE 
INT_ATTR_USE_PREACHER_FOR_DEFENCESee DO STATE_DEFEND_BASE

 

 

 

Set

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

 

 

 

Increment

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

 

 

 

Decrement

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

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

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

 

 

 

IF, Else, EndIF

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

 

 

 

Every

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
}

 

 

 

Do

Execute a command.

 

State Commands


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_SULKCauses 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_BASEWhen 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_DEFENDAll 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_DEFENDSee STATE_DEFEND_BASE
STATE_HOUSE_A_PERSON 
STATE_POPULATE_DRUM_TOWER 
STATE_PREACH 
STATE_SEND_GHOSTS 
STATE_SHAMAN_GET_WILDS 
STATE_TRAIN_PEOPLE 
TURN_PUSHNot normally used in Bullfrog scripts.

 

Example:

DO STATE_FETCH_WOOD OFF

 


 

Attack

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

 


 

Spell Attack

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

 


 

Reset Base Marker


Syntax:

DO RESET_BASE_MARKER

 


 

Set Base Marker


Syntax:

DO SET_BASE_MARKER marker

marker: a field with the marker index

 

Example:

DO SET_BASE_MARKER 30

 


 

Set Base Radius


Syntax:

DO SET_BASE_RADIUS rad

rad: a field

 

Example:

DO SET_BASE_RADIUS 15

 


 

Count People in Marker

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

 


 

Set Drum Tower Pos

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

 


 

Convert at Marker


Syntax:

DO CONVERT_AT_MARKER marker

marker: a field with the marker index

 

Example:

DO CONVERT_AT_MARKER 14

 


 

Preach at Marker


Syntax:

DO PREACH_AT_MARKER marker

marker: a field with the marker index

 

Example:

DO PREACH_AT_MARKER 14

 


 

Get Spells Cast

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

 


 

Get Num One Off Spells

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

 


 

Set Attack Variable

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

 


 

Build Drum Tower


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

 


 

Guard at Marker

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

 


 

Guard Between Markers

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

 


 

State Spell Defence

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

 


 

Get Height at Pos

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

 


 

Send All People to Marker


Syntax:

DO SEND_ALL_PEOPLE_TO_MARKER marker

marker: a field with the marker index

 

Example:

DO SEND_ALL_PEOPLE_TO_MARKER 17

 


 

Set Marker Entry


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

 


 

Marker Entries


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

 


 

Clear Guarding From

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

 


 

Set Building Direction

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

 


 

Train People Now


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

 


 

Pray at Head


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 Person in DT

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

 


 

I Have one Shot

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

 


 

Vehicle Patrol


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

 


 

Defend Shamen

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

 


 

Send Shamen Defenders Home

Stop guarding the shaman (see DEFEND_SHAMEN).

Syntax:

DO SEND_SHAMEN_DEFENDERS_HOME

 


 

Is Building Near


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

 


 

Build At

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

 


 

Set Spell Entry

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

 


 

Delay Main Drum Tower

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

 


 

Build 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

 


 

Zoom to


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

 


 

Disable User Inputs

User inputs will be ignored until the ENABLE_USER_INPUTS command is given.

Syntax:

DO DISABLE_USER_INPUTS

 


 

Enable User Inputs

Resumes user control after inputs have been disabled with DISABLE_USER_INPUTS

Syntax:

DO ENABLE_USER_INPUTS

 


 

Open Dialog


Syntax:

DO OPEN_DIALOG idx

idx: a field

 

Example:

DO OPEN_DIALOG 123

 


 

Give One Shot

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

 


 

Clear Standing People


Syntax:

DO CLEAR_STANDING_PEOPLE

 


 

Only Stand at Markers

Prevents followers from walking around at activated marker entries. See DO MARKER_ENTRIES.

Syntax:

DO ONLY_STAND_AT_MARKERS

 


 

Nav Check


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

 


 

Target FireWarriors


Syntax:

DO TARGET_FIREWARRIORS

 


 

Dont Target FireWarriors


Syntax:

DO DONT_TARGET_FIREWARRIORS

 


 

Target Blue Shaman


Syntax:

DO TARGET_BLUE_SHAMAN

 


 

Dont Target Blue Shaman


Syntax:

DO DONT_TARGET_BLUE_SHAMAN

 


 

Target Blue Drum Towers


Syntax:

DO TARGET_BLUE_DRUM_TOWERS

 


 

Dont Target Blue Drum Towers


Syntax:

DO DONT_TARGET_BLUE_DRUM_TOWERS

 


 

Get Head Trigger Count


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

 


 

Move Shaman to Marker

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

 


 

Track Shaman to Angle

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

 


 

Partial Building Count


Update the internal building counts to include part-built and damaged buildings (e.g. INT_B_BUILDING_SMALL_HUT)

Syntax:

DO PARTIAL_BUILDING_COUNT

 


 

Send Blue People to Marker


Syntax:

DO SEND_BLUE_PEOPLE_TO_MARKER marker

marker: a field with the marker index

 

Example:

DO SEND_BLUE_PEOPLE_TO_MARKER 12

 


 

Give Mana to Player


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

 


 

Is Player in World View


Syntax:

DO IS_PLAYER_IN_WORLD_VIEW var

var: a variable

 

Example:

DO IS_PLAYER_IN_WORLD_VIEW $result

 


 

Deselect All Blue People


Syntax:

DO DESELECT_ALL_BLUE_PEOPLE

 


 

Flash Button

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

 


 

Turn Panel 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

 


 

Give Player Spell


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

 


 

Trigger Thing


Syntax:

DO TRIGGER_THING marker

marker: a field with marker idx

 

Example:

DO TRIGGER_THING 4

 


 

Track to Marker


Syntax:

DO TRACK_TO_MARKER marker

marker: a field with the marker index

 

Example:

DO TRACK_TO_MARKER 9

 


 

Camera Rotation


Syntax:

DO CAMERA_ROTATION speed

speed: a field

 

Example:

DO CAMERA_ROTATION -10

 


 

Stop Camera Rotation


Syntax:

DO STOP_CAMERA_ROTATION

 


 

Count Blue Shapes


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

 


 

Count Blue in Houses


Syntax:

DO COUNT_BLUE_IN_HOUSES var

var: a variable

 

Example:

DO COUNT_BLUE_IN_HOUSES $count

 


 

Count Blue With Build Command


Syntax:

DO COUNT_BLUE_WITH_BUILD_COMMAND var

var: a variable

 

Example:

DO COUNT_BLUE_WITH_BUILD_COMMAND $result

 


 

Remove Player Thing


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

 


 

Set Wood Collection RadII


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

 


 

Get Num People Begin Preached


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

 


 

Trigger Level Lost


Syntax:

DO TRIGGER_LEVEL_LOST

 


 

Trigger Level Won


Syntax:

DO TRIGGER_LEVEL_WON

 


 

Remove Head at Pos


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

 


 

Set Bucket Count for Spell


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

 


 

Create Msg Narrative

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

 


 

Create Msg Information

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

 


 

Create Msg Information Zoom

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

 


 

Set Msg TimeOut

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

 


 

Set Msg Delete on OK


Delete the message from the stack when the player clicks 'ok'.

Syntax:

DO SET_MSG_DELETE_ON_OK

 


 

Set Msg Auto Open Dlg


Automatically opens the latest message and freezes the game.

Syntax:

DO SET_MSG_AUTO_OPEN_DLG

 


 

Fix Wild in Area


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

 


 

Count Angels


Syntax:

DO COUNT_ANGELS team var

team: BLUE, RED, YELLOW, GREEN or a field

var: a variable

 

Example:

DO COUNT_ANGELS 0 $count

 


 

Set No Blue Reinc


Syntax:

DO SET_NO_BLUE_REINC

 


 

Is Shaman in Area


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

 


 

Set Defence Radius


Syntax:

DO SET_DEFENCE_RADIUS rad

rad: a field

 

Example:

DO SET_DEFENCE_RADIUS 5

 


 

Delete Smoke Stuff


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

 


 

Set Timer Going


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 Timer


Remove the timer from the player's screen.

Syntax:

DO REMOVE_TIMER

 


 

Has Timer Reached Zero


Syntax:

DO HAS_TIMER_REACHED_ZERO var

 

Example:

DO HAS_TIMER_REACHED_ZERO $result

 


 

FlyBy Create New


Syntax:

DO FLYBY_CREATE_NEW

 


 

FlyBy Start


Syntax:

DO FLYBY_START

 


 

FlyBy Stop


Syntax:

DO FLYBY_STOP

 


 

FlyBy Set Event Pos


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

 


 

FlyBy Set Event Angle


Syntax:

DO FLYBY_SET_EVENT_ANGLE angle angle duration

angle: a field

duration: a field

 

Example:

DO FLYBY_SET_EVENT_ANGLE 2000 371 50

 


 

FlyBy Set Event Zoom


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

 


 

FlyBy Set Event ToolTip


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

 


 

FlyBy Set End Target


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

 


 

Kill Team in Area


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

 


 

Clear All Msg


Syntax:

DO CLEAR_ALL_MSG

 


 

Is Prision on Level


Syntax:

DO IS_PRISON_ON_LEVEL var

var: a variable

 

Example:

DO IS_PRISON_ON_LEVEL $result

 


 

Attack Command Tutorial


Syntax:

DO ATTACK team num_ppl target_type attack_model damage spell1 spell2 spell3 attack_type bring_back_vehicles marker1 marker2 marker3

 

Attack basics: You can use the ATTACK command to mount an attack on an enemy base using either followers, or the shaman, or both. When the command is given, the computer selects the followers for the attack team and sends them to the gathering point. By default, this is the Circle of Resurrection, but the gathering point can be changed by building a Main Drum Tower (see DO SET_DRUM_TOWER_POS). When all the followers (and the shaman if selected) have gathered, they set off for the designated target. About halfway there they will pause to regroup, as some categories of follower can move faster than others. Again, once everyone has arrived, they continue on their way and carry out the attack. The initial grouping at the CoR or drum tower can be disabled by using
SET INT_ATTR_DONT_GROUP_AT_DT X
where X is any positive integer.

 

Prerequisites: For the attack command to work, you need to issue these two commands first:
DO STATE_AUTO_ATTACK ON
SET INT_ATTR_MAX_ATTACKS 999

 

If STATE_AUTO_ATTACK is set to OFF (as it may be by default) no attacks will take place. Similarly, if INT_ATTR_MAX_ATTACKS is set to 0, the attack command will be ignored. If it is set to a low number, only that number of attacks will be performed and any thereafter will be ignored.

 

It's worth running DO NAV_CHECK before issuing the DO ATTACK command. This will check to make sure that your followers can reach the intended target and avoid followers standing around with their hands in the air.

 

If the shaman is to be part of the attack, you need to issue the command SET INT_ATTR_AWAY_SHAMAN X where X is any positive integer. Otherwise the shamn will ignore the command. If you want the shaman to attack on her own, and you know where you want her to cast her spell, consider using DO SPELL_ATTACK.

 

The mix of follower types in the attack team is controlled by the following parameters:
INT_ATTR_AWAY_BRAVE
INT_ATTR_AWAY_FIREWARRIOR
INT_ATTR_AWAY_RELIGIOUS
INT_ATTR_AWAY_SPY
INT_ATTR_AWAY_WARRIOR

A value of 0 will tend to mean that that type of follower won't join the attack, a value of 100 that it will. Thus, if you want a warrior attack, use SET INT_ATTR_AWAY_WARRIOR 100 and set the other parameters to 0. For a mixed team, set the parameters in the proportions you want. This doesn't work absolutely - if you don't have enough of your preferred follower type, the computer will substitute others to make up the numbers. You can use values greater than 100, but at higher values the total size of the attack force may be rather larger than the number set in the ATTACK command.

Team: This sets the target tribe and can be RED BLUE GREEN or YELLOW (but obviously not the ai players' own colour).

 

num_people: This controls the maximum number of followers which will be used in the attack, excluding the shaman. The computer will try to get an even mix of the different types of followers - unfortunately the mix cannot be controlled in the script. The computer will select idle followers or followers in huts, but not followers who are guarding or patrolling. Apart from that, the selection appears to be random. Set num_people to zero if you want to attack with the shaman only.

 

target_type: Can take one of three values:

ATTACK_MARKER: With this command, the attacking force will move to the marker index given in the next parameter (attack_model). Once there they will attack any enemy followers or buildings which they can detect. If they can't detect any, they will mill around for a while until called back to the CoR.
ATTACK_BUILDING: In this case, the attack force will make their way to the nearest enemy building of the type specified by attack_model. On arrival, they will attack any occupants of the building and then start to dismantle it.
ATTACK_PERSON: This is similar to attack_building, except that a specific type of follower will be targeted. In practice, however, whatever follower type is specified, the force always seems to head straight for the enemy shaman.

 

attack_model: This controls the specific target destination which the attackers will aim for and can take three forms, depending on the setting of the previous parameter (target_type):

ATTACK_MARKER: With target_type set to ATTACK_MARKER, attack model is an integer corresponding to one of the markers set up on the map. These can be seen using the map editor.
ATTACK_BUILDING: For building attacks, use the internal parameter corresponding to the building type which you want attacked, such as INT_SMALL_HUT or INT_TEMPLE. Use INT_NO_SPECIFIC_BUIDING if you want them to attack the nearest enemy building, whatever it may be.
ATTACK_PERSON: As noted before, only the shaman can be targeted, so you may as well use INT_SHAMAN or INT_TARGET_SHAMAN.

 

damage: This parameter varies from 0 to 999 and influences the amount of damage the attackers will try to inflict before they withdraw. When set to 1, they will (for instance) cause just 1 unit of damage to a building. At 999 they become kamikazi fighters who will keep on attacking until they are killed.

 

spell 1: If the shaman is taking part in the attack, this will be the first spell she uses. If marker1 is specified, she will cast the spell when she reaches that marker, in the direction of marker2, otherwise she will use it when she arrives at the target. If attacking without the shaman, set spell1-3 to INT_NO_SPECIFIC_SPELL.

 

spell2 & spell3: These two spells will be cast when the shaman arrives at the target. Each of the spells will be cast only once and then the shaman will head for home.

 

attack_type: This paramneter can take the following self-explanatory values: ATTACK_NORMAL, ATTACK_BY_BOAT, ATTACK_BY_BALLOON. Note that, if you intend using vehicles, it would be wise to check that there are some available before issuing the attack command

 

marker1: If marker1 is set, the followers will go there en route to attack the target, pause to regroup, and then continue. If the shaman is in the attacking force, she will cast spell1 at that point, in the direction of marker2, if they are specified.

 

marker2: Sets the direction for any spell cast at marker1.

 

marker3: This parameter does not appear to have any function.

 

Example:

DO STATE_AUTO_ATTACK ON
SET INT_ATTR_MAX_ATTACKS 999
INT_ATTR_AWAY_SHAMAN 0
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

 

This command will send a force of 8 followers to attack the nearest Blue buildings, whatever they may be, pausing at marker 5 on their way. The attack will be forceful, and the followers will likely be killed before they retreat. The shaman will not take part.

 

Return to Attack syntax entry