SCRMaps
/
Sign in

Every epScript built-in

All 195 functions the official reference documents, for checking a name and the order of its arguments.

Explained in: The basics

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.

Actions
AddCurrentPlayer(playerid : TrgPlayer) : ActionAllows desynchronized execution.
CenterView(location : TrgLocation) : ActionAllows desync execution and sets the current player 's camera to the location Example
CenterViewAll(location) : ActionCenter the camera on location for all players (including observers).
CreateUnit(number, unitType : TrgUnit, location : TrgLocation, player : TrgPlayer) : ActionCreate number of unitType for player at location .
CreateUnitWithProperties(number, unitType : TrgUnit, Where : location : TrgLocation, player : TrgPlayer, properties : TrgProperty) : ActionCreate number of unitType with properties for player at location .
DisplayText(text : TrgString) : ActionAllows 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) : ActionDisplay 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) : ActionGive up to number unitType units of owner player in area to recipient player.
KillUnit(unitType : TrgUnit, player : TrgPlayer) : ActionKill 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) : ActionKill up to number unitType units of player in specified area .
LeaderBoardComputerPlayers(state : TrgPropState) : ActionSet the enabled state of the LeaderBoard for computer players.
LeaderBoardControl(unitType : TrgUnit, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' unitType control counts described as label .
LeaderBoardControlAt(unitType : TrgUnit, area : TrgLocation, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' unitType control counts in area described as label .
LeaderBoardGoalControl(goal, unitType : TrgUnit, label : TrgString) : ActionDisplay 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) : ActionDisplay 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) : ActionDisplay a LeaderBoard in descending order of all players' kills of unitType closest to goal described as label .
LeaderBoardGoalResources(goal, resourceType : TrgResource, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' collections of resourceType closest to goal described as label .
LeaderBoardGoalScore(goal, scoreType : TrgScore, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' scoreType scores closest to goal described as label .
LeaderBoardGreed(goal) : ActionDisplay a LeaderBoard in descending order of all players' collections of crystal and gas mines closest to goal .
LeaderBoardKills(unitType : TrgUnit, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' kills of unitType described as label .
LeaderBoardResources(resourceType : TrgResource, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' collections of resourceType described as label .
LeaderBoardScore(scoreType : TrgScore, label : TrgString) : ActionDisplay a LeaderBoard in descending order of all players' scoreType scores described as label .
MinimapPing(location : TrgLocation) : ActionAllow desync execution.
MinimapPingAll(location) : ActionIssue a ping at location on the minimap for all players (including observers).
ModifyUnitEnergy(number : TrgCount, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation, percentage) : ActionChange 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) : ActionAdd 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) : ActionChange 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) : ActionChange 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) : ActionChange the shields of up to number unitType units of player in area to percentage percent.
MoveLocation(location : TrgLocation, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : ActionMove 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) : ActionInstantly move up to number unitType units of player in startArea to targetLocation .
Order(unitType : TrgUnit, player : TrgPlayer, startArea : TrgLocation, order : TrgOrder, targetLocation : TrgLocation) : ActionIssue an order for player 's unitType units in startArea towards the center of targetLocation .
PlayWAV(WAVName : TrgString) : ActionAllow desynchronized execution.
PlayWAVAll(WAVName) : ActionPlay the sound WAVName for all players (including observers).
RemoveUnit(unitType : TrgUnit, player : TrgPlayer) : ActionRemove all unitType units of player from the map, including units still in the production queue.
RemoveUnitAt(number : TrgCount, unitType : TrgUnit, area : TrgLocation, player : TrgPlayer) : ActionRemove up to number unitType units of player in area from the map, number = 0 represents all (All) units.
RunAIScript(Script : TrgAIScript) : ActionRun AI script Script for the current player.
RunAIScriptAt(Script : TrgAIScript, area : TrgLocation) : ActionRun AI script Script for the current player in area .
SetAllianceStatus(targetPlayer : TrgPlayer, status : TrgAllyStatus) : ActionSet the alliance status of the current player towards targetPlayer to status .
SetCountdownTimer(SetTo/Add/Subtract : TrgModifier, number) : ActionSet countdown timer to SetTo/Add/Subtract number game seconds.
SetCurrentPlayer(playerID : TrgPlayer) : ActionAllows desynchronized execution.
SetDeaths(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, unitType : TrgUnit) : ActionSet 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) : ActionThis function is not usually used to set player unit death counts.
SetDoodadState(state : TrgPropState, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : ActionSet the Doodad state of player 's unitType units in area to state .
SetInvincibility(state : TrgPropState, unitType : TrgUnit, player : TrgPlayer, area : TrgLocation) : ActionSet 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) : ActionSet the 32-bit positive integer value stored at memoryAddress to SetTo/Add/Subtract value .
SetMemoryEPD(epd : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value) : ActionSet 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) : ActionSetMemory that supports mask access, can modify any one or more bits of 32 bits.
SetMemoryXEPD(epd : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, mask) : ActionSetMemoryEPD that supports mask access, can modify any one or more bits of 32 bits.
SetMissionObjectives(text : TrgString) : ActionAllows desynchronized execution.
SetMissionObjectivesAll(text : TrgString) : ActionSet the mission objectives text to text for all players (including observers).
SetNextPtr(trg, dest) : ActionSet 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) : ActionSet player 's resourceType resources to SetTo/Add/Subtract value .
SetScore(player : TrgPlayer, SetTo/Add/Subtract : TrgModifier, value, scoreType : TrgScore) : ActionSet player 's scoreType score to SetTo/Add/Subtract value .
SetSwitch(switchName : TrgSwitch, switchAction : TrgSwitchAction) : ActionSet the state of switch switchName to switchAction .
TalkingPortrait(unitType : TrgUnit, milliseconds) : ActionAllows desynchronized execution.
TalkingPortraitAll(unitType, milliseconds) : ActionDisplay 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.
Conditions
Accumulate(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, resourceType : TrgResource) : ConditionCompare whether the resourceType collected by player is AtLeast/AtMost/Exactly value Example
Bring(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit, location : TrgLocation) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare whether the unitType under the control of the current player at location is less than any other player (including neutral players).
CommandMost(unitType : TrgUnit) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare 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) : ConditionThis 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) : ConditionCompare 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) : ConditionCompare whether the current player's current score type is the highest score Example
Kills(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value, unitType : TrgUnit) : ConditionCompare 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) : ConditionCompare whether the current player 's kill count of unitType is the least on the map -
LeastResources(resourceType : TrgResource) : ConditionCompare whether the current player 's resourceType is the least on the map -
LowestScore(score type : TrgScore) : ConditionCompare whether the current player's current score type is the lowest score -
Memory(memoryAddress, AtLeast/AtMost/Exactly : TrgComparison, value) : ConditionCompare whether the 32-bit unsigned integer stored at memoryAddress is AtLeast/AtMost/Exactly value .
MemoryEPD(epd, AtLeast/AtMost/Exactly : TrgComparison, value) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare 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) : ConditionCompare whether the current player 's kill count of unitType is the most on the map Example
MostResources(resourceType : TrgResource) : ConditionCompare whether the current player 's resourceType is the most on the map Example
Opponents(player : TrgPlayer, AtLeast/AtMost/Exactly : TrgComparison, value) : ConditionCompare 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) : ConditionCompare whether the score type score of player is AtLeast/AtMost/Exactly value points -
Switch(switch : TrgSwitch, state : TrgSwitchState) : ConditionCompare whether the state of switch is state Example
Memory
bread_cp(cpoffset, subp) : EUDVariable- wwrite_cp (cpoffset, subp, w) - bwrite_cp (cpoffset, subp, b) -
bread_epd(epd, subp) : EUDVariableReads the word/byte value at local memory address 0x58A364 + epd 4 + subp , subp < 4 .
bread(ptr) : EUDVariableReads 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) : EUDVariableReads a cunit pointer from local memory address 0x58A364 + epd 4 .
dbstr_adddw(dst, number) : EUDVariableConverts a numeric value to text output at local memory address dst , returns address dst + strlen(itoa( number )).
dbstr_addptr(dst, ptr) : EUDVariableConverts a numeric value to hexadecimal digit text output at local memory address dst , returns address dst + strlen(itox( number )).
dbstr_addstr_epd(dst, srcepd) : EUDVariableCopies the string at local memory address 0x58A364 + srcepd 4 to memory address dst , returns address dst + strlen_epd( srcepd ).
dbstr_addstr(dst, src) : EUDVariableCopies 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) : EUDVariableReads the dword value at local memory address 0x58A364 + epd 4 .
dwread(ptr) : EUDVariable-
epd2s(epd) : DbReads the string at local memory address 0x58A364 + srcepd 4 , equivalent to using {:t} placeholder in formatted text.
epdread_cp(cpoffset) : EUDVariable-
epdread_epd(epd) : EUDVariableReads a pointer from local memory address 0x58A364 + epd 4 and returns its EPD value.
GetMapStringAddr(strID : TrgString) : EUDVariableGets the memory address of a local map string or string ID strID .
GetTBLAddr(TBLKey : StatText) : EUDVariableGets the memory address of a TBL table Key/ID TBLKey .
hptr(value) : DbConverts 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) : EUDVariableUses mask as a mask to read the dword value at local memory address 0x58A364 + epd 4 .
memcmp(buf1, buf2, count) : EUDVariableCompares 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) : DbReads the string at local memory address ptr , equivalent to using {:s} placeholder in formatted text.
readgen_cp(mask, args) : duckCan be used to create custom local memory read functions.
readgen_epd(mask, args) : duck-
strcmp(s1, s2) : EUDVariableCompares the strings (terminated by \x00) between local s1 and s2 memory blocks.
strlen_epd(epd) : EUDVariableGets the number of ASCII characters in the string (terminated by \x00) pointed to by the local epd offset pointer.
strlen(ptr) : EUDVariableGets the number of ASCII characters in the string (terminated by \x00) pointed to by the local pointer ptr .
strnstr(ptr, substr, count) : EUDVariableSearches 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-
Maths and bitwise
atan2_256(x, y) : EUDVariableThe 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) : EUDVariableArctangent 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) : tupleEUDVariable, 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) : tupleEUDVariable, 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).
Iterators
EUDLoopNewCUnit(allowance = 2) : EUDIteratorIterates 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) : EUDIteratorIterates 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) : EUDIteratorIterates over active players of type ptype , force force and race race .
EUDLoopPlayerCUnit(player: TrgPlayer) : EUDIteratorIterates over all units of player player and wraps the traversed pointers into CUnit objects.
EUDLoopPlayerUnit(player: TrgPlayer) : EUDIteratorIterates over all units of player player ptr and epd.
EUDLoopRange(start, end=None) : EUDIteratorIterates over values from start to end - 1.
Compile time
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) : duckRegisters 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) : duckSimple 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(...) : CUWPCompile-time inserts a Create Unit with Properties into the map and returns it.
unProxy(x) : duckCompile-time gets the pointer value of the reference type x.
Everything else
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) : EUDVariableUses 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) : DbReturns player player 's color code in the game.
playerexist(player) : EUDVariableChecks if player player still exists in the game.
PName(player: TrgPlayer) : DbReturns player player 's name in the game.
RawTrigger(conditions = list(...), actions = list(...), preserved = true/false) : RawTriggerInserts a static classical trigger and cannot pass variables.
VProc(vars, actions) : RawTrigger| RawTrigger The action list actions can only pass constant action expression lists.
The EPScript lesson