AddComFree
(
units : Список)
set of units receives free command
AddComGet
(
units : Список,
x : Целое,
y : Целое)
list of units receives simple get cargo command
AddComGive
(
units : Список,
un : Целое)
list of units receives simple give cargo command
AddComHack
(
units : Список,
un : Целое)
list of units receives hack command
AddComHeal
(
units : Список,
un : Целое)
set of units receives heal specified unit command
AddComHiddenCamera
(
units : Список,
x : Целое,
y : Целое)
list of units receives place hidden camera
AddComHold
(
units : Список)
set of units receives hold command
AddComInvisible
(
units : Список)
list of units receives invisible command
AddComLinkTo
(
units : Список,
hum : Целое)
set of vehicles receives link to specified human command
AddComLinkToBase
(
units : Список,
un : Целое)
depot or warehouse receives command to link building un to the base
AddComMoveToArea
(
units : Список,
area : Целое)
set of units receives move command to specified area
AddComMoveUnit
(
units : Список,
un : Целое)
set of units receives move command to specified unit
AddComMoveXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives move command to specified coordinates
AddComPause
(
units : Список)
set of buildings receives pause research or construction command
AddComPlaceDelayedCharge
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
set of units receives command for place explosives to [x,y] or near unit un
AddComPlaceRemoteCharge
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
set of units receives command for place explosives to [x,y] or near unit un
AddComPlaceWeapon
(
units : Список,
weap : Целое)
list of turrets and bunkers receives place specified weapon command
AddComRecycle
(
units : Список,
un : Целое)
list of vehicles receives command to recycle in building un
AddComRefuel
(
units : Список,
un : Целое)
list of units receives refuel command
AddComRemember
(
units : Список)
set of units receives remember command
AddComRepairBuilding
(
units : Список,
un : Целое)
set of units receives repair specified building command
AddComRepairVehicle
(
units : Список,
un : Целое)
set of units receives repair specified vehicle command
AddComResearch
(
units : Список,
techn : Целое)
set of labs receives research technology techn command
AddComReturn
(
units : Список)
set of units receives return command
AddComSabre
(
units : Список)
list of sheiks receives SabreOn command
AddComSailEvent
(
units : Список,
num : Целое)
unit raises generic event SailEvent(num)
AddComSpaceShift
(
units : Список,
x : Целое,
y : Целое)
list of units receives command to use spaceshifting grenade
AddComStand
(
units : Список)
set of units receives stand command
AddComStop
(
units : Список)
set of units receives stop command
AddComTameXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives tame command
AddComTeleportExit
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
list of units receives command for place exit of teleport un to [x,y]
AddComTimeShift
(
units : Список,
x : Целое,
y : Целое)
list of units receives command to use timeshifting grenade
AddComTransport
(
units : Список,
un : Целое,
mattype : Целое)
list of units receives transport command
AddComTurnUnit
(
units : Список,
un : Целое)
set of units receives turn command to specified unit
AddComTurnXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives turn command to specified coordinates
AddComUnlink
(
units : Список)
set of vehicles receives unlink command
AddComUnload
(
units : Список)
list of units receives cargo unload command
AddComUpgrade
(
units : Список)
list of units receives command upgrade
AddComUpgradeLab
(
units : Список,
labtype : Целое)
list of units receives command upgrade to specified laboratory
AddComWait
(
units : Список,
time : Целое)
set of units receives wait command
AddComWalk
(
units : Список)
set of units receives walk command
AddCopyTasks
(
un_dest : Целое,
un_source : Целое)
copy tasks from unit un_source to unit_dest (adding, no patrol)
AddExperience
(
hum : Целое,
sk : Целое,
points : Целое)
adds experience points in skill sk to human hum
AddMcUnits
(
mcid : Целое,
units : Список)
changes list of units of the macro mcid; returns true if succesfull
AddMcUnitsSpec
(
mcid : Целое,
units : Список,
spec : Целое)
changes spec list of units of the macro mcid; returns true if succesfull
AddMedal
(
ident : Строка,
number : Целое)
if number>0 then adds [ident,number] item to gained_medals if number<0 then adds [ident,-number] item to missing_medals
AddMusic
(
ident : Строка)
after current music track stops the new is played
AddResourceType
(
base : Целое,
mattype : Целое,
amount : Целое)
adds resource of specified type to the specified base
AddTaskList
(
un : Целое,
list : Список)
adds tasks from tasklist (GetTaskList format) - use carefully!
AllNearestUnitToUnit
(
units : Список,
un : Целое)
Returns all nearest unit from list units to unit un (ignoring un itself), or zero
AreaToMatrix
(
area : Целое)
creates a matrix from the area
ArtContamination
(
x : Целое,
y : Целое,
percentage : Целое)
makes contaminated area (percentage of siberite rocket contamination)
Attacks
(
un : Целое)
returns number of unit which is curently attacked by unit un (aiming counts as attack), or zero
AvailableChassisList
(
un : Целое)
returns list of available components (chassis) - factory, workshop
AvailableControlList
(
un : Целое)
returns list of available components (controls) - factory, workshop
AvailableEngineList
(
un : Целое)
returns list of available components (engines) - factory, workshop
AvailableWeaponList
(
un : Целое)
returns list of available components (weapons) - factory, workshop, turret
BestFromListByList
(
items : Переменная,
values : Переменная)
Returns SortListByListDesc(items,values)[1], or zero iv values is empty. Faster than SortListByListAsc
BuildingsInProgress
(
side : Целое)
returns true if construction of any buildings of specified side isn't finish
BuildingStatus
(
un : Целое)
returns building status (bs_???)
BuildQuery
(
q : Строка,
al : Список)
Displays query dialog with question q and list of answers al
ChangeBattleFlagSide
(
flagid : Целое,
side : Целое)
changes side of existing battleflag
ChangeMap
(
ident : Строка,
fname : Строка)
changes map, ident identifies text while loading, fname is name of the map in the same directory (without path)
ChangeMissionObjectives
(
ident : Строка)
change mission objectives, s is ident in Texts.txt
ChangeResourceAmountXY
(
x : Целое,
y : Целое,
n : Целое)
changes amount of existing resources on specified hex
ChangeSideFog
(
side : Целое,
fognumber : Целое)
set fog of specified side to specified fognumber
CharacterSelection
(
ident : Строка,
min : Целое,
max : Целое,
units : Список,
classes : Список)
Displays Character selection menu and returns list of characters selected by player - ident is identifier of caption from Texts.txt - min and max are minimum and maximum number of hired character to close dialog - units is list of units, which can contain special commands which affects all following units: sel_hired - following character are hired at start (default) sel_not_hired - following character are not hired at start sel_changeable - player can fire/hire following characters sel_not_changeable - player cannot fire/hire following characters (default) sel_change_class - player can change class of following characters sel_dont_change_class - player cannot change class of following characters (default) sel_ignore_class_nation - following characters can be changed to class indepedning its nation sel_dont_ignore_class_nation - following characters can be changed only to classes of its nation (default) - classes is list of posibly classes to which can be units changed. Every items may be in two formats: class_number - this class can be used without limitations [class_number,min] - you must select at least min characters with this class [class_number,min,max] - you must select min to max characters with this class Example1 (select up to five mechanic and soldiers from gamma2 and gamma3): CharacterSelection('S1',1,6, [JMM, sel_not_hired, sel_changeable] ^ gamma2 ^ gamma3, [class_soldier, class_mechanic]); Example2 (select up to five men from gamma2 to help John and Tim build a base) CharacterSelection('S2',3,7, [sel_changeable, JMM, sel_not_changeable, Tim, sel_not_hired, sel_changeable] ^ gamma2, [class_soldier, class_mechanic, [class_engineer,1], class_scientistic]);
CheckCharacterSet
(
ident : Строка)
Returns number of characters in character set from the save (if there is an empty set in the save, CheckCharacterSet returns 0, but TestCharacter returns true)
ClearMcUnits
(
mcid : Целое)
clears list of units of the macro mcid; returns true if succesfull
ClearMcUnitsSpec
(
mcid : Целое,
spec : Целое)
clears spec list of units of the macro mcid; returns true if succesfull
ComAgressiveMove
(
units : Список,
x : Целое,
y : Целое)
set of units receives agressive move command to specified coordinates
ComAnim
(
units : Список,
atype : Целое)
list of units receives do specified animation command
ComAttackPlace
(
units : Список,
x : Целое,
y : Целое)
set of units receives attack command to specified coordinates
ComAttackSoporific
(
units : Список,
un : Целое)
attack unit un with soporific amunition
ComAttackUnit
(
units : Список,
un : Целое)
set of units receives attack command to specified unit
ComBuild
(
units : Список,
bud : Целое,
x : Целое,
y : Целое,
dir : Целое)
set of units receives build command
ComBuildBehemoth
(
units : Список,
bud : Целое,
x : Целое,
y : Целое,
dir : Целое)
set of units receives build behemoth command
ComCancel
(
units : Список)
set of buildings receives cancel research or construction command
ComCarabine
(
units : Список)
list of sheiks receives CarabineOn command
ComChangeProfession
(
units : Список,
new_prof : Целое)
set of units receives change profession to new_prof command
ComCollect
(
units : Список,
x : Целое,
y : Целое)
set of units receives collect command to specified coordinates
ComConstruct
(
units : Список,
chassis : Целое,
engine : Целое,
control : Целое,
weapon : Целое)
set of factories receives construct vehicle with specified components command
ComContaminate
(
units : Список,
x : Целое,
y : Целое)
list of units receives contaminate siberite deposit
ComCrawl
(
units : Список)
set of units receives crawl command
ComDismantle
(
units : Список,
un : Целое)
list of units receives command to dismantle building un
ComEnterUnit
(
units : Список,
un : Целое)
set of units receives enter specified unit command
ComExitBuilding
(
units : Список)
set of units receives exit building command
ComExitVehicle
(
units : Список)
set of units receives exit vehicle command
ComFireExplosives
(
units : Список)
set of units receives fire remote controlled explosives command
ComForceInvisible
(
units : Список)
list of units receives invisible command
ComFree
(
units : Список)
set of units receives free command
ComGet
(
units : Список,
x : Целое,
y : Целое)
list of units receives simple get cargo command
ComGive
(
units : Список,
un : Целое)
list of units receives simple give cargo command
ComHack
(
units : Список,
un : Целое)
list of units receives hack command
ComHeal
(
units : Список,
un : Целое)
set of units receives heal specified unit command
ComHiddenCamera
(
units : Список,
x : Целое,
y : Целое)
list of units receives place hidden camera
ComHold
(
units : Список)
set of units receives hold command
ComInvisible
(
units : Список)
list of units receives invisible command
ComLinkTo
(
units : Список,
hum : Целое)
set of vehicles receives link to specified human command
ComLinkToBase
(
units : Список,
un : Целое)
depot or warehouse receives command to link building un to the base
ComMoveToArea
(
units : Список,
area : Целое)
set of units receives move command to specified area
ComMoveUnit
(
units : Список,
un : Целое)
set of units receives move command to specified unit
ComMoveXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives move command to specified coordinates
ComPause
(
units : Список)
set of buildings receives pause research or construction command
ComPlaceDelayedCharge
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
set of units receives command for place explosives to [x,y] or near unit un
ComPlaceRemoteCharge
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
set of units receives command for place explosives to [x,y] or near unit un
ComPlaceWeapon
(
units : Список,
weap : Целое)
list of turrets and bunkers receives place specified weapon command
ComRecycle
(
units : Список,
un : Целое)
list of vehicles receives command to recycle in building un
ComRefuel
(
units : Список,
un : Целое)
list of units receives refuel command
ComRemember
(
units : Список)
set of units receives remember command
ComRepairBuilding
(
units : Список,
un : Целое)
set of units receives repair specified building command
ComRepairVehicle
(
units : Список,
un : Целое)
set of units receives repair specified vehicle command
ComResearch
(
units : Список,
techn : Целое)
set of labs receives research technology techn command
ComReturn
(
units : Список)
set of units receives return command
ComSabre
(
units : Список)
list of sheiks receives SabreOn command
ComSailEvent
(
units : Список,
num : Целое)
unit raises generic event SailEvent(num)
ComSpaceShift
(
units : Список,
x : Целое,
y : Целое)
list of units receives command to use spaceshifting grenade
ComStand
(
units : Список)
set of units receives stand command
ComStop
(
units : Список)
set of units receives stop command
ComTameXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives tame command
ComTeleportExit
(
units : Список,
x : Целое,
y : Целое,
un : Целое)
list of units receives command for place exit of teleport un to [x,y]
ComTimeShift
(
units : Список,
x : Целое,
y : Целое)
list of units receives command to use timeshifting grenade
ComTransport
(
units : Список,
un : Целое,
mattype : Целое)
list of units receives transport command
ComTurnUnit
(
units : Список,
un : Целое)
set of units receives turn command to specified unit
ComTurnXY
(
units : Список,
x : Целое,
y : Целое)
set of units receives turn command to specified coordinates
ComUnlink
(
units : Список)
set of vehicles receives unlink command
ComUnload
(
units : Список)
list of units receives cargo unload command
ComUpgrade
(
units : Список)
list of units receives command upgrade
ComUpgradeLab
(
units : Список,
labtype : Целое)
list of units receives command upgrade to specified laboratory
ComWait
(
units : Список,
time : Целое)
set of units receives wait command
ComWalk
(
units : Список)
set of units receives walk command
Constructable
(
chas : Целое,
eng : Целое,
con : Целое,
weap : Целое)
returns true, if vehicle constructable
ContactTime
(
sides : Список)
time from last contact (parameter: side, or [side1,side2])
Contaminate
(
side : Целое,
x : Целое,
y : Целое)
immediatelly contaminates siberite deposit; if succesfull, (raises event and) returns true
CopySkills
(
un1 : Целое,
un2 : Целое)
copies skills between units (un1->un2)
CopyTasks
(
un_dest : Целое,
un_source : Целое)
copy tasks from unit un_source to unit_dest (replacing, no patrol)
CostOfBuilding
(
kind : Целое,
nation : Целое)
returns cost in list [cans,oil,sib]
CostOfVehicle
(
chassis : Целое,
engine : Целое,
control : Целое,
weapon : Целое)
returns cost in list [cans,oil,sib]
CostOfWeapon
(
weapon : Целое)
returns cost in list [cans,oil,sib]
Crawls
(
units : Список)
returns number of crawling units in list (0=false)
CreateAndPlaceBuildingXYD
(
x : Целое,
y : Целое,
direction : Целое)
Creates a building using uc_ and bc_ parameters
CreateBuilding
()
Creates a building using uc_ and bc_ parameters
CreateCharacter
(
ident : Строка)
Shortcut for CreateOneCharacterFromSet(ident,1)
CreateCharacterSet
(
ident : Строка)
Loads a set of characters with specified ident from the save Creates people from it (except dead characters) using some uc_side and returns set of its handles
CreateCratesXY
(
amount : Целое,
x : Целое,
y : Целое,
materialisation : Логический)
CreateCratesXYR
(
amount : Целое,
x : Целое,
y : Целое,
r : Целое,
materialisation : Логический)
CreateDepositXY
(
x : Целое,
y : Целое,
typ : Целое)
creates deposit of mat_siberite or mat_oil type on specified coordinates
CreateHuman
()
Creates human using uc_ and hc_ parameters
CreateOneCharacterFromSet
(
ident : Строка,
index : Целое)
Same as CreateCharacterSet, but only one unit is created (the one with specified index in the set)
CreateOneCharacterFromSetWithClass
(
ident : Строка,
index : Целое,
cl : Целое)
Same as CreatePeopleFromCharacterSet, but character gets specified class
GetAttr
(
units : Список,
attr : Целое)
returns average attribute attr of specified human units
GetBase
(
un : Целое)
returns base of specified building (or zero, if it is not building)
GetBattleFlagSide
(
flagid : Целое)
returns side of existing battleflag
GetBLevel
(
un : Целое)
returns level of building, if un is not a building, returns -1
GetBType
(
un : Целое)
returns type of building, if un is not a building, returns -1
GetBuildingTechReq
(
kind : Целое,
nation : Целое)
returns technology required to building of kind, nation (0 - free; -1 - not available to nation)
GetBuildList
(
base_or_list : Переменная)
creates BuildList from whole base or list of units (buildings)
GetBWeapon
(
un : Целое)
returns type of weapon (in case of turret or bunker, zero otherwise)
GetCargo
(
units : Список,
mattype : Целое)
returns (total) amount of mattype
GetCargoType
(
units : Список)
returns type of cargo (mat_none, mat_cans, mat_oil, mat_siberite, mat_multi)
GetChassis
(
un : Целое)
returns type of vehicle chassis
GetClass
(
un : Целое)
returns class of specified human unit
GetControl
(
un : Целое)
returns type of vehicle control
GetCustomRate
(
basicrate : Целое,
tab : Целое,
skill : Целое)
returns basicrate bonused (or penalized) by skill (-10..50) using skilltable tab (0..6) Usually used skills are 0..10. Table 0 gives no bonus, table 6 gives biggest bonus. e.g. scientist's research rate is GetCustomRate(zaklad,4,GetSkill(human,skill_scentistic))
InGameOff
()
function, which: restore tick, switch ingame_video to false, set ExclusiveOff
InGameOn
()
function, which: store tick, switch ingame_video to true, set ExclusiveOn
InitBc
()
Initializes building create structure to default values
InitHc
()
Initializes human create structure to default values
InitUc
()
Initializes unit create structure to default values
InitVc
()
Initializes vehicle create structure to default values
Insert
(
list : Список,
index : Целое,
item : Переменная)
inserts item to list at specified position (1 - before first, n - before n-th), returns result if index>n+1 (n=length of list), then positions n+2 to index-1 are filled by undef value
InsertMusic
(
ident : Строка)
stops current music and play new, then starts current again
IsAt
(
un : Целое,
x : Целое,
y : Целое)
returns true if unit is at specified coordinates
IsBusy
(
un : Целое)
returns true if unit has a tasks (even its own)
IsConstructed
(
build : Целое)
returns nonzero number, if build is building under construction or if it is upgraded
IsControledBy
(
veh : Целое)
returns number of driver of a remote controlled vehicle, zero otherwise
IsDead
(
un : Целое)
returns true if unit is dead (lives on zero or totally destroyed)
IsDrivenBy
(
veh : Целое)
returns number of driver of a human controlled vehicle, zero otherwise
IsDying
(
un : Целое)
returns true if unit is on map and dying
IsEnvironment
(
x : Целое,
y : Целое)
returns true if there is an environment on x, y
IsIdle
(
un : Целое)
returns true if unit does nothing
IsInArea
(
un : Целое,
area : Целое)
returns true if unit is in specified area (it can be driving or inside)
IsInUnit
(
hum : Целое)
returns number of unit in which a unit is or zero
IsLive
(
un : Целое)
returns true if unit is on map and not dead
IsOK
(
un : Целое)
returns true if unit is on map and not dying
IsPlaced
(
un : Целое)
returns true if unit un is placed
IsSelected
(
units : Список)
returns true if selected
IsTamedBy
(
un : Целое)
returns number of tamer of this animal, zero otherwise
McAttack
(
prior : Целое,
regid : Целое,
units : Список,
options : Список)
runs McAttack macro and returns mcid There must be running McRegistry macro to start McAttack - enemies are registred by this McRegistry. McAttack starts after each registration of this McRegistry.
McBase
(
prior : Целое,
units : Список,
build : Список,
research : Список,
construct : Список,
options : Список)
runs macro and returns mcid build must be BuildList, researchs - list of techs, construct - not implemented
McCustom
(
prior : Целое,
units : Список)
runs void macro and returns mcid
McDefend
(
prior : Целое,
regid : Целое,
units : Список,
options : Список)
runs McDefend macro and returns mcid There must be running McRegistry macro to start McDefend - enemies are registred by this McRegistry. McDefend starts after each registration of this McRegistry. Parameters: [mc_def_advantage, percent] ... how great advantage over enemy is enough (default 200, twice) [mc_area_dont_leave, defarea] ... area where must all defenders be (default none) (-)mc_change_to_soldiers ... set here if McDefend can switch people to soldiers (-)mc_change_to_mechanics... set here if McDefend can switch people to mechanics
McMove
(
prior : Целое,
units : Список,
waypoints : Список,
options : Список)
runs macro and returns mcid informace u Pedra
McPatrol
(
prior : Целое,
regid : Целое,
units : Список,
options : Список)
runs McPatrol macro and returns mcid There must be running McRegistry macro to start McPatrol - enemies are registred by this McRegistry. McPatrol starts after each registration of this McRegistry.
McRegistrationResultChanges
(
mcid : Целое,
count : Целое,
strength : Целое)
Value of strength has no real meaning, use it only for comparation with another result of macro or for comparation with zero. Posible options (note that defarea can be given in two formats, as 'areanumber' or as '[x,y,r]'):
[mc_reg_refresh_time, ticks] ... interval between two registrations (default 0$1)
[mc_reg_area_to_guard, defarea] ... registries enemies in defined area (default none)
[mc_reg_area_to_protect, defarea] ... registries enemies attacking units in specified area (default none)
[mc_reg_units_to_protect, listofunits] ... registries enemies attackign specified units (default none)
[mc_reg_units_to_guard, listofunits] ... registries specified enemies (default none)
[mc_reg_expire_stops_to_attack, ticks] ... how long after enemy stops to attack the registration expires (default 0$3)
[mc_reg_expire_leaves_area, ticks] ... how long after enemy leaves area the registration expires (default 0$2)
(-)mc_reg_ignore_fog ... ignores fog so you can see all enemies in area (default false)
(-)mc_reg_only_important ... doesn't raise event if result changes from nonzero value to another nonzero value (default false)
McRegistry
(
side : Целое,
options : Список)
Runs macro for automatic registration of enemies of side in specified intervals and returns mcid. Every registration gives count and strength of all registered units as its result. If registration returns different result than a previous (or nonzero in first registration), it raises event: McRegistrationResultChanges(mcid,count,strength). Value of strength has no real meaning, use it only for comparation with another result of macro or for comparation with zero. Posible options (note that defarea can be given in two formats, as 'areanumber' or as '[x,y,r]'): [mc_reg_refresh_time, ticks]... interval between two registrations (default 0$1) [mc_reg_area_to_guard, defarea]... registries enemies in defined area (default none) [mc_reg_area_to_protect, defarea] ... registries enemies attacking units in specified area (default none) [mc_reg_units_to_protect, listofunits] ... registries enemies attackign specified units (default none) [mc_reg_units_to_guard, listofunits] ... registries specified enemies (default none) [mc_reg_expire_stops_to_attack, ticks] ... how long after enemy stops to attack the registration expires (default 0$3) [mc_reg_expire_leaves_area, ticks]... how long after enemy leaves area the registration expires (default 0$2) (-)mc_reg_ignore_fog ... ignores fog so you can see all enemies in area (default false) (-)mc_reg_only_important ... doesn't raise event if result changes from nonzero value to another nonzero value (default false)
McRegistryChangeOptions
(
mcid : Целое,
options : Список)
changes options of McRegistry with ident mcid
McRepair
(
prior : Целое,
units : Список,
others : Список,
options : Список)
runs McRepair macro and returns mcid units will be maintain others (and extras from McWithdraw); options - [[mcr_hum_area, area], [mcr_veh_area, area], (-)mcr_area_only, [mcr_safety, 7], [mcr_hum_limit, 600], [mcr_veh_limit, 1000], [mcr_bui_limit, 1000], [mcr_repv_area, area], [mcr_capv_area, area], [mcr_repb_area, area], [mcr_capb_area, area]]
McSAddFortification
(
mcid : Целое,
kinds : Список,
weapons : Список)
create new fortification definition for McSkirmish mcid, returns number of definition
McSAddVehicles
(
mcid : Целое,
weapons : Список,
chassis : Список,
engines : Список,
controls : Список,
parkingarea : Целое)
creates new vehicle definition for McSkirmish mcid, returns number of group
McSChangeFortification
(
mcid : Целое,
number : Целое,
kinds : Список,
weapons : Список)
updates fortification definition for McSkirmish mcid, definition number
McSChangeVehicles
(
mcid : Целое,
number : Целое,
weapons : Список,
chassis : Список,
engines : Список,
controls : Список,
parkingarea : Целое)
updates vehicle definition for McSkirmish mcid, group number
McSConditionalStrategyFilter
(
str : Список)
filters conditional strategy to strategy without conditions (main strategy list)
McSGetVehList
(
mcid : Целое,
number : Целое)
returns list of vehicles in group number
McSParking
(
mcid : Целое,
veh : Список,
park : Логический)
changes list of parking vehicles; veh will be added (park=true) or removed (park=false)
McSSetPosList
(
mcid : Целое,
list : Список)
sets building position list for McSkirmish mcid
McSSetStrategy
(
mcid : Целое,
list : Список)
sets main strategy list for McSkirmish mcid
McWithdraw
(
prior : Целое,
repid : Целое,
units : Список,
options : Список)
runs McWithdraw macro and returns mcid; there should be running McRepair first options - [[mcw_hum_lo, 400], [mcw_hum_hi, 800], [mcw_veh_lo, 400], [mcw_veh_hi, 1000], [mcw_hum_area, defarea], [mcw_veh_area, defarea], [mcw_corpse_area, defarea]] areas will be copied from McRepair of repid before evaluating this options
MineAtPos
(
x : Целое,
y : Целое)
returns true, if it is mine at pos x, y; otherwise false
MineExplosion
(
x : Целое,
y : Целое,
wound : Целое)
explosion of mine at x, y
MineOfUnit
(
un : Целое)
returns [x,y], if unit has placed remote charge; otherwise returns false
MoveAreaXY
(
area : Целое,
x : Целое,
y : Целое)
moves area, left upper corner of deltoid is at specified coordinates
Msg
(
m : Строка)
Shortcut to BuildQuery(m,['OK']);
MultiplayerCRC
()
sends a multiplayer control message (vlada)
MultiplayerSideAlive
(
side : Целое)
returns true, if there is at least one player playing this side
MultiRand
(
min : Целое,
max : Целое,
n : Целое)
random number in selected range, made by n Rand
MusicIsPlaying
(
res : Переменная)
returns true if music is playing
PlaceEnvironment
(
x : Целое,
y : Целое,
envset : Целое,
num : Целое)
creates environment num from set envset on x, y
PlaceEnvironmentList
(
list : Список)
creates environments; [[x,y,envset,num],[x,y,envset]...]; num may not be defined
PlaceHumanInUnit
(
hum : Целое,
un : Целое)
Places unplaced human into a placed or unplaced unit
PlaceMine
(
x : Целое,
y : Целое,
side : Целое,
typ : Целое)
place mine at pos x, y. typ=0 - remote mine (result number of mine), typ>0 (timed mine - time in tick (1..100))
PlaceRandEnvironment
(
x : Целое,
y : Целое,
envset : Целое)
creates random environment from set envset on x, y
PlaceSeeing
(
x : Целое,
y : Целое,
side : Целое,
range : Целое)
places area of seeing (negative range for radar seeing)
PlaceTreesToArea
(
area : Целое,
sets : Список,
count : Целое,
trials : Целое,
dist : Целое)
creates count trees in area, set selects randomly from list of sets for each tree makes some amount of trials and selects the one with less other trees within dist note than tree in distance 1 is twice worse than tree in distance 2 etc.
PlaceUnitAnywhere
(
un : Целое,
materialisation : Логический)
Places unit anywhere on map, returns true if succeedes If materialisation is true, unit is materialised
PlaceUnitArea
(
un : Целое,
area : Целое,
materialisation : Логический)
Places unit into specified area, returns true if succeedes If materialisation is true, unit is materialised
PlaceUnitXY
(
un : Целое,
x : Целое,
y : Целое,
materialisation : Логический)
Places unit at specified coordinates, returns true if succeedes If materialisation is true, unit is materialised
PlaceUnitXYR
(
un : Целое,
x : Целое,
y : Целое,
r : Целое,
materialisation : Логический)
Places unit near specified coordinates (max. dist is r), returns true if succeedes If materialisation is true, unit is materialised
PlaceWeaponTurret
(
un : Целое,
bc_weapon : Целое)
place bc_weapon on turet or bunker un
PlayMusic
(
ident : Строка)
stops current music and play new
PlayMusicNoLoop
(
ident : Строка)
stops current music and play new, no other is played after this new ends
PlaySoundXY
(
x : Целое,
y : Целое,
ident : Строка)
plays sound with ident from coordinates x, y
PrepareAttr
(
sex : Целое)
prepares random attributes for specified sex (or common, if zero)
PrepareCharacter
(
ident : Строка)
Shortcut for PrepareOneCharacterFromSet(ident,1)
PrepareClassSkills
(
cl : Целое,
level : Целое)
prepares skills for human with class cl (this skill is near specified level) negative level means that this human is specialist
PrepareCustomSkills
(
list : Список)
prepares randomly skills for human creating, give list of four levels as a parameter: if one of parameters is negative, then this skill counts as basic
PrepareEngineer
(
sex : Целое,
lev : Целое)
prepares parameters for a engineer with specified sex and level (0=random for sex)
PrepareEngineerSkills
(
level : Целое)
prepares skills for engineer, main skill is near specified level (uses PrepareClass)
PrepareHuman
(
sex : Целое,
cl : Целое,
lev : Целое)
prepares parameters for a human with specified sex, class and level (0=random for sex or class) negative level means that this human is specialist
PrepareMechanic
(
sex : Целое,
lev : Целое)
prepares parameters for a mechanic with specified sex and level (0=random for sex)
PrepareMechanicSkills
(
level : Целое)
prepares skills for mechanic, main skill is near specified level (uses PrepareClass)
PrepareNewCharacter
(
ident : Строка)
Prepares hc_ and uc_ structures for a new global character (which was never saved before)
PrepareOneCharacterFromSet
(
ident : Строка,
index : Целое)
Same as CreateOneCharacter, but character is only prepared (not created yet), returns true if succeeds
PrepareScientist
(
sex : Целое,
lev : Целое)
prepares parameters for a scientist with specified sex and level (0=random for sex)
PrepareScientistSkills
(
level : Целое)
prepares skills for scientist, main skill is near specified level (uses PrepareClass)
RaiseSailEvent
(
num : Целое)
raises immediately generic event SailEvent(num)
Rand
(
min : Целое,
max : Целое)
random number in selected range
RandHex
(
border : Логический)
returns coordinate of random hex anywhere on map in format [x,y] if border is true, then bordering hexes can be included
RandHexArea
(
area : Целое,
border : Логический)
returns coordinate of random hex in specified area in format [x,y] (or 0 if fails) if border is true, then bordering hexes can be included
RandHexXYR
(
x : Целое,
y : Целое,
r : Целое,
border : Логический)
returns coordinate of random not invalid hex near to xy (max. dist is R) in format [x,y] (or 0 if fails) if border is true, then bordering hexes can be included
RemoveEnvironmentWithoutRebuild
(
x : Целое,
y : Целое)
removes environment on x, y, don't count parameters, use only if normal RemoveEnviroment follows
RemoveMcUnits
(
mcid : Целое,
units : Список)
changes list of units of the macro mcid; returns true if succesfull
RemoveMcUnitsSpec
(
mcid : Целое,
units : Список,
spec : Целое)
changes spec list of units of the macro mcid; returns true if succesfull
RemoveMineOfUnit
(
un : Целое)
removes placed remote charge of unit, if exists
RemoveSeeing
(
x : Целое,
y : Целое,
side : Целое)
removes area of seeing (all matching areas)
RemoveTasks
(
units : Список)
removes all tasks of units
RemoveUnit
(
un : Целое)
Removes specified unit from map
Replace
(
list : Список,
index : Целое,
item : Переменная)
replaces item of list with specified index with another, returns result if index>n (n=length of list), then positions n+1 to index-1 are filled by undef value
ReplaceEnvironment
(
x : Целое,
y : Целое,
envset : Целое,
num : Целое)
replaces environment on x, y by element num from set
Researched
(
side : Целое,
tech : Целое)
returns true if tech is researched (obsolete)
ResetFog
(
res : Переменная)
resets fog of war of all sides to black
ResetMultiScore
(
res : Переменная)
resets multiplayer score for all sides
RevealFogArea
(
side : Целое,
area : Целое)
reveals fog for specified side in specified area
RewardPeople
(
humans : Список)
gives mission reward to list of human characters (use before save)
SaveCampaignFile
(
fname : Строка)
saves actualised campaign file to fname.txt in mission directory (use only for debuging)
SaveCharacters
(
humlist : Список,
ident : Строка)
Saves set of human characters to the output save and gives it specified ident For special characters use: SaveCharacters(handle,name) in one mission and handle:=CreateCharacter(name) in the next mission For survived people from previous mission use SaveCharacters(set,name) in one mission and set:=CreateCharacterSet(name) in the next mission
SaveForQuickRestart
()
use it after ingame videos and character selection - quick restart will start from this point
SaveVariable
(
v : Переменная,
ident : Строка)
Saves variable to the save with specified ident
Say
(
un : Целое,
ident : Строка)
Specified unit says sentence identified by ident
SayEffect
(
ident : Строка)
Say effect identified by ident
SayNoFace
(
un : Целое,
ident : Строка)
Specified unit says sentence identified by ident, it's face not appears
SayNoName
(
un : Целое,
ident : Строка)
Specified unit says sentence identified by ident, it's name doesn't appear - use for enemies
SayRadio
(
un : Целое,
ident : Строка)
Specified unit says over radio sentence identified by ident, use for off map units
SayRadioNoName
(
un : Целое,
ident : Строка)
Specified unit says over radio sentence identified by ident, it's name doesn't appear
See
(
side : Целое,
un : Целое)
returns true if side sees specified unit
SeeArea
(
side : Целое,
area : Целое)
returns how much hexes of specified area side sees
SeeGreyArea
(
side : Целое,
area : Целое)
returns how much hexes of specified area side sees + gray hexes
SeeXY
(
side : Целое,
x : Целое,
y : Целое)
returns how good side sees specified hex
SelectiveQuery
(
ident : Строка,
list : Список)
Displays query dialog defined in texts, returns number of answer (1..n) List contains numbers of items which will be shown
SelectUnits
(
units : Список)
add selection to units
SendSiberiteRocket
(
x : Целое,
y : Целое)
siberite rocket will explode at hex x,y
SetAlliedVictory
(
side : Целое,
state : Логический)
sets allied victory state for side
SetAreaMapShow
(
area : Целое,
id : Целое)
shows area on map and/or minimap
SetArtifactRes
(
side : Целое,
state : Логический)
allows researching of artifact technology
SetArtifactUse
(
side : Целое,
number : Целое,
state : Целое,
lab : Целое)
allows use of artifact icon in labs of side... number - art_use_?; state - art_?; lab - unit number, negative kind, or zero for all labs
SetAttitude
(
fromside : Целое,
toside : Целое,
att : Целое,
sym : Логический)
sets attitude to att (if sym then sets the symetric relation too)
SetAttr
(
units : Список,
attr : Целое,
value : Целое)
set attribute attr of specified human units to value
SetBattleFlag
(
side : Целое,
x : Целое,
y : Целое,
options : Список)
sets battle flag for specified side to specified coordinates and returns flagid effect of flag depends on its options, default options: [[bfo_defend_bonus_human,80],[bfo_defend_bonus_vehicle,40],[bfo_defend_bonus_building,0],[bfo_range,17],[bfo_height,100]] distance: 0..range: full effect; range+1..range*2: decreasing effect
SetBLevel
(
units : Список,
blevel : Целое)
sets basic level of building(s)
SiberiteRocket
(
x : Целое,
y : Целое,
n : Целое,
list : Переменная)
emulates n-th phase of siberite rocket explosion on list of units
SideShoot
(
un : Целое)
returns side, that last shoot unit un
SortListByListAsc
(
items : Переменная,
values : Переменная)
Returns list items ascending sorted by asociated integer list values If lists aren't the same size, only smaller length of list is used
SortListByListDesc
(
items : Переменная,
values : Переменная)
Returns list items descending sorted by asociated integer list values. If lists aren't the same size, only smaller length of list is used
TechNationAvailable
(
tech : Целое,
nation : Целое)
returns true if tech is available to nation
TeleportExit
(
un : Целое,
x : Целое,
y : Целое)
creates exit on [x,y] for teleport un
TeleportUnit
(
un : Целое,
x : Целое,
y : Целое,
range : Целое,
sound : Логический)
try to teleport unit un to [x,y]. Uses warp effect. Sound optionally. Returns true, if succeed. Only for outside units. Use range to auto-find other destination if [x,y] unusable.
TestCharacters
(
ident : Строка)
Returns true if there is a character or group of characters with specified ident in the save
TestVariable
(
ident : Строка)
Returns true if there is a variable with specified ident in the save
Wait
(
ticks : Целое)
waits for specified number of ticks, ignores asynchronous mode
WaitForMc
(
mcid : Целое)
waits for finishing of macro mcid
WantsToAttack
(
un : Целое)
returns number of unit which is target of attack command of unit un, or zero
WaypointsFromMatrix
(
matrix : Список,
areas : Список)
creates waypoints through areas using matrix. Areas is a list: [[x,y,r],...] and there must be at least one item in this list. The way is randomly created: random points in the areas are selected, then one of the best ways through these points is randomly selected.
WorstFromListByList
(
items : Переменная,
values : Переменная)
Returns SortListByListAsc(items,values)[1], or zero iv values is empty. Faster than SortListByListDesc