The Populous: The Beginning Wiki





This version of the Popscript Wiki HTML Help File was created at:
4/30/2006 11:55:04 PM

    Welcome to the Populous: The Beginning Wiki!

Built by: Megafont




Currently, inside this wiki you will find information primarily dealing with AI scripting for single player Populous: The Beginning levels.  This wiki contains what we know so far about the scripting language and its commands.  This wiki may eventually have some information and tutorials on Populous level editing in general as well.  I got into level editing and scripting for Populous: The Beginning in very large part thanks to the Populous: Reincarnated website.  Here's a link so its easy to get back and forth between here and there.
Populous: Reincarnated



IMPORTANT NOTE: I do not take or deserve credit for most of the information and materials contained in this wiki.  Much of it was figured out and compiled by other members of the Pop Scripting community, and I have just put the information into a new format and added to/improved it where I could.  Thanks goes out to those who originally compiled or created materials found in this wiki, such as the Attack Tutorial and the
Viewing the Values of Variables While in the Game Tutorial.



Download This Wiki as an HTML Help File:

Here you can download this wiki as an HTML help file.  It also shows the date it was last recompiled so you can tell if you have the newest version of the HTML help file or not.  Also, for those of you making various PopScripting tools and stuff, I have also put up a 2nd download link here where you can download my HTML help file compiler program.  This way, if I haven't recompiled the help file in a long while, you guys can download the installer and compile a new version of the help file to go with your tools/utilities and stuff.  After downloading the installer, all you have to do is unzip the .ZIP file and run the Setup.exe program to install the Help File Compiler Utility.

Right click on the links and choose the 'Save Link As' or 'Save Target As' option, depending on whether you're using Internet Explorer or Firefox.


PopScript Wiki HTML Help File.htm  -  Last Updated: 4/30/2006

PopScript Wiki HTML Help File Compiler Utility   -  Last Updated: 4/30/2006




Contents:


About This Wiki  -  How to use and edit this wiki, type conventions used within, etc.

Pop Scripting Basics  -  Populous Scripting basics, such as comments

Pop Script Commands  -  Listing of Pop Script commands

       DO STATE Commands  -  Listing of Pop Script DO STATE commands

       DO Commands  -  Listing of Pop Script DO commands

Internal Attribute Variables   -  Listing of Pop Script Internal Attribute Variables

Internal Game Variables  -  Listing of Pop Script Internal Game Variables


Level Listing  -  A list of all Populous: The Beginning levels with various info about each, such as what AI scripts it uses

Incomplete Knowledge Listing  -  A list of everything that we don't yet fully understand about Pop Scripting

Tutorials  -  Tutorials can be found in here

Glossary  -  You can find definitions for various terms and things in here








Back to Top

Populous Scripting Basics



Comments:


There are two types of comments: line comments and block comments.

Line comment: Any code followed by a double forward slash ( // ) until the end of the line is ignored by the compiler.

Block comment: A block comment begins with /* and ends with */.  Any code between them is ignored by the compiler. A block comment can span multiple lines. Blank lines are ignored.


Examples:

some code // this is a line comment
some code


/*
this is a
block comment
*/


some /* another block comment */ code




Begin, End, and SCRIPT_END:


A code block always begins with a {, and ends with a }.

The script must end with the SCRIPT_END command.  Any code after it is ignored.

 
Example:

{
   // some code
   // in here

}
SCRIPT_END




Variables:


Variables are used to store values that can be used or changed at any time.

To use a variable, use the $ prefix followed by the variable name.  It can be up to 32 characters long, but can't contain spaces.  The maximum number of user variables allowed is 64.

You can assign a value to a variable by using the SET Command.


Examples:

$a_variable

// set the value of $my_var to 2
SET $my_var    2

// assign a value from another variable
SET $my_var2   $another_var
SET $my_var3   INT_B_BUILDING_SMALL_HUT



Constants:


A constant is a fixed number in code.

Examples:

0
1
12
206

// assign a constant to a variable
SET $var 25









Back to Top

Populous: The Beginning - Internal Game Variables



Internal variables are variables that contain information on the state of the game, such as how many followers and buildings a player has.  This page lists all of the internal game variables used in Pop Scripting and what they are for.


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 the 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



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 complete vehicles of each type for the current player.

INT_M_VEHICLE_BOAT
INT_M_VEHICLE_AIRSHIP


Number of complete vehicles of each type for Blue.

INT_B_VEHICLE_BOAT
INT_B_VEHICLE_AIRSHIP


Number of complete vehicles of each type for Red.

INT_R_VEHICLE_BOAT
INT_R_VEHICLE_AIRSHIP


Number of complete vehicles of each type for Yellow.

INT_Y_VEHICLE_BOAT
INT_Y_VEHICLE_AIRSHIP


Number of complete vehicles of each type for Green.

INT_G_VEHICLE_BOAT
INT_G_VEHICLE_AIRSHIP


Number of each type of follower for thr 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 the 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 by enemies:

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_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_WARRIOR
INT_RELIGIOUS
INT_SPY
INT_FIREWARRIOR

INT_SHAMAN


Building Type Identifiers:

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


???:

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 orientation:


INT_CAMERA_ANGLE
INT_CAMERA_X
INT_CAMERA_Z



See Also:

Internal Attribute Variables






Back to Top

Populous: The Beginning - Internal Attribute Variables



You can change the values of these variables by using the SET Command.


Internal Attribute Variable
Information
INT_ATTR_AWAY_BRAVE
Determines the proportion of braves used in an attack force raised using the DO ATTACK Command.  Can be set to values in the range 0-100.
INT_ATTR_AWAY_FIREWARRIOR
Determines the proportion of fire warriors used in an attack force raised using the DO ATTACK CommandCan be set to values in the range 0-100.
INT_ATTR_AWAY_RELIGIOUS
Determines the proportion of preachers used in an attack force raised using the DO ATTACK CommandCan be set to values in the range 0-100.
INT_ATTR_AWAY_SHAMAN
Determines whether the shaman will take part in the attack.  See the DO ATTACK Command.  Can be set to 0 or 1.
INT_ATTR_AWAY_SPY
Determines the proportion of spies used in an attack force raised using the DO ATTACK CommandCan be set to values in the range 0-100.
INT_ATTR_AWAY_WARRIOR
Determines the proportion of warriors used in an attack force raisued using the DO ATTACK CommandCan be set to values in the range 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, but sometimes set to 0.
INT_ATTR_DEFENSE_RAD_INCR
Normally set to values in the range 0-15.
INT_ATTR_DONT_AUTO_TRAIN_PREACHERS
Rarely used.  Can be set to 0 or 1.
INT_ATTR_DONT_DELETE_USELESS_BOAT_HOUSE
Not used in Bullfrog scripts.
INT_ATTR_DONT_GROUP_AT_DT
This determines whether followers will gather at the CoR or at the main drum tower when they are preparing to attack.  See the Attack Tutorial.
INT_ATTR_DONT_USE_BOATS
Normaly set to 0 or 1.
INT_ATTR_EMPTY_AT_WAYPOINT
When attacking using a balloon, this variable causes followers to leave it when they reach the intermediate waypoint during an attack, and continue from there on foot.  Can be set to 0 or 1.
INT_ATTR_ENEMY_SPY_MAX_STAND
Normally set to 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
Sets the amount of huts the AI will build in their base.
INT_ATTR_MAX_ATTACKS
Sets the maximum number of attacks the AI will perform.
INT_ATTR_MAX_BUILDNIGS_ON_GO
Sets the maximum number of buildings that can be under construction at any given time.
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_BOAT_DRIVERS
...
INT_ATTR_PREF_BOAT_HUTS
Sets the preferred number of boat huts.  The AI will try to build this many boat huts in their base.
INT_ATTR_PREF_FIREWARRIOR_PEOPLE
Sets the preferred number of fire warriors.  The AI will try to train this many fire warriors.  If some are killed, then the AI will train more.
INT_ATTR_PREF_FIREWARRIOR_TRAINS
Sets the preferred number of fire warrior training huts.  The AI will try to build this many fire warrior training huts in their base.
INT_ATTR_PREF_RELIGIOUS_PEOPLE
Sets the preferred number of fire preachers.  The AI will try to train this many preachers.  If some are killed, then the AI will train more.
INT_ATTR_PREF_RELIGOUS_TRAINS
Sets the preferred number of temples.  The AI will try to build this many temples in their base.
INT_ATTR_PREF_SPY_PEOPLE
Sets the preferred number of spies.  The AI will try to train this many spies.  If some are killed, then the AI will train more.
INT_ATTR_PREF_SPY_TRAINS
Sets the preferred number of spy training huts.  The AI will try to build this many spy training huts in their base.
INT_ATTR_PREF_WARRIOR_PEOPLE
Sets the preferred number of warriors.  The AI will try to train this many warriors.  If some are killed, then the AI will train more.
INT_ATTR_PREF_WARRIOR_TRAINS
Sets the preferred number of warrior training huts.  The AI will try to build this many warrior trianing huts in their base.
INT_ATTR_RANDOM_BUILD_SIDE
Usually set to 0, but can also be set to 1.
INT_ATTR_RETREAT_VALUE
...
INT_ATTR_SHAMAN_BLAST
Controls the damage done by the AI Shaman's blast. Normal values are 0, 32, 64, 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 the DO STATE_DEFEND_BASE Command.


See Also:

Attack Tutorial

DO ATTACK Command

DO STATE Commands

Internal Game Variables

SET Command







Back to Top

Pop Script Commands
       DO STATE Commands
       DO Commands



Populous Scripting Commands


This section lists known information about all of the Populous Script commands.  Click a command name below to go to its documentation page.


SET

INCREMENT

DECREMENT

MULTIPLY

DIVIDE

IF, ELSE, ENDIF

EVERY


DO  -  Executes a command.  See the following sections about the commands you can execute with DO.

        DO STATE Commands
       
        DO Commands

 






Back to Top

Pop Script Commands
       DECREMENT Command



DECREMENT Command

Subtracts a given value from a variable or internal attribute variable.



Syntax:

DECREMENT variable value


Parameters:

variable: A user variable or internal attribute variable to decrement.

value: The value to decrement the variable by.


Examples:

DECREMENT $a_variable               2
DECREMENT INT_ATTR_MAX_ATTACKS      14
DECREMENT INT_ATTR_MAX_ATTACKS      $a_variable
DECREMENT $my_variable              INT_ATTR_MAX_ATTACKS



See Also:

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics





Back to Top

Pop Script Commands
       DIVIDE Command



DIVIDE Command

Divides two given values and stores the result in a given variable.



Syntax:

DIVIDE variable value1 value2


Parameters:

variable: A user variable or internal attribute variable to store the result in.

value1, value2: The two values to divide.


Examples:

DIVIDE $result                  10                        2

DIVIDE INT_ATTR_MAX_ATTACKS     $a_variable               10
DIVIDE $result                  INT_ATTR_MAX_ATTACKS      12
DIVIDE $result                  INT_ATTR_MAX_ATTACKS      $my_variable
DIVIDE $result                  $my_variable              INT_ATTR_MAX_ATTACKS



See Also:

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics






Back to Top

Pop Script Commands
       EVERY Command



EVERY Command

Repeats a group of commands after the specified interval.  value1 specifies the repeat time in game turns.  There are about 8 game turns per second.  value2 specifies the offset, which is subtracted from the first period.  For example, if the values were 256 12, then the EVERY command would trigger after 244 game turns, and every 256 game turns thereafter.  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


Parameters:

value1
: The repeat interval in game turns.  This value must be one of these constant values:  (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192).

value2: (optional) The offset in game turns.

NOTE: value1 and value2 are both constants, not variables.


Examples:

// In this example, we increment $my_variable by 1 every 16 game turns.
EVERY 16
{
    INCREMENT $my_variable 1
}


// In this example, we decrement $my_other_variable by 1 after
// 100 game turns and then again every 128 game turns thereafter.

EVERY 128 28
{
    DECREMENT $my_other_variable 1
}



See Also:

DECREMENT Command

INCREMENT Command


Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics







Back to Top

Pop Script Commands
       IF Command



IF Command

Tests a condition.  If the condition tested is true, then the code in the IF block is executed.  If the condition tested is not true, then the code in the ELSE block will be executed (if there is an ELSE block present).  Note that multiple conditions can be tested in one IF statement (hence the ... in the syntax below), however each condition tested must be seperated by a logical operator.



Syntax:

IF ( value1 operator value2 ... )
{
    // Code to run if the condition above is true
}
ELSE
{
    // Code to run if the condition above is not true
}
ENDIF

// You could also make an IF block without an ELSE clause, as
// shown here:

IF (
value1 operator value2 ... )
{
    // Code to run if the condition above is true
}
ENDIF


Parameters:

value1, value2: The two values to compare.  The two values can be constants, user variables, internal game variables, or internal attribute variables.

operator: The comparison operator to use to compare value1 to value2.  This can be any of the following comparison operators.

Comparsion Operators:
==   equal to
!=   not equal to
 >   greater than
 <   less than
>=   greater than or equal to
<=   less than or equal to

Logical Operators:
&&   and
||   or


Examples:

// In this example, we test if $my_variable is less than 10
// and $my_other_variable is not equal to 0.
// If both of these conditions are true, then
// $my_variable is incremented by 1.  Otherwise,
// the two variables are reset so that the next time that
// this IF statement executes, $my_variable would be
// incremented again.

IF ( $my_variable < 10 && $my_other_variable != 0 )
{
    INCREMENT $my_variable  1
}
ELSE
{
    SET $my_variable        0
    SET $my_other_variable  1
}
ENDIF


// In this example, we test if $my_variable is equal to 5.
// If this condition is true, then we reset $my_variable to 0.
// Also notice that we did not add an ELSE clause in this example.

IF ( $my_variable == 5 )
{
    SET $my_variable        0
}
ENDIF



See Also:

INCREMENT Command

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics

SET Command






Back to Top

Pop Script Commands
       INCREMENT Command



INCREMENT Command

Adds a given value to a variable or internal attribute variable.



Syntax:

INCREMENT variable value


Parameters:

variable: A user variable or internal attribute variable to increment.

value: The value to increment the variable by.


Examples:

INCREMENT $a_variable               5
INCREMENT INT_ATTR_MAX_ATTACKS      22
INCREMENT INT_ATTR_MAX_ATTACKS      $my_variable
INCREMENT $my_variable              INT_ATTR_MAX_ATTACKS



See Also:

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics







Back to Top

Pop Script Commands
       MULTIPLY Command



MULTIPLY Command

Multipies two given values and stores the result in a given variable.



Syntax:

MULTIPLY variable value1 value2


Parameters:

variable: A user variable or internal attribute variable to store the result in.

value1, value2: The two values to multiply.


Examples:

MULTIPLY $result                  5                         6

MULTIPLY INT_ATTR_MAX_ATTACKS     $a_variable               10
MULTIPLY $result                  INT_ATTR_MAX_ATTACKS      28
MULTIPLY $result                  INT_ATTR_MAX_ATTACKS      $my_variable
MULTIPLY $result                  $my_variable              INT_ATTR_MAX_ATTACKS



See Also:

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics






Back to Top

Pop Scripting Basics
Pop Script Commands
       SET Command



SET Command

Assigns a given value to a variable or internal attribute variable.



Syntax:

SET variable value


Parameters:

variable: A user variable or internal attribute variable to assign a value to.

value: The value to assign to the variable.


Examples:

SET $a_variable               3
SET
INT_ATTR_MAX_ATTACKS      10
SET INT_ATTR_MAX_ATTACKS      $my_variable
SET $my_variable              INT_ATTR_MAX_ATTACKS



See Also:

Internal Attribute Variables

Internal Game Variables

Pop Scripting Basics






Back to Top

Pop Script Commands
       DO Commands
               DO ATTACK Command



DO ATTACK Command

The ATTACK Command is the major command for making the shaman and/or followers attack an enemy.  See the 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


Parameters:

team: Specifies which enemy team to attack.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

num_ppl: Sets the maximum number of followers that will take part in the attack (excluding the shaman).

target_type: Sets the attack type.  Can be set to ATTACK_MARKER, ATTACK_BUILDING, or ATTACK_PERSON
.

attack_model
: Sets the specific target that the attackers will aim for.  See the
Internal Game Variables page for a list of all the building type indentifiers and follower type identifiers that you could use in this parameter.

damage: This parameter sets the amount of damage the attackers will try to inflict before they withdraw.  Can be set to values in the range 0-999.

spell1, spell2, spell3: These parameters set the spells that the shaman will use if she is taking part in the attack.  When the attackers reach marker1, the shaman will fire spell1 in the direction of marker
2 (that's only if marker2 is specified, otherwise the shaman will use spell1 when she reaches the target).  The shaman will cast spell2 and spell3 when she reaches the target. If the shaman is not taking part in the attack, then set these three parameters to INT_NO_SPECIFIC_SPELL. See the Internal Game Variables page for a list of all the other spell identifiers you could use in these parameters.  If you are making the shaman attack by herself, then consider using DO SPELL_ATTACK.  Note that if the shaman does not have the specified spells charged up and ready to use, she will be unable to take part in the attack.  As a result, she will turn around and head home after arriving at marker1.

attack_type: Sets the attack type.  Can be set to  ATTACK_NORMAL, ATTACK_BY_BOAT, or ATTACK_BY_BALLOON

bring_back_vehicles: Set to 1 for true, or 0 for false.

marker1: Specifies the index number of the first marker.  If marker1 is specified, the attackers will go there on the way to the target and pause to regroup since some units are faster than others.  At that point, if the shaman is in the attack force, she will cast spell1 in the direction of marker2 (if marker2 is specified). 

marker2: Specifies the index number of the second marker.  Sets the direction for any spell cast by the shaman at marker1.

marker3: ???  Specifies the index number of the third marker.  This parameter does not appear to have any function.


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



See Also:

Attack Tutorial

DO SPELL_ATTACK Command

Internal Attribute Variables

Internal Game Variables







Back to Top

Pop Script Commands
       DO Commands
               DO BUILD_AT Command



DO BUILD_AT Command

Places a building plan of the specified building type at the coordinates given.  If that land is not available, it will be placed as near as possible to the given coordinates.



Syntax:

DO BUILD_AT x z building param


Parameters:

x: Specifies the X-coordinate of the location to build at.

z: Specifies the Z-coordinate of the location to build at.


building: Specifies which type of building plan to place down.  See the Internal Game Variables page for a list of all of the building type identifiers that you could use in this parameter.

param: ???   May control the direction the building faces.


Example:

DO BUILD_AT 8 38 INT_DRUM_TOWER 0



See Also:

DO BUILD_DRUM_TOWER Command

DO BUILD_MAIN_DRUM_TOWER Command

DO DELAY_MAIN_DRUM_TOWER Command

DO SET_DRUM_TOWER_POS Command








Back to Top

Pop Script Commands
       DO Commands
               DO BUILD_DRUM_TOWER Command



DO BUILD_DRUM_TOWER Command

Places a drum tower building plan at the specified coordinates.



Syntax:

DO BUILD_DRUM_TOWER x z


Parameters:

x: Specifies the X-coordinate of the location to build the drum tower at.

z: Specifies the Z-coordinate of the location to build the drum tower at.



Example:

DO BUILD_DRUM_TOWER 204 136



See Also:

DO BUILD_AT Command

DO BUILD_MAIN_DRUM_TOWER Command

DO DELAY_MAIN_DRUM_TOWER Command

DO PUT_PERSON_IN_DT Command

DO SET_DRUM_TOWER_POS Command






Back to Top

Pop Script Commands
       DO Commands
               DO BUILD_MAIN_DRUM_TOWER Command



DO BUILD_MAIN_DRUM_TOWER Command

Restarts the building of the main drum tower after it has been halted by the DO DELAY_MAIN_DRUM_TOWER Command .  See also DO SET_DRUM_TOWER_POS Command .



Syntax:

DO BUILD_MAIN_DRUM_TOWER


Parameters:

None.


Example:

DO BUILD_MAIN_DRUM_TOWER



See Also:

DO BUILD_AT Command

DO BUILD_DRUM_TOWER Command

DO DELAY_MAIN_DRUM_TOWER Command


DO PUT_PERSON_IN_DT Command

DO SET_DRUM_TOWER_POS Command






Back to Top

Pop Script Commands
       DO Commands
               DO CAMERA_ROTATION Command



DO CAMERA_ROTATION Command

Causes the camera to start rotating at a specified speed.  The camera will not stop rotating until you call the DO STOP_CAMERA_ROTATION Command .

NOTE: If you want to create more complex camera sequences, see the command documentation pages for the flyby commands.  Go to the DO FLYBY_CREATE_NEW Command page, from which you can go directly to the command documentation pages for all of the other flyby commands as well.



Syntax:

DO CAMERA_ROTATION speed


Parameters:

speed: Specifies how fast the camera will rotate.


Example:

DO CAMERA_ROTATION 10



See Also:

DO FLYBY_CREATE_NEW Command

DO STOP_CAMERA_ROTATION Command

DO TRACK_SHAMAN_TO_ANGLE Command

DO TRACK_TO_MARKER Command

DO ZOOM_TO Command







Back to Top

Pop Script Commands
       DO Commands
               DO CLEAR_ALL_MSG Command



DO CLEAR_ALL_MSG Command

Clears all messages from the player's message queue on the left side of the screen.



Syntax:

DO CLEAR_ALL_MSG


Parameters:

None.


Example:

DO CLEAR_ALL_MSG



See Also:

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command






Back to Top

Pop Script Commands
       DO Commands
               DO CLEAR_GUARDING_FROM Command



DO CLEAR_GUARDING_FROM Command

Cancels up to 4 previously activated marker entries.  See also: DO MARKER_ENTRIES Command.



Syntax:

DO CLEAR_GUARDING_FROM entry1 entry2 entry3 entry4


Parameters:

entry1, entry2, entry3, entry4: Specifies the index number of the marker entry to deactivate.  If you are deactivating fewer than four marker entries, set the unused entry parameters to -1.


Example:

// This example deactivates two previously created marker entries.  The last two paremeters are set to -1
// since they are unused.
DO CLEAR_GUARDING_FROM 18 19 -1 -1



See Also:

DO GUARD_AT_MARKER Command

DO GUARD_BETWEEN_MARKERS Command

DO MARKER_ENTRIES Command

DO ONLY_STAND_AT_MARKERS Command

DO SET_MARKER_ENTRY Command

DO VEHICLE_PATROL Command





Back to Top

Pop Script Commands
       DO Commands
               DO CLEAR_STANDING_PEOPLE Command



DO CLEAR_STANDING_PEOPLE Command

???



Syntax:

DO CLEAR_STANDING_PEOPLE


Parameters:

None.


Example:

DO CLEAR_STANDING_PEOPLE



See Also:







Back to Top

Pop Script Commands
       DO STATE Commands
       DO Commands



Populous Scripting DO Commands


This section contains known information about all of the Populous Scripting DO commands.  Click on a command name below to go to its command documentation page.  Note that some commands can be used in the initialization section of a script, while others won't work if you try to use them there.

 

A

DO
      
        ATTACK

 

B


DO

        BUILD_AT

        BUILD_DRUM_TOWER

        BUILD_MAIN_DRUM_TOWER

 

C


DO

        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

        CREATE_MSG_INFORMATION_ZOOM

        CREATE_MSG_NARRATIVE

 

D


DO

        DEFEND_SHAMAN

        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

 

E


DO

        ENABLE_USER_INPUTS

 

F


DO

        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_START

        FLYBY_STOP

 

G


DO

        GET_HEAD_TRIGGER_COUNT

        GET_HEIGHT_AT_POS

        GET_NUM_ONE_OFF_SPELLS

        GET_NUM_PEOPLE_BEING_PREACHED

        GET_SPELLS_CAST

        GIVE_MANA_TO_PLAYER

        GIVE_ONE_SHOT

        GIVE_PLAYER_SPELL

        GUARD_AT_MARKER

        GUARD_BETWEEN_MARKERS

 

H


DO       

        HAS_TIMER_REACHED_ZERO

       

I


DO

        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

K
DO

        KILL_TEAM_IN_AREA

 

M


DO

        MARKER_ENTRIES

        MARVELLOUS_HOUSE_DEATH

        MOVE_SHAMAN_TO_MARKER

 

N


DO

        NAV_CHECK

 

O


DO

        ONLY_STAND_AT_MARKERS

        OPEN_DIALOG

 

P


DO

        PARTIAL_BUILDING_COUNT

        PRAY_AT_HEAD

        PREACH_AT_MARKER

        PUT_PERSON_IN_DT

 

R


DO

        REMOVE_HEAD_AT_POS

        REMOVE_PLAYER_THING

        REMOVE_TIMER

        RESET_BASE_MARKER

 

S


DO

        SEND_ALL_PEOPLE_TO_MARKER

        SEND_BLUE_PEOPLE_TO_MARKER

        SEND_SHAMAN_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

 

T


DO

        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

       

V


DO

        VEHICLE_PATROL

       

Z


DO

        ZOOM_TO




 






Back to Top

Pop Script Commands
       DO Commands
               DO CONVERT_AT_MARKER Command



DO CONVERT_AT_MARKER Command

Causes the AI shaman to go to the specified marker.  Once there, she will convert any wildmen that are within her spell range.



Syntax:

DO CONVERT_AT_MARKER marker


Parameters:

marker: Specifies the index number of the marker the AI shaman should go to.


Example:

DO CONVERT_AT_MARKER 3



See Also:

DO DESELECT_ALL_BLUE_PEOPLE Command

DO PRAY_AT_HEAD Command

DO PREACH_AT_MARKER Command

DO SEND_ALL_PEOPLE_TO_MARKER Command

DO SEND_BLUE_PEOPLE_TO_MARKER Command






Back to Top

Pop Script Commands
       DO Commands
               DO COUNT_ANGELS Command



DO COUNT_ANGELS Command

Counts the number of Angels of Death owned by the specified team, and stores the result in the specified variable.



Syntax:

DO COUNT_ANGELS team variable


Parameters:

team: Specifies which team's Angels of Death to count.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

variable: Specifies the variable to store the count in.


Example:

DO COUNT_ANGELS BLUE $count



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO COUNT_BLUE_IN_HOUSES Command



DO COUNT_BLUE_IN_HOUSES Command

Counts the number of blue followers that are currently in huts, and stores the result in the specified variable.



Syntax:

DO COUNT_BLUE_IN_HOUSES variable


Parameters:

variable: Specifies the variable to store the count in.


Example:

DO COUNT_BLUE_IN_HOUSES $count



See Also:

DO COUNT_ANGELS Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO COUNT_BLUE_SHAPES Command



DO COUNT_BLUE_SHAPES Command

Counts the number of building plans the player has placed down, and stores the result in the specified variable.  This only counts building plans for which the building hasn't been constructed yet.  For example, if you have 2 huts already built and you've placed building plans for 3 more, this command would return 3.



Syntax:

DO COUNT_BLUE_SHAPES variable


Parameters:

variable: Specifies the variable to store the count in.


Example:

DO COUNT_BLUE_SHAPES $count



See Also:

DO COUNT_ANGELS Command

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO COUNT_BLUE_WITH_BUILD_COMMAND Command



DO COUNT_BLUE_WITH_BUILD_COMMAND Command

Counts the number of blue followers who are currently constructing buildings, and stores the result in the specified variable. 



Syntax:

DO COUNT_BLUE_WITH_BUILD_COMMAND variable


Parameters:

variable: Specifies the variable to store the count in.


Example:

DO COUNT_BLUE_WITH_BUILD_COMMAND $count



See Also:

DO COUNT_ANGELS Command

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO COUNT_PEOPLE_IN_MARKER Command



DO COUNT_PEOPLE_IN_MARKER Command

Counts the number of followers from the specified team that are within a given radius of the specified marker, and stores the result in the given variable. 



Syntax:

DO COUNT_PEOPLE_IN_MARKER team marker radius variable


Parameters:

team: Specifies which team's followers to count.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

marker
: Specifies the index of the marker to count at.

radius
: Specifies the radius to count within.

variable: Specifies variable to store the count in.


Example:

// This example counts the number of red followers that are within a 6 unit radius of marker 3.
DO COUNT_PEOPLE_IN_MARKER RED 3 6 $count



See Also:

DO COUNT_ANGELS Command

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO CREATE_MSG_INFORMATION Command



DO CREATE_MSG_INFORMATION Command

Drops an information message tag (green 'i') onto the message queue on the left side of the player's screen.  When the player clicks on it, the game is paused and the message is displayed.



Syntax:

DO CREATE_MSG_INFORMATION idx


Parameters:

idx: Specifies the index of the message to display in the message box.  For example, setting this parameter to 78 will result in the message "I have created my reincarnation site and the settlement is nearly complete."  The messages themselves are stored in the lang00.dat file in the /language/ subfolder of the main Populous folder.


Example:

DO CREATE_MESSAGE_INFORMATION 78



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command





Back to Top

Pop Script Commands
       DO Commands
               DO CREATE_MSG_INFORMATION_ZOOM Command



DO CREATE_MSG_INFORMATION_ZOOM Command

Drops a zoom information message tag (green 'i' with a small white triangle in the upper right corner) onto the message queue on the left side of the player's screen.  When the player clicks on it, the game is paused, the message is displayed, and the camera moves to the position specified.  When the player closes the message box, the camera returns to its previous position.



Syntax:

DO CREATE_MSG_INFORMATION_ZOOM idx x z angle


Parameters:

idx: Specifies the index of the message to display in the message box.  For example, setting this parameter to 78 will result in the message "I have created my reincarnation site and the settlement is nearly complete."  The messages themselves are stored in the lang00.dat file in the /language/ subfolder of the main Populous folder.

x: Specifies the
X-position of the place to zoom to.

z: Specifies the Z-position of the place to zoom to.

angle: Specifies the angle of the camera.


Example:

DO CREATE_MESSAGE_INFORMATION_ZOOM 78 18 250 71



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command





Back to Top

Pop Script Commands
       DO Commands
               DO CREATE_MSG_NARRATIVE Command



DO CREATE_MSG_NARRATIVE Command

Drops an narrative message tag (open book symbol) onto the message queue on the left side of the player's screen.  When the player clicks on it, the game is paused and the message is displayed.



Syntax:

DO CREATE_MSG_NARRATIVE idx


Parameters:

idx: Specifies the index of the message to display in the message box.  For example, setting this parameter to 78 will result in the message "I have created my reincarnation site and the settlement is nearly complete."  The messages themselves are stored in the lang00.dat file in the /language/ subfolder of the main Populous folder.


Example:

DO CREATE_MESSAGE_NARRATIVE 78



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command






Back to Top

Pop Script Commands
       DO Commands
               DO DEFEND_SHAMAN Command



DO DEFEND_SHAMAN Command

Sends a specified number of followers to guard the shaman (equivalant to the 'G' command when playing).  You can have the followers guarding the shaman stop guarding and head home by using the DO SEND_SHAMAN_DEFENDERS_HOME Command .



Syntax:

DO DEFEND_SHAMAN num_ppl


Parameters:

num_ppl: Specifies the number of followers to send to guard the shaman.


Example:

DO DEFEND_SHAMAN 10



See Also:

DO SEND_SHAMAN_DEFENDERS_HOME Command

DO STATE_DEFEND Command







Back to Top

Pop Script Commands
       DO Commands
               DO DELAY_MAIN_DRUM_TOWER Command



DO DELAY_MAIN_DRUM_TOWER Command

Prevents the braves from building the main drum tower (see DO SET_DRUM_TOWER_POS Command ).  This can be reversed by using the DO BUILD_MAIN_DRUM_TOWER Command.



Syntax:

DO DELAY_MAIN_DRUM_TOWER


Parameters:

None.


Example:

DO DELAY_MAIN_DRUM_TOWER



See Also:

DO BUILD_AT Command

DO BUILD_DRUM_TOWER Command

DO BUILD_MAIN_DRUM_TOWER Command

DO PUT_PERSON_IN_DT Command

DO SET_DRUM_TOWER_POS Command







Back to Top

Pop Script Commands
       DO Commands
               DO DELETE_SMOKE_STUFF Command



DO DELETE_SMOKE_STUFF Command

???



Syntax:

DO DELETE_SMOKE_STUFF x z radius


Parameters:

x: Specifies the X-coordinate of the location.

z: Specifies the Z-coordinate of the location.

radius: Specifies the radius.


Example:

DO DELETE_SMOKE_STUFF 92 194 5



See Also:






Back to Top

Pop Script Commands
       DO Commands
               DO DESELECT_ALL_BLUE_PEOPLE Command



DO DESELECT_ALL_BLUE_PEOPLE Command

Deselects all selected blue followers (including the shaman if she is selected).



Syntax:

DO DESELECT_ALL_BLUE_PEOPLE


Parameters:

None.


Example:

DO DESELECT_ALL_BLUE_PEOPLE



See Also:

DO CONVERT_AT_MARKER Command

DO PRAY_AT_HEAD Command

DO PREACH_AT_MARKER Command

DO SEND_ALL_PEOPLE_TO_MARKER Command?

DO SEND_BLUE_PEOPLE_TO_MARKER Command?







Back to Top

Pop Script Commands
       DO Commands
               DO DISABLE_USER_INPUTS Command



DO DISABLE_USER_INPUTS Command

User input will be ignored until the DO ENABLE_USER_INPUTS Command is given.



Syntax:

DO DISABLE_USER_INPUTS


Parameters:

None.


Example:

DO DISABLE_USER_INPUTS



See Also:

DO ENABLE_USER_INPUTS Command






Back to Top

Pop Script Commands
       DO Commands
               DO DONT_TARGET_BLUE_DRUM_TOWERS Command



DO DONT_TARGET_BLUE_DRUM_TOWERS Command

???



Syntax:

DO DONT_TARGET_BLUE_DRUM_TOWERS


Parameters:

None.


Example:

DO DONT_TARGET_BLUE_DRUM_TOWERS



See Also:

DO DONT_TARGET_BLUE_SHAMAN Command

DO DONT_TARGET_FIREWARRIORS Command

DO TARGET_BLUE_DRUM_TOWERS command?

DO TARGET_BLUE_SHAMAN Command?

DO TARGET_FIREWARRIORS Command?






Back to Top

Pop Script Commands
       DO Commands
               DO DONT_TARGET_BLUE_SHAMAN Command



DO DONT_TARGET_BLUE_SHAMAN Command

???



Syntax:

DO DONT_TARGET_BLUE_SHAMAN


Parameters:

None.


Example:

DO DONT_TARGET_BLUE_SHAMAN



See Also:

DO DONT_TARGET_BLUE_DRUM_TOWERS Command

DO DONT_TARGET_FIREWARRIORS Command

DO TARGET_BLUE_DRUM_TOWERS command?

DO TARGET_BLUE_SHAMAN Command?

DO TARGET_FIREWARRIORS Command?






Back to Top

Pop Script Commands
       DO Commands
               DO DONT_TARGET_FIREWARRIORS Command



DO DONT_TARGET_FIREWARRIORS Command

???



Syntax:

DO DONT_TARGET_FIREWARRIORS


Parameters:

None.


Example:

DO DONT_TARGET_FIREWARRIORS



See Also:

DO DONT_TARGET_BLUE_DRUM_TOWERS Command

DO DONT_TARGET_BLUE_SHAMAN Command

DO TARGET_BLUE_DRUM_TOWERS command?

DO TARGET_BLUE_SHAMAN Command?

DO TARGET_FIREWARRIORS Command?





Back to Top

Pop Script Commands
       DO Commands
               DO ENABLE_USER_INPUTS Command



DO ENABLE_USER_INPUTS Command

Enables user input after it has been disabled by the DO DISABLE_USER_INPUTS Command.



Syntax:

DO ENABLE_USER_INPUTS


Parameters:

None.


Example:

DO ENABLE_USER_INPUTS



See Also:

DO DISABLE_USER_INPUTS Command






Back to Top

Pop Script Commands
       DO Commands
               DO FIX_WILD_IN_AREA Command



DO FIX_WILD_IN_AREA Command

???



Syntax:

DO FIX_WILD_IN_AREA x z radius


Parameters:

x: Specifies the X-coordinate of the location.

z: Specifies the Z-coordinate of the location.

radius: Specifies the radius.


Example:

DO FIX_WILD_IN_AREA 6 88 14



See Also:








Back to Top

Pop Script Commands
       DO Commands
               DO FLASH_BUTTON Command



DO FLASH_BUTTON Command

Puts a flashing white border around the specified button on the panel on the left side of the screen, or removes it depending on the value of the state parameter.



Syntax:

DO FLASH_BUTTON idx state


Parameters:

idx: Specifies the index number of the button to activate or deactivate a white flashing border for.  Can be set to one of the values listed below:

Possible Values for the idx Parameter:
You may notice some index numbers are skipped in this list.  That's because nothing happened when I tested those values.  Also, there don't seem to be values that work for the Teleport spell button or the Bloodlust spell button, so I guess you can't put a flashing border around those 2 buttons.  As for the indices that are skipped (like 17 and 25), my guess is that they were for buttons that didn't make it into the final version of the game or something.  I put some blank lines in various parts of this list to divide it up into different groups so its easier to read.

 0 = The Hut button
 1 = The Guard Tower button
 2 = The Temple button
 3 = The Spy Training Hut Button
 4 = The Warrior Training Hut button
 5 = The Firewarrior Training Hut button
 6 = The Boat House button
 7 = The Balloon Hut button
 8 = The Guard Post button

 9 = The Dakini Tribe Icon
10 = Chumara Tribe Icon
11 = Matak Tribe Icon

13 = The Spells Tab
14 = The Buildings Tab
15 = The Followers Tab
16 = The Shaman button
18 = The Blast spell button
19 = The Lightning spell button
20 = The Tornado spell button
21 = The Swarm spell button
22 = The Invisibility spell button
23 = The Hypnotise spell button
24 = The Firestorm spell button
26 = The Erode spell button
27 = The Swamp spell button
28 = The Land Bridge spell button
29 = The Angel of Death spell button
30 = The Earthquake spell button
31 = The Flatten spell button
32 = The Convert spell button
33 = The Volcano spell button
34 = The Armageddon spell button
35 = The Magical Shield spell button

38 = The Map display


state: If set to ON, a white flashing border is activated around the specified button.  If set to OFF, the white border around the specified button is deactivated.


Example:

DO FLASH_BUTTON 16 ON



See Also:

DO TURN_PANEL_ON Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_CREATE_NEW Command



DO FLYBY_CREATE_NEW Command

Starts the creation of a new flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_CREATE_NEW


Parameters:

None.


Example:

DO FLYBY_CREATE_NEW



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command

DO FLYBY_STOP Command







Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_SET_END_TARGET Command



DO FLYBY_SET_END_TARGET Command

???  This command doesn't do what you'd think based on its name.  I don't know for sure what it does but it doesn't appear to have any effect on the camera itself.  Looking at some Bullfrog scripts, I noticed that they always set the first two parameters to values identical to the values they used in the first two parameters of one of their calls to the DO FLYBY_SET_EVENT_POS Command.  They also seem to put an extra call to the DO FLYBY_SET_EVENT_POS Command at the end of the flyby script to return the camera to where it started (usually the player's base).  In addition, they seem to set the 3rd parameter to the same direction they rotated the camera to in the last rotation that happens in the flyby sequence.  The last parameter seems to always be set to 0.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_SET_END_TARGET x z direction zoom


Parameters:

x: Specifies the X-coordinate of the location.

z: Specifies the Z-coordinate of the location.

direction: In Bullfrog scripts, this parameter is always set to whatever direction they rotated the camera to in the last camera rotation they did in the flyby sequence.

zoom: In Bullfrog scripts, this parameter always seems to be set to 0.


Example:

DO FLYBY_SET_END_TARGET 60 202 2000 0



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_SET_EVENT_ANGLE Command



DO FLYBY_SET_EVENT_ANGLE Command

Specifies a direction for the camera to rotate to at a specific time during a flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_SET_EVENT_ANGLE direction start duration


Parameters:

direction: Specifies the direction for the the camera to rotate to. Here are some possible values: 0 = north, 500 = east, 1000 = south, and 1500 = west.  Whether the camera will do a clockwise or counter-clockwise rotation depends on which direction would be the shortest rotation distance for the camera to reach the specified direction.  For example, if the camera is facing north, and a call to this command tells it to rotate to face west, then the camera will rotate counter-clockwise since that would be a 90 degree rotation, compared to the 270 degree rotation it would do if went clockwise.

start: Specifies the time during the flyby sequence at which the camera should rotate to the specified direction.  For example, setting this parameter to 20 would cause the camera to rotate to the specified direction 20 game turns after the flyby sequence started.

duration: Specifies how long (in game turns) you want it to take the camera to rotate from the direction it's currenty facing to the specified direction.


Example:

DO FLYBY_SET_EVENT_ANGLE 1575 371 50



See Also:

DO CAMERA_ROTATION Command


DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_SET_EVENT_POS Command



DO FLYBY_SET_EVENT_POS Command

Specifies a location for the camera to go to and focus on at a given time during a flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_SET_EVENT_POS x z start duration


Parameters:

x: Specifies the X-coordinate of the location for the camera to go to.

z: Specifies the Z-coordinate of the location for the camera to go to.

start: Specifies the time during the flyby sequence at which the camera should go to the specified location.  For example, setting this parameter to 20 would cause the camera to go to the specified location 20 game turns after the flyby sequence started.

duration: Specifies how long (in game turns) you want it to take the camera to travel from its current location to the specified location.


Example:

DO FLYBY_SET_EVENT_POS 60 202 360 50



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_SET_EVENT_TOOLTIP Command



DO FLYBY_SET_EVENT_TOOLTIP Command

Specifies a tooltip to be displayed at a given location at a specified time during a flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_SET_EVENT_TOOLTIP x z idx start duration


Parameters:

x: Specifies the X-coordinate of the location to display the tooltip at.

z: Specifies the Z-coordinate of the location to display the tooltip at.

idx: Specifies the index of the tooltip to display.  For example, setting this parameter to 3 will display the tooltip "Casting on shaman has no effect: See Encyclopeadia.".  The tooltips are stored in the lang00.dat file.

start: Specifies the time during the flyby sequence at which the the tooltip should be displayed.  For example, setting this parameter to 20 would cause the specified tooltip to be displayed at the given location 20 game turns after the flyby sequence started.

duration: Specifies how long (in game turns) you want tooltip to remain visible for.


Example:

DO FLYBY_SET_EVENT_TOOLTIP 96 136 3 100 40



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_SET_EVENT_ZOOM Command



DO FLYBY_SET_EVENT_ZOOM Command

Specifies for the camera to zoom in or out at a specific time during a flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_SET_EVENT_ZOOM zoom start duration


Parameters:

zoom: Specifies the new zoom level for the camera to zoom in or out to.  Values for this parameter can range from -100 to 100 with 0 being the camera's normal zoom level, 100 means zoom all the way in, and -100 means zoom all the way out.

start: Specifies the time during the flyby sequence at which the camera should zoom in or out the specified amount.  For example, setting this parameter to 20 would cause the camera to zoom as specified by the zoom parameter 20 game turns after the flyby sequence started.

duration: Specifies how long (in game turns) you want it to take the camera to transition from its current zoom level to the specified zoom level.  This parameter basically controls how fast or slow the camera will zoom in or out. 


Example:

DO FLYBY_SET_EVENT_ZOOM 0 208 132



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_START Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_START Command



DO FLYBY_START Command

Starts a flyby sequence that has been created using the other flyby commands.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_START


Parameters:

None.


Example:

DO FLYBY_START



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_STOP Command






Back to Top

Pop Script Commands
       DO Commands
               DO FLYBY_STOP Command



DO FLYBY_STOP Command

Stops a flyby sequence.

NOTE: If you want to do a simpler camera manipulation than a flyby sequence, then see the DO CAMERA_ROTATION Command page, from which you can go directly to the command documentation pages for all of the other simple camera manipulation commands as well.



Syntax:

DO FLYBY_STOP


Parameters:

None.


Example:

DO FLYBY_STOP



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_END_TARGET Command

DO FLYBY_SET_EVENT_ANGLE Command

DO FLYBY_SET_EVENT_POS Command

DO FLYBY_SET_EVENT_TOOLTIP Command

DO FLYBY_SET_EVENT_ZOOM Command

DO FLYBY_START Command






Back to Top

Pop Script Commands
       DO Commands
               DO GET_HEAD_TRIGGER_COUNT Command



DO GET_HEAD_TRIGGER_COUNT Command

Gets a count of the number of times the stone head or totem pole at the specified location has been triggered.  The result is stored in the specified variable.



Syntax:

DO GET_HEAD_TRIGGER_COUNT x z variable


Parameters:

x: Specifies the X-coordinate of the stone head.

z: Specifies the Z-coordinate of the stone head.

variable: Specifies the variable to store the count in.


Example:

DO GET_HEAD_TRIGGER_COUNT 32 18 $count



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEIGHT_AT_POS Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO GET_HEIGHT_AT_POS Command



DO GET_HEIGHT_AT_POS Command

Gets the height of the ground at the location of the specified marker.  The result is stored in the specified variable.  This command is useful for determining if water has been bridged.



Syntax:

DO GET_HEIGHT_AT_POS marker variable


Parameters:

marker: Specifies the index number of the marker whose location you want to get the height of the ground at.

variable: Specifies the variable to store the result in.


Example:

DO GET_HEIGHT_AT_POS 2 $result



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO GET_NUM_ONE_OFF_SPELLS Command



DO GET_NUM_ONE_OFF_SPELLS Command

Gets a count of the number of spells of a given type that the specified team has charged and ready for use.  The result is stored in the specified variable.



Syntax:

DO GET_NUM_ONE_OFF_SPELLS team spell variable


Parameters:

team: Specifies which team to get a count for.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

spell: Specifies which spell to get a count for.  See the Internal Game Variables page for a list of all of the spell type identifiers you can use in this parameter.

variable: Specifies the variable to store the count in.


Example:

DO GET_NUM_ONE_OFF_SPELLS 0 INT_HYPNOTISM $count



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_HEIGHT_AT_POS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command

Internal Game Variables







Back to Top

Pop Script Commands
       DO Commands
               DO GET_NUM_PEOPLE_BEING_PREACHED Command



DO GET_NUM_PEOPLE_BEING_PREACHED Command

Gets a count of the number of followers of the specified team that are currently being preached by enemy preachers.  The result is stored in the specified variable.



Syntax:

DO GET_NUM_PEOPLE_BEING_PREACHED team variable


Parameters:

team: Specifies which team to get a count for.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

variable: Specifies the variable to store the count in.


Example:

DO GET_NUM_PEOPLE_BEING_PREACHED BLUE $count



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_HEIGHT_AT_POS Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_SPELLS_CAST Command

DO PARTIAL_BUILDING_COUNT Command






Back to Top

Pop Script Commands
       DO Commands
               DO GET_SPELLS_CAST Command



DO GET_SPELLS_CAST Command

Gets a count of the number of times that a given spell has been cast by the specified team.  The result is stored in the specified variable.



Syntax:

DO GET_SPELLS_CAST team spell variable


Parameters:

team: Specifies which team to get a count for.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

spell: Specifies which spell to get a count for.  See the Internal Game Variables page for a list of all of the spell type identifiers that you can use in this parameter.

variable: Specifies the variable to store the count in.


Example:

// This example gets a count of the number of times that the blue team has cast the
// Erosion spell.

DO GET_SPELLS_CAST BLUE INT_EROSION $count



See Also:

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_HEIGHT_AT_POS Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO PARTIAL_BUILDING_COUNT Command

Internal Game Variables







Back to Top

Pop Script Commands
       DO Commands
               DO GIVE_MANA_TO_PLAYER Command



DO GIVE_MANA_TO_PLAYER Command

Gives the specified amount of mana to the specified team.



Syntax:

DO GIVE_MANA_TO_PLAYER team mana


Parameters:

team: Specifies which team to give the mana to.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

mana: Specifies the amount of mana to give to the specified team.


Example:

DO GIVE_MANA_TO_PLAYER RED 500000



See Also:

DO GIVE_ONE_SHOT Command

DO GIVE_PLAYER_SPELL Command






Back to Top

Pop Script Commands
       DO Commands
               DO GIVE_ONE_SHOT Command



DO GIVE_ONE_SHOT Command

Gives one shot of the specified spell to the specified team. 

Note that if you specify INT_BLOODLUST, INT_TELEPORT, or INT_WRATH_OF_GOD in the spell parameter, it won't give the player a shot of the spell unless the spell can also be obtained somewhere in the level via a stone head or something.



Syntax:

DO GIVE_ONE_SHOT spell team


Parameters:

spell: Specifies the spell to give one shot of to the specified team.  See the Internal Game Variables page for a list of all of the spell type identifiers that you can use in this parameter.

team: Specifies the team to give one shot of the specified spell to. 
Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.


Example:

DO GIVE_ONE_SHOT INT_LIGHTNING BLUE



See Also:

DO GIVE_MANA_TO_PLAYER Command

DO GIVE_PLAYER_SPELL Command

Internal Game Variables






Back to Top

Pop Script Commands
       DO Commands
               DO GIVE_PLAYER_SPELL Command



DO GIVE_PLAYER_SPELL Command

Gives the specified spell to the specified team.  For example if you were to call this command with the team parameter set to BLUE, then the specified spell would appear on the player's Spells panel.

Note that if you specify INT_BLOODLUST, INT_TELEPORT, or INT_WRATH_OF_GOD in the spell parameter, it won't give the player the spell unless the spell can also be obtained somewhere in the level via a stone head or something.



Syntax:

DO GIVE_PLAYER_SPELL team spell


Parameters:

team: Specifies the team to give the specified spell to.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

spell: Specifies the spell to give to the specified team.  See the Internal Game Variables page for a list of all of the spell type identifiers that you can use in this parameter.


Example:

DO GIVE_PLAYER_SPELL BLUE INT_SWAMP



See Also:

DO GIVE_MANA_TO_PLAYER Command

DO GIVE_ONE_SHOT Command

Internal Game Variables







Back to Top

Pop Script Commands
       DO Commands
               DO GUARD_AT_MARKER Command



DO GUARD_AT_MARKER Command

Sets up a group of followers to guard at a designated marker.  They will run around the marker in a circle.  You can make them just stand at the marker instead by using the DO ONLY_STAND_AT_MARKERS Command .  Getting a group of followers to guard at a marker can also be accomplished by using the DO SET_MARKER_ENTRY Command, which seems to be the method prefered by Bullfrog.



Syntax:

DO GUARD_AT_MARKER marker braves warriors firewarriors preachers guard


Parameters:

marker: Specifies the index of the marker you want the followers to guard at.

braves: Specifies the number of braves to put in the patrol group.

warriors: Specifies the number of warriors to put in the patrol group.

firewarriors: Specifies the number of fire warriors to put in the patrol group.

preachers: Specifies the number of preachers to put in the patrol group.

guard: Set this parameter to GUARD_NORMAL.


Example:

// This example creates a patrol group of 7 warriors to guard at marker 18.
DO GUARD_AT_MARKER 18 0 7 0 0 GUARD_NORMAL




See Also:

DO CLEAR_GUARDING_FROM Command

DO GUARD_BETWEEN_MARKERS Command

DO MARKER_ENTRIES Command

DO ONLY_STAND_AT_MARKERS Command

DO SET_MARKER_ENTRY Command

DO VEHICLE_PATROL Command







Back to Top

Pop Script Commands
       DO Commands
               DO GUARD_BETWEEN_MARKERS Command



DO GUARD_BETWEEN_MARKERS Command

Sets up a group of followers to guard between two designated markers.  Getting a group of followers to guard between two markers can also be accomplished by using the DO SET_MARKER_ENTRY Command, which seems to be the method prefered by Bullfrog.



Syntax:

DO GUARD_BETWEEN_MARKERS marker1 marker2 braves warriors firewarriors preachers guard


Parameters:

marker1, marker2: Specifies the indexes of the markers you want the followers to guard between.

braves: Specifies the number of braves to put in the patrol group.

warriors: Specifies the number of warriors to put in the patrol group.

firewarriors: Specifies the number of fire warriors to put in the patrol group.

preachers: Specifies the number of preachers to put in the patrol group.

guard: Set this parameter to GUARD_NORMAL.


Example:

// This example creates a patrol group of 7 warriors to guard between markers 28 and 29.
DO GUARD_BETWEEN_MARKERS 28 29 0 7 0 0 GUARD_NORMAL




See Also:

DO CLEAR_GUARDING_FROM Command

DO GUARD_AT_MARKER Command

DO MARKER_ENTRIES Command

DO ONLY_STAND_AT_MARKERS Command

DO SET_MARKER_ENTRY Command

DO VEHICLE_PATROL Command






Back to Top

Pop Script Commands
       DO Commands
               DO HAS_TIMER_REACHED_ZERO Command



DO HAS_TIMER_REACHED_ZERO Command

Checks to see if the timer has reached zero.  This command will return 1 if it as, or 0 if it hasn't.  This return value is stored in variable.



Syntax:

DO HAS_TIMER_REACHED_ZERO variable


Parameters:

variable: The variable to store the result in.


Example:

DO HAS_TIMER_REACHED_ZERO $result



See Also:

DO REMOVE_TIMER Command

DO SET_TIMER_GOING Command

Viewing the Values of Variables While in the Game Tutorial






Back to Top

Pop Script Commands
       DO Commands
               DO I_HAVE_ONE_SHOT Command



DO I_HAVE_ONE_SHOT Command

Checks to see if the AI shaman has one or more shots of the specified spell available.  This command returns 1 if she does, or 0 otherwise.  The result is stored in the given variable.  It is unknown how this command works when you set the type parameter to BUILDING_TYPE and the model paremeter to a building type identifier.  In Bullfrog scripts, it seems this command is never used in this way. I thought maybe it would return 1 if there was at least one of the specified type of building available in the AI base, but that doesn't seem to be the case.



Syntax:

DO I_HAVE_ONE_SHOT type model variable


Parameters:

type
: Specifies the type of resource to check (spells or buildings).  Can be set to SPELL_TYPE or BUILDING_TYPE.

model: Specifies the spell type or building type.  See the Internal Game Variables page for a list of all the spell type and building type identifiers you can use in this parameter.

variable: Specifies the variable to store the result in.


Example:

DO I_HAVE_ONE_SHOT SPELL_TYPE INT_TORNADO $result



See Also:

DO IS_BUILDING_NEAR Command

DO IS_PLAYER_IN_WORLD_VIEW Command

DO IS_PRISON_ON_LEVEL Command

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command

DO IS_SHAMAN_IN_AREA Command





Back to Top

Pop Script Commands
       DO Commands
               DO IS_BUILDING_NEAR Command



DO IS_BUILDING_NEAR Command

Checks to see if a building of the specified type is present within a given radius of a specified location.  This command returns 1 if there is, or 0 otherwise.  The result is stored in the given variable.



Syntax:

DO IS_BUILDING_NEAR building_type x z team radius variable


Parameters:

building_type
: Specifies the type of building to check for.  See the Internal Game Variables page for a list of all of the building type identifiers that you can use in this parameter.

x: Specifies the X-coordinate of the location to check at.

z: Specifies the Z-coordinate of the location to check at.

team
: Specifies which team's building to look for.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

radius: Specifies the radius to look within.

variable: Specifies the variable to store the result in.


Example:

// This example checks if there is a red drum tower within a radius of 5 units from the location at coordinates (136, 246).
DO IS_BUILDING_IN_AREA INT_DRUM_TOWER 136 246 RED 5 $result



See Also:

DO I_HAVE_ONE_SHOT Command

DO IS_PLAYER_IN_WORLD_VIEW Command

DO IS_PRISON_ON_LEVEL Command

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command

DO IS_SHAMAN_IN_AREA Command







Back to Top

Pop Script Commands
       DO Commands
               DO IS_PLAYER_IN_WORLD_VIEW Command



DO IS_PLAYER_IN_WORLD_VIEW Command

Checks to see if the player is in world view (when you press Enter in the game, the camera zooms way out so you can view the level from orbit around the planet. This is the world view.)  This command returns 1 if player is in world view, or 0 otherwise.  This result is stored in the given variable.



Syntax:

DO IS_PLAYER_IN_WORLD_VIEW variable


Parameters:

variable: Specifies the variable to store the result in.


Example:

DO IS_PLAYER_IN_WORLD_VIEW $result



See Also:

DO I_HAVE_ONE_SHOT Command

DO IS_BUILDING_NEAR Command

DO IS_PRISON_ON_LEVEL Command

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command

DO IS_SHAMAN_IN_AREA Command






Back to Top

Pop Script Commands
       DO Commands
               DO IS_PRISON_ON_LEVEL Command



DO IS_PRISON_ON_LEVEL Command

Checks to see if there is a prison on the level.  This command returns 1 if there are one or more prisons on the level, or 0 otherwise.  This result is stored in the given variable.



Syntax:

DO IS_PRISON_ON_LEVEL variable


Parameters:

variable: Specifies the variable to store the result in.


Example:

DO IS_PRISON_ON_LEVEL $result



See Also:

DO I_HAVE_ONE_SHOT Command

DO IS_BUILDING_NEAR Command

DO IS_PLAYER_IN_WORLD_VIEW Command

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command

DO IS_SHAMAN_IN_AREA Command





Back to Top

Pop Script Commands
       DO Commands
               DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command



DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command

Checks to see if the AI shaman is able to cast a spell.  This command returns 1 if if she is, or 0 otherwise.  This result is stored in the given variable.



Syntax:

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK variable


Parameters:

variable: Specifies the variable to store the result in.


Example:

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK $result



See Also:

DO I_HAVE_ONE_SHOT Command

DO IS_BUILDING_NEAR Command

DO IS_PLAYER_IN_WORLD_VIEW Command

DO IS_PRISON_ON_LEVEL Command

DO IS_SHAMAN_IN_AREA Command






Back to Top

Pop Script Commands
       DO Commands
               DO IS_SHAMAN_IN_AREA Command



DO IS_SHAMAN_IN_AREA Command

Checks to see if the shaman of the specified team is present within a given radius of the specified marker.  This command returns 1 if she is, or 0 otherwise.  This result is stored in the given variable.



Syntax:

DO IS_SHAMAN_IN_AREA team marker radius variable


Parameters:

team: Specifies which team's shaman to look for.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

marker: Specifies the index of the marker to check at.

radius: Specifies the radius to look within.

variable: Specifies the variable to store the result in.


Example:

// This example checks to see if the blue shaman is within a 6 unit radius of marker 4.
DO IS_SHAMAN_IN_AREA BLUE 4 6 $result



See Also:

DO I_HAVE_ONE_SHOT Command

DO IS_BUILDING_NEAR Command

DO IS_PLAYER_IN_WORLD_VIEW Command

DO IS_PRISON_ON_LEVEL Command

DO IS_SHAMAN_AVAILABLE_FOR_ATTACK Command






Back to Top

Pop Script Commands
       DO Commands
               DO KILL_TEAM_IN_AREA Command



DO KILL_TEAM_IN_AREA Command

Kills all followers that are within a given radius of the specified location regardless of which tribe those followers belong to.  Note that followers killed by this command don't fall dead on the ground like they do when they've been defeated in battle.  When followers or shamans are killed by this command, they simply vanish from the world. 



Syntax:

DO COUNT_ANGELS x z radius


Parameters:

x: Specifies the X-coordinate of the location to kill followers of any tribe at.

z: Specifies the Z-coordinate of the location to kill followers of any tribe at.


Example:

DO KILL_TEAM_IN_AREA 32 80 5



See Also:







Back to Top

Pop Script Commands
       DO Commands
               DO MARKER_ENTRIES Command



DO MARKER_ENTRIES Command

Activates up to 4 marker entries previously defined using the DO SET_MARKER_ENTRY Command .  Use the DO ONLY_STAND_AT_MARKERS Command if you want the patrolling followers to stand at the marker rather than run around it in a circle.  To cancel a group of followers guarding a marker, use the DO CLEAR_GUARDING_FROM Command.



Syntax:

DO MARKER_ENTRIES entry1 entry2 entry3 entry4


Parameters:

entry1
, entry2, entry3, entry4: Specifies the index number of the marker entry to activate.  If you are activating fewer than four marker entries, set the unused entry parameters to -1.


Example:

// This example activates three previously created marker entries.  The last paremeter is set to -1
// since it is unused.

DO MARKER_ENTRIES 1 2 3 -1



See Also:


DO CLEAR_GUARDING_FROM Command

DO GUARD_AT_MARKER Command

DO GUARD_BETWEEN_MARKERS Command

DO ONLY_STAND_AT_MARKERS Command

DO SET_MARKER_ENTRY Command

DO VEHICLE_PATROL Command






Back to Top

Pop Script Commands
       DO Commands
               DO MARVELLOUS_HOUSE_DEATH Command



DO MARVELLOUS_HOUSE_DEATH Command

What this command does is currently unknown.



Syntax:

DO MARVELLOUS_HOUSE_DEATH


Parameters:

None.


Example:

DO MARVELLOUS_HOUSE_DEATH



See Also:







Back to Top

Pop Script Commands
       DO Commands
               DO MOVE_SHAMAN_TO_MARKER Command



DO MOVE_SHAMAN_TO_MARKER Command

Causes the blue shaman to go to the specified marker.



Syntax:

DO MOVE_SHAMAN_TO_MARKER marker


Parameters:

marker: Specifies the index number of the marker the blue shaman should go to.


Example:

DO MOVE_SHAMAN_TO_MARKER 2



See Also:

DO TRACK_SHAMAN_TO_ANGLE Command








Back to Top

Pop Script Commands
       DO Commands
               DO NAV_CHECK Command



DO NAV_CHECK Command

Checks to see whether followers specified for an attack can actually reach the target.  Returns 1 if they can or 0 otherwise.  This return value is stored in variable.



Syntax:

DO NAV_CHECK team target_type model remember variable


Parameters:

team:
Specifies which enemy team to attack.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

target_type: Sets the target type.  Can be set to ATTACK_MARKER, ATTACK_BUILDING, or ATTACK_PERSON.

model
: Sets the specific target that the attackers will aim for.  See the Internal Game Variables page for a list of all the building type identifiers and follower type identifiers that you can use in this parameter.

remember: ???

variable: The variable to store the result in.


Examples:

DO NAV_CHECK BLUE ATTACK_BUILDING INT_NO_SPECIFIC_BUILDING 0 $result1
DO NAV_CHECK GREEN ATTACK_MARKER 7 0 $result2



See Also:

Attack Tutorial

DO ATTACK Command


Internal Attribute Variables

Internal Game Variables








Back to Top

Pop Script Commands
       DO Commands
               DO ONLY_STAND_AT_MARKERS Command



DO ONLY_STAND_AT_MARKERS Command

Causes patrolling followers to just stand at markers rather than running around them in circles.  See also: DO MARKER_ENTRIES Command.



Syntax:

DO ONLY_STAND_AT_MARKERS


Parameters:

None.


Example:

DO ONLY_STAND_AT_MARKERS



See Also:


DO CLEAR_GUARDING_FROM Command

DO GUARD_AT_MARKER Command

DO GUARD_BETWEEN_MARKERS Command

DO MARKER_ENTRIES Command

DO SET_MARKER_ENTRY Command

DO VEHICLE_PATROL Command






Back to Top

Pop Script Commands
       DO Commands
               DO OPEN_DIALOG Command



DO OPEN_DIALOG Command

This command is the same as the DO CREATE_MSG_INFORMATION Command, except that this command creates the specified message and displays it instantly on the screen without adding it into the message queue on the left side of the player's screen.



Syntax:

DO OPEN_DIALOG idx


Parameters:

idx: Specifies the index of the message to display in the message box.  For example, setting this parameter to 78 will result in the message "I have created my reincarnation site and the settlement is nearly complete."  The messages themselves are stored in the lang00.dat file in the /language/ subfolder of the main Populous folder.


Example:

DO OPEN_DIALOG 78



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command





Back to Top

Pop Script Commands
       DO Commands
               DO PARTIAL_BUILDING_COUNT Command



DO PARTIAL_BUILDING_COUNT Command

Updates the internal building count variables (like INT_B_BUILDING_SMALL_HUT) to include partially built and damaged buildings.  For a list of all of the internal building count variables, see the Internal Game Variables page.



Syntax:

DO PARTIAL_BUILDING_COUNT


Parameters:

None.


Example:

DO PARTIAL_BUILDING_COUNT



See Also:

DO COUNT_ANGELS Command

DO COUNT_BLUE_IN_HOUSES Command

DO COUNT_BLUE_SHAPES Command

DO COUNT_BLUE_WITH_BUILD_COMMAND Command

DO COUNT_PEOPLE_IN_MARKER Command

DO GET_HEAD_TRIGGER_COUNT Command

DO GET_NUM_ONE_OFF_SPELLS Command

DO GET_NUM_PEOPLE_BEING_PREACHED Command

DO GET_SPELLS_CAST Command

Internal Game Variables






Back to Top

Pop Script Commands
       DO Commands
               DO PRAY_AT_HEAD Command



DO PRAY_AT_HEAD Command

Causes a given number of followers to go to a stone head or totem pole to pray.  In the level editor, you create a stone head and place it where you want it.  Then somewhere, place an effect that you want to be triggered by the stone head.  Place a trigger on the same spot as the stone head you created, and link the trigger to the effect that you want to have be activated when the followers finish praying at the stone head.  Lastly, place a marker on the same spot in the world as the stone you placed.  Now, all you have to do is tells the followers to worship the stone head via your script.  All you have to do is call this command, set its num_ppl parameter to the number of followers you want to worship the stone head, and set its marker parameter to the index number of the marker that the trigger is sitting on.  When the command is called, the set number of followers will go to the stone head and worship it until the the effect is triggered.



Syntax:

DO PRAY_AT_HEAD num_ppl marker


Parameters:

num_ppl
: Specifies the number of followers to send to worship the stone head.

marker
: Specifies the index number of the marker that the followers should worship a stone head at.  If there is a stone head sitting on the specified marker, then the number of followers specified by the num_ppl command will go to this stone head and worship it.


Example:

DO PRAY_AT_HEAD 5 3



See Also:

DO CONVERT_AT_MARKER Command

DO DESELECT_ALL_BLUE_PEOPLE Command

DO PREACH_AT_MARKER Command

DO REMOVE_HEAD_AT_POS Command

DO SEND_ALL_PEOPLE_TO_MARKER Command

DO SEND_BLUE_PEOPLE_TO_MARKER Command


DO TRIGGER_LEVEL_LOST Command

DO TRIGGER_LEVEL_WON Command

DO TRIGGER_THING Command






Back to Top

Pop Script Commands
       DO Commands
               DO PREACH_AT_MARKER Command



DO PREACH_AT_MARKER Command

Sends a preacher (if one is available) to the specified marker to preach.  Note that this command won't work if the DO STATE PREACH command is not set to ON.



Syntax:

DO PREACH_AT_MARKER marker


Parameters:

marker: Specifies the index number of the marker to send a preacher to preach at.


Example:

DO PREACH_AT_MARKER 14



See Also:

DO CONVERT_AT_MARKER Command

DO DESELECT_ALL_BLUE_PEOPLE Command

DO PRAY_AT_HEAD Command

DO SEND_ALL_PEOPLE_TO_MARKER Command

DO SEND_BLUE_PEOPLE_TO_MARKER Command







Back to Top

Pop Script Commands
       DO Commands
               DO PUT_PERSON_IN_DT Command



DO PUT_PERSON_IN_DT Command

Puts a specified type of follower into the drum tower at the location given.



Syntax:

DO PUT_PERSON_IN_DT follower_type x z


Parameters:

follower_type: Specifies the type of follower to populate the drum tower with.  See the Internal Game Variables page for a list of all of the follower type identifiers that you can use in this parameter.

x: Specifies the X-coordinate of the drum tower.

z: Specifies the Z-coordinate of the drum tower.


Example:

DO PUT_PERSON_IN_DT INT_RELIGIOUS 46 34



See Also:

DO BUILD_DRUM_TOWER Command

DO BUILD_MAIN_DRUM_TOWER Command

DO DELAY_MAIN_DRUM_TOWER Command

DO SET_DRUM_TOWER_POS Command






Back to Top

Pop Script Commands
       DO Commands
               DO REMOVE_HEAD_AT_POS Command



DO REMOVE_HEAD_AT_POS Command

Causes the stone head or totem pole at the specified location to sink into the ground.



Syntax:

DO REMOVE_HEAD_AT_POS x z


Parameters:

x: Specifies the X-coordinate of the location of the stone head.

z: Specifies the Z-coordinate of the location of the stone head.


Example:

DO REMOVE_HEAD_AT_POS 194 218



See Also:

DO PRAY_AT_HEAD Command

DO REMOVE_PLAYER_THING Command

DO REMOVE_TIMER Command







Back to Top

Pop Script Commands
       DO Commands
               DO REMOVE_PLAYER_THING Command



DO REMOVE_PLAYER_THING Command

Takes the specified building or spell away from the specified team.  For example, calling this command with the team parameter set to BLUE will cause the building or spell specified by the thing parameter to be removed from the player's Buildings or Spells panel respectively.



Syntax:

DO REMOVE_PLAYER_THING team thing


Parameters:

team: Specifies team from which to take away the specified spell or building.  Can be set to BLUE, RED, YELLOW, GREEN, or a numeric value.

thing: Specifies the the spell or building to take away.  See the Internal Game Variables page for a list of all of the building type and spell type identifiers that you can use in this parameter.


Example:

// This example would cause the temple building plan to be taken away from the green team,
// and thus they no longer would be able to build temples after this command is executed.

DO REMOVE_PLAYER_THING GREEN INT_TEMPLE



See Also:

DO REMOVE_HEAD_AT_POS Command

DO REMOVE_TIMER Command







Back to Top

Pop Script Commands
       DO Commands
               DO REMOVE_TIMER Command



DO REMOVE_TIMER_REMOVE Command

Removes the timer from the upper right corner of the player's screen.



Syntax:

DO REMOVE_TIMER


Parameters:

None.


Example:

DO REMOVE_TIMER



See Also:

DO HAS_TIMER_REACHED_ZERO Command

DO REMOVE_HEAD_AT_POS Command

DO REMOVE_PLAYER_THING Command

DO SET_TIMER_GOING Command

Viewing the Values of Variables While in the Game Tutorial







Back to Top

Pop Script Commands
       DO Commands
               DO RESET_BASE_MARKER Command



DO RESET_BASE_MARKER Command

I'm not sure what this command really does, but in Bullfrog scripts it seems to always be called just before a call to the DO SET_BASE_MARKER command.



Syntax:

DO RESET_BASE_MARKER


Parameters:

None.


Example:

DO RESET_BASE_MARKER



See Also:

DO SET_BASE_MARKER Command

DO SET_BASE_RADIUS Command






Back to Top

Pop Script Commands
       DO Commands
               DO SEND_ALL_PEOPLE_TO_MARKER Command



DO SEND_ALL_PEOPLE_TO_MARKER Command

Causes all of the AI followers (including the shaman) to go to the specified marker.



Syntax:

DO SEND_ALL_PEOPLE_TO_MARKER marker


Parameters:

marker: Specifies the index number of the marker the AI followers will go to.


Example:

DO SEND_ALL_PEOPLE_TO_MARKER 17



See Also:

DO CONVERT_AT_MARKER Command

DO DESELECT_ALL_BLUE_PEOPLE Command

DO PRAY_AT_HEAD Command

DO PREACH_AT_MARKER Command

DO SEND_BLUE_PEOPLE_TO_MARKER Command






Back to Top

Pop Script Commands
       DO Commands
               DO SEND_BLUE_PEOPLE_TO_MARKER Command



DO SEND_BLUE_PEOPLE_TO_MARKER Command

Causes all blue followers (excluding the shaman) to go to the specified marker.



Syntax:

DO SEND_BLUE_PEOPLE_TO_MARKER marker


Parameters:

marker: Specifies the index number of the marker that the blue followers will go to.


Example:

DO SEND_BLUE_PEOPLE_TO_MARKER 12



See Also:

DO CONVERT_AT_MARKER Command

DO DESELECT_ALL_BLUE_PEOPLE Command

DO PRAY_AT_HEAD Command

DO PREACH_AT_MARKER Command

DO SEND_ALL_PEOPLE_TO_MARKER Command






Back to Top

Pop Script Commands
       DO Commands
               DO SEND_SHAMAN_DEFENDERS_HOME Command



DO SEND_SHAMAN_DEFENDERS_HOME Command

Causes followers guarding the shaman to stop and head home.



Syntax:

DO SEND_SHAMAN_DEFENDERS_HOME


Parameters:

None.


Example:

DO SEND_SHAMAN_DEFENDERS_HOME



See Also:

DO DEFEND_SHAMAN Command

DO STATE_DEFEND Command







Back to Top

Pop Script Commands
       DO Commands
               DO SET_ATTACK_VARIABLE Command



DO SET_ATTACK_VARIABLE Command

The specified variable may (or may not) be altered by the AI during or after an attack.  The exact mechanism is unkown.  This needs further study.



Syntax:

DO SET_ATTACK_VARIABLE variable


Parameters:

variable: Specifies the variable to use.


Example:

DO SET_ATTACK_VARIABLE $attack_var



See Also:

DO ATTACK Command

Attack Tutorial






Back to Top

Pop Script Commands
       DO Commands
               DO SET_BASE_MARKER Command



DO SET_BASE_MARKER Command

Sets where the base radius' origin is.  The base radius sets the range within which the AI shaman will convert wildmen if DO STATE_SHAMAN_GET_WILDS is set to ON.  Defaults to the location of the CoR we think.



Syntax:

DO SET_BASE_MARKER marker


Parameters:

marker: Specifies the index number of a marker.


Example:

DO SET_BASE_MARKER 30



See Also:

DO RESET_BASE_MARKER Command

DO SET_BASE_RADIUS Command

DO STATE_SHAMAN_GET_WILDS Command






Back to Top

Pop Script Commands
       DO Commands
               DO SET_BASE_RADIUS Command



DO SET_BASE_RADIUS Command

Sets the range within which the AI shaman will convert wildmen automatically if DO STATE_SHAMAN_GET_WILDS is set to ON.



Syntax:

DO SET_BASE_RADIUS radius


Parameters:

radius: Specifies the radius.


Example:

DO SET_BASE_RADIUS 15



See Also:

DO RESET_BASE_MARKER Command

DO SET_BASE_MARKER Command

DO STATE_SHAMAN_GET_WILDS Command







Back to Top

Pop Script Commands
       DO Commands
               DO SET_BUCKET_COUNT_FOR_SPELL Command



DO SET_BUCKET_COUNT_FOR_SPELL Command

???



Syntax:

DO SET_BUCKET_COUNT_FOR_SPELL spell mult


Parameters:

spell: Specifies the spell.  See the Internal Game Variables page for a list of all the spell identifiers you can use in this parameter.

mult: ???


Example:

DO SET_BUCKET_COUNT_FOR_SPELL INT_VOLCANO 320



See Also:

DO SET_SPELL_ENTRY Command

DO SPELL_ATTACK Command







Back to Top

Pop Script Commands
       DO Commands
               DO SET_BUILDING_DIRECTION Command



DO SET_BUILDING_DIRECTION Command

Sets the direction that new buildings will face.  If left unset, new buildings will face in random directions.



Syntax:

DO SET_BUILDING_DIRECTION direction


Parameters:

direction: Specifies the direction for new buildings to face.


Example:

DO SET_BUILDING_DIRECTION 4



See Also:





Back to Top

Pop Script Commands
       DO Commands
               DO SET_DEFENCE_RADIUS Command



DO SET_DEFENCE_RADIUS Command

???



Syntax:

DO SET_DEFENCE_RADIUS radius


Parameters:

radius: Specifies the radius.


Example:

DO SET_DEFENCE_RADIUS 5



See Also:








Back to Top

Pop Script Commands
       DO Commands
               DO SET_DRUM_TOWER_POS Command



DO SET_DRUM_TOWER_POS Command

Sets the X and Z coordinates for the main drum tower.  This is where followers will congregate before an attack.  If no main drum tower positon is set, they will congregate at the CoR.  If the position cannot be reached from the CoR (like if it were on an island) then the position will be set at the nearest accessible point.  Note that a drum tower will automatically be built at that position unless DO DELAY_MAIN_DRUM_TOWER has been run.  For ordinary drum towers, use the DO BUILD_AT or DO BUILD_DRUM_TOWER commands.



Syntax:

DO SET_DRUM_TOWER_POS x z


Parameters:

x: Specifies the X-coordinate of the location to build the main drum tower at.

z: Specifies the Z-coordinate of the location to build the main drum tower at.



Example:

DO SET_DRUM_TOWER_POS 230 46



See Also:

DO BUILD_AT Command

DO BUILD_DRUM_TOWER Command

DO BUILD_MAIN_DRUM_TOWER Command

DO DELAY_MAIN_DRUM_TOWER Command


DO PUT_PERSON_IN_DT Command






Back to Top

Pop Script Commands
       DO Commands
               DO SET_MARKER_ENTRY Command



DO SET_MARKER_ENTRY Command

Sets up the mix of followers that you want to guard at a marker or between two markers.  Once set up, the marker entry can be activated by using the DO MARKER_ENTRIES Command.  An activated marker entry can be deactivated using the DO CLEAR_GUARDING_FROM Command

Getting a group of followers to guard at a marker or between two markers can also be accomplished by using the DO GUARD_AT_MARKER and DO GUARD_BETWEEN_MARKERS commands respectively.  However, the DO SET_MARKER_ENTRY command seems to be the method preferred by Bullfrog.



Syntax:

DO SET_MARKER_ENTRY entry marker1 marker2 braves warriors firewarriors preachers


Parameters:

entry: Specifies the index number to use to identify the patrolling group this command is creating.

marker1, marker2: These parameters specify the two markers you want the specified group of followers to guard between.  If marker2 is set to -1, then the patrolling followers will run in a circle around marker1.  If you want the patrol group to just stand at marker1 rather than running around it in a circle, you can accomplish this by using the DO ONLY_STAND_AT_MARKERS Command.

braves: Specifies the number of braves to put in the patrol group.

warriors: Specifies the number of warriors to put in the patrol group.

firewarriors: Specifies the number of fire warriors to put in the patrol group.

preachers: Specifies the number of preachers to put in the patrol group.


Example:

// This example creates a patrol group of 4 fire warriors and has them guard between markers 7 and 8.
DO SET_MARKER_ENTRY 3 7 8 0 0 4 0



See Also:

DO CLEAR_GUARDING_FROM Command

DO GUARD_AT_MARKER Command

DO GUARD_BETWEEN_MARKERS Command

DO MARKER_ENTRIES Command

DO ONLY_STAND_AT_MARKERS Command

DO VEHICLE_PATROL Command







Back to Top

Pop Script Commands
       DO Commands
               DO SET_MSG_AUTO_OPEN_DLG Command



DO SET_MSG_AUTO_OPEN_DLG Command

Automatically pauses the game and displays the last message that was added to the message queue on the left side of the player's screen.



Syntax:

DO SET_MSG_AUTO_OPEN_DLG


Parameters:

None.


Example:

DO SET_MSG_AUTO_OPEN_DLG



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_MSG_TIMEOUT Command





Back to Top

Pop Script Commands
       DO Commands
               DO SET_MSG_DELETE_ON_OK Command



DO SET_MSG_DELETE_ON_OK Command

This command will cause the latest message added to the message queue on the left side of the player's screen to be deleted when the player closes it.  If the latest message was not displayed automatically, then the player will have to open the message himself by clicking on it, but it will still be deleted when he closes it.



Syntax:

DO SET_MSG_DELETE_ON_OK


Parameters:

None.


Example:

DO SET_MSG_DELETE_ON_OK



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_TIMEOUT Command






Back to Top

Pop Script Commands
       DO Commands
               DO SET_MSG_TIMEOUT Command



DO SET_MSG_TIMEOUT Command

Sets a time limit for the last message that was added to the message queue on the left side of the player's screen.  Once the specified time limit has elapsed, the message will be deleted from the message queue regardless of whether the player has opened it.



Syntax:

DO SET_MSG_TIMEOUT time


Parameters:

time: Specifies the time limit for the message (in game turns).


Example:

// This example will cause the last message added to the message queue
// to disappear after 32 game turns have elapsed.

DO SET_MSG_TIMEOUT 32



See Also:

DO CLEAR_ALL_MSG Command

DO CREATE_MSG_INFORMATION Command

DO CREATE_MSG_INFORMATION_ZOOM Command

DO CREATE_MSG_NARRATIVE Command

DO OPEN_DIALOG Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command






Back to Top

Pop Script Commands
       DO Commands
               DO SET_NO_BLUE_REINC Command



DO SET_NO_BLUE_REINC Command

Causes the player's team to start the level without a Circle of Reincarnation.  This means that if the player's shaman dies, the game is over since she can't be reincarnated.



Syntax:

DO SET_NO_BLUE_REINC


Parameters:

None.


Example:

DO SET_NO_BLUE_REINC



See Also:

SET_REINCARNATION Command







Back to Top

Pop Script Commands
       DO Commands
               DO SET_SPELL_ENTRY Command



DO SET_SPELL_ENTRY Command

Enables a spell for the AI shaman to use.  The spells are number from 0 upwards (using the entry parameter).  The spell and its mana cost are defined by some of the Internal Game Variables (such as INT_BLAST and INT_M_SPELL_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 the base parameter is set to 1, the spell will only be used in the base area, and only outside the base if the base parameter is set to 0.



Syntax:

DO SET_SPELL_ENTRY entry spell mana frequency num_ppl base


Parameters:

entry: Specifies the index number to use to identify the spell entry this command is creating.

spell: Specifies which spell to enable for the AI shaman to use.

mana: Specifies how much mana it costs to cast to spell.

frequency: ???

num_ppl: Specifies the number of enemy followers that must be in the area for the spell to be used.

base: Specifies whether the specified spell is to be used in the base area, or outside the base area.  Set to 1 for inside, or 0 for outside.


Example:

DO SET_SPELL_ENTRY 1 INT_SWARM INT_M_SPELL_SWARM_COST 128 2 1



See Also:

Internal Game Variables






Back to Top

Pop Script Commands
       DO Commands
               DO SET_TIMER_GOING Command



DO SET_TIMER_GOING Command

Sets and starts the timer which will then appear on the upper right corner of the player's screen.



Syntax:

DO SET_TIMER_GOING time


Parameters:

time: Specifies the time to set the timer for (in seconds).  Note that for some reason the timer starts out with one second less than you specify.  So if you set this parameter to 5 for example, the timer will start with 4 seconds when it appears.


Example:

// This example sets the timer for 60 seconds and starts it.
DO SET_TIMER_GOING 61



See Also:

DO HAS_TIMER_REACHED_ZERO Command

DO REMOVE_TIMER Command

Viewing the Values of Variables While in the Game Tutorial






Back to Top

Pop Script Commands
       DO Commands
               DO SET_WOOD_COLLECTION_RADII Command



DO SET_WOOD_COLLECTION_RADII Command

???



Syntax:

DO SET_WOOD_COLLECTION_RADII min max x z


Parameters:

min: Specifies the minimum radius.

max: Specifies the maximum radius.

x: Specifies the X-coordinate of the location in the world.

z: Specifies the Z-coordinate of the location in the world.


Example:

DO SET_WOOD_COLLECTION_RADII 5 40 0 0



See Also:






Back to Top

Pop Script Commands
       DO Commands
               DO SPELL_ATTACK Command



DO SPELL_ATTACK Command

Makes the shaman go to the specified marker position and cast a spell in the specified direction.



Syntax:

DO SPELL_ATTACK spell marker direction


Parameters:

spell: The spell the shaman will cast.  See the Internal Game Variables page for a list of all the spell type identifiers that you can use in this parameter.


marker: The index of the marker you want the shaman to go to.

direction
: The direction you want the shaman to cast her spell in.


Example:

DO SPELL_ATTACK INT_ANGEL_OF_DEATH 70 0



See Also:

Attack Tutorial

DO ATTACK Command


Internal Attribute Variables

Internal Game Variables




Back to Top

Pop Script Commands
       DO STATE Commands
       DO Commands



Populous Scripting DO STATE Commands


This section lists known information about all of the Populous Script DO STATE commands.  Click a command name below to go to its information page.


Syntax:

DO command state

Parameters:

state
: ON or OFF

command: One of the following commands:

Command
Information
AUTO_MESSAGES
...
EXTRA_WOOD_COLLECTION
...
FLYBY_ALLOW_INTERRUPT
Sets whether the player is allowed to interrupt or skip flyby sequences.
GIVE_UP_AND_SULK
Causes all remaining followers to guard the shaman and sends her to the Blue Circle of Reincarnation.
SET_AUTO_BUILD
...
SET_AUTO_HOUSE
...
SET_BUCKET_USAGE
...
SET_REINCARNATION
Sets whether the AI shaman will have a Circle of Reincarnation. When set to ON she will create a Circle of Reincarnation when the level starts, and if set to OFF she won’t.  See also SET_NO_BLUE_REINC.
STATE_AUTO_ATTACK
This must be turned on when you use the DO ATTACK Command, or your attack will not happen.
STATE_BRING_NEW_PEOPLE_BACK
...
STATE_BUILD_VEHICLE
Determines whether braves will go to the boat hut or balloon hut and build boats or balloons.
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 to 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_SHAMAN?.
STATE_FETCH_FAR_VEHICLE
...
STATE_FETCH_LOST_PEOPLE
...
STATE_FETCH_LOST_VEHICLE
...
STATE_FETCH_WOOD
...
STATE_FIREWARRIOR_DEFEND
See the entry for STATE_DEFEND_BASE above in this table.
STATE_HOUSE_A_PERSON
...
STATE_POPULATE_DRUM_TOWER
...
STATE_PREACH
This must be set to ON when using the DO PREACH_AT_MARKER Command.
STATE_SEND_GHOSTS
...
STATE_SHAMAN_GET_WILDS
When set to ON, the shaman will convert wildmen that are within her spell range, otherwise she will ignore them.
STATE_SPELL_DEFENCE
See the DO STATE_SPELL_DEFENCE Command page.
STATE_TRAIN_PEOPLE
...
TURN_PUSH
...


Examples:

DO STATE_FETCH_WOOD          ON
DO STATE_AUTO_ATTACK         ON
DO STATE_SHAMAN_GET_WILDS    OFF


See Also:


DO ATTACK Command

DO DEFEND_SHAMAN Command

DO SET_NO_BLUE_REINC Command

DO STATE_SPELL_DEFENCE Command

Internal Attribute Variables

Internal Game Variables

SET Command








Back to Top

Pop Script Commands
       DO Commands
               DO STATE_SPELL_DEFENCE Command



DO STATE_SPELL_DEFENCE Command

Sets the default X and Z coordinates which the shaman will occupy. If state is set to ON, the shaman will defend herself.



Syntax:

DO STATE_SPELL_DEFENCE x z state


Parameters:

x: Specifies the X-position of the place the shaman will defend.

z: Specifies the Z-position of the place the shaman will defend.

state: Sets whether the shaman will defend herself.  Can be set to ON or OFF.


Example:

DO STATE_SPELL_DEFENCE 36 130 ON



See Also:

DO STATE Commands






Back to Top

Pop Script Commands
       DO Commands
               DO STOP_CAMERA_ROTATION Command



DO STOP_CAMERA_ROTATION Command

Stops rotation of the camera that was started by the DO CAMERA_ROTATION Command.

NOTE: If you want to create more complex camera sequences, see the command documentation pages for the flyby commands.  Go to the DO FLYBY_CREATE_NEW Command page, from which you can go directly to the command documentation pages for all of the other flyby commands as well.



Syntax:

DO STOP_CAMERA_ROTATION


Parameters:

None.


Example:

DO STOP_CAMERA_ROTATION



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO TRACK_SHAMAN_TO_ANGLE Command

DO TRACK_TO_MARKER Command

DO ZOOM_TO Command







Back to Top

Pop Script Commands
       DO Commands
               DO TARGET_BLUE_DRUM_TOWERS Command



DO TARGET_BLUE_DRUM_TOWERS Command

???



Syntax:

DO TARGET_BLUE_DRUM_TOWERS


Parameters:

None.


Example:

DO TARGET_BLUE_DRUM_TOWERS



See Also:

DO DONT_TARGET_BLUE_DRUM_TOWERS Command

DO DONT_TARGET_BLUE_SHAMAN Command

DO DONT_TARGET_FIREWARRIORS Command

DO TARGET_BLUE_SHAMAN Command?

DO TARGET_FIREWARRIORS Command?





Back to Top

Pop Script Commands
       DO Commands
               DO TARGET_BLUE_SHAMAN Command



DO TARGET_BLUE_SHAMAN Command

???



Syntax:

DO TARGET_BLUE_SHAMAN


Parameters:

None.


Example:

DO TARGET_BLUE_SHAMAN



See Also:

DO DONT_TARGET_BLUE_DRUM_TOWERS Command

DO DONT_TARGET_BLUE_SHAMAN Command

DO DONT_TARGET_FIREWARRIORS Command

DO TARGET_BLUE_DRUM_TOWERS Command

DO TARGET_FIREWARRIORS Command?





Back to Top

Pop Script Commands
       DO Commands
               DO TARGET_FIREWARRIORS Command



DO TARGET_FIREWARRIORS Command

???



Syntax:

DO TARGET_FIREWARRIORS


Parameters:

None.


Example:

DO TARGET_FIREWARRIORS



See Also:

DO DONT_TARGET_BLUE_DRUM_TOWERS Command

DO DONT_TARGET_BLUE_SHAMAN Command

DO DONT_TARGET_FIREWARRIORS Command

DO TARGET_BLUE_DRUM_TOWERS Command

DO TARGET_BLUE_SHAMAN Command






Back to Top

Pop Script Commands
       DO Commands
               DO TRACK_SHAMAN_TO_ANGLE Command



DO TRACK_SHAMAN_TO_ANGLE Command

Causes the camera to quickly move to the location of the blue shaman in the world.  As the camera moves to the location of the blue shaman, it will simultaneously rotate to face the specified direction.

NOTE: If you want to create more complex camera sequences, see the command documentation pages for the flyby commands.  Go to the DO FLYBY_CREATE_NEW Command page, from which you can go directly to the command documentation pages for all of the other flyby commands as well.



Syntax:

DO TRACK_SHAMAN_TO_ANGLE direction


Parameters:

direction: Specifies the direction for the camera to rotate to.  As the camera zooms to the location of the blue shaman in the world, it will simultaneously rotate to face the specified direction.  As with the direction parameter of the DO FLYBY_SET_EVENT_ANGLE Command , some possible values are: 0 = north, 500 = east, 1000 = south, and 1500 = west.


Example:

DO TRACK_SHAMAN_TO_ANGLE 1352



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_EVENT_ANGLE Command

DO MOVE_SHAMAN_TO_MARKER Command

DO STOP_CAMERA_ROTATION Command

DO TRACK_TO_MARKER Command

DO ZOOM_TO Command






Back to Top

Pop Script Commands
       DO Commands
               DO TRACK_TO_MARKER Command



DO TRACK_TO_MARKER Command

Causes the camera to quickly move to the location of the specified marker in the world.

NOTE: If you want to create more complex camera sequences, see the command documentation pages for the flyby commands.  Go to the DO FLYBY_CREATE_NEW Command page, from which you can go directly to the command documentation pages for all of the other flyby commands as well.



Syntax:

DO TRACK_TO_MARKER marker


Parameters:

marker: Specifies the index number of the marker whose location the camera will zoom to.


Example:

DO TRACK_TO_MARKER 9



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_EVENT_ANGLE Command

DO STOP_CAMERA_ROTATION Command

DO TRACK_SHAMAN_TO_ANGLE Command

DO ZOOM_TO Command






Back to Top

Pop Script Commands
       DO Commands
               DO TRAIN_PEOPLE_NOW Command



DO TRAIN_PEOPLE_NOW Command

Sends a given number of braves to train to become the specified type of follower. 



Syntax:

DO TRAIN_PEOPLE_NOW num_ppl model


Parameters:

num_ppl: Specifies how many people to train.

model: Species what type of follower to train the people to be.  See the Internal Game Variables page for a list of all of the follower type identifiers that you can use in this parameter.


Example:

DO TRAIN_PEOPLE_NOW 5 INT_RELIGIOUS



See Also:

Internal Game Variables






Back to Top

Pop Script Commands
       DO Commands
               DO TRIGGER_LEVEL_LOST Command



DO TRIGGER_LEVEL_LOST Command

Causes the level to end as though the player has lost.



Syntax:

DO TRIGGER_LEVEL_LOST


Parameters:

None.


Example:

DO TRIGGER_LEVEL_LOST



See Also:

DO PRAY_AT_HEAD Command

DO TRIGGER_LEVEL_WON Command

DO TRIGGER_THING Command






Back to Top

Pop Script Commands
       DO Commands
               DO TRIGGER_LEVEL_WON Command



DO TRIGGER_LEVEL_WON Command

Causes the level to end as though the player has won.



Syntax:

DO TRIGGER_LEVEL_WON


Parameters:

None.


Example:

DO TRIGGER_LEVEL_WON



See Also:

DO PRAY_AT_HEAD Command

DO TRIGGER_LEVEL_LOST Command

DO TRIGGER_THING Command




Back to Top

Pop Script Commands
       DO Commands
               DO TRIGGER_THING Command



DO TRIGGER_THING Command

Triggers an effect in the world.  In the level editor, you create an effect and place it where you want it to happen.  Then somewhere nearby, place a trigger that triggers the effect.  Lastly, place a marker on the same spot in the world as the trigger you just placed.  Now, all you have to do is trigger the effect via your script.  All you have to do is call this command and set its marker parameter to the index number of the marker that the trigger is sitting on.  When the command is called, it will then activate the trigger that is sitting on top of the specified marker, and thus everything that is linked to that trigger will be activated.  So you can use this command to make more dynamic levels, by for example having a natural disaster happen at a certain time in the level.



Syntax:

DO TRIGGER_THING marker


Parameters:

marker: Specifies the index number of the marker to activate a trigger at.  If there is a trigger sitting on the specified marker, then everything linked to that trigger will be activated.


Example:

DO TRIGGER_THING 4



See Also:

DO PRAY_AT_HEAD Command

DO TRIGGER_LEVEL_LOST Command

DO TRIGGER_LEVEL_WON Command






Back to Top

Pop Script Commands
       DO Commands
               DO TURN_PANEL_ON Command



DO TURN_PANEL_ON Command

Activates the panel defined by idx for the human player.



Syntax:

DO TURN_PANEL_ON idx


Parameters:

idx: Specifies the index number of the panel to activate.  Can be set to one of the following values:

0 = Followers Panel
1 = Spells Panel
2 = Buildings Panel


Example:

DO TURN_PANEL_ON 2



See Also:

DO FLASH_BUTTON Command







Back to Top

Pop Script Commands
       DO Commands
               DO VEHICLE_PATROL Command



DO VEHICLE_PATROL Command

Causes a specified number of followers to patrol in the specified type of vehicles.  It is not currently known how the marker parameters are used.



Syntax:

DO VEHICLE_PATROL num_ppl marker1 marker2 marker3 marker4 vehicle_type


Parameters:

num_ppl: Specifies the number of people to take part in the patrol.

marker1: ???


marker2: ???

marker3: ???

marker4: ???

vehicle_type: Specifies the type of vehicle to patrol in.  Can be set to BOAT_TYPE or BALLOON_TYPE.


Example:

DO VEHICLE_PATROL 5 31 30 31 30 BOAT_TYPE



See Also:

DO CLEAR_GUARDING_FROM Command

DO GUARD_AT_MARKER Command

DO GUARD_BETWEEN_MARKERS Command

DO MARKER_ENTRIES Command

DO ONLY_STAND_AT_MARKERS Command

DO SET_MARKER_ENTRY Command










Back to Top

Pop Script Commands
       DO Commands
               DO ZOOM_TO Command



DO ZOOM_TO Command

Causes the camera to quickly move to the specified location in the world.  As the camera moves to the specified location, it will simultaneously rotate to face the specified direction.

NOTE: If you want to create more complex camera sequences, see the command documentation pages for the flyby commands.  Go to the DO FLYBY_CREATE_NEW Command page, from which you can go directly to the command documentation pages for all of the other flyby commands as well.



Syntax:

DO ZOOM_TO x z direction


Parameters:

x: Specifies the X-coordinate of the location for the camera to zoom to.

z: Specifies the Z-coordinate of the location for the camera to zoom to.

direction: Specifies the direction for the camera to rotate to.  As the camera zooms to the specified location in the world, it will simultaneously rotate to face the specified direction.  As with the direction parameter of the DO FLYBY_SET_EVENT_ANGLE Command ,
some possible values are: 0 = north, 500 = east, 1000 = south, and 1500 = west.


Example:

DO ZOOM_TO 166 130 1096



See Also:

DO CAMERA_ROTATION Command

DO FLYBY_CREATE_NEW Command

DO FLYBY_SET_EVENT_ANGLE Command

DO STOP_CAMERA_ROTATION Command

DO TRACK_SHAMAN_TO_ANGLE Command

DO TRACK_TO_MARKER Command






Back to Top

About the Populous: The Beginning Wiki




This wiki is best viewed with your desktop resolution set at 1024x768 or higher.  At resolutions lower than 1024x768, you may have to scroll down a little ways on some pages to see the content.  I'm not sure why it does that.  Oh well.

The main page is basically the table of contents, and you can return to it anytime by clicking on the wiki title in the left side of the blue bar at the top of the screen.  This is why I didn't put any links back to the main page on any of the sub pages. 

As you navigate around this wiki, notice the row of links just below the wiki title (in the blue bar at the top of the screen).  These links point to the last 5 pages you've visited in this wiki.  So you can jump back a couple pages with one click, rather than clicking your browser's back button twice, for example.

To see the list of recent changes and additions that have been made to the Populous: The Beginning Wiki, click on the
Changes link in the menu on the left side of the screen.  Likewise, to see a list of past revisions of the page you are currently looking at, click on the Versions link in the menu on the left side of your screen.

To discuss or comment on the page you are currently looking at, click on the
Page Discussion link in the menu on the left side of your screen.  This will pop up a screen showing you all comments that have been posted regarding the page you were just on (if there are any).  At the top of this page, you will see a link named Discuss page_name, where page_name is the name of the page you were on when you clicked on the Page Discussion link in the menu.  Click on that link to add your own comment, or you can also click on the Discussion links that follow comments.

You can also view all the pages in the wiki by clicking on the
Page Directory link in the menu on the left side of the screen.  You will then be presented with a list of all the pages that currently exist in this wiki.  You can jump to any page in the list by clicking on its name.  The Page Directory page also allows you to create new pages.  You can do this by entering the name of your new page in the text box at the top of the page and then click on the Create button.

To edit the page you are currently looking at, click on the
Edit Page link in the menu on the left side of the screen.  That will pop up an editor screen that is alot like using a plain old word processor program.  While editing the page, if you want to make a link to another page, just go to the place where you want the link to be. Then type the title of the page (as it appears on the Page Directory page) you want to link to surrounded by square brackets.  If you want the link text to be different from the title of the article, then type the page title just like before, but type a | character right after it.  Following that, type the text you want your link to have.  So here are the two ways to make a link:
{page title}
{page title|link text}
NOTE: I didn't use square brackets in the examples above because then they would show up as links.  So I just used the other kind of brackets.  Just remember that when you make links, you have to use square brackets rather than the kind of brackets I used in the examples.  One other thing:  To link to a page that is not part of the wiki, use the hyperlink button in the page editor.

When you click on the
Save Changes button, you will see the page again with your changes made to it.  If the page you linked to does not exist, you will see a question mark at the end of the link you made.  Clicking on it will create the page and open the editor so you can start editing your new page. 


Well, I think that about covers the basics of using this wiki.  I just thought I'd make this nice little page in the hopes that it might save you some time in learning to use this wiki.




Type Conventions

The type conventions used in this wiki are pretty simple, as this saves time compared to having an overly complex scheme.  Here are the various type conventions used in this wiki.  Try to stick to them for consistancy throughout the wiki, and just to make the wiki nicer.

normal text -
Normal text is usually in the font Arial, and the size is x-small in the size drop-down listbox in the page editor.

yellow text
-
Text is colored in this
shade of yellow (in the page editor, its the 2nd color in the 4th row in the text color picker)  to emphasize it and make it stand out. Sometimes this shade of orange is also used for emphasizing things.  For example, this was done further up on this page in the paragraph about making links on a wiki page.  In the text color picker of the page editor, this shade of orange is the 2nd color in the 3rd row.

bold text -
Bold text is used for sub section titles (for example, the Parameters: heading in the documentation pages for all of the pop script commands)

courier new -
The Courier New font is used for code examples.  This is because a monospace font makes it nice and easy to line things up in your code.

green text -
Comments in code examples are always in this
shade of green (in the page editor, its the 4th color in the 3rd row in the text color picker).  This makes it easy to distinguish them from the code.

Medium -
Medium size bold text is used for main section headings and page titles.


The color used for table grids in this wiki is rgb( 100, 100, 100 ) or #646464 in hexadecimal.  If you make a table on a page, you can enter this hexadecimal color value into the
Border Color property. This is found in the Cell Properties window which is accessed by right clicking on your table (after selecting the cells whose border color you wish to change), and then selecting Cell Properties from the popup menu.








Back to Top

Incomplete Knowledge Listing




This page lists everything that we don't yet fully understand.  I created this page do give us a nice way to keep track of and be able to see how much we really understand.  This page basically shows what areas in our current knowledge of Pop Scripting still need more work.


Internal Variables:
    Internal Attribute Variables
    Internal Game Variables


DO STATE Commands


DO Commands:

    ATTACK  -  (the marker3 parameter)

    BUILD_AT  -  (the 4th parameter)

    CLEAR_STANDING_PEOPLE

    DELETE_SMOKE_STUFF

    FIX_WILD_IN_AREA

    FLYBY_SET_END_TARGET

    I_HAVE_ONE_SHOT  -  (how does it work when building types are specified?)

    MARVELLOUS_HOUSE_DEATH

    NAV_CHECK  -  (the remember parameter)

    RESET_BASE_MARKER

    SET_ATTACK_VARIABLE

    SET_BUCKET_COUNT_FOR_SPELL

    SET_BUILDING_DIRECTION

    SET_DEFENCE_RADIUS

    SET_SPELL_ENTRY  -  (the frequency parameter)

    SET_WOOD_COLLECTION_RADII

    VEHICLE PATROL


    I played with these following 6 commands for awhile, but I didn't manage to figure them out.  They didn't seem to affect the behavior of the AI attackers when I used the DO ATTACK Command to have the AI attack my base.  They didn't seem to affect which objects in my base that the AI shaman targeted with her lightning spell either when I made her part of the AI attack force.

    DO DONT_TARGET_BLUE_DRUM_TOWERS Command

    DO DONT_TARGET_BLUE_SHAMAN Command

    DO DONT_TARGET_FIREWARRIORS Command

    DO TARGET_BLUE_DRUM_TOWERS Command

    DO TARGET_BLUE_SHAMAN Command

    DO TARGET_FIREWARRIORS Command







Back to Top

Populous: The Beginning Level Listing


This section lists all the levels that came with Populous: The Beginning as well as those that came with the Undiscovered Worlds expansion pack.  It lists various information about each level, such as name, filename, AI scripts pointed to by the level's header, and number of players.


Level #
Level Name
Filename
Red AI Script #
Yellow AI Script #
Green AI Script #
# of Players

Populous: The Beginning - Single Player Levels (found in the \levels\ subfolder)

0
Tutorial
Levl2079.dat
057
004
005
2
1
The Journey Begins
Levl2001.dat
010
004
005
2
2
Night Falls
Levl2002.dat
074
074
074
4
3
Crisis of Faith
Levl2003.dat
012
012
005
3
4
Combined Forces
Levl2004.dat
013
013
013
4
5
Death From Above
Levl2005.dat
058
000
000
2
6
Building Bridges
Levl2006.dat
014
014
015
4
7
Unseen Enemy
Levl2007.dat
021
021
005
3
8
Continental Divide
Levl2008.dat
016
000
000
2
9
Fire in the Mist
Levl2009.dat
028
028
000
3
10
From the Depths
Levl2010.dat
059
059
059
4
11
Treacherous Souls
Levl2011.dat
017
017
022
4
12
An Easy Target
Levl2012.dat
060
061
062
4
13
Aerial Bombardment
Levl2013.dat
030
030
029
4
14
Attacked From All Sides
Levl2014.dat
038
039
037
4
15
Incarcerated
Levl2015.dat
075
075
005
3
16
Bloodlust
Levl2016.dat
025
026
027
4
17
Middle Ground
Levl2017.dat
076
077
078
4
18
Head Hunter
Levl2018.dat
019
020
032
4
19
Unlikely Allies
Levl2019.dat
031
041
064
3
20
Archipelago
Levl2020.dat
043
004
005
2
21
Fractured Earth
Levl2021.dat
040
000
000
2
22
Solo
Levl2022.dat
064
065
066
4
23
Inferno
Levl2023.dat
023
024
018
4
24
Journey’s End
Levl2024.dat
053
054
055
4
25
The Beginning
Levl2025.dat
033
034
035
4

Populous: The Beginning - Multiplayer Levels (found in the \levels\ subfolder)

1
Hills Divide Us
Levl2080.dat
080
000
000
2
2
Eye of the Storm
Levl2082.dat
082
000
000
2
3
Two Crabs
Levl2083.dat
083
000
000
2
4
Skirmish
Levl2084.dat
084
000
000
2
5
All Around the World
Levl2094.dat
101
000
000
2
6
Linked Isles
Levl2100.dat
100
100
000
3
7
Skirmish
Levl2109.dat
084
084
000
3
8
Three-Way
Levl2110.dat
085
085
000
3
9
Avenging Angels
Levl2111.dat
122
122
000
3
10
Sandy Castles
Levl2112.dat
112
112
099
3
11
Two on Two
Levl2120.dat
120
120
120
4
12
Craters
Levl2127.dat
122
122
122
4
13
Dead Sea
Levl2128.dat
122
122
122
4
14
Face Off
Levl2131.dat
130
130
130
4
15
Pressure Point
Levl2133.dat
122
122
122
4
16
Multiple Choice
Levl2134.dat
098
000
000
2

Undiscovered Worlds Expansion Pack – Single Player Levels   (found in the \levluw\ subfolder)

1
Aftermath
Levl2060.dat
031
000
000
2
2
Lava Flow
Levl2056.dat
029
000
000
2
3
Soul Survivor
Levl2063.dat
035
000
000
2
4
World Wide Web
Levl2062.dat
033
034
000
3
5
Human Shield
Levl2057.dat
021
022
023
4
6
No Man’s Land
Levl2058.dat
028
027
000
3
7
Protection Racket
Levl2078.dat
059
059
059
4
8
Prisons
Levl2072.dat
001
000
000
2
9
Overshadowed
Levl2074.dat
002
002
000
3
10
Fortress
Levl2061.dat
032
000
000
2
11
L’Assassine
Levl2059.dat
024
025
026
4
12
Natural Disaster
Levl2076.dat
060
060
060
4

Undiscovered Worlds Expansion Pack – Multiplayer Levels   (found in the \levluw\ subfolder)

1
Barricade
Levl2085.dat
085
000
000
2
2
Battlements
Levl2086.dat
085
000
000
2
3
Cog
Levl2095.dat
122
122
122
2
4
Sliced Beetle
Levl2096.dat
130
130
130
2
5
Two-Way
Levl2097.dat
120
120
120
2
6
Multiple Choice
Levl2099.dat
079
000
000
2
7
Angels
Levl2101.dat
080
080
000
3
8
Canyon
Levl2102.dat
087
087
000
3
9
Three Crabs
Levl2119.dat
119
119
119
3
10
Cog
Levl2124.dat
124
124
124
4
11
Clockwise
Levl2138.dat
138
138
138
4
12
Walls
Levl2139.dat
122
122
122
4

NOTE: The \levluw\ subfolder also contains copies of all the multiplayer maps from the original game. See the “Populous: The Beginning – Multiplayer Levels” section of this table above for the listing of those levels.







Back to Top

Glossary



B

Building Type Identifiers
Building type identifiers are just internal game variables that represent the different types of buildings that are in the game.  These variables are used in Populous AI scripts to reference a particular building type when you want to make the AI attack a certain type of building for example. 
See the Internal Game Variables page for a list of all the building type identifiers.

C

CoR
See Circle of Reincarnation.

Circle of Reincarnation
This is the circle of stones the shaman creates at the start of the level, and it is also where she will respawn shortly after being killed.

Constant

A constant is a value that is written explicitly in Populous script.  See also: Pop Scripting Basics.


F

Follower Type Identifiers
Follower type identifiers are just internal game variables that represent the different types of followers in the game. These variables are used in Populous AI scripts to reference a particular type of follower.  See the Internal Game Variables page for a list of all the follower type identifiers.


I

Internal Game Variable
Internal game variables are variables that store information about the current state of the game.  See also Internal Game Variables.

Internal Attriuildte Variable
Internal attribute variables are variables that control various attributes of the game world.  See also Internal Attribute Variables.


M

Marker
A marker is an entity that can be placed in a level using the level editor.  It is used to mark a position on the game world.  Each marker has a numeric index which can be referenced in a script, for example to make the AI shaman go to that position and cast a spell.  The X and Z coordinates of the marker can be viewed in the level editor, as can its index number.


S

Spell Identifiers
Spell type identifiers are just internal game variables that represent the different spells the shaman can cast. These variables are used in Populous AI scripts to reference a particular spell  when you want to tell the shaman to cast it for example.  See the Internal Game Variables? page for a list of all the spell typ e identifiers.


V

Variable
A variable is used to store a value.  For example in Populous script a variable might look like this: $my_variable.  A variable is basically a name that refers to a specific place in memory so the programmer/scripter doesn't need to know exactly where his data value is stored in memory in order to access it.  See also: Pop Scripting Basics .







Back to Top

Tutorials



This section is a list of links to all tutorials that are currently in this wiki.  The tutorials may cover populous scripting, general level editing, or whatever (as long as it is Populous related of course).



Pop Script Tutorials:

Attack Tutorial

Viewing the Values of Variables While in the Game Tutorial










Back to Top

Tutorials
       Attack Tutorial



Attack Command Tutorial

By:
CDplayer




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 DO ATTACK command to mount an attack on an enemy base using either followers, 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 Reincarnation, but the gathering point can be changed by building a Main Drum Tower (see DO SET_DRUM_TOWER_POS Command). 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 DO 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 in the attack, and a value of 100 will mean 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_ppl: 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_ppl 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 the next parameter (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.  It 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 and marker2 are specified, she will cast the spell when she reaches marker1, in the direction of marker2, otherwise she will use it when she arrives at the target. If attacking without the shaman, set spells 1-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 parameter can take the following self-explanatory values: ATTACK_NORMAL, ATTACK_BY_BOAT,  or ATTACK_BY_BALLOON. Note that if you intend on 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, and marker2 is set, she will cast spell1 at that point, in the direction of marker2.

 
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 example 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.



See Also:

DO ATTACK Command

DO NAV_CHECK Command

DO SET_DRUM_TOWER_POS Command


DO SPELL_ATTACK Command

DO STATE_AUTO_ATTACK Command

Internal Attribute Variables

Internal Game Variables

SET Command










Back to Top

Tutorials
       Viewing the Values of Variables While in the Game Tutorial




Viewing the Values of Variables While in the Game Tutorial

By: CDplayer




In the AI script language, it's hard to figure out what's going on because there is no easy way to find out the value of numerical variables while testing your script. Here's a little routine which will display them for you via the timer in the game.

Section 1

Code:


         //-------- display value -------------
         SET $Test =xxxx=
         IF ( $Test == 0 )
         {
            DO SET_TIMER_GOING 6001
            DO CREATE_MSG_INFORMATION 172
            DO SET_MSG_AUTO_OPEN_DLG
            DO SET_MSG_DELETE_ON_OK
         }
         ELSE
         {
            IF ( $Test < 0 )
            {
               SET $Test2 6000
               DECREMENT $Test2 $Test
               INCREMENT $Test2 1
               DO SET_TIMER_GOING $Test2
               DO CREATE_MSG_INFORMATION 171
               DO SET_MSG_AUTO_OPEN_DLG
               DO SET_MSG_DELETE_ON_OK
            }
            ELSE
            {
               INCREMENT $Test 1
               DO SET_TIMER_GOING $Test
               DO CREATE_MSG_INFORMATION 173       
               DO SET_MSG_AUTO_OPEN_DLG
               DO SET_MSG_DELETE_ON_OK
           }
            ENDIF
         }
         ENDIF
         //--------- end display --------------



Section 2

Code:


EVERY 64 17
{
   DO REMOVE_TIMER
}   



Replace '
=xxxx=' with the name of the variable you want to test at the start of the first code section (eg SET $Test $43). When the routine runs, it will start the onscreen timer with the number of seconds remaining set to the value of the variable and will then display a random message to stop the timer. Zero values are displayed as 100:00 and negative values are displayed as the number of seconds added to 100 minutes (ie -25 displays as 100:25). Of course, values greater than 59 will be displayed as minutes and seconds (eg 90 will display as 01:30) but it's not hard to figure out.

The second code fragment is needed if you want to clear the timer from the screen afterwards. (You can't put it in the main routine because it clears the timer before the message displays.)

For example, say you want to know what game turn has been reached at a certain point in the game. You would replace the first non-comment line of the code with

SET $Test INT_GAME_TURN

and set it to trigger at the point you are interested in and it will tell you. This is useful for finding out why things are not happening as you expect them to, or to figure out what some of the internal variables do.



See Also:


DECREMENT Command

DO CREATE_MSG_INFORMATION Command

DO REMOVE_TIMER Command

DO SET_MSG_AUTO_OPEN_DLG Command

DO SET_MSG_DELETE_ON_OK Command

DO SET_TIMER_GOING Command

EVERY Command

IF Command

INCREMENT Command

SET Command