epScript's built-ins are defined by the official reference, SCRMapDocs. Below is every function it documents with a signature, grouped by what it does. The point of the page is to check an argument order with your eyes: get one wrong and it still compiles, and the map does something else.
The Korean descriptions are written for the functions a map actually uses; every other row keeps the official English as it stands. Mixing in a machine translation would leave a reader unable to trust any single row.
| AddCurrentPlayer(playerid : TrgPlayer) : Action | Allows desynchronized execution. |
|---|---|
| CenterView(location : TrgLocation) : Action | Allows desync execution and sets the current player 's camera to the location Example |
| CenterViewAll(location) : Action | Center the camera on location for all players (including observers). |
| CreateUnit(number, unitType : TrgUnit, location : TrgLocation, player : TrgPlayer) : Action | Create number of unitType for player at location . |
| CreateUnitWithProperties(number, unitType : TrgUnit, Where : location : TrgLocation, player : TrgPlayer, properties : TrgProperty) : Action | Create number of unitType with properties for player at location . |
| DisplayText(text : TrgString) : Action | Allows desync execution and displays text on the next line of the text area on the current player's screen The argument text of this action is actually the number of this text entry in the map string table. |
| DisplayTextAll(text : TrgString) : Action | Display text on the next line of the text area for all players (including observers). |
| GiveUnits(number : TrgCount, unitType : TrgUnit, owner : TrgPlayer, area : TrgLocation, recipient : TrgPlayer) : Action | Give up to number unitType units of owner player in area to recipient player. |
| KillUnit(unitType : TrgUnit, player : TrgPlayer) : Action | Kill all unitType units of player , including units still in the build queue and nuclear missiles not yet launched in nuclear silos. |
| KillUnitAt(number : TrgCount, unitType : TrgUnit, specified area : TrgLocation, player : TrgPlayer) : Action | Kill up to number unitType units of player in specified area . |
| LeaderBoardComputerPlayers(state : TrgPropState) : Action | Set the enabled state of the LeaderBoard for computer players. |
| LeaderBoardControl(unitType : TrgUnit, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' unitType control counts described as label . |
| LeaderBoardControlAt(unitType : TrgUnit, area : TrgLocation, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' unitType control counts in area described as label . |
| LeaderBoardGoalControl(goal, unitType : TrgUnit, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' unitType control counts closest to goal described as label . |
| LeaderBoardGoalControlAt(goal, unitType : TrgUnit, area : TrgLocation, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' unitType control counts in area closest to goal described as label . |
| LeaderBoardGoalKills(goal, unitType : TrgUnit, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' kills of unitType closest to goal described as label . |
| LeaderBoardGoalResources(goal, resourceType : TrgResource, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' collections of resourceType closest to goal described as label . |
| LeaderBoardGoalScore(goal, scoreType : TrgScore, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' scoreType scores closest to goal described as label . |
| LeaderBoardGreed(goal) : Action | Display a LeaderBoard in descending order of all players' collections of crystal and gas mines closest to goal . |
| LeaderBoardKills(unitType : TrgUnit, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' kills of unitType described as label . |
| LeaderBoardResources(resourceType : TrgResource, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' collections of resourceType described as label . |
| LeaderBoardScore(scoreType : TrgScore, label : TrgString) : Action | Display a LeaderBoard in descending order of all players' scoreType scores described as label . |
| MinimapPing(location : TrgLocation) : Action | Allow desync execution. |
| MinimapPingAll(location) : Action | Issue a ping at location on the minimap for all players (including observers). |
| ModifyUnitEnergy(number : TrgCount, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation, percentage) : Action | Change the energy of up to number unitType units of player in area to percentage percent. |
| ModifyUnitHangarCount(added, number : TrgCount, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : Action | Add up to added loaded units to up to number unitType units of player in area . |
| ModifyUnitHitPoints(number : TrgCount, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation, percentage) : Action | Change the hit points of up to number unitType units of player in area to percentage percent. |
| ModifyUnitResourceAmount(number : TrgCount, player : TrgPlayer, area : TrgLocation, new value) : Action | Change the resource value of up to number units of player in area to new value . |
| ModifyUnitShields(number : TrgCount, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation, percentage) : Action | Change the shields of up to number unitType units of player in area to percentage percent. |
| MoveLocation(location : TrgLocation, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : Action | Move the center of location onto one of the unitType units of player in area . |
| MoveUnit(number : TrgCount, unitType : TrgUnit, player : TrgPlayer, startArea : TrgLocation, targetLocation : TrgLocation) : Action | Instantly move up to number unitType units of player in startArea to targetLocation . |
| Order(unitType : TrgUnit, player : TrgPlayer, startArea : TrgLocation, order : TrgOrder, targetLocation : TrgLocation) : Action | Issue an order for player 's unitType units in startArea towards the center of targetLocation . |
| PlayWAV(WAVName : TrgString) : Action | Allow desynchronized execution. |
| PlayWAVAll(WAVName) : Action | Play the sound WAVName for all players (including observers). |
| RemoveUnit(unitType : TrgUnit, player : TrgPlayer) : Action | Remove all unitType units of player from the map, including units still in the production queue. |
| RemoveUnitAt(number : TrgCount, unitType : TrgUnit, area : TrgLocation, player : TrgPlayer) : Action | Remove up to number unitType units of player in area from the map, number = 0 represents all (All) units. |
| RunAIScript(Script : TrgAIScript) : Action | Run AI script Script for the current player. |
| RunAIScriptAt(Script : TrgAIScript, area : TrgLocation) : Action | Run AI script Script for the current player in area . |
| SetAllianceStatus(targetPlayer : TrgPlayer, status : TrgAllyStatus) : Action | Set the alliance status of the current player towards targetPlayer to status . |
| SetCountdownTimer(SetTo/Add/Subtract : TrgModifier, number) : Action | Set countdown timer to SetTo/Add/Subtract number game seconds. |
| SetCurrentPlayer(playerID : TrgPlayer) : Action | Allows desynchronized execution. |
| SetDeaths(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, unitType : TrgUnit) : Action | Set the number of deaths of player 's unitType units to SetTo/Add/Subtract value . |
| SetDeathsX(player : TrgPlayer, SetTo/Add/Subtract: TrgModifier, value, unitType: TrgUnit, mask) : Action | This function is not usually used to set player unit death counts. |
| SetDoodadState(state : TrgPropState, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : Action | Set the Doodad state of player 's unitType units in area to state . |
| SetInvincibility(state : TrgPropState, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : Action | Set the invincibility state of player 's unitType units in area to state . |
| SetKills(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, unitType : TrgUnit) : Action | | Action Set player 's kills against unitType to SetTo/Add/Subtract value . |
| SetMemory(memoryAddress, SetTo/Add/Subtract : TrgModifier, value) : Action | Set the 32-bit positive integer value stored at memoryAddress to SetTo/Add/Subtract value . |
| SetMemoryEPD(epd : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value) : Action | Set the 32-bit positive integer value stored at memory address 0x58A364 + ( epd 4) to SetTo/Add/Subtract value . |
| SetMemoryX(memoryAddress, SetTo/Add/Subtract : TrgModifier, value, mask) : Action | SetMemory that supports mask access, can modify any one or more bits of 32 bits. |
| SetMemoryXEPD(epd : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, mask) : Action | SetMemoryEPD that supports mask access, can modify any one or more bits of 32 bits. |
| SetMissionObjectives(text : TrgString) : Action | Allows desynchronized execution. |
| SetMissionObjectivesAll(text : TrgString) : Action | Set the mission objectives text to text for all players (including observers). |
| SetNextPtr(trg, dest) : Action | Set the next trigger pointer of trigger trg to dest . |
| SetNextScenario(text : TrgString) : Action | ~~ Set the name of the next map to load after the current game ends to text . |
| SetResources(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, resourceType : TrgResource) : Action | Set player 's resourceType resources to SetTo/Add/Subtract value . |
| SetScore(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, scoreType : TrgScore) : Action | Set player 's scoreType score to SetTo/Add/Subtract value . |
| SetSwitch(switchName : TrgSwitch, switchAction : TrgSwitchAction) : Action | Set the state of switch switchName to switchAction . |
| TalkingPortrait(unitType : TrgUnit, milliseconds) : Action | Allows desynchronized execution. |
| TalkingPortraitAll(unitType, milliseconds) : Action | Display the portrait of unitType at all players' (including observers) unit portraits for milliseconds game milliseconds. |
| Transmission(unitType : TrgUnit, area : TrgLocation, WAVName : TrgString, SetTo/Add/Subtract : TrgModifier, time, text : TrgString) : Action | ~~ Allows desynchronized execution. |
| Accumulate(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, resourceType : TrgResource) : Condition | Compare whether the resourceType collected by player is AtLeast/AtMost/Exactly value Example |
|---|---|
| Bring(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit, location : TrgLocation) : Condition | Compare whether the number of unitType of player in location is AtLeast/AtMost/Exactly value When the second parameter of Bring is AtMost, it will detect unfinished buildings, incubating creep tumors; it will not detect loaded units or unit |
| Command(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit) : Condition | Compare whether the number of unitType under the control of player on the map is AtLeast/AtMost/Exactly value When the second parameter of Command is AtMost, it will detect loaded units, units still in training, unfinished buildings, incuba |
| CommandLeast(unitType : TrgUnit) : Condition | Compare whether the unitType under the control of the current player on the map is less than any other player (including neutral players). |
| CommandLeastAt(unitType : TrgUnit, location : TrgLocation) : Condition | Compare whether the unitType under the control of the current player at location is less than any other player (including neutral players). |
| CommandMost(unitType : TrgUnit) : Condition | Compare whether the unitType under the control of the current player on the map is more than any other player (including neutral players). |
| CommandMostAt(unitType : TrgUnit, location : TrgLocation) : Condition | Compare whether the unitType under the control of the current player at location is more than any other player (including neutral players). |
| CountdownTimer(AtLeast/AtMost/Exactly : TrgComparison, seconds) : Condition | Compare whether the remaining seconds of the countdown timer are AtLeast/AtMost/Exactly seconds game seconds This condition should not use Exactly to compare because trigger polling does not occur every game second. |
| Deaths(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit) : Condition | Compare whether the death count of unitType of player is AtLeast/AtMost/Exactly value When player or unitType is out of range It is an EUD condition that compares whether the 32-bit unsigned integer stored at 0x58A364 + ( player 4 + unitTyp |
| DeathsX(player: TrgPlayer, AtLeast/AtMost/Exactly: TrgComparison, value, unitType: TrgUnit, mask) : Condition | This condition is usually not used to compare player unit deaths It is usually used to compare whether the 32-bit (unsigned integer value & mask ) stored at 0x58A364 + ( player 4 + unitType 48) is AtLeast/AtMost/Exactly value . |
| ElapsedTime(AtLeast/AtMost/Exactly : TrgComparison, game seconds) : Condition | Compare whether the elapsed game time is AtLeast/AtMost/Exactly value game seconds This condition should not use Exactly to compare because trigger polling does not occur every game second. |
| HighestScore(score type : TrgScore) : Condition | Compare whether the current player's current score type is the highest score Example |
| Kills(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit) : Condition | Compare whether the kills of unitType of player is AtLeast/AtMost/Exactly value Kills is not kill score, note the difference Killing own units is not counted in the Kills Example |
| LeastKills(unitType : TrgUnit) : Condition | Compare whether the current player 's kill count of unitType is the least on the map - |
| LeastResources(resourceType : TrgResource) : Condition | Compare whether the current player 's resourceType is the least on the map - |
| LowestScore(score type : TrgScore) : Condition | Compare whether the current player's current score type is the lowest score - |
| Memory(memoryAddress, AtLeast/AtMost/Exactly : TrgComparison, value) : Condition | Compare whether the 32-bit unsigned integer stored at memoryAddress is AtLeast/AtMost/Exactly value . |
| MemoryEPD(epd, AtLeast/AtMost/Exactly : TrgComparison, value) : Condition | Compare whether the 32-bit unsigned integer stored at 0x58A364 + ( epd 4) is AtLeast/AtMost/Exactly value Its synchronization depends on the synchronization of the data stored at 0x58A364 + ( epd 4) . |
| MemoryX(memoryAddress, AtLeast/AtMost/Exactly : TrgComparison, value, mask) : Condition | Compare whether the 32-bit (unsigned integer value & mask ) stored at memoryAddress is AtLeast/AtMost/Exactly value Its synchronization depends on the synchronization of the data stored at memoryAddress . |
| MemoryXEPD(epd, AtLeast/AtMost/Exactly : TrgComparison, value, mask) : Condition | Compare whether the 32-bit (unsigned integer value & mask ) stored at 0x58A364 + ( epd 4) is AtLeast/AtMost/Exactly value Its synchronization depends on the synchronization of the data stored at 0x58A364 + ( epd 4) . |
| MostKills(unitType : TrgUnit) : Condition | Compare whether the current player 's kill count of unitType is the most on the map Example |
| MostResources(resourceType : TrgResource) : Condition | Compare whether the current player 's resourceType is the most on the map Example |
| Opponents(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value) : Condition | Compare whether the number of opponents of player in the current game is AtLeast/AtMost/Exactly value Example |
| Score(player : TrgPlayer, score type : TrgScore, AtLeast/AtMost/Exactly : TrgComparison, value) : Condition | Compare whether the score type score of player is AtLeast/AtMost/Exactly value points - |
| Switch(switch : TrgSwitch, state : TrgSwitchState) : Condition | Compare whether the state of switch is state Example |
| bread_cp(cpoffset, subp) : EUDVariable | - wwrite_cp (cpoffset, subp, w) - bwrite_cp (cpoffset, subp, b) - |
|---|---|
| bread_epd(epd, subp) : EUDVariable | Reads the word/byte value at local memory address 0x58A364 + epd 4 + subp , subp < 4 . |
| bread(ptr) : EUDVariable | Reads the dword/word/byte value at the specified local memory address ptr . |
| cunitepdread_cp(cpoffset) : py | _tuple EUDVariable, EUDVariable - |
| cunitepdread_epd(epd) : py | _tuple EUDVariable, EUDVariable Reads a cunit pointer from local memory address 0x58A364 + epd 4 . |
| cunitread_cp(cpoffset) : EUDVariable | - |
| cunitread_epd(epd) : EUDVariable | Reads a cunit pointer from local memory address 0x58A364 + epd 4 . |
| dbstr_adddw(dst, number) : EUDVariable | Converts a numeric value to text output at local memory address dst , returns address dst + strlen(itoa( number )). |
| dbstr_addptr(dst, ptr) : EUDVariable | Converts a numeric value to hexadecimal digit text output at local memory address dst , returns address dst + strlen(itox( number )). |
| dbstr_addstr_epd(dst, srcepd) : EUDVariable | Copies the string at local memory address 0x58A364 + srcepd 4 to memory address dst , returns address dst + strlen_epd( srcepd ). |
| dbstr_addstr(dst, src) : EUDVariable | Copies the local string src to memory address dst , returns address dst + strlen( src ). |
| dwbreak(number) : py | _tuple EUDVariable, EUDVariable, EUDVariable, EUDVariable, EUDVariable, EUDVariable Splits a dword value number into word and byte forms. |
| dwepdread_cp(cpoffset) : py | _tuple EUDVariable, EUDVariable - |
| dwepdread_epd(epd) : py | _tuple EUDVariable, EUDVariable Reads a pointer from local memory address 0x58A364 + epd 4 and returns the pointer and its EPD value. |
| dwread_cp(cpoffset) : EUDVariable | - dwwrite_cp (cpoffset, value) - dwadd_cp (cpoffset, value) - dwsubtract_cp (cpoffset, value) - |
| dwread_epd(epd) : EUDVariable | Reads the dword value at local memory address 0x58A364 + epd 4 . |
| dwread(ptr) : EUDVariable | - |
| epd2s(epd) : Db | Reads the string at local memory address 0x58A364 + srcepd 4 , equivalent to using {:t} placeholder in formatted text. |
| epdread_cp(cpoffset) : EUDVariable | - |
| epdread_epd(epd) : EUDVariable | Reads a pointer from local memory address 0x58A364 + epd 4 and returns its EPD value. |
| GetMapStringAddr(strID : TrgString) : EUDVariable | Gets the memory address of a local map string or string ID strID . |
| GetTBLAddr(TBLKey : StatText) : EUDVariable | Gets the memory address of a TBL table Key/ID TBLKey . |
| hptr(value) : Db | Converts value to hexadecimal output, equivalent to using {:x} placeholder in formatted text. |
| maskread_cp(cpoffset, mask) : EUDVariable | - maskwrite_cp (cpoffset, mask, value) - |
| maskread_epd(epd, mask) : EUDVariable | Uses mask as a mask to read the dword value at local memory address 0x58A364 + epd 4 . |
| memcmp(buf1, buf2, count) : EUDVariable | Compares count bytes of content between local buf1 and buf2 memory blocks. |
| posread_cp(cpoffset) : py | _tuple EUDVariable, EUDVariable The usage of all functions in the _cp series can refer to the _epd series. |
| posread_epd(epd) : py | _tuple EUDVariable, EUDVariable Reads a pos (location) from local memory address 0x58A364 + epd 4 . |
| ptr2s(ptr) : Db | Reads the string at local memory address ptr , equivalent to using {:s} placeholder in formatted text. |
| readgen_cp(mask, args) : duck | Can be used to create custom local memory read functions. |
| readgen_epd(mask, args) : duck | - |
| strcmp(s1, s2) : EUDVariable | Compares the strings (terminated by \x00) between local s1 and s2 memory blocks. |
| strlen_epd(epd) : EUDVariable | Gets the number of ASCII characters in the string (terminated by \x00) pointed to by the local epd offset pointer. |
| strlen(ptr) : EUDVariable | Gets the number of ASCII characters in the string (terminated by \x00) pointed to by the local pointer ptr . |
| strnstr(ptr, substr, count) : EUDVariable | Searches for another string substr within the first count ASCII characters of the string pointed to by the local pointer ptr . |
| wread_cp(cpoffset, subp) : EUDVariable | - |
| wread_epd(epd, subp) : EUDVariable | - |
| wread(ptr) : EUDVariable | - |
| atan2_256(x, y) : EUDVariable | The difference from atan2 is that in processing angles, it divides a circumference into 256 equal parts, and the angle is in 256 degrees, not 360 degrees. |
|---|---|
| atan2(y, x) : EUDVariable | Arctangent function of two arguments, returns the polar angle of the point (x, y), i.e. |
| bitand(a, b) : py | _int | EUDVariable Bitwise AND operation a & b Example |
| bitlshift(a, b) : py | _int | EUDVariable Bitwise Left shift operation a << b Example |
| bitnand(a, b) : py | _int | EUDVariable Bitwise NAND operation ~( a & b ) Example |
| bitnor(a, b) : py | _int | EUDVariable Bitwise NOR operation ~( a | b ) Example |
| bitnot(a) : py | _int | EUDVariable Bitwise NOT operation ~ a Example |
| bitnxor(a, b) : py | _int | EUDVariable Bitwise XNOR operation ~( a ^ b ) Example |
| bitor(a, b) : py | _int | EUDVariable Bitwise OR operation a | b Example |
| bitrshift(a, b) : py | _int | EUDVariable Bitwise Right shift operation a b Example |
| bitxor(a, b) : py | _int | EUDVariable Bitwise XOR operation a ^ b Example |
| div_euclid(a, b) : py | _tuple EUDVariable, EUDVariable Added in euddraft 0.9.9.8. |
| div_floor(a, b) : py | _tuple EUDVariable, EUDVariable Added in euddraft 0.9.9.8. |
| div_towards_zero(a, b) : py | _tuple EUDVariable, EUDVariable Added in euddraft 0.9.9.8. |
| div(a, b) : py | _tuple EUDVariable, EUDVariable Unsigned integer division a divided by b , supports only positive integers, returns quotient and remainder. |
| lengthdir_256(length, angle) : tuple | EUDVariable, EUDVariable The difference from lengthdir is that in processing angles, it divides a circumference into 256 equal parts, and the angle is in 256 degrees, not 360 degrees. |
| lengthdir(length, angle) : tuple | EUDVariable, EUDVariable Calculates the coordinates of another point by traveling length distance from (0, 0) in the direction of angle degrees. |
| pow(x, y) : py | _int | EUDVariable Calculates x to the power of y . |
| sqrt(x) : py | _int | EUDVariable Calculates the integer square root of x (truncated). |
| EUDLoopNewCUnit(allowance = 2) : EUDIterator | Iterates over up to allowance new units that have appeared since the last time current frame called EUDLoopNewUnit or EUDLoopNewCUnit and wraps the traversed pointers into CUnit objects. |
|---|---|
| EUDLoopNewUnit(allowance = 2) : EUDIterator | Iterates over up to allowance ptr and epd of new units that have appeared since the last time current frame called EUDLoopNewUnit or EUDLoopNewCUnit. |
| EUDLoopPlayer(ptype, force, race) : EUDIterator | Iterates over active players of type ptype , force force and race race . |
| EUDLoopPlayerCUnit(player: TrgPlayer) : EUDIterator | Iterates over all units of player player and wraps the traversed pointers into CUnit objects. |
| EUDLoopPlayerUnit(player: TrgPlayer) : EUDIterator | Iterates over all units of player player ptr and epd. |
| EUDLoopRange(start, end=None) : EUDIterator | Iterates over values from start to end - 1. |
| b2i1(content, index) : py | _int - |
|---|---|
| b2i2(content, index) : py | _int - |
| b2i4(content, index) : py | _int Converts the byte, word, or dword at position index in the literal byte string content to a positive integer constant using little endian. |
| b2u(b) : py | _str Converts between byte literal and string literal. |
| b2utf8(str) : py | _byte Decodes str using UTF-8. |
| EncodeLocation(areaName : py_str) : py | _int Gets the areaName defined in the map editor (usually SCMD) converted to the corresponding area ID. |
| EncodeString(text : py_str) : py | _int Gets the ID of an text entry in the map string table (Map String Table). |
| EncodeSwitch(switchName : py_str) : py | _int Gets the switchName defined in the map editor (usually SCMD) converted to the corresponding switch ID. |
| EncodeTBL(TBLKey : py_str) : py | _int Gets the index ID corresponding to TBLKey in the map TBL dictionary. |
| EncodeTech(techName : py_str) : py | _int Gets the techName in the map tech.dat converted to the corresponding technology name ID. |
| EncodeUnit(unitType : py_str) : py | _int Gets the unitType in the map unit.dat converted to the corresponding unitTypeID. |
| EncodeWeapon(weaponName : py_str) : py | _int Gets the weaponName in the map weapon.dat converted to the corresponding weapon name ID. |
| EUDCreateVariables(count) : py | _list EUDVariable Creates count variables at compile time and returns a compile-time list containing references to the created variables. |
| EUDRegisterObjectToNamespace(funcname, obj) : duck | Registers an object to the global namespace, mainly used for parameter passing between modules. |
| GetLocationIndex(areaName : py_str) : py | _int - |
| GetPlayerInfo(player: TrgPlayer) : py | _struct Compile-time gets the information of player player in the map information. |
| GetPropertyIndex(property : CUWP) : py | _int Compile-time gets the number of a CUWP property in the map CUWP list. |
| GetStringIndex(text : py_str) : py | _int - |
| GetSwitchIndex(switchName : py_str) : py | _int - |
| GetUnitIndex(unitType : py_str) : py | _int - |
| i2b1(i) : py | _byte - |
| i2b2(i) : py | _byte - |
| i2b4(i) : py | _byte Converts the integer constant i to one, two or four byte constants using little endian. |
| list(*args) : py | _list Creates and returns a flat compile-time Python list. |
| py_enumerate(vlist) : py | _iter Compile-time enumeration iterator to enumerate and expand items in compile-time containers. |
| py_eval(str) : duck | Simple Python code execution at compile time, returning the result. |
| py_len(gconstant) : py | _int Gets the length of global constants at the compile-time Python level. |
| py_list(iter) : py | _list Creates and returns a compile-time Python list. |
| py_open(filename, mode) : py | _file Compile-time opens the file filename in mode mode and returns a Python file object. |
| py_range(start, end, step) : py | _iter Compile-time counting iterator to iterate from start to end in steps of step and expand the code block. |
| py_str(val) : py | _str Compile string wrapping conversion at compile time. |
| SCMD2Text(text) : py | _str Compile-time converts the hexadecimal numeric values \<XX\ in the text text to the corresponding ASCII characters. |
| u2b(s) : py | _byte - |
| u2utf8(str) : py | _str Encodes str using UTF-8. |
| UnitProperty(...) : CUWP | Compile-time inserts a Create Unit with Properties into the map and returns it. |
| unProxy(x) : duck | Compile-time gets the pointer value of the reference type x. |
| EPD(ptr) : py | _int | EUDVariable Converts the specified pointer ptr to an EPD offset. |
|---|---|
| EUDFuncPtr(argn, retn) : py | _int Declares a pointer to a closure function with argn arguments and retn return values. |
| EUDTypedFuncPtr(argtypes, rettypes) : py | _int Declares a pointer to a closure function with an argument type list of argtypes and a return value type list of rettypes . |
| getlocTL(loc : TrgLocation) : py | _tuple EUDVariable, EUDVariable Gets the upper left coordinate of a location. |
| l2v(conditionalExpression) : EUDVariable | Uses a trigger at runtime to get the logical value false or true of conditionalExpression . |
| parse(address, radix=10) : py | _list EUDVariable, EUDVariable Parses a string at memory address into a number using radix notation. |
| PColor(player: TrgPlayer) : Db | Returns player player 's color code in the game. |
| playerexist(player) : EUDVariable | Checks if player player still exists in the game. |
| PName(player: TrgPlayer) : Db | Returns player player 's name in the game. |
| RawTrigger(conditions = list(...), actions = list(...), preserved = true/false) : RawTrigger | Inserts a static classical trigger and cannot pass variables. |
| VProc(vars, actions) : RawTrigger | | RawTrigger The action list actions can only pass constant action expression lists. |
