Polski Česky English Français Русский Español
Home Site Original War Support Community Forums Facebook YouTube Discord
Your first time here? View this!

SAIL Base

Functions List

A B C D E F G H I K L M N O P Q R S T U V W Y

A

  • AddCargo ( units : list, mattype : integer, amount : integer ) adds amount of mattype (each unit in list); returns true if (all) succeed
  • AddComAgressiveMove ( units : list, x : integer, y : integer ) set of units receives agressive move command to specified coordinates
  • AddComAnim ( units : list, atype : integer ) list of units receives do specified animation command
  • AddComAttackPlace ( units : list, x : integer, y : integer ) set of units receives attack command to specified coordinates
  • AddComAttackSoporific ( units : list, un : integer ) attack unit un with soporific amunition
  • AddComAttackUnit ( units : list, un : integer ) set of units receives attack command to specified unit
  • AddComBuild ( units : list, bud : integer, x : integer, y : integer, dir : integer ) set of units receives build command
  • AddComBuildBehemoth ( units : list, bud : integer, x : integer, y : integer, dir : integer ) set of units receives build behemoth command
  • AddComCancel ( units : list ) set of buildings receives cancel research or construction command
  • AddComCarabine ( units : list ) list of sheiks receives CarabineOn command
  • AddComChangeProfession ( units : list, new_prof : integer ) set of units receives change profession to new_prof command
  • AddComCollect ( units : list, x : integer, y : integer ) set of units receives collect command to specified coordinates
  • AddComConstruct ( units : list, chassis : integer, engine : integer, control : integer, weapon : integer ) set of factories receives construct vehicle with specified components command
  • AddComContaminate ( units : list, x : integer, y : integer ) list of units receives contaminate siberite deposit
  • AddComCraneBuild ( units : list, bud : integer, x : integer, y : integer, dir : integer ) set of units receives build command
  • AddComCrawl ( units : list ) set of units receives crawl command
  • AddComDismantle ( units : list, un : integer ) list of units receives command to dismantle building un
  • AddComEnterUnit ( units : list, un : integer ) set of units receives enter specified unit command
  • AddComExitBuilding ( units : list ) set of units receives exit building command
  • AddComExitVehicle ( units : list ) set of units receives exit vehicle command
  • AddComFireExplosives ( units : list ) set of units receives fire remote controlled explosives command
  • AddComForceInvisible ( units : list ) list of units receives invisible command
  • AddComFree ( units : list ) set of units receives free command
  • AddComGet ( units : list, x : integer, y : integer ) list of units receives simple get cargo command
  • AddComGive ( units : list, un : integer ) list of units receives simple give cargo command
  • AddComHack ( units : list, un : integer ) list of units receives hack command
  • AddComHeal ( units : list, un : integer ) set of units receives heal specified unit command
  • AddComHiddenCamera ( units : list, x : integer, y : integer ) list of units receives place hidden camera
  • AddComHold ( units : list ) set of units receives hold command
  • AddComInvisible ( units : list ) list of units receives invisible command
  • AddComLinkTo ( units : list, hum : integer ) set of vehicles receives link to specified human command
  • AddComLinkToBase ( units : list, un : integer ) depot or warehouse receives command to link building un to the base
  • AddComMoveToArea ( units : list, area : integer ) set of units receives move command to specified area
  • AddComMoveUnit ( units : list, un : integer ) set of units receives move command to specified unit
  • AddComMoveXY ( units : list, x : integer, y : integer ) set of units receives move command to specified coordinates
  • AddComPause ( units : list ) set of buildings receives pause research or construction command
  • AddComPlaceDelayedCharge ( units : list, x : integer, y : integer, un : integer ) set of units receives command for place explosives to [x,y] or near unit un
  • AddComPlaceRemoteCharge ( units : list, x : integer, y : integer, un : integer ) set of units receives command for place explosives to [x,y] or near unit un
  • AddComPlaceWeapon ( units : list, weap : integer ) list of turrets and bunkers receives place specified weapon command
  • AddComRecycle ( units : list, un : integer ) list of vehicles receives command to recycle in building un
  • AddComRefuel ( units : list, un : integer ) list of units receives refuel command
  • AddComRemember ( units : list ) set of units receives remember command
  • AddComRepairBuilding ( units : list, un : integer ) set of units receives repair specified building command
  • AddComRepairVehicle ( units : list, un : integer ) set of units receives repair specified vehicle command
  • AddComResearch ( units : list, techn : integer ) set of labs receives research technology techn command
  • AddComReturn ( units : list ) set of units receives return command
  • AddComSabre ( units : list ) list of sheiks receives SabreOn command
  • AddComSailEvent ( units : list, num : integer ) unit raises generic event SailEvent(num)
  • AddComSpaceShift ( units : list, x : integer, y : integer ) list of units receives command to use spaceshifting grenade
  • AddComStand ( units : list ) set of units receives stand command
  • AddComStop ( units : list ) set of units receives stop command
  • AddComTameXY ( units : list, x : integer, y : integer ) set of units receives tame command
  • AddComTeleportExit ( units : list, x : integer, y : integer, un : integer ) list of units receives command for place exit of teleport un to [x,y]
  • AddComTimeShift ( units : list, x : integer, y : integer ) list of units receives command to use timeshifting grenade
  • AddComTransport ( units : list, un : integer, mattype : integer ) list of units receives transport command
  • AddComTurnUnit ( units : list, un : integer ) set of units receives turn command to specified unit
  • AddComTurnXY ( units : list, x : integer, y : integer ) set of units receives turn command to specified coordinates
  • AddComUnlink ( units : list ) set of vehicles receives unlink command
  • AddComUnload ( units : list ) list of units receives cargo unload command
  • AddComUpgrade ( units : list ) list of units receives command upgrade
  • AddComUpgradeLab ( units : list, labtype : integer ) list of units receives command upgrade to specified laboratory
  • AddComWait ( units : list, time : integer ) set of units receives wait command
  • AddComWalk ( units : list ) set of units receives walk command
  • AddCopyTasks ( un_dest : integer, un_source : integer ) copy tasks from unit un_source to unit_dest (adding, no patrol)
  • AddExperience ( hum : integer, sk : integer, points : integer ) adds experience points in skill sk to human hum
  • AddMcUnits ( mcid : integer, units : list ) changes list of units of the macro mcid; returns true if succesfull
  • AddMcUnitsSpec ( mcid : integer, units : list, spec : integer ) changes spec list of units of the macro mcid; returns true if succesfull
  • AddMedal ( ident : string, number : integer ) if number>0 then adds [ident,number] item to gained_medals if number<0 then adds [ident,-number] item to missing_medals
  • AddMusic ( ident : string ) after current music track stops the new is played
  • AddResourceType ( base : integer, mattype : integer, amount : integer ) adds resource of specified type to the specified base
  • AddTaskList ( un : integer, list : list ) adds tasks from tasklist (GetTaskList format) - use carefully!
  • AllNearestUnitToUnit ( units : list, un : integer ) Returns all nearest unit from list units to unit un (ignoring un itself), or zero
  • AreaToMatrix ( area : integer ) creates a matrix from the area
  • ArtContamination ( x : integer, y : integer, percentage : integer ) makes contaminated area (percentage of siberite rocket contamination)
  • Attacks ( un : integer ) returns number of unit which is curently attacked by unit un (aiming counts as attack), or zero
  • AvailableChassisList ( un : integer ) returns list of available components (chassis) - factory, workshop
  • AvailableControlList ( un : integer ) returns list of available components (controls) - factory, workshop
  • AvailableEngineList ( un : integer ) returns list of available components (engines) - factory, workshop
  • AvailableWeaponList ( un : integer ) returns list of available components (weapons) - factory, workshop, turret

B

  • BestFromListByList ( items : variable, values : variable ) Returns SortListByListDesc(items,values)[1], or zero iv values is empty. Faster than SortListByListAsc
  • BuildingsInProgress ( side : integer ) returns true if construction of any buildings of specified side isn't finish
  • BuildingStatus ( un : integer ) returns building status (bs_???)
  • BuildQuery ( q : string, al : list ) Displays query dialog with question q and list of answers al

C

  • CanBeConstructed ( factory : integer, chassis : integer, engine : integer, control : integer, weapon : integer ) returns if vehicle can be constructed in factory
  • CanBeResearched ( labor : integer, tech : integer ) returns if tech can be researched in lab (if tech is already researched, returns false)
  • CanCarry ( un : integer ) returns true if unit is engineer or cargo holder
  • CanCarryHowMuch ( un : integer ) returns how much material can unit still carry
  • CanCarryNext ( un : integer ) returns true if unit is not full
  • Carry ( un : integer ) returns true if unit carries something
  • CenterNowOnUnits ( units : list ) centers immediatelly screen to specified group of units
  • CenterNowOnXY ( x : integer, y : integer ) centers immediatelly screen on specified coordinates
  • CenterOnUnits ( units : list ) centers screen to specified group of units with scrolling
  • CenterOnXY ( x : integer, y : integer ) centers screen on specified coordinates with scrolling
  • ChangeBattleFlagOptions ( flagid : integer, options : list ) changes options of existing battleflag
  • ChangeBattleFlagSide ( flagid : integer, side : integer ) changes side of existing battleflag
  • ChangeMap ( ident : string, fname : string ) changes map, ident identifies text while loading, fname is name of the map in the same directory (without path)
  • ChangeMissionObjectives ( ident : string ) change mission objectives, s is ident in Texts.txt
  • ChangeResourceAmountXY ( x : integer, y : integer, n : integer ) changes amount of existing resources on specified hex
  • ChangeSideFog ( side : integer, fognumber : integer ) set fog of specified side to specified fognumber
  • CharacterSelection ( ident : string, min : integer, max : integer, units : list, classes : list ) 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 : string ) 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 : integer ) clears list of units of the macro mcid; returns true if succesfull
  • ClearMcUnitsSpec ( mcid : integer, spec : integer ) clears spec list of units of the macro mcid; returns true if succesfull
  • ComAgressiveMove ( units : list, x : integer, y : integer ) set of units receives agressive move command to specified coordinates
  • ComAnim ( units : list, atype : integer ) list of units receives do specified animation command
  • ComAttackPlace ( units : list, x : integer, y : integer ) set of units receives attack command to specified coordinates
  • ComAttackSoporific ( units : list, un : integer ) attack unit un with soporific amunition
  • ComAttackUnit ( units : list, un : integer ) set of units receives attack command to specified unit
  • ComBuild ( units : list, bud : integer, x : integer, y : integer, dir : integer ) set of units receives build command
  • ComBuildBehemoth ( units : list, bud : integer, x : integer, y : integer, dir : integer ) set of units receives build behemoth command
  • ComCancel ( units : list ) set of buildings receives cancel research or construction command
  • ComCarabine ( units : list ) list of sheiks receives CarabineOn command
  • ComChangeProfession ( units : list, new_prof : integer ) set of units receives change profession to new_prof command
  • ComCollect ( units : list, x : integer, y : integer ) set of units receives collect command to specified coordinates
  • ComConstruct ( units : list, chassis : integer, engine : integer, control : integer, weapon : integer ) set of factories receives construct vehicle with specified components command
  • ComContaminate ( units : list, x : integer, y : integer ) list of units receives contaminate siberite deposit
  • ComCrawl ( units : list ) set of units receives crawl command
  • ComDismantle ( units : list, un : integer ) list of units receives command to dismantle building un
  • ComEnterUnit ( units : list, un : integer ) set of units receives enter specified unit command
  • ComExitBuilding ( units : list ) set of units receives exit building command
  • ComExitVehicle ( units : list ) set of units receives exit vehicle command
  • ComFireExplosives ( units : list ) set of units receives fire remote controlled explosives command
  • ComForceInvisible ( units : list ) list of units receives invisible command
  • ComFree ( units : list ) set of units receives free command
  • ComGet ( units : list, x : integer, y : integer ) list of units receives simple get cargo command
  • ComGive ( units : list, un : integer ) list of units receives simple give cargo command
  • ComHack ( units : list, un : integer ) list of units receives hack command
  • ComHeal ( units : list, un : integer ) set of units receives heal specified unit command
  • ComHiddenCamera ( units : list, x : integer, y : integer ) list of units receives place hidden camera
  • ComHold ( units : list ) set of units receives hold command
  • ComInvisible ( units : list ) list of units receives invisible command
  • ComLinkTo ( units : list, hum : integer ) set of vehicles receives link to specified human command
  • ComLinkToBase ( units : list, un : integer ) depot or warehouse receives command to link building un to the base
  • ComMoveToArea ( units : list, area : integer ) set of units receives move command to specified area
  • ComMoveUnit ( units : list, un : integer ) set of units receives move command to specified unit
  • ComMoveXY ( units : list, x : integer, y : integer ) set of units receives move command to specified coordinates
  • ComPause ( units : list ) set of buildings receives pause research or construction command
  • ComPlaceDelayedCharge ( units : list, x : integer, y : integer, un : integer ) set of units receives command for place explosives to [x,y] or near unit un
  • ComPlaceRemoteCharge ( units : list, x : integer, y : integer, un : integer ) set of units receives command for place explosives to [x,y] or near unit un
  • ComPlaceWeapon ( units : list, weap : integer ) list of turrets and bunkers receives place specified weapon command
  • ComRecycle ( units : list, un : integer ) list of vehicles receives command to recycle in building un
  • ComRefuel ( units : list, un : integer ) list of units receives refuel command
  • ComRemember ( units : list ) set of units receives remember command
  • ComRepairBuilding ( units : list, un : integer ) set of units receives repair specified building command
  • ComRepairVehicle ( units : list, un : integer ) set of units receives repair specified vehicle command
  • ComResearch ( units : list, techn : integer ) set of labs receives research technology techn command
  • ComReturn ( units : list ) set of units receives return command
  • ComSabre ( units : list ) list of sheiks receives SabreOn command
  • ComSailEvent ( units : list, num : integer ) unit raises generic event SailEvent(num)
  • ComSpaceShift ( units : list, x : integer, y : integer ) list of units receives command to use spaceshifting grenade
  • ComStand ( units : list ) set of units receives stand command
  • ComStop ( units : list ) set of units receives stop command
  • ComTameXY ( units : list, x : integer, y : integer ) set of units receives tame command
  • ComTeleportExit ( units : list, x : integer, y : integer, un : integer ) list of units receives command for place exit of teleport un to [x,y]
  • ComTimeShift ( units : list, x : integer, y : integer ) list of units receives command to use timeshifting grenade
  • ComTransport ( units : list, un : integer, mattype : integer ) list of units receives transport command
  • ComTurnUnit ( units : list, un : integer ) set of units receives turn command to specified unit
  • ComTurnXY ( units : list, x : integer, y : integer ) set of units receives turn command to specified coordinates
  • ComUnlink ( units : list ) set of vehicles receives unlink command
  • ComUnload ( units : list ) list of units receives cargo unload command
  • ComUpgrade ( units : list ) list of units receives command upgrade
  • ComUpgradeLab ( units : list, labtype : integer ) list of units receives command upgrade to specified laboratory
  • ComWait ( units : list, time : integer ) set of units receives wait command
  • ComWalk ( units : list ) set of units receives walk command
  • Constructable ( chas : integer, eng : integer, con : integer, weap : integer ) returns true, if vehicle constructable
  • ContactTime ( sides : list ) time from last contact (parameter: side, or [side1,side2])
  • Contaminate ( side : integer, x : integer, y : integer ) immediatelly contaminates siberite deposit; if succesfull, (raises event and) returns true
  • CopySkills ( un1 : integer, un2 : integer ) copies skills between units (un1->un2)
  • CopyTasks ( un_dest : integer, un_source : integer ) copy tasks from unit un_source to unit_dest (replacing, no patrol)
  • CostOfBuilding ( kind : integer, nation : integer ) returns cost in list [cans,oil,sib]
  • CostOfVehicle ( chassis : integer, engine : integer, control : integer, weapon : integer ) returns cost in list [cans,oil,sib]
  • CostOfWeapon ( weapon : integer ) returns cost in list [cans,oil,sib]
  • Crawls ( units : list ) returns number of crawling units in list (0=false)
  • CreateAndPlaceBuildingXYD ( x : integer, y : integer, direction : integer ) Creates a building using uc_ and bc_ parameters
  • CreateBuilding ( ) Creates a building using uc_ and bc_ parameters
  • CreateCharacter ( ident : string ) Shortcut for CreateOneCharacterFromSet(ident,1)
  • CreateCharacterSet ( ident : string ) 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
  • CreateCharacterWithClass ( ident : string, cl : integer ) Shortcut for CreateOneCharacterFromSetWithClass(ident,1,cl)
  • CreateCratesAnywhere ( amount : integer, materialisation : boolean )
  • CreateCratesArea ( amount : integer, area : integer, materialisation : boolean )
  • CreateCratesXY ( amount : integer, x : integer, y : integer, materialisation : boolean )
  • CreateCratesXYR ( amount : integer, x : integer, y : integer, r : integer, materialisation : boolean )
  • CreateDepositXY ( x : integer, y : integer, typ : integer ) creates deposit of mat_siberite or mat_oil type on specified coordinates
  • CreateHuman ( ) Creates human using uc_ and hc_ parameters
  • CreateOneCharacterFromSet ( ident : string, index : integer ) Same as CreateCharacterSet, but only one unit is created (the one with specified index in the set)
  • CreateOneCharacterFromSetWithClass ( ident : string, index : integer, cl : integer ) Same as CreatePeopleFromCharacterSet, but character gets specified class
  • CreateResourcesAnywhere ( typ : integer, amount : integer, materialisation : boolean )
  • CreateResourcesArea ( typ : integer, amount : integer, area : integer, materialisation : boolean )
  • CreateResourcesXY ( typ : integer, amount : integer, x : integer, y : integer, materialisation : boolean )
  • CreateResourcesXYR ( typ : integer, amount : integer, x : integer, y : integer, r : integer, materialisation : boolean )
  • CreateVehicle ( ) Creates vehicle using uc_ and vc_ parameters

D

  • DebugLog ( text : variable ) debug log (prcek)
  • DebugLogAll ( ) log CRC etc. (rumun)
  • Delete ( list : list, index : integer ) deletes item from list, returns result if index is out of list, then happens nothing
  • DeleteCharacters ( ident : string ) Deletes character set from the save
  • DeleteVariable ( ident : string ) Deletes a character from the save
  • DeselectUnits ( units : list ) removes selection of units
  • DestroyUnit ( un : integer ) Destroys specified unit (include removing, if placed)
  • DialogueOff ( ) function, which: restore tick, switch stop_action to false, set ExclusiveOff
  • DialogueOn ( ) function, which: store tick, switch stop_action to true, set ExclusiveOn
  • DisableExclamations ( res : variable ) exclamations disabled
  • DisableVideoExclamations ( res : variable ) video exclamations disabled
  • DoNotAttack ( side : integer, un : integer ) neutoceni pro stranu side na jednotku un
  • DWait ( ticks : integer ) waits for specified number of ticks,

E

  • EffectTeleport ( x : integer, y : integer ) makes effect on hex [x,y]
  • EnableExclamations ( res : variable ) exclamations enabled
  • EnableVideoExclamations ( res : variable ) video exclamations enabled
  • EraseResourceArea ( ar : integer, typ : integer ) erases all resources in of specified type in specified area
  • ExclusiveOff ( ) cancels effect of ExclusiveOn
  • ExclusiveOn ( ) stops all other threads of SAIL until ExclusiveOff is executed or this thread ends
  • ExistMc ( mcid : integer ) if macro mcid exists, returns true, otherwise false
  • ExitGame ( res : variable ) exits game (debug)

F

  • FilterAllUnits ( filter : list ) filters list of all units using filter
  • FilterUnitsExceptArea ( area : integer, filter : list ) filters list of units not in specified area using filter
  • FilterUnitsInArea ( area : integer, filter : list ) filters list of units in specified area using filter
  • FindArtifact ( size : integer ) finds artifact with size size and returns its position [x,y], or false
  • FindBattleFlag ( x : integer, y : integer ) returns flagid of battle flag on [x,y], or -1
  • FindMaxSkill ( units : list, skill : integer ) returns unit with max skill from units
  • FindMaxSkill2 ( units : list, skill : integer ) returns unit with max skill from units (including nonplaced) added by angry jam
  • FindMinSkill ( units : list, skill : integer ) returns unit with min skill from units
  • FindNearestPoint ( list_of_points : list, x : integer, y : integer ) returns nearest point to x y from list_of_points
  • FogOff ( sw : integer ) if sw is true, fog is off
  • ForceSay ( un : integer, ident : string ) Specified unit says sentence identified by ident even if it is dying (but not dead)
  • ForceSayNoFace ( un : integer, ident : string ) Specified unit says sentence identified by ident even if it is dying, it's face doesn't appear
  • ForceSayNoName ( un : integer, ident : string ) Specified unit says sentence identified by ident even if it is dying, it's name doesn't appear

G

  • GetActResearch ( un : integer ) returns technology actually researching in lab un; 0 if no or spec research
  • GetAlliedVictory ( side : integer ) returns allied victory state of side
  • GetAttitude ( fromside : integer, toside : integer ) returns attitude
  • GetAttr ( units : list, attr : integer ) returns average attribute attr of specified human units
  • GetBase ( un : integer ) returns base of specified building (or zero, if it is not building)
  • GetBattleFlagSide ( flagid : integer ) returns side of existing battleflag
  • GetBLevel ( un : integer ) returns level of building, if un is not a building, returns -1
  • GetBType ( un : integer ) returns type of building, if un is not a building, returns -1
  • GetBuildingTechReq ( kind : integer, nation : integer ) returns technology required to building of kind, nation (0 - free; -1 - not available to nation)
  • GetBuildList ( base_or_list : variable ) creates BuildList from whole base or list of units (buildings)
  • GetBWeapon ( un : integer ) returns type of weapon (in case of turret or bunker, zero otherwise)
  • GetCargo ( units : list, mattype : integer ) returns (total) amount of mattype
  • GetCargoType ( units : list ) returns type of cargo (mat_none, mat_cans, mat_oil, mat_siberite, mat_multi)
  • GetChassis ( un : integer ) returns type of vehicle chassis
  • GetClass ( un : integer ) returns class of specified human unit
  • GetControl ( un : integer ) returns type of vehicle control
  • GetCustomRate ( basicrate : integer, tab : integer, skill : integer ) 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))
  • GetDir ( un : integer ) returns direction of a unit
  • GetDistUnitArea ( un : integer, area : integer ) returns distance of a unit and the closest hex in the area (0 if it is in area)
  • GetDistUnits ( un1 : integer, un2 : integer ) returns distance of two units, 99999 if one or both of them aren't on the map
  • GetDistUnitXY ( un1 : integer, x : integer, y : integer ) returns distance of a unit and a hex, 99999 if unit isn't on the map
  • GetDistXY ( x1 : integer, y1 : integer, x2 : integer, y2 : integer ) returns distance of two hexes
  • GetEnergy ( base : integer ) returns list of power values: [need,needmax,prod,prodmax]
  • GetEngine ( un : integer ) returns type of vehicle engine
  • GetExtPositions ( un : integer ) returns list of factory extensions positions [[x,y],[x,y],[x,y],[x,y],[x,y]]
  • GetFreeMode ( un : integer ) returns true if unit is in free mode
  • GetFuel ( units : list ) returns average fuel of specified combustion or solar vehicles list
  • GetGraphicsBrightness ( res : variable ) returns gamma correction from setting
  • GetGraphicsGamma ( res : variable ) returns gamma correction from setting
  • GetIdent ( un : integer ) returns ident of specified unit (for debuging listings etc.)
  • GetLabKind ( un : integer, which : integer ) return kind of laboratory, which is 1 or 2
  • GetListOfCratesInArea ( area : integer ) returns list of crates positions in area
  • GetListOfResourcesInArea ( area : integer ) returns list of deposits positions according to the type, [x,y,typ,...]
  • GetLives ( units : list ) returns average lives of specified units
  • GetMark ( un : integer ) returns value of mark of unit un (masha flag)
  • GetMcUnits ( mcid : integer ) returns list of units of the macro mcid
  • GetMcUnitsSpec ( mcid : integer, spec : integer ) returns spec list of units of the macro mcid
  • GetMultiplayerSetting ( index : integer ) returns value of multiplayer setting with specified index
  • GetMultiScore ( side : integer ) gets multiplayer score of specified side
  • GetNation ( un : integer ) returns nation of unit
  • GetProperties ( un : integer ) return list of unit properties [speed, defend, sight, range, eff1, eff2, eff3]
  • GetRememberedX ( un : integer ) returns ComReturn x coordinate of a unit
  • GetRememberedY ( un : integer ) returns ComReturn y coordinate of a unit
  • GetResourceAmountXY ( x : integer, y : integer ) returns amount of resources on specified hex
  • GetResourceArea ( ar : integer, typ : integer ) returns all resources in of specified type in specified area
  • GetResources ( base : integer ) returns list of base resources: [cans,oil,sib]
  • GetResourceType ( base : integer, mattype : integer ) returns amount of material of specified type in specified base
  • GetResourceTypeXY ( x : integer, y : integer ) returns resource type on specified hex or zero
  • GetResourceVisibility ( x : integer, y : integer, side : integer ) : boolean returns true, if deposit at pos x, y is visible for side
  • GetRestrict ( btype : integer, side : integer ) returns restriction btype for side
  • GetSex ( un : integer ) returns sex of specified human unit
  • GetSide ( un : integer ) returns side of a unit
  • GetSideFog ( side : integer ) returns number of fog of specified side
  • GetSkill ( units : list, sk : integer ) returns average skill sk of specified human units
  • GetTag ( index : integer ) gets value of tag[index]
  • GetTaskList ( un : integer ) returns list of lists [task,x,y,obj,par1,par2,patrol]; siiiiib (UDatStr - ukol...)
  • GetTech ( tech : integer, side : integer ) returns state of technology for side
  • GetTechLab ( tech : integer ) returns kind of lab required to research tech
  • GetTechProgress ( tech : integer, side : integer ) returns progress of technology research for side
  • GetTechTechsReq ( tech : integer ) returns list of technologies required to research tech
  • GetType ( un : integer ) returns type of unit (unit_human, unit_vehicle, unit_building)
  • GetUnitActivity ( un : integer ) returns units activity (constants in UDatStr.pas - cin...)
  • GetUnitMc ( un : integer ) returns mcid of macro which uses unit un; returns zero if not used
  • GetUnitNumber ( x : integer, y : integer ) returns number of unit at pos x, y
  • GetWeapon ( un : integer ) returns type of vehicle weapon
  • GetWorkingProgress ( units : list ) returns (average) progress of action of unit(s) - construction, etc.
  • GetX ( un : integer ) returns x coordinate of a unit
  • GetY ( un : integer ) returns y coordinate of a unit
  • GiveMedals ( ident : string ) xxx
  • GiveMissionExperience ( humans : list, number : integer ) gives default experience for mission number to characters humans (nepouzivat)
  • GiveSkillBonus ( units : list, sk : integer, value : integer ) increases basic skill sk of units by value

H

  • HasTask ( un : integer ) returns true if unit has a tasks from player or SAIL
  • HexInfo ( x : integer, y : integer ) returns number of unit on hex, 0 for free and -1 for environment
  • HiddenCamera ( x : integer, y : integer, side : integer ) creates hidden camera
  • HideArea ( side : integer, area : integer ) sets specified area invisible for specified side
  • Hint ( ident : string ) adds hint
  • HintSpec ( ident : string, kind : integer ) adds hint (kind: 0-hint, 1-info, 2-error, 3-first)

I

  • ImagineProperties ( vehb : integer, human : integer, cl : integer ) return list of unit properties for vehb with human inside (cl 0 means actual class)
  • InArea ( x : integer, y : integer, area : integer ) returns true if [X,Y] is in specified area
  • InBattle ( sides : list ) battle detection (parameter: side, or [side1,side2])
  • 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 : list, index : integer, item : variable ) 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 : string ) stops current music and play new, then starts current again
  • IsAt ( un : integer, x : integer, y : integer ) returns true if unit is at specified coordinates
  • IsBusy ( un : integer ) returns true if unit has a tasks (even its own)
  • IsConstructed ( build : integer ) returns nonzero number, if build is building under construction or if it is upgraded
  • IsControledBy ( veh : integer ) returns number of driver of a remote controlled vehicle, zero otherwise
  • IsDead ( un : integer ) returns true if unit is dead (lives on zero or totally destroyed)
  • IsDrivenBy ( veh : integer ) returns number of driver of a human controlled vehicle, zero otherwise
  • IsDying ( un : integer ) returns true if unit is on map and dying
  • IsEnvironment ( x : integer, y : integer ) returns true if there is an environment on x, y
  • IsIdle ( un : integer ) returns true if unit does nothing
  • IsInArea ( un : integer, area : integer ) returns true if unit is in specified area (it can be driving or inside)
  • IsInUnit ( hum : integer ) returns number of unit in which a unit is or zero
  • IsLive ( un : integer ) returns true if unit is on map and not dead
  • IsOK ( un : integer ) returns true if unit is on map and not dying
  • IsPlaced ( un : integer ) returns true if unit un is placed
  • IsSelected ( units : list ) returns true if selected
  • IsTamedBy ( un : integer ) returns number of tamer of this animal, zero otherwise

K

  • KillBattleFlag ( flagid : integer ) removes battle flag flagid (returns true if succesfull)
  • KillMc ( mcid : integer ) if macro mcid exists, closes macro and returns true; otherwise returns false
  • KillUnit ( un : integer ) Kills specified unit by setting its lives to zero

L

  • LaunchMine ( number : integer ) explosion of remote mine, that was placed by PlaceMine Rumun: DO NOT USE number, it changes
  • LaunchMineAtPos ( x : integer, y : integer, side : integer ) launch mine at pos x, y, that was placed by PlaceMine
  • LinkVehicleToHuman ( veh : integer, hum : integer ) Links vehicle to a human in Control tower
  • ListEnvironmentArea ( area : integer ) returns list of environments in area; [[x,y,envset,num],...]
  • LoadVariable ( ident : string, default : variable ) Loads a variable with specified ident from the save (or default if ident is not found)

M

  • McAttack ( prior : integer, regid : integer, units : list, options : list ) 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 : integer, units : list, build : list, research : list, construct : list, options : list ) runs macro and returns mcid build must be BuildList, researchs - list of techs, construct - not implemented
  • McCustom ( prior : integer, units : list ) runs void macro and returns mcid
  • McDefend ( prior : integer, regid : integer, units : list, options : list ) 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 : integer, units : list, waypoints : list, options : list ) runs macro and returns mcid informace u Pedra
  • McPatrol ( prior : integer, regid : integer, units : list, options : list ) 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 : integer, count : integer, strength : integer ) 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 : integer, options : list ) 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 : integer, options : list ) changes options of McRegistry with ident mcid
  • McRepair ( prior : integer, units : list, others : list, options : list ) 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 : integer, kinds : list, weapons : list ) create new fortification definition for McSkirmish mcid, returns number of definition
  • McSAddVehicles ( mcid : integer, weapons : list, chassis : list, engines : list, controls : list, parkingarea : integer ) creates new vehicle definition for McSkirmish mcid, returns number of group
  • McSChangeFortification ( mcid : integer, number : integer, kinds : list, weapons : list ) updates fortification definition for McSkirmish mcid, definition number
  • McSChangeVehicles ( mcid : integer, number : integer, weapons : list, chassis : list, engines : list, controls : list, parkingarea : integer ) updates vehicle definition for McSkirmish mcid, group number
  • McSConditionalStrategyFilter ( str : list ) filters conditional strategy to strategy without conditions (main strategy list)
  • McSGetVehList ( mcid : integer, number : integer ) returns list of vehicles in group number
  • McSkirmish ( prior : integer, units : list, options : list ) runs McSkirmish macro and returns mcid options - [[mcs_PosList, list], [mcs_Strategy, list], [mcs_Parking, parkingarea]]
  • McSParking ( mcid : integer, veh : list, park : boolean ) changes list of parking vehicles; veh will be added (park=true) or removed (park=false)
  • McSSetPosList ( mcid : integer, list : list ) sets building position list for McSkirmish mcid
  • McSSetStrategy ( mcid : integer, list : list ) sets main strategy list for McSkirmish mcid
  • McWithdraw ( prior : integer, repid : integer, units : list, options : list ) 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 : integer, y : integer ) returns true, if it is mine at pos x, y; otherwise false
  • MineExplosion ( x : integer, y : integer, wound : integer ) explosion of mine at x, y
  • MineOfUnit ( un : integer ) returns [x,y], if unit has placed remote charge; otherwise returns false
  • MoveAreaXY ( area : integer, x : integer, y : integer ) moves area, left upper corner of deltoid is at specified coordinates
  • Msg ( m : string ) Shortcut to BuildQuery(m,['OK']);
  • MultiplayerCRC ( ) sends a multiplayer control message (vlada)
  • MultiplayerSideAlive ( side : integer ) returns true, if there is at least one player playing this side
  • MultiRand ( min : integer, max : integer, n : integer ) random number in selected range, made by n Rand
  • MusicIsPlaying ( res : variable ) returns true if music is playing

N

  • NearestUnitToUnit ( units : list, un : integer ) Returns nearest unit from list units to unit un (ignoring un itself), or zero
  • NearestUnitToXY ( units : list, x : integer, y : integer ) Returns nearest unit from list units to position (x,y), or zero if units is empty
  • NewCharacter ( ident : string ) Loads and create a new global character (which was never saved before), returns its handle
  • NormalAttack ( side : integer, un : integer ) zruseni speciality pro stranu side na jednotku un

O

  • OpenCampaignFile ( fname : string ) opens campaign file fname.txt in mission directory and loads data (use only for debuging)

P

  • PlaceEnvironment ( x : integer, y : integer, envset : integer, num : integer ) creates environment num from set envset on x, y
  • PlaceEnvironmentList ( list : list ) creates environments; [[x,y,envset,num],[x,y,envset]...]; num may not be defined
  • PlaceHumanInUnit ( hum : integer, un : integer ) Places unplaced human into a placed or unplaced unit
  • PlaceMine ( x : integer, y : integer, side : integer, typ : integer ) 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 : integer, y : integer, envset : integer ) creates random environment from set envset on x, y
  • PlaceSeeing ( x : integer, y : integer, side : integer, range : integer ) places area of seeing (negative range for radar seeing)
  • PlaceTreesToArea ( area : integer, sets : list, count : integer, trials : integer, dist : integer ) 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 : integer, materialisation : boolean ) Places unit anywhere on map, returns true if succeedes If materialisation is true, unit is materialised
  • PlaceUnitArea ( un : integer, area : integer, materialisation : boolean ) Places unit into specified area, returns true if succeedes If materialisation is true, unit is materialised
  • PlaceUnitXY ( un : integer, x : integer, y : integer, materialisation : boolean ) Places unit at specified coordinates, returns true if succeedes If materialisation is true, unit is materialised
  • PlaceUnitXYR ( un : integer, x : integer, y : integer, r : integer, materialisation : boolean ) Places unit near specified coordinates (max. dist is r), returns true if succeedes If materialisation is true, unit is materialised
  • PlaceWeaponTurret ( un : integer, bc_weapon : integer ) place bc_weapon on turet or bunker un
  • PlayMusic ( ident : string ) stops current music and play new
  • PlayMusicNoLoop ( ident : string ) stops current music and play new, no other is played after this new ends
  • PlaySoundXY ( x : integer, y : integer, ident : string ) plays sound with ident from coordinates x, y
  • PrepareAttr ( sex : integer ) prepares random attributes for specified sex (or common, if zero)
  • PrepareCharacter ( ident : string ) Shortcut for PrepareOneCharacterFromSet(ident,1)
  • PrepareClassSkills ( cl : integer, level : integer ) prepares skills for human with class cl (this skill is near specified level) negative level means that this human is specialist
  • PrepareCustomSkills ( list : 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 : integer, lev : integer ) prepares parameters for a engineer with specified sex and level (0=random for sex)
  • PrepareEngineerSkills ( level : integer ) prepares skills for engineer, main skill is near specified level (uses PrepareClass)
  • PrepareHuman ( sex : integer, cl : integer, lev : integer ) 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 : integer, lev : integer ) prepares parameters for a mechanic with specified sex and level (0=random for sex)
  • PrepareMechanicSkills ( level : integer ) prepares skills for mechanic, main skill is near specified level (uses PrepareClass)
  • PrepareNewCharacter ( ident : string ) Prepares hc_ and uc_ structures for a new global character (which was never saved before)
  • PrepareOneCharacterFromSet ( ident : string, index : integer ) Same as CreateOneCharacter, but character is only prepared (not created yet), returns true if succeeds
  • PrepareScientist ( sex : integer, lev : integer ) prepares parameters for a scientist with specified sex and level (0=random for sex)
  • PrepareScientistSkills ( level : integer ) prepares skills for scientist, main skill is near specified level (uses PrepareClass)
  • PrepareSiberiteRocket ( ) prepares siberite rocket explosion
  • PrepareSoldier ( sex : integer, lev : integer ) prepares parameters for a soldier with specified sex and level (0=random for sex)
  • PrepareSoldierSkills ( level : integer ) prepares skills for soldier, main skill is near specified level (uses PrepareClass)
  • PriorityAttack ( side : integer, un : integer ) prioritni utok strany side na jednotku un
  • Prob ( per : integer ) returns true on per percent (Rand(1,100)<=per)

Q

  • Query ( ident : string ) Displays query dialog defined in texts, returns number of answer (1..n)

R

  • RaiseSailEvent ( num : integer ) raises immediately generic event SailEvent(num)
  • Rand ( min : integer, max : integer ) random number in selected range
  • RandHex ( border : boolean ) returns coordinate of random hex anywhere on map in format [x,y] if border is true, then bordering hexes can be included
  • RandHexArea ( area : integer, border : boolean ) 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 : integer, y : integer, r : integer, border : boolean ) 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
  • Randomize ( ) randomize SAIL random numbers
  • RandomizeAll ( ) randomize all random numbers in game
  • RemoveDepositXY ( x : integer, y : integer ) removes deposit of any type on specified coordinates
  • RemoveEnvironment ( x : integer, y : integer ) removes environment on x, y
  • RemoveEnvironmentArea ( area : integer ) removes all environment in area
  • RemoveEnvironmentWithoutRebuild ( x : integer, y : integer ) removes environment on x, y, don't count parameters, use only if normal RemoveEnviroment follows
  • RemoveMcUnits ( mcid : integer, units : list ) changes list of units of the macro mcid; returns true if succesfull
  • RemoveMcUnitsSpec ( mcid : integer, units : list, spec : integer ) changes spec list of units of the macro mcid; returns true if succesfull
  • RemoveMineOfUnit ( un : integer ) removes placed remote charge of unit, if exists
  • RemoveSeeing ( x : integer, y : integer, side : integer ) removes area of seeing (all matching areas)
  • RemoveTasks ( units : list ) removes all tasks of units
  • RemoveUnit ( un : integer ) Removes specified unit from map
  • Replace ( list : list, index : integer, item : variable ) 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 : integer, y : integer, envset : integer, num : integer ) replaces environment on x, y by element num from set
  • Researched ( side : integer, tech : integer ) returns true if tech is researched (obsolete)
  • ResetFog ( res : variable ) resets fog of war of all sides to black
  • ResetMultiScore ( res : variable ) resets multiplayer score for all sides
  • RevealFogArea ( side : integer, area : integer ) reveals fog for specified side in specified area
  • RewardPeople ( humans : list ) gives mission reward to list of human characters (use before save)

S

  • SaveCampaignFile ( fname : string ) saves actualised campaign file to fname.txt in mission directory (use only for debuging)
  • SaveCharacters ( humlist : list, ident : string ) 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 : variable, ident : string ) Saves variable to the save with specified ident
  • Say ( un : integer, ident : string ) Specified unit says sentence identified by ident
  • SayEffect ( ident : string ) Say effect identified by ident
  • SayNoFace ( un : integer, ident : string ) Specified unit says sentence identified by ident, it's face not appears
  • SayNoName ( un : integer, ident : string ) Specified unit says sentence identified by ident, it's name doesn't appear - use for enemies
  • SayRadio ( un : integer, ident : string ) Specified unit says over radio sentence identified by ident, use for off map units
  • SayRadioNoName ( un : integer, ident : string ) Specified unit says over radio sentence identified by ident, it's name doesn't appear
  • See ( side : integer, un : integer ) returns true if side sees specified unit
  • SeeArea ( side : integer, area : integer ) returns how much hexes of specified area side sees
  • SeeGreyArea ( side : integer, area : integer ) returns how much hexes of specified area side sees + gray hexes
  • SeeXY ( side : integer, x : integer, y : integer ) returns how good side sees specified hex
  • SelectiveQuery ( ident : string, list : list ) Displays query dialog defined in texts, returns number of answer (1..n) List contains numbers of items which will be shown
  • SelectUnits ( units : list ) add selection to units
  • SendSiberiteRocket ( x : integer, y : integer ) siberite rocket will explode at hex x,y
  • SetAlliedVictory ( side : integer, state : boolean ) sets allied victory state for side
  • SetAreaMapShow ( area : integer, id : integer ) shows area on map and/or minimap
  • SetArtifactRes ( side : integer, state : boolean ) allows researching of artifact technology
  • SetArtifactUse ( side : integer, number : integer, state : integer, lab : integer ) 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 : integer, toside : integer, att : integer, sym : boolean ) sets attitude to att (if sym then sets the symetric relation too)
  • SetAttr ( units : list, attr : integer, value : integer ) set attribute attr of specified human units to value
  • SetBattleFlag ( side : integer, x : integer, y : integer, options : list ) 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 : list, blevel : integer ) sets basic level of building(s)
  • SetBName ( units : list, bname : string ) sets building's display string
  • SetCargo ( units : list, mattype : integer, amount : integer ) sets amount of mattype (each unit in list); returns true if (all) succeed
  • SetClass ( units : list, value : integer ) sets immediatelly class of units to value
  • SetDir ( un : integer, dir : integer ) sets direction to an unplaced unit
  • SetFuel ( units : list, percent : integer ) sets fuel of specified combustion or solar vehicles list
  • SetGraphicsBrightness ( brightness : integer ) sets brightness of display
  • SetGraphicsGamma ( gamma : integer ) sets gamma correction of display
  • SetLastMission ( humans : list, number : integer ) changes last mission in which characters humans was present (nepouzivat)
  • SetLives ( units : list, value : integer ) set lives of specified units to value
  • SetMark ( units : list, mark : integer ) sets mark of units (masha flag)
  • SetMultiScore ( side : integer, score : integer ) sets multiplayer score of specified side
  • SetNoActivity ( un : integer ) resets activity of (laboratory) un; use VERY carefully!
  • SetRememberedX ( un : integer, value : integer ) sets ComReturn x coordinate of a unit
  • SetRememberedY ( un : integer, value : integer ) sets ComReturn y coordinate of a unit
  • SetResourceType ( base : integer, mattype : integer, amount : integer ) sets resource of specified type to the specified base
  • SetResourceVisibility ( x : integer, y : integer, side : integer ) sets deposit at pos x, y visible for side
  • SetRestrict ( btype : integer, side : integer, state : boolean ) sets restriction btype for side
  • SetSide ( units : list, value : integer ) set side of specified units to value
  • SetSideBase ( base : integer, value : integer ) set side of complete base
  • SetSkill ( units : list, sk : integer, value : integer ) set skill sk of specified human units to value
  • SetSpecResearch ( un : integer, time : integer, auto : boolean ) sets (laboratory) un to SpecResearch; auto mode; time - length; use carefully!
  • SetTag ( index : integer, value : integer ) sets tag[index] to value
  • SetTaskList ( un : integer, list : list ) sets tasks from tasklist (GetTaskList format) - use carefully!
  • SetTech ( tech : integer, side : integer, state : integer ) sets state of technology for side
  • SetTechProgress ( tech : integer, side : integer, percentage : integer ) sets progress of technology research for side
  • SetUnitDisplayNumber ( un : integer, num : integer ) displays number num over the unit un (even in final Original War)... zero means display nothing
  • SetWorkingProgress ( units : list, percentage : integer ) sets progress of action of unit(s) - construction, etc. (not research!)
  • ShiftX ( x : integer, dir : integer, dist : integer ) returns x coordinate shifted by dist hexes in direction dir
  • ShiftY ( y : integer, dir : integer, dist : integer ) returns x coordinate shifted by dist hexes in direction dir
  • ShowArea ( side : integer, area : integer ) reveal an area hiden by HideArea
  • SiberiteExplosion ( x : integer, y : integer ) create siberite explosion
  • SiberiteRocket ( x : integer, y : integer, n : integer, list : variable ) emulates n-th phase of siberite rocket explosion on list of units
  • SideShoot ( un : integer ) returns side, that last shoot unit un
  • SortListByListAsc ( items : variable, values : variable ) 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 : variable, values : variable ) Returns list items descending sorted by asociated integer list values. If lists aren't the same size, only smaller length of list is used
  • StopMusic ( ) stops music

T

  • TechNationAvailable ( tech : integer, nation : integer ) returns true if tech is available to nation
  • TeleportExit ( un : integer, x : integer, y : integer ) creates exit on [x,y] for teleport un
  • TeleportUnit ( un : integer, x : integer, y : integer, range : integer, sound : boolean ) 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 : string ) Returns true if there is a character or group of characters with specified ident in the save
  • TestVariable ( ident : string ) Returns true if there is a variable with specified ident in the save

U

  • UnitFilter ( units : list, filter : list ) filters list of unit using filter
  • UnitShoot ( un : integer ) returns unit, that last shoot unit un
  • UnitsInside ( un : integer ) returns list of units inside building (or vehicle) un
  • UnitsLinked ( un : integer ) returns number of linked vehicles on unit

V

  • ValidHex ( x : integer, y : integer ) {true if hex x,y is valid;} 0 - invalid, 1 - bordering, 2 - normal.
  • ViewMineAtPos ( x : integer, y : integer, side : integer ) reveal mine at pos x, y for side_fog[side]

W

  • Wait ( ticks : integer ) waits for specified number of ticks, ignores asynchronous mode
  • WaitForMc ( mcid : integer ) waits for finishing of macro mcid
  • WantsToAttack ( un : integer ) returns number of unit which is target of attack command of unit un, or zero
  • WaypointsFromMatrix ( matrix : list, areas : list ) 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 : variable, values : variable ) Returns SortListByListAsc(items,values)[1], or zero iv values is empty. Faster than SortListByListDesc

Y


Page generated in 0.005 sec
7 database queries called