THINGS YOU MIGHT WANT TO DO, AND HOW TO DO THEM:
* Set up a trigger that fires only once, right when the game starts
You'd have a rule like this:
Code: Select all
RULE ONESHOT
if (true)
then <whatever>
END_RULE
* Increment counter(x), If counter(x) equals (y)
Counters are represented by cHotInts, in the scripting system. You create a counter named <name> by putting the following in your DEFINITIONS section:
cHotInt <name>
Then, you can set the counter in the INITIALIZATION section like so:
<name> = 0;
You can initialize it to any number you want. Then, you can perform mathematical operations on it inside ACTION sections. To increment it, you would do:
<name> = <name> + 1;
To decrement it:
<name> = <name> - 1;
You can copy the values of other counter variables as well:
<name> = <othername>;
Then, when you want to make a rule that depends on the value of a counter, it will look like this:
// Example: fire Bonk when counter Foo reaches 23
Code: Select all
RULE
if (23 == Foo)
then Bonk
END_RULE
Note the TWO equals signs! = means assignment, == means test for equality.
* If player's unit count (specific unit type or total) = x
* If player(x) has total unit count of (x)
You do this, and most things of this form (unit counts of a type) by using Groups. In this case, you want to make up a group, put all the units of the type you're interested in into that group, and then test the group's size.
To fire a rule when a player 1's unit count of all types is EXACTLY x:
Code: Select all
RULE ONESHOT
if (CreateNamedGroup("UCount") &&
AddUnitsByAttributeToGroup("UCount", "Anything", 1,
kPlayerMode_Self, NULL) &&
NumUnitsInGroup("Ucount") == x //doing == for EXACTLY x
)
then Whatever
END_RULE
In the above example, the "UCount" name is something I just made up for this rule. The only thing that matters is that it's not going to collide with something else. You could, if you wanted to, do something in the ACTION section that this rule fires, like SelectGroup("UCount") and then AttackWithSelection(), but for this example we're just counting the units.
"Anything" is the name of the attribute that we're using to select units to add to the group. The full set of named attributes is in $/run/db/dbunittypeattribute.uta. I could have chosen MobileUnits, or Citizens, to limit it to the count of units that matched those attributes.
The 1 is the player that we're talking about, and kPlayerMode_Self means that we're only considering units that belong to that player. These are the different player modes you can use:
kPlayerMode_Anybody, //all players (including the world player)
kPlayerMode_Self, //only units that belong to me.
kPlayerMode_Allies, //only units that belong to my allies
kPlayerMode_SelfAndAllies, //units that belong to me OR my allies
kPlayerMode_Enemies, //units that belong to my declared enemies
kPlayerMode_NonSelf, //enemies and allies, just not me
kPlayerMode_World, //the world player only (resources, animals)
kPlayerMode_NotTheWorld, //anybody who is not the world player
(For future reference, they're located in $/src/EE2/DbHdrs/DbUnitTypeAttributeDefs.h.)
* If quantity(x) units from player(x) enters trigger area(y)
* If player(x) has type of unit(y) in trigger area(z)
This is very much the same as the above, but theA ddUnitsByAttributeToGroup call needs an additional parameter, the name of the area. If you named an area "NearMyBase", and you wanted to trigger as soon as AT LEAST five citizens from player 2 were near your base:
Code: Select all
RULE ONESHOT
if (CreateNamedGroup("Trespassers") &&
AddUnitsByAttributeToGroup("Trespassers", "Citizens", 2,
kPlayerMode_Self, "NearMyBase") &&
NumUnitsInGroup("Ucount") >= 5 //doing >= for AT LEAST five
)
then Whatever
END_RULE
To show off player modes, maybe you don't care about which specific player they're from, as long as they're enemies of player 1. Then you'd do this:
...
AddUnitsByAttributeToGroup("Trespassers", "Citizens", 1,
kPlayerMode_Enemies, "NearMyBase") &&
...
* An alternate way to see if named unit enters trigger area(x)
First, create a group, then add your named unit to it. Then, REMOVE all the units in the group that are in the trigger area. Then, if the group is empty, you know that the guy's in the area you're looking for. Make sense?
Here's an example:
Code: Select all
RULE ONESHOT
if (CreateNamedGroup("JustJames") &&
AddUnitToGroup("JustJames", "JamesBond") &&
RemoveUnitsByAttributeFromGroup("JustJames", "Anything", 0,
kPlayerMode_Anyone, "NearMyBase") &&
NumUnitsInGroup("JustJames") == 0
)
then JamesBondIsNearMyBase
END_RULE
[color=#BF0000]
* If player(x) has killed count(y) units owned by player(z)[/color]
This case is handled by:
Code: Select all
RULE ONESHOT
if (GetNumKilledUnitsFromPlayerByAttribute(z, x, "Anything") >= y
)
then HoorayForUs
END_RULE
* If player(x) destroys quantity(y) of unit type(z) owned by player(z1)
But note that you can be more selective by changing "Anything" to the name of another UnitTypeAttribute, such as MobileUnits (if you don't want to count building destruction):
Code: Select all
RULE ONESHOT
if (GetNumKilledUnitsFromPlayerOfType(z1, x, "z") >= y
)
then WeAreTotallyTheBest
END_RULE
Also note that we do ">= y" rather than "== y", which would trigger when the killed count was exactly y. The reason why we do this is because in the super-rare occurrence that player x kills multiple units at the same time (or, maybe in the nuclear epoch, not so super-rare occurence), the kill count might jump past y without ever equalling it exactly. Therefore it's a lot more pragmatic to test with a > or a < in there somewhere.
* Find the name of a particular unit type for AddUnitsByTypeToGroup
There is no authoritative/centralized list of types, but if you search
for 'UnitType' at the start of the line in $/run/db/Units/*.ddf,
you'll find them. A handy way to do this in VC++ is:
1. go to "Find in Files" under the "Edit" menu
2. Make sure 'Regular Expression' is checked and 'Look in subfolders'
is _not_ checked
3. type '^UnitType' (make sure the ^ is there) into 'Find what:'
4. type '*.ddf' into 'In files/file types:'
5. type C:\EE2\run\db\Units into 'In folder:' (or wherever your
run/db/units directory is
6. hit enter
Of course, without VC++ this can be a little tricky, but the Unit Type names are actually quite easy to figure out. You can usually just use a unit's RPS class name (Frigate, Bomber, HeavyInfantry, LightInfantry, etc.) as it's type. Buildings are always their base type (barracks, workshops – even if its in an epoch with factories, warehouse, etc.) Note that some RPS families have some extra members. If you want Macemen through Objective Force Warriors, it's HeavyInfantry1. If you want Spearmen through Mini-Gunners, it's HeavyInfantry2. Heavy and Light Mounted2 are Helicopters and Heavy and Light Mounted3 are HERCs. Tanks are LightTank and HeavyTank. Finally, LightArtillery2 is the mobile AA unit.
* Use certain 'area' commands relative to the locations of units/groups
So, say you want to move the selection to a named unit called 'TargetUnit'. Instead of placing an area down in the editor where you think TargetUnit is going to be and giving a move order to that area, you can do:
MoveSelectionToArea("Unit:TargetUnit");
Likewise, if there's a group named TargetGroup that you want to move towards the middle of, do this:
MoveSelectionToArea("Group:TargetGroup");
The script interface sees the Unit: and Group: prefixes and does the right thing. This syntax works for the commands:
Create[Named,Grouped]UnitInArea (maybe good for group)
MoveSelectionToArea[WithAttack]
InstantMoveSelectionToArea
AttackAreaWithSelection
SetCameraLookArea
* Make a unit invincible
Do this:
AttachEffectToUnit("<unitname>", "Invincibility");
There used to be a SetUnitInvincible call, but it didn't work, and since this -does- work, it's much more preferable.
* Clean up after a cinematic before the objectives panel pops up
If you want to have some cleanup functions called before the initial cinematic ends, you can put them in a special ACTION called "PreScenInfoPanelHook". This ACTION section should only have one step, and can't use any delay functions (like DoDelay, or DoWaitUntilCinematicTime), since it all takes place at once. It should look like this:
Code: Select all
ACTION PreScenInfoPanelHook
SCRIPT WORLD
SelectGroup("UnitsUsedOnlyForCinematic");
RemoveGroup();
END_SCRIPT
END_ACTION
This will be called immediately after the cinematic ends, but before the objectives panel comes up, so you can do it to remove things you don't want visible during that time.
* All text must use localized strings
A localized string is simply a call to a text database where your text lives. Having all text in an outside database makes it easier to troubleshoot and translate, should the mood strike you. All text that you wish to display in your scenario, either through messages you display through your script or custom display names you set in the editor, must be in the form of a string that can be found and edited in an external file in the text database.
To add an entry to the text db, you need to download and use an editing program like BabelPad™ and make sure you save the file with the prefix "usertext" as in usertext_myscenario.utf8. Next, make a folder called "db" in your "EE2\Run" directory and drop the .utf8 file in a "Text" folder within the "db" folder. Next, start making up strings:
usertext_myscenario_beginning,"""In the beginning…"""
usertext_myscenario_cornchips,"""there were plenty of corn chips…"""
etc…
Make sure you end the file with a hard return, or else you'll likely get some kind of error.
Then, in your script, anytime you want to show some text, you call a the appropriate string:
PrintMessage("usertext_myscenario_beginning");
Or…
CreateDialogBox("usertext_myscenario_beginning", true);
Or you can create a custom display name in the editor by opening up the object properties panel and entering a string:
Display Name: usertext_unitname_BobTheMighty
Now that we've gotten past the simple example, I'm going to give you a
very complex one. This is for strings that have formatting commands in
them, when you want to print a message where the content depends on
values that aren't known until runtime. In this situation, we want to
print a message that depends on the name of a player, an amount
(ostensibly extracted from an alliance proposal), the name of a
particular enum (in this case, a resource), and another
designer-specified string that lives elsewhere in the text DB. We can
do this with a text DB entry that has argument strings in it.
Argument strings are basically small chunks of a message that you want
to substitute something else in for. They're represented by single
words, preferably in all caps, surrounded by % signs. (If you want to
use a % sign by itself in your string, use '\%', and if you want to
use a \ sign by itself, use '\\'.) The following example has four
formatting strings in it, each of which is replaced by a different
piece of data.
// in $/run/db/Text/dbtext_scenario_tutorial1.csv:
usertext_scenario_tutorial1_14 "%PLAYER% has offered you %AMOUNT% %RESOURCE% in exchange for
%AREA%!"
usertext_scenario_tutorial1_15 "Lawrence"
usertext_scenario_tutorial1_16 "North Andover"
// in your script:
StartFormat("usertext_scenario_tutorial1_14");
FormatPlayerName("PLAYER", 2);
FormatInt("AMOUNT", 100);
FormatEnum("RESOURCE", "eResourceType", kResourceType_Gold);
FormatString("AREA", "usertext_scenario_tutorial1_15");
PrintFormattedMessage();
In the end, it will come out looking like:
"King George has offered you 100 Gold in exchange for Lawrence!"
This assumes that player 2's name is King George, but you get the point.
* Create and update a status string
You can make persistent strings that remain on screen. The intent is so that players will have information about their progress toward a particular goal. An example of a good use would be if a player needed to capture three territories, you can display a string on screen that says something like "Captured 0 of 3 territories." When the player captured another territory, you can update it again to say 1 of 3, and so forth. Use of these strings builds upon localized strings as described above. You'll need to know how to do that in order to format these status strings.
I'll describe an example based on the capturing territories idea. First, you need to make sure you have a localized string defined in one of the .utf8 files. This is the only thing that needs to be done outside of the script. This is, of course, a template. And you will be able to, in script, replace the %CAPTUREDNUM% and %CAPTUREDREQ% portions of the string with data in the script.
text_G3_objectiveCapture_status,
"""Captured %CAPTUREDNUM% of %CAPTUREDREQ% territories"""
In the script, for each status string you need an integer which is used to hold an identifier for the string. The integer can be declared in the DEFINITIONS portion of the script, like so.
int statusObjectiveCapture
You need to create a new status string. This can be done in the INITIALIZATION portion of the script.
int statusObjectiveCapture = NewMissionStatusString();
The following section is the action in which the objective is given to the player. The script that I'm including will build the formatted string and put it into our status string. Afterward, we'll make another call to show the string. The command to show the string will make sure the string is automatically displayed on the screen.
Code: Select all
ACTION GivePlayerCaptureObjective
SCRIPT_WORLD
// Include other script to enable the objective
. . .
//
// Start formatting the status string.
StartFormat("text_G3_objectiveCapture_status");
// Add the number of captured territories. I'm assuming
// you define this integer elsewhere, and that you are
// updating it. Note that the value of the integer RIGHT
// NOW is the value that gets inserted into the string.
// If the value of the integer changes later, the string
// will NOT be automatically updated.
FormatInt("CAPTUREDNUM", numTerritoriesCaptured);
// Add one more int for the number of required territoried
FormatInt("CAPTUREDREQ", numTerritoriedRequired);
// Finally, we 'print' the text specified in the
// StartFormat command into the status string that we
// created with NewMissionStatusString during
// initialization, including the variables we added with
// the format calls. Note that this does not cause the
// string to be displayed on string.
PrintFormattedMissionStatusString(statusObjectiveCapture);
// Now that we have initially formatted the string, we can
// show it to the user.
ShowMissionStatusString(statusObjectiveCapture, true);
END_SCRIPT
END_ACTION
Here's another action that gets called whenever the player captures a new territory. This action updates the string to reflect the progress of the player. Note that we can format and print a string without having to show the string again, because we already showed the string when the previous action ran.
Code: Select all
ACTION UpdateCaptureObjective
SCRIPT_WORLD
// Include other script to do whatever
. . .
//
// Start formatting the status string.
StartFormat("text_G3_objectiveCapture_status");
// Again, the number of captured territories and
// and required territories are added. We assume that
// numTerritoriesCaptured has been updated already.
FormatInt("CAPTUREDNUM", numTerritoriesCaptured);
FormatInt("CAPTUREDREQ", numTerritoriedRequired);
// And print once again. This will update and change the
// displayed string, assuming that the string is already
// shown.
PrintFormattedMissionStatusString(statusObjectiveCapture);
END_SCRIPT
END_ACTION
And, finally, you should hide the string once it's no longer relevant to the player. When he's completed the objective, for example.
ShowMissionStatusString(statusObjectiveCapture, false);
GOOD PRACTICES TO FOLLOW:
* Use constants instead of strings in place
This is a good practice to follow to reduce the occurence of 'typo errors' (e.g., accidentally mistyping the name of a unit, group, or area). Instead of referring to areas/groups/units by name strings, make a constant out of that name string, and use that instead:
Code: Select all
// old way:
RULE IsHirohitoDead ONESHOT
if (!DoesUnitExist("Hirohito")
)
then OhManHeDied
END_RULE
// new, slightly annoying way:
DEFINITIONS
constant HIROHITO "Hirohito"
END_DEFINITIONS
RULE IsHirohitoDead ONESHOT
if (!DoesUnitExist(HIROHITO)
)
then OhManHeDied
END_RULE
This has one major benefit: if you misspell the name of a constant,
you will get a compile error, instead of it mysteriously not working during testing.
Code: Select all
// old way, no error (though you will get a message about
// Hirohito dying earlier than you would expect):
RULE IsHirohitoDead ONESHOT
if (!DoesUnitExist("Hirhito")
)
then OhManHeDied
END_RULE
// new way, now with compile-time error:
DEFINITIONS
constant HIROHITO "Hirohito"
END_DEFINITIONS
RULE IsHirohitoDead ONESHOT
if (!DoesUnitExist(HIOHITO)
)
then OhManHeDied
END_RULE
Of course, you are obligated to spell the name correctly in the DEFINITIONS section, but if you're using the same constant everywhere, it will be more likely to show up earlier if you misspell it there.
ENUM LISTS:
Some arguments to script commands are 'enums', which are enumerated values. They have very long descriptive names and are usually used to select one of a set of possibilities. You can tell an enum argument to a script command by the fact that its type starts with an 'e' (like ePlayerMode). Here are the list of possible enums that script interface calls take, and their possible values:
// the basic move type each terrain type can be classified into
ENUM eResourceType {
// special enum to signify all natural resources
kResourceType_AllNaturalResource,
kResourceType_Food,
kResourceType_Wood,
kResourceType_Stone,
kResourceType_Gold,
kResourceType_Tin,
kResourceType_Iron,
kResourceType_Saltpeter,
kResourceType_Oil,
kResourceType_Uranium,
};
// Player mode enumeration - each UnitTypeAttribute has a player mode,
// which is used to determine whether units are contained in the set
// described by a UnitTypeAttribute depending on their ownership. For
// a unit, its mode will be kPlayerMode_Self, which is the default for
// all UnitTypeAttributes.
ENUM ePlayerMode {
kPlayerMode_Anybody, //all players (including the world player)
kPlayerMode_Self, //only units that belong to me.
kPlayerMode_Allies, //only units that belong to my allies
kPlayerMode_SelfAndAllies,//units that belong to me OR my allies
kPlayerMode_Enemies, //units that belong to my declared enemies
kPlayerMode_NonSelf, //enemies and allies, just not me
kPlayerMode_World, //the world player only (resources, animals)
kPlayerMode_NotTheWorld, //anybody who is not the world player
};
//These are the four crown types.
ENUM eCrownType {
kCrownType_Military,
kCrownType_Economic,
kCrownType_Cultural,
kCrownType_Imperial,
};
// determine how out of range time is handled by an animator
enum EVisualLoopType
{
// anim will loop until changed
eVISUAL_LOOP,
// anim will play once then stay at the last pose
eVISUAL_CLAMP,
// anim will play forward then backward etc ...
eVISUAL_PINGPONG
};
enum eDiplomaticState
{
//If player X is hostile toward player Y, player X automatically
//gets the 'attack' cursor when mousing over Y's units. These
//enemy units will also be considered valid targets of
//opportunity (based on the players unit AI settings). This is a
//nonreflexive state - X's hostility toward Y doesn't necessarily
//imply Y's hostility toward X.
kDiplomaticState_Hostile,
//Players who have a neutral diplomatic stance don't get the
//attack cursor by default, but can use a keyboard modifier key
//to initiate attack. Trading is allowed between neutral
//players.
kDiplomaticState_Neutral,
//When two players are allied, all kinds of stuff can happen
//depending on the scope of their alliance. This is a reflexive
//relationship - 'X allied with Y' implies 'Y allied with X' in
//the exactly symmetric fashion.
kDiplomaticState_Allied,
};
enum eAllianceDuration
{
//The alliance will only last until war is declared by either
//party.
kAllianceDuration_UntilWar,
//The alliance has a specific time duration and cannot be broken
//until then.
kAllianceDuration_Timed,
};
enum eAllianceLOSState
{
//Each party gets full shared LOS from the other's units.
kAllianceLOSState_Full,
//Each party only gets shared LOS from the other's buildings.
kAllianceLOSState_Buildings,
//Each party only gets shared LOS from the other's mobile units
kAllianceLOSState_MobileUnits,
//Neither party gets any LOS from the other.
kAllianceLOSState_None,
};
enum eAllianceBorderPerm
{
//Each player has full access to the other player's empire,
//regardless of borders.
kAllianceBorderPerm_Full,
//Only civilian units may pass through the other player's
//borders.
kAllianceBorderPerm_Civilian,
//No units may pass through the other player's borders.
kAllianceBorderPerm_None,
};
enum eAllianceResRight
{
//Other player may freely harvest from any resource located
//within the other player's borders.
kAllianceResRight_Full,
//The player individually specifies the resources that can be
//harvested by the other player. The player also specifies a
//'Tariff' associated with the resource rights. This is a
//percentage that the player harvesting pays in the resource
//being harvested. Valid percentages range from 0 to 99%.
kAllianceResRight_Specified,
//Other player may not harvest any resource located within the
//other player's borders.
kAllianceResRight_None,
};
enum eStanceType {
kStanceType_Aggressive,
kStanceType_Defensive,
kStanceType_HoldPosition,
kStanceType_Cautious,
};
// Enumeration of the different weather states. Normal is the default.
ENUM eWeatherState {
kWeatherState_Normal,
kWeatherState_RainLt,
kWeatherState_SnowLt,
kWeatherState_DustLt,
kWeatherState_RainHv,
kWeatherState_SnowHv,
kWeatherState_DustHv,
kNumWeatherStates,
};
// This is an enumeration of the different area effect types. Many
// special unit powers directly correspond to an effect type. You can // use this enum to see if a player has used a particular unit power.
// The enum shown here is not comprehensive. There are many more
// effect types. If you're looking for one and you don't see it here, // it most likely exists and is ready to use, but it might
// require a little bit of programming support first.
ENUM eEffectType {
kEffectType_GatherIntel,
kEffectType_Extraction,
kEffectType_Contaminate,
kEffectType_Sabotage,
kEffectType_Cloak //this is what the Pyramids do, amongst other things
-------------------------------------------
LIST OF ALL IES SCRIPT COMMANDS
Again, an overview of all commands that the compiler knows in the editor.
DoDisplayDialog
void SetUnitDisplayName(const char *in_szUnitNameInScript, const char *in_szTextDatabaseEntry);
void CreateUnitAtLocation(int in_iPlayerID,const char *in_szTypeName,bool in_bSpecialForces, float in_fXLoc, float in_fYLoc,float in_fAngle)
void CreateNamedUnitAtLocation(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, float in_fXLoc, float in_fYLoc,float in_fAngle)
void CreateGroupedUnitAtLocation(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, float in_fXLoc, float in_fYLoc,float in_fAngle)
void SetUnitPlacementAngle(float in_fAngle)
void CreateUnitInArea(int in_iPlayerID,const char *in_szTypeName,bool in_bSpecialForces, const char *in_szAreaName)
void CreateNamedUnitInArea(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, const char *in_szAreaName)
void CreateGroupedUnitInArea(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, const char *in_szAreaName)
void CreateUnitInTerritory(int in_iPlayerID, const char* in_szTypeName, bool in_bSpecialForces,const char* in_szTerritoryName)
void CreateNamedUnitInTerritory(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, const char *in_szTerritoryName)
void CreateGroupedUnitInTerritory(int in_iPlayerID,const char *in_szTypeName, const char *in_szUnitName,bool in_bSpecialForces, const char *in_szTerritoryName)
void CreateUnitInUnit(int in_iPlayerID, const char* in_szTypeName,bool in_bSpecialForces, const char* in_szTargetUnit)
void CreateNamedUnitInUnit(int in_iPlayerID, const char* in_szTypeName,const char* in_szUnitName, bool in_bSpecialForces, const char* in_szTargetUnit)
void CreateGroupedUnitInUnit(int in_iPlayerID, const char* in_szTypeName,const char* in_szGroupName, bool in_bSpecialForces, const char* in_szTargetUnit)
void GenerateAIBuildManagers(const char* in_szCapitolName)
void PausePlayerAI(int in_iPlayerID, bool bPaused)
void SetAIInstantRallying(int in_iPlayerID, bool in_bShouldInstantRally)
void AI_ChangePersonality(int in_iPlayerID, const char *in_szFileName)
AI_LoadCivSpecificPersonality
void AI_SetAttackFactor(int in_iPlayerID, float in_fFactor)
void AI_SetBuildTimeFactor(int in_iPlayerID, float in_fFactor)
void AI_SetBuildCostFactor(int in_iPlayerID, float in_fFactor)
void AI_CreateBattalion(int in_iPlayerID, const char* in_szMyUnitGroupName, const char *in_szEnemyUnitGroupName, const char* in_szTerritoryName, eTaskType in_eTaskType)
void SetPlayerToCinematicOnly(int in_PlayerID, bool in_bCinematicOnly)
void SetPlayerResource(int in_iPlayerID, eResourceType in_eResType,int in_iAmount)
void AddPlayerResource(int in_iPlayerID, eResourceType in_eResType,int in_iAmountToAdd)
void RemovePlayerResource(int in_iPlayerID,eResourceType in_eResType, int in_iAmountToRemove)
void LiftShroudForPlayer(int in_iPlayerID)
void ToggleFogOfWar(bool in_bFogOn)
void ResetFogOfWar(int in_iPlayerID)
void CarveShroudCircle(int in_iPlayerID, float in_fX, float in_fY, int in_iRadius)
void CarveShroudOverTerritory(int in_iPlayerID, const char* in_szTerritoryName)
void PlaceFlare(float in_fX, float in_fY, int in_iRadius, int in_iPlayerID, float in_fDuration)
void FlushFlares(int in_iPlayerID)
void FlareMiniMap(int in_iPlayerID, float in_fX, float in_fY)
void FlareMiniMapForDuration(int in_iPlayerID, float in_fX, float in_fY, float in_fDuration)
void AlertPlayer()
void CarveShroudArea(int in_iPlayerID, const char *in_szAreaName)
void SetPopCapPerCityCenterForPlayer(int in_iPlayerID,
void SetMaxPopCapacity(int in_iPlayerID, int in_iNewMaxPopCap)
Void NewMissionTimer(const char *in_szTextDBEntry, int in_iTimerID);
void NewMissionTimerWithFormattedName(bool in_bMissionTimer);
void SetMissionTimer(int in_iTimerID, int in_iTimeInSeconds);
void StartMissionTimer(int in_iTimerID)
void PauseMissionTimer(int in_iTimerID)
int NewMissionStatusString()
void SetTechEnabled(int in_iPlayerID, const char *in_szTechName, bool in_bEnabled)
void AdvancePlayerEpoch(int in_iPlayerID, int in_iEpoch)
void AwardTech(int in_iPlayerID, const char* in_szTechName)
void SetMaxEpochUI(int in_iMaxEpoch)
void CallNamedEventHandler(const char *in_szEventHandlerName, const char *in_szArgument)
int AttachEffectToUnit(const char *in_szUnitName, const char *in_szEffectName)
int AttachEffectToGroup(const char *in_szGroupName, const char *in_szEffectName)
int AttachEffectToPlayer(int in_iPlayerID, const char *in_szEffectName)
int AttachEffectToPlayerAtLocation(int in_iPlayerID,const char *in_szEffectName,float in_fX,float in_fY)
void CancelEffect(int in_iEffectID)
SetPlayerWinner
void WinScenario()
void LoseScenario()
bool HasPlayerResearchedTech(int in_iPlayerID, const char* in_szTechName)
int GetOwningPlayerForTerritory(const char* in_szTerritoryName)
void ChangeTerritoryOwner(const char* in_szTerritoryName, int in_iNewPlayer)
void ChangeTerritoryCityName(const char* in_szTerritoryName, const char* in_szCityName)
int GetNumTerritoriesForPlayer(int in_PlayerID)
GetNumberTerritoriesTributed
bool DidPlayerTributeTerritoryToOwner(const char* in_szTerritoryName, int in_iPreviousOwner)
void AddAirMissionWayPoint(const char *in_szAirportUnitName, eAirMissionType in_missionType, int in_missionNumber, float in_waypointX, float in_waypointY);
void AddAirMissionWayPointArea(const char *in_szAirportUnitName, eAirMissionType in_missionType, int in_missionNumber, const char *in_szAreaName);
void CancelAirMission(const char *in_szAirportUnitName, eAirMissionType in_missionType, int in_missionNumber);
void AssignAirplaneToMission(const char *in_szAirportUnitName, eAirMissionType in_missionType, int in_missionNumber, const char *in_szAirplaneUnitName) = 0;
int GetCurrentBuyPrice(int in_iPlayer, eResourceType in_eType)
int GetCurrentSellPrice(int in_iPlayer, eResourceType in_eType)
int GetCurrentInflationRate(int in_iPlayer, eResourceType in_eType)
int GetCurrentDeflationRate(int in_iPlayer, eResourceType in_eType)
int GetCurrentMaxBuyPrice(int in_iPlayer, eResourceType in_eType)
int GetCurrentMinSellPrice(int in_iPlayer, eResourceType in_eType)
void SetBuyPrice(int in_iPlayer, eResourceType in_eType, int in_iValue)
void SetSellPrice(int in_iPlayer, eResourceType in_eType, int in_iValue)
void SetInflationRate(int in_iPlayer, eResourceType in_eType, int in_iValue)
void SetDeflationRate(int in_iPlayer, eResourceType in_eType, int in_iValue)
void SetMaxBuyPrice(int in_iPlayer, eResourceType in_eType,int in_iValue)
void SetMinSellPrice(int in_iPlayer, eResourceType in_eType,int in_iValue)
void StartPlayingCinematic(const char *in_szCinematicName)
void DoDelayUntilCinematicTime(float in_fMark, cIEScript *pIEScript)
void DoDelayUntilCinematicFinished(cIEScript *pIEScript)
void SetCinematicTime(float in_fTime)
void PlayBink(const char *in_Binkfilename)
void StartFormat(const char *in_szTextDBEntry)
void FormatPlayerName(const char *in_szArgument, int in_iPlayerID)
void FormatPlayerCiv(const char *in_szArgument, int in_iPlayerID)
void FormatInt(const char *in_szArgument, int in_iValue)
void FormatFloat(const char *in_szArgument, float in_fValue)
void FormatEnum(const char *in_szArgument, const char *in_szEnumName, int in_iValue)
void FormatString(const char *in_szArgument, const char *in_szTextDBEntry)
void PrintFormattedMessage()
void PrintFormattedSubtitle()
void PrintFormattedMissionStatusString (int in_iStringID)
void PIPSetBookmarkLocation(int in_iPlayerID, int in_iBookmark, float in_fX, float in_fY, float in_fDistance)
void PIPSetBookmarkUnit(int in_iPlayerID, int in_iBookmark, const char *in_szUnitName, float in_fDistance)
void PIPViewBookmark(int in_iBookmark)
void PIPCycleMode(bool in_bCycle)
void PIPEnable(bool in_bEnable)
void CreateDialogBox(const char *in_szTitle,const char* in_szDisplayText,bool in_bPauseGame)
void CreateObjectiveDialogBox(const char *in_szObjectiveName,bool in_bPauseGame)
bool IsObjectiveDialogBoxOpen()
void SetAllowObjectiveDialogInEncyclopedia(bool in_bAllow)
bool IsObjectiveCompleted(const char *in_szObjectiveName)
bool IsObjectiveFailed(const char *in_szObjectiveName)
bool IsObjectiveUnlocked(const char *in_szObjectiveName)
bool AllPrimaryObjectivesCompleted()
bool AllSecondaryObjectivesCompleted()
bool AnyPrimaryObjectivesFailed()
bool AnyLoseConditionsFailed()
void SetObjectiveUnlocked(const char *in_szObjectiveName)
void SetObjectiveLocked(const char *in_szObjectiveName)
void SetObjectiveCompleted(const char *in_szObjectiveName)
void SetObjectiveNotCompleted(const char *in_szObjectiveName)
void SetObjectiveFailed(const char *in_szObjectiveName)
void ChangeObjectiveDescription(const char *in_szObjectiveName,const char *in_szDescriptionText)
void ObjectiveClearAllTargets(const char *in_szObjectiveName)
void ObjectiveSetTargetLocation(const char *in_szObjectiveName,float in_fX, float in_fY)
void ObjectiveAddTargetLocation(const char *in_szObjectiveName,float in_fX, float in_fY)
bool ObjectiveRemoveTargetLocation(const char *in_szObjectiveName,float in_fX, float in_fY)
void ObjectiveClearTargetLocations(const char *in_szObjectiveName)
void ObjectiveSetTargetUnit(const char *in_szObjectiveName,const char *in_szUnitName)
void ObjectiveAddTargetUnit(const char *in_szObjectiveName,const char *in_szUnitName)
bool ObjectiveRemoveTargetUnit(const char *in_szObjectiveName,const char *in_szUnitName)
void ObjectiveClearTargetUnits(const char *in_szObjectiveName)
void ObjectiveSetTargetArea(const char *in_szObjectiveName,const char *in_szAreaName)
void ObjectiveAddTargetArea(const char *in_szObjectiveName,const char *in_szAreaName)
bool ObjectiveRemoveTargetArea(const char *in_szObjectiveName,const char *in_szAreaName)
void ObjectiveClearTargetAreas(const char *in_szObjectiveName)
void ObjectiveSetTargetTerritory(const char *in_szObjectiveName,const char *in_szTerritoryName)
void ObjectiveAddTargetTerritory(const char *in_szObjectiveName,const char *in_szTerritoryName)
bool ObjectiveRemoveTargetTerritory(const char *in_szObjectiveName,const char *in_szTerritoryName)
void ObjectiveClearTargetTerritories(const char *in_szObjectiveName)
bool SelectUnit(const char *in_szUnitName)
bool SelectGroup(const char *in_szGroupName)
bool SelectGroupForPlayer(const char* in_szGroupName,int in_iPlayerID)
bool ClearSelection()
bool CreateNamedGroup(const char *in_szGroupName)
bool AddUnitToGroup(const char *in_szGroupName,const char *in_szUnitName)
bool RemoveUnitFromGroup(const char *in_szGroupName,const char *in_szUnitName)
bool AddGroupToGroup(const char *in_szGroupTo,const char *in_szGroupFrom)
bool RemoveGroupFromGroup(const char *in_szGroupTo,const char *in_szGroupFrom)
bool AddUnitsByAttributeToGroup(const char *in_szGroupName,const char *in_szAttributeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool RemoveUnitsByAttributeFromGroup(const char *in_szGroupName,const char *in_szAttributeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool AddUnitsByTypeToGroup(const char *in_szGroupName,const char *in_szUnitTypeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool RemoveUnitsByTypeFromGroup(const char *in_szGroupName,const char * in_szUnitTypeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool AddDeadUnitsByAttributeToGroup(const char *in_szGroupName,const char *in_szAttributeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool AddDeadUnitsByTypeToGroup(const char *in_szGroupName,const char *in_szUnitTypeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool AddUnitsInCityToGroup(const char* in_szGroupName,const char* in_szAttributeName,int in_iPlayerID,ePlayerMode in_ePlayerMode,const char* in_szCityName)
bool RemoveUnitsInCityFromGroup(const char* in_szGroupName,const char* in_szAttributeName,int in_iPlayerID,ePlayerMode in_ePlayerMode,const char* in_szCityName)
bool AddUnitsByAttributeToGroupFromTerritory(const char *in_szGroupName, const char *in_szAttributeName, int in_iPlayerID, ePlayerMode in_ePlayerMode, const char *in_szTerritoryName)
bool RemoveUnitsByAttributeFromGroupFromTerritory(const char *in_szGroupName, const char *in_szAttributeName, int in_iPlayerID, ePlayerMode in_ePlayerMode, const char *in_ szTerritoryName)
bool AddUnitsByTypeToGroupFromTerritory(const char *in_szGroupName,const char *in_szUnitTypeName, int in_iPlayerID,ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool RemoveUnitsByTypeFromGroupFromTerritory (const char *in_szGroupName, const char * in_szUnitTypeName, int in_iPlayerID, ePlayerMode in_ePlayerMode, const char *in_szAreaName)
bool AddUnitsByAttributeInLOSToGroup(int in_iPlayerWhoSeesID,const char* in_szGroupName, const char* in_AttributeName,int in_iPlayerWhoControlsID)
bool RemoveUnitsByAttributeInLOSFromGroup(int in_iPlayerWhoSeesID,const char* in_szGroupName, const char* in_AttributeName,int in_iPlayerWhoControlsID)
bool AddUnitsByTypeInLOSToGroup(int in_iPlayerWhoSeesID,const char* in_szGroupName, const char* in_AttributeName,int in_iPlayerWhoControlsID)
bool RemoveUnitsByTypeInLOSFromGroup(int in_iPlayerWhoSeesID,const char* in_szGroupName, const char* in_AttributeName,int in_iPlayerWhoControlsID)
bool PlayerHasLOSToAnyoneInGroup(int in_iPlayerID,const char *in_szGroupName)
bool UnitHasLOSToAnyoneInGroup(const char *in_szUnitName,const char *in_szGroupName)
bool GroupHasLOSToAnyoneInGroup(const char *in_szWatchers,const char *in_szTargets)
bool NamedUnitIsInArea(const char *in_szUnitName,const char *in_szAreaName)
bool AnyoneFromGroupIsInArea(const char *in_szGroupName,const char *in_szAreaName)
bool EveryoneFromGroupIsInArea(const char *in_szGroupName,const char *in_szAreaName)
bool NamedUnitIsInTerritory(const char *in_szUnitName,const char *in_szTerritoryName)
bool AnyoneFromGroupIsInTerritory(const char *in_szGroupName,const char *in_szTerritoryName)
bool EveryoneFromGroupIsInTerritory(const char *in_szGroupName,const char *in_szTerritoryName)
void AddToControlGroupFromGroup(const char *in_szGroupName,int in_iPlayerID, int in_iControlGroupNumber)
void SetControlGroupFromGroup(const char *in_szGroupName,int in_iPlayerID, int in_iControlGroupNumber)
void ClearControlGroup(int in_iPlayerID, int in_iControlGroupNumber)
void AddToGroupFromControlGroup(int in_iControlGroupNumber,int in_iPlayerID, const char *in_szGroupName)
void LookAtControlGroup(int in_iPlayerID,int in_iControlGroupNumber)
bool ControlGroupHasUnits(int in_iPlayerID, int in_iControlGroupNumber)
void MoveSelection(float fX, float fY)
void MoveSelectionToArea(const char *in_szAreaName)
void MoveSelectionToTerritory(const char *in_szTerritoryName)
void MoveSelectionToAreaWithAttack(const char *in_szAreaName,bool in_bGroupAttack)
void MoveSelectionToTerritoryWithAttack(const char *in_szTerritoryName, bool in_bGroupAttack)
void InstantMoveSelectionToArea(const char* in_szAreaName, int iMaxDistance)
void InstantMoveSelection(float fX, float fY, int iMaxDistance)
ReloadSelection
void PatrolWithSelection(const char *in_szPoint1,const char *in_szPoint2, const char *in_szPoint3,const char *in_szPoint4, const char *in_szPoint5,const char *in_szPoint6, const char *in_szPoint7,const char *in_szPoint8)
void AttackAreaWithSelection(const char *in_szAreaName)
void GiveAttackBasePreference(int in_iPlayerID,const char *in_szAreaName, float in_priorityBoost)
void GiveDefendBasePreference(int in_iPlayerID,const char *in_szAreaName, float in_priorityBoost)
void GiveCaptureTerritoryPreference (int in_iPlayerID,const char *in_szTerritoryName, float in_priorityBoost)
void GiveAttackArmyPreference(int in_iPlayerID,const char* in_szTypeName, float in_priorityBoost)
void SetSelectionFormation(const char *in_szFormationName)
void AttackWithSelection(const char *in_szAttackee)
void AttackGroupWithSelection(const char *in_szTargetGroupName)
void CaptureWithSelection(const char *in_szTarget)
void SetSelectionStance(eStanceType in_eStance)
void SearchAndDestroyWithSelection()
void SearchAndDestroyWallsWithSelection()
void GatherFromNamedUnitWithSelection(const char *in_szUnitName)
GatherResourceWithSelection
void GuardWithSelection(const char* in_szUnitToGuard)
void StopSelection()
void ExploreWithSelection()
bool IsUnitExploring(const char* in_szUnitName)
bool IsAnyoneInGroupExploring(const char* in_szGroupName)
bool IsUnitPatrolling(const char* in_szUnitName)
bool IsAnyoneInGroupPatrolling(const char* in_szGroupName)
void RemoveGarrisonedUnitsFromGroup(const char* in_szGroupName)
void GarrisonSelection(const char *in_szContainerName)
void UngarrisonSelection()
UngarrisonSelectionAtLocation
bool IsUnitGarrisoned(const char* in_szUnitName)
IsUnitSabotaged
GetNumGarrisoned(const char *in_szGroupName)
int CountUnitsGarrisonedInUnit(const char* in_szUnitName)
int CountUnitsGarrisonedInGroup(const char* in_szGroup)
void KillSelection()
void RemoveSelection()
void HealUnit(const char *in_szUnitName)
void HealGroup(const char *in_szGroupName)
void DamageUnit(const char *in_szUnitName, float in_fAmount)
void DamageGroup(const char *in_szGroupName, float in_fAmount)
void SetUnitOwnedBy(const char *in_szUnitName,int in_iPlayerID)
void SetGroupOwnedBy(const char *in_szGroupName,int in_iPlayerID)
PauseUnitAI
PauseGroupAI
void SetUnitSpecialForces(const char *in_szUnitName,bool in_bSpecial)
void SetGroupSpecialForces(const char *in_szGroupName,bool in_bSpecial)
void SetResourcesGatheredTypeAndAmount(eResourceType in_resourceType, int in_iAmount)
void SetResourcesGatheredAmount(int in_iAmount)
bool IsSelectionInsideCity(const char* in_szCityName, bool in_bAll)
void UseSpecialPowerSelf(const char* in_szSpecialPower)
void UseSpecialPowerTarget(const char* in_szSpecialPower,const char* in_szTargetUnitName)
void UseSpecialPowerLocation(const char* in_szSpecialPower,float in_fX, float in_fY)
void UseSpecialPowerOnTargetInArea(const char* in_szPowerName,const char* in_szAreaName)
void UseSpecialPowerOnTargetInGroup(const char* in_szPowerName,const char* in_szGroupName)
void RechargePowerReserve()
bool HasPlayerUsedSpecialPowerRecently(int in_iWhichPlayer,eEffectType in_whichEffect, float in_fTimePeriod)
int NumTimesPlayerUsedRegionPower(int in_iPlayerID)
bool IsEffectOfTypeOnSelection(eEffectType in_whichEffect, bool in_bAll)
void StartBuildWall(int in_iPlayerID, float in_fX, float in_fY,const char* in_szWallBaseType);
void StartBuildRoad(int in_iPlayerID, float in_fX, float in_fY,const char* in_szRoadBaseType);
void AddConnectableWaypoint(float in_fX, float in_fY)
void SelectionBuildConnectable()
void BlinkSelectionCircles(float in_fDuration)
void ShowMissionTimerWidget(int in_iTimerID, bool in_bShow);
void ShowMissionStatusString(int in_iStringID, bool in_bShow)
void SetVisualStateOnUnit(const char *in_szUnitName, const char *in_szVisualStateName, float in_fStateLoopTime, EVisualLoopType in_eLoopType)
void PrintMessage(const char *in_szMessage)
void PrintMessageFromPlayer(const char* in_szMessage, int in_iPlayerID)
void ClearMessage()
void PrintSubtitle(const char *in_szMessage)
void ClearSubtitle()
SetCameraLookAt(float in_fX, float in_fY, bool in_bPIP)
void SetCameraLookAtArea(const char *in_szAreaName, bool in_bPIP)
void SetCameraHeading(float in_fAngle, bool in_bPIP)
void SetCameraDistanceFraction(float in_fFraction, bool in_bPIP)
void DebugOutputString(const char *in_szDebugString)
void ClearDebugBuffer()
bool IsUnitBookMarked(const char* in_szUnitName)
IsBookmarkSet
bool IsUnitSelectedUI(const char* in_szUnitName)
bool IsGroupSelectedUI(const char* in_szGroupName)
bool IsWidgetVisible(const char* in_szWidgetName)
void SetWarPlanDeleteEnabled(bool in_bEnabled)
void SetWarPlanCopyEnabled(bool in_bEnabled)
void SetWarPlanSendToAlliesEnabled(bool in_bEnabled)
bool ShowMonthWidget(bool in_bShow)
bool IsUserPlacingType(const char* in_szUnitTypeName)
void DisableCitizenManager()
void FlashWidgetUntilClicked(const char *in_szWidgetName, bool in_bStopFlashingIfHotkeyActivated)
void FlashWidgetForTime(const char *in_szWidgetName, float in_fTimeInSeconds)
void FlashWidgetUntilStopped(const char *in_szWidgetName)
void StopFlashingWidget(const char *in_szWidgetName)
HackMakeWidgetFlashable
void AddWidgetListenForSelection(const char *in_szWidgetName,bool in_bCountHotkeyActivationAsSelection)
void AddWidgetListenForSelectionWithEventAndArg(const char *in_szWidgetName, const char *in_szEventName, const char *in_szEventArg)
void RemoveWidgetListenForSelection(const char *in_szWidgetName)
bool HasWidgetBeenSelected(const char *in_szWidgetName)
int GetWidgetSelectionCount(const char *in_szWidgetName)
bool HasTextBeenTyped( const char *in_szText)
void SuppressTerritoryMessages(bool in_bSuppressMessages)
void SetDontPauseDuringEncyclopedia(bool in_bPauseGame)
void SetDontPauseDuringDiplomacy(bool in_bPauseGame)
void SetDontPauseDuringScenarioBriefing(bool in_bPauseGame)
int StartPlayingSound(const char *in_szSoundSampleName);
Void StopSound(int in_handle);
void StopAllScriptSounds();
int PlayVoiceOver(const char *in_filename);
int PlayUnpausableVoiceOver(const char *in_filename);
int PlayLoopingVoiceOver(const char *in_filename);
void FadeOutSound(int in_handle, float in_length);
bool IsSoundPlaying(int in_iNonce) = 0;
void ToggleStreamingMusic(bool in_enable);
int PlayLoopingMusic(const char *in_filename);
int PlayOneShotMusic(const char *in_filename);
eDiplomaticState GetDiplomaticState(int in_iFromPlayer, int in_iToPlayer)
void SetDiplomaticState(int in_iFromPlayer, int in_iToPlayer, eDiplomaticState in_eState)
bool IsDiplomaticStateLocked(int in_iPlayer1ID, int in_iPlayer2ID)
void LockDiplomaticState(int in_iPlayer1ID, int in_iPlayer2ID)
void UnlockDiplomaticState(int in_iPlayer1ID, int in_iPlayer2ID)
bool IsAllianceProposalWaiting(int in_iPlayer1ID, int in_iPlayer2ID)
float GetWaitingProposalTimeElapsed (int in_iFromPlayer,int in_iToPlayer)
eAllianceDuration GetWaitingProposalDurationType(int in_iFromPlayer,int in_iToPlayer)
float GetWaitingProposalDuration (int in_iFromPlayer,int in_iToPlayer)
eAllianceLOSState GetWaitingProposalLOSState(int in_iFromPlayer, int in_iToPlayer)
eAllianceBorderPerm GetWaitingProposalBorderPermission(int in_iFromPlayer, int in_iToPlayer)
bool WaitingProposalAllowsMiningOf(int in_iFromPlayer,int in_iToPlayer, eResourceType in_eResourceType)
int WaitingProposalTariffPercentage(int in_iFromPlayer,int in_iToPlayer, eResourceType in_eResourceType)
int GetWaitingProposalTribute(int in_iPlayerFromID,int in_iPlayerToID, eResourceType in_eResourceType)
void RejectWaitingProposal(int in_iFromPlayer, int in_iToPlayer)
void AcceptWaitingProposal(int in_iFromPlayer, int in_iToPlayer)
void EnterAllianceProposal(int in_iPlayer1ID, int in_iPlayer2ID,eAllianceDuration in_eDuration, float in_fLength,eAllianceLOSState in_eLOS,eAllianceBorderPerm in_eBorderPermission,eAllianceResRight in_eResourceRight)
StartAllianceProposal
SendAllianceProposal
SetAllianceProposalDurationUntilWarIsDeclared
SetAllianceProposalDurationTimed
SetAllianceProposalLOSState
SetAllianceProposalBorderPermission
SetAllianceProposalResourceRight
AddAllianceProposalTributeResource
AddAllianceProposalTributeUnits
AddAllianceProposalTributeTerritory
bool StartVerifyAllianceProposal(int in_iPlayer1ID, int in_iPlayer2ID)
bool VerifyProposalDurationNotLongerThan(eAllianceDuration in_eDurationType, float in_fDuration)
bool VerifyProposalDurationNotShorterThan(eAllianceDuration in_eDurationType, float in_fDuration)
bool VerifyProposalLOS(eAllianceLOSState in_eLOS)
bool VerifyProposalBorderPermissions(eAllianceBorderPermissions in_eBorderPermissions)
bool VerifyProposalResourceRightsNotMoreThan(int in_iPercent)
bool VerifyProposalResourceRightsNotLessThan(int in_iPercent)
bool VerifyProposalTributeResource( eResourceType in_eType,int in_iAmount)
bool VerifyProposalTributeTerritory(const char* in_szTerritoryName)
bool FinishVerifyAllianceProposal()
void ForceAlliance(int in_iPlayer1ID, int in_iPlayer2ID,eAllianceDuration in_eDuration, float in_fLength,eAllianceLOSState in_eLOS,eAllianceBorderPerm in_eBorderPermission,eAllianceResRight in_eResourceRight)
void TributeResource(int in_iPlayerFromID, int in_iPlayerToID,eResourceType in_eResourceType, int in_iAmount)
void TributeTerritory(const char *in_szTerritoryName)
void TributeUnits(const char *in_szUnitName)
void SetAIDiplomacyEnabled(int in_iPlayerID, bool bEnabled)
void SetAIWarplansEnabled (int in_iPlayerID, bool in_bEnabled)
void SetAITauntsEnabled(bool bEnabled)
void ForceSurrenderOffer(int in_iPlayerAI, int in_iPlayerHuman)
bool IsAnyWarplanSentFromPlayerToPlayer(int in_iPlayerSendID, int in_iPlayerReceiveID)
bool AcceptPendingPlanFromPlayer(int in_iSendingPlayer, int in_iReceivingPlayer)
int GetCurrentMonth()
int GetCurrentSeason()
void SetCurrentMonth(int in_iMonth)
void SetCurrentTimeOfDay(int in_iHour)
void SetSecondsPerYear(float in_fSecPerYear)
void PauseCalendar(bool in_bPause)
void PauseCalendarAtMonth(int in_iWhichMonth)
void PauseWeatherSystem(bool in_bPause)
void ChangeToWeather(enum eWeatherState in_whichWeather, float in_fTransitionTime)
void StartLightningBolt()
void StartLightningBoltAtLocation(float in_fX, float in_fY)
void StartLightningBoltHitUnit(const char* in_szTargetUnitName, float in_fDamageAmount)
void ChangeToSkybox(const char* in_szSkyboxName, float in_fTransitionTime);
int RandomIntBetween(int in_iLow, int in_iHigh)
float RandomFloatBetween(float in_fLow, float in_fHigh)
bool IsMissionTimerExpired(int in_iTimerID)
int GetMissionTimer(int in_iTimerID)
float GetDistanceFromUnitToPoint(const char *in_szUnitName, float in_fX, float in_fY)
float GetDistanceFromUnitToUnit(const char *in_szUnit1Name, const char *in_szUnit2Name)
float GetMinDistanceFromUnitToGroup(const char *in_szUnitName, const char *in_szGroupName)
float GetMaxDistanceFromUnitToGroup(const char *in_szUnitName, const char *in_szGroupName)
bool DoesWallCoverGap(int in_iPlayerID, const char* in_szAreaA, const char* in_szAreaB, int in_iMaxUnits)
bool DoesRoadCoverGap(int in_iPlayerID, const char* in_szAreaA, const char* in_szAreaB, int in_iMaxUnits)
bool DoesUnitExist(const char *in_szUnitName)
void NameRandomUnitInGroup(const char *in_szGroupName, const char *in_szUnitName)
eUnitGoalType GetUnitGoalType(const char *in_szUnitName)
float GetUnitHealth(const char *in_szUnitName)
int GetPlayerResource(int in_iPlayerID, eResourceType in_eResType)
float GetPlayerCrownScore(int in_iPlayerID, eCrownType in_eCrownType)
float GetPlayerCrownThreshold(int in_iPlayerID, eCrownType in_eCrownType)
void AdjustPlayerCrownScore(int in_iPlayerID, eCrownType in_eCrownType, float in_fAdjustment)
void AwardCrown(int in_iPlayerID, eCrownType whichCrown)
void AddCrownPowerForAllPlayers(eCrownType in_eCrownType, const char* in_szPowerName)
void RemoveCrownPowerForAllPlayers(eCrownType in_eCrownType, const char* in_szPowerName)
void AddCrownPowerForOnePlayer(int in_iPlayerID, eCrownType in_eCrownType, const char* in_szPowerName)
void RemoveCrownPowerForOnePlayer(int in_iPlayerID, eCrownType in_eCrownType, const char* in_szPowerName)
void LimitPlayerToOneCrownPower(int in_iPlayerID, eCrownType in_eCrownType, const char* in_szPowerName)
int PlayerWhoHasCrown(eCrownType in_eCrownType)
bool HasPlayerEarnedCrown(int in_iPlayerID, eCrownType in_eCrownType)
SetAllowLeaderForCrown(int in_iPlayerID, eCrownType in_eCrownType, bool m_bMayBuild)
GetAmountOfResourcesCollected
int GetAmountOfGoldFromTrade(int in_iPlayerID)
int GetNumCitizensGatheringResource(int in_iPlayerID, eResourceType in_eType)
int GetNumDeadUnits(int in_iFromPlayerID)
int GetNumDeadUnitsOfType(int in_iFromPlayerID, const char *in_szUnitTypeName)
int GetNumDeadUnitsByAttribute(int in_iFromPlayerID, const char *in_szAttributeName)
int GetNumConvertedUnitsOfType(int in_iToPlayerID, const char *in_szUnitTypeName)
int GetNumConvertedUnitsByAttribute(int in_iToPlayerID, const char *in_szAttributeName)
int GetNumConvertedAwayUnitsOfType(int in_iFromPlayerID, const char *in_szUnitTypeName)
int GetNumConvertedAwayUnitsByAttribute(int in_iFromPlayerID, const char *in_szAttributeName)
int GetNumConvertedUnitsFromPlayerOfType(int in_iFromPlayerID, int in_iToPlayerID, const char *in_szUnitTypeName)
int GetNumConvertedUnitsFromPlayerByAttribute(int in_iFromPlayerID, int in_iToPlayerID, const char *in_szAttributeName)
int GetNumKilledUnitsOfType(int in_iToPlayerID, const char *in_szUnitTypeName)
int GetNumKilledUnitsByAttribute(int in_iToPlayerID, const char *in_szAttributeName)
int GetNumKilledUnitsFromPlayerOfType(int in_iFromPlayerID, int in_iKillingPlayerID, const char *in_szUnitTypeName)
int GetNumKilledUnitsFromPlayerByAttribute(int in_iFromPlayerID, int in_iKillingPlayerID, const char *in_szAttributeName)
int GetNumProducedUnitsOfType(int in_iPlayerID, const char *in_szUnitTypeName)
int GetNumProducedUnitsByAttribute(int in_iPlayerID, const char *in_szAttributeName)
int GetAmountOfTribute(int in_iPlayerFromID, int in_iPlayerToID, eResourceType in_eResourceType)
int GetOwningPlayerID(const char *in_szUnitName)
bool IsGroupOwnedBy(const char *in_szGroupName, int in_iPlayerID)
int GetGroupOwnerID(const char *in_szGroupName)
float GetElapsedGameTime()
bool PlayerInGame(int in_iPlayerID)
bool PlayerHasResearchedTech(int in_iPlayerID, const char *in_szTechName)
int GetPlayerEpoch(int in_iPlayerID)
bool DoesPlayerHaveEnoughTechsToAdvance(int in_iPlayerID)
int NumUnitsInGroup(const char *in_szGroupName)
int NumUnitsInGroupNotDead(const char* in_szGroupName)
int GetNumPlayers()
bool IsPlayerAttackingInArea( int in_iAttackerID,int in_iTargetID,const char* in_szArea)
int GetLandTradeRoutesBetweenPlayers(int in_iPlayerA, int in_iPlayerB)
int GetSeaTradeRoutesBetweenPlayers(int in_iPlayerA, int in_iPlayerB)
int GetAllTradeRoutesBetweenPlayers(int in_iPlayerA, int in_iPlayerB)
int GetAllTradeRoutesForPlayer(int in_iPlayer)
bool HavePlayersTradedRecently(int in_iPlayerA,int in_iPlayerB,float in_fTimePeriod)
bool IsWeakestPlayer(int in_iPlayer, float in_fRequiredRatio);
bool IsStrongestPlayer(int in_iPlayer, float in_fRequiredRatio);
bool HasLeastResources(int in_iPlayer, float in_fRequiredRatio);
bool EnemiesArePlaneHappy(int in_iPlayer)
bool EnemiesHaveForsakenPlanes(int in_iPlayer)
int GetPlayerPopulation(int in_iPlayer);
OnIslandsMap
IsDeathmatchGame
HaveLowResources
float GetPercentOfMapExploredByPlayer(int in_iPlayerID)
bool IsPlayerHumanControlled(int in_iPlayerID)
void SetRollCreditsAfterScenario(bool in_bRollCredits)
WasHotKeyPressedRecently