Table of Contents

Editor Faq







CheckWar([RegimeNr in Question],[Relation with RegimeNr])

CheckPeace([RegimeNr in Question],[Relation with RegimeNr])

CheckUnitsFrom([AreaSlot],[AreaCode],[RegimeNr],[Not From PeopleNr])

















CheckActionCard([Regime Owner],[Card Nr]) : Returns 0 if the card (a card you've been dealt but not played) is NOT in the deck. Returns 1 if it is.



CheckHistoricActionCard([Regime Owner],[Card Nr]) : Returns 0 if the historic card (a card you've played in the past) is NOT in the deck. Returns 1 if it is.

CheckSFTypeInArea([AreaSlot],[AreaCode (-1=all hexes)],[SFType],[Regime])

CheckPowerPointsInArea([AreaSlot],[AreaCode],[Regime],[Land only (0=no check, 1=land theater only)])

CheckSFTypeInXY([X],[Y],[SFType (-1=all)],[Regime])

CheckRegimeKills([Regime],[SFType (-1=all)],[Round (-1=all rounds)],[Report 0=qty, 1=power pts])

CheckRegimeLosses([Regime],[SFType (-1=all)],[Round (-1=all rounds)],[Report 0=qty, 1=power pts])

CheckRegimeProduction([Regime],[SFType (-1=all)],[Round (-1=all rounds)],[Report 0=qty, 1=power pts])




CheckSFTypeGroupInXY([X],[Y],[SFType Group (-1=all)],[Regime])

CheckAIThinkSpeed([Regime]) : Gives back the AI think speed level. 0=Normal, 100=Slow, 250=Very Slow. (in old AT this was the production bonus- if ever merge keep this in mind)


CheckUnitOwner([Unit Nr])

CheckUnitHQ([Unit Nr])

CheckUnitX([Unit Nr])

CheckUnitY([Unit Nr])

CheckUnitHistorical(ID)([Unit Nr])

CheckUnitIsHQ([Unit Nr])

CheckRegimeRelation([Reg1],[Reg2]) : Returns 0 for war, 1 for peace, 2 for alliance

CheckUnitInHQChain([Unit Nr],[HQ Nr])

CheckUnitCommanderStaffPercent([Unit Nr])

CheckUnitHQPower([Unit Nr])

CheckFirstUnitWithHistoricalNr([Historical Nr])




CheckStringList([Stringlist ID],[Row],[Col])

CheckStringReplace([From String],[Which substring],[Replace with what])

CheckRegimeVar([Regime Nr],[Var Nr])

CheckHistoricalUnitTempVar([Unit Nr (or -1 to use hist.)],[TempVar Nr (1-5)],[Use Historical Unit Nr])

CheckCommanderDescript([Unit Nr])

CheckCommanderXP([Unit Nr])

CheckStringListRows([StringList ID])

CheckStringListCols([StringList ID])

CheckStringListLastID() : Use the CheckStringListLastID to get a STRINGID, which you need to change or read anything from it. To get the last row you have to use another function.


CheckUnitSFType([Unit #],[SFType Group (-1 for none)],[Specific SFType (-1 for none)]) : Returns the number of individuals in this unit



CheckRegimeUnitsMorale([Reg]) : Returns the average morale of all units on map for this regime

CheckRegimeUnitsExperience([Reg]) : Returns the average experience of all units on map for this regime

CheckUnitTempOwner([Unit Nr]) : Returns the real owner. If this is a subregime it will actually give back the subregime regime # instead of the uberregime which the normal CheckUnitOwner will return.

CheckUnitPower([Unit Nr]) : Returns the real total power points in the unit.



CheckUnitSelectable([Unit Nr]) : Returns 0 if not selectable. returns 1 if selectable.

DistanceClosestEnemyHex([Minimum (AI)VP value? 0=any],[from X],[from Y],[Max distance (-1=no maximum)]) : Returns the distance. Max distance can be set to keep processing time down if necc.

CheckEnemyTroopsCloseBy([Max Distance],[from X],[from Y],[Distance divider modifier (0=none)]) : Max distance sets circle in which too look. Distance divider modifier set by what the power points of a unit are divided. if 0 they are not divided. if 1 they are divided by distance. if 2 by double distance.. etc..

CheckUnitMor([Unit#]) : Keep in mind this is an average of the subformations.

CheckSFTypePower([SFType#],[SFType Targetgroup],[1=attack score, 2=defend score])


CheckSFTypeHP([SFType#],[SFType Targetgroup],[1=attack hp, 2=defend hp])

CheckSFTypeMoveType([SFType#]) 87) CheckSFTypeMoveRedux([SFType#])



CheckSFTypeFuelUse([SFtype#],[1=ForMovement, 2=ForCombat])







CheckDipOffer([From Regime],[Too Regime])

CheckDefinedAreaID([Slot#(0-9)],[Value#]) : Returns first Defined area with that slot&value coupled to it.

CheckHexPeople([X],[Y]) : Returns people number of location here. if any. if not returns -1.

CheckNonSleepingRegimesToCome() : Returns the number of regimes that are still to be played in this round that are not put to sleep.

CheckCalcGetPercent([Var X],[of Var Y]) : Returns the percentage that var X makes up of var Y.

CheckLocCounter() : Returns the number of locations. remember counting starts at 0.

CheckLocX([Location#]) : Returns the number of locations. remember counting starts at 0.

CheckLocY([Location#]) : Returns the number of locations. remember counting starts at 0.

CheckMaxFuelUse([Regime (-1=all)],[Fuel Type (-1=all)])



CheckHexLocNr([X],[Y]) : Returns -1 if no Location in hex. 0 or higher if present.

CheckHexUnitCounter([X],[Y]) : Returns -1 if no units. Returns 0 is one unit (in slot

. Returns 1 if two units present (one in slot 0, one in slot1), etc..

CheckHexUnit([X],[Y],[Unit Slot]) : You should use CheckHexUnitCounter to determine the number of units on the hex. Start with slot=0!

CheckStringLength([String]) : Return of 0 means an empty string has been tested.

CheckUnitStaffPercent([Unit Nr],[CheckMode=0,1,2]) : Return the staff % of the unit… you might want to use this check in combination with CheckUnitHqPower since distance is not checked for in this event. Check Mode 0 returns staff%. Check Mode 1 returns combat mod%, Check Mode 2 returns morale mod%.



CheckRoadType([X],[Y],[Direction]) : Direction: 0=n, 1=ne, 2=se, 3=s, 4=sw, 5=nw. Use direction -1 to test for all directions: first type found is returned. -1 is returned if none.

CheckRiverType([X],[Y],[Direction]) : Direction: 0=n, 1=ne, 2=se, 3=s, 4=sw, 5=nw. Use direction -1 to test for all directions: first type found is returned. -1 is returned if none.

CheckBridge([X],[Y],[Direction]) : Direction: 0=n, 1=ne, 2=se, 3=s, 4=sw, 5=nw. Use direction -1 to test for all directions. Returns 0 for no bridge and 1 for yes bridge.

CheckHisVar([His Unit ID#],[Type#]) : Returns value if type is present. If type is not present it returns 0.

CheckUnitRecon([Unit#],[Include land theater 0=no, 1=yes],[Include sea theater 0=no, 1=yes],[Include air theater 0=no, 1=yes]) : Returns total recon points in the unit.

CheckRoadTypeSpecific([X],[Y],[Specific Road Type]) : Check is specied roadtype is present in this hex. Returns 1 if is. Returns 0 if not.

CheckHistoricalUnitAverageXP([Unit#]) : Will look up other units on map with the same historical unit and return average xp

CheckRandomRowStringList([Stringlist ID],[Col used as weight (-1=none)])

CheckFindInStringList([Stringlist ID],[In Col],[Find Value]) : Returns row# where value is found or -1 if not.


CheckGetHistoricalUnitID([Slot#]) : Keep in mind that this function should be used to scroll through all historical units using a looper from 0 to CheckTotalHistoricalUnits. Use this function to get the actual ID to be used in other functions.

CheckGetHistoricalUnitRegime([Historical Unit ID#])

CheckPeopleUnderHQ([HQ level to check],[Troop people],[HQ people],[regime#]) : A complicated function. HQ level 1 is HQs with historical unit set to Corps. HQ level 2 is only HQs with historical HQ set to Army, 3=armygroup, 4=high command.. Function returns % of total power points of people on map is under a hq whose historical unit people is set to hqppl. This function could for example be used to check if axis minor are under wehrmacht HQs or under their own.

CheckGetHistoricalUnitPeople([Historical Unit ID#])

CheckGetHistoricalUnitType([Historical Unit ID#]) : Returns the type. 5=corps, 6=army, etc..

CheckGetHistoricalUnitOfficer([Historical Unit ID#]) : returns 1 if officer, returns 0 if not. Basicly the length of officer name is checked.

CheckCompareString([String1],[String2],[Mode]) : Case insensitive. Mode=1 means it looks if the strings are exactly alike. Mode=2 same but all spaces are removed. Mode=3 means it looks if part of string1 is equal to string 2. Function returns 1 if equal or 0 if not.

CheckMin([Value1],[Value2]) : Returns the lowest of the 2 values entered

CheckMax([Value1],[Value2]) : Returns the highest of the 2 values entered

CheckGetHistoricalUnitName([Historical Unit ID#])

CheckGetHistoricalSubparts([Historical Unit ID#])

CheckTotalSupplyUse([Regime #]) : Returns the BasicSupplyUse of all troops on the map added up.

CheckUnitAP([Unit#]) : Keep in mind this is the lowest AP subformations.

CheckPbemPlayer([Regime#]) : Expert use only! Returns either 1 for pbem player 1 (challenger), 2 for pbem player 2(opponent) or 0 if not set (not a started pbem++ game for example)

CheckDrawGame() : Returns 0 if not. Returns 1 if this is a draw game.

CheckTotalActioncards([Regime #],[Category # (-1=all)],[Color # (-1=all)]) : Returns the total number of action cards the regime has in hand.

CheckAICombatMod([Regime]) : Gives back the AI combat modifier. 0=none, >0 is the percentual bonus. (This is the AI difficulty in the scenario setup screen)

CheckIsUnitAPreDef([Unr#]) : Returns -1 if not a predef. Returns the predef ID # if it is a predef.

CheckRuleVar([RuleVar#],[Mulitply by 100? 0=no 1=yes]) : Multiply option is there because some rulevar have single values like 0.4 or 0.03. And the scripting sytem can only handle integers.

CheckUnitXP([Unit#],[Only if staff (0=no,1=yes)]) : Keep in mind that it returns the highest XP found in any subformation.

CheckGetHistoricalUnitCommanderName([Historical Unit ID#]) : Returns the commandername (not the his.unit name!). If no commander empty string is returned.

CheckFindHistoricalUnitWithCommanderName([Commander Name]) : Returns the first historical unit ID number of a unit ON the map with this commander name present. -1= none find.

CheckUnitHQChanged([Unit Nr]) : Returns 1 if the unit HQ has been changed in this turn. Returns 0 if not. And here are the execs:


OldStyleMessage (DEPRECIATED)([Regime1],[Regime2],[BackPic#],[FrontPic#]) : Is depreciated. Avoid using it

ExecChangeDip (DEPRECIATED)([RegimeNr1],[RegimeNr2]) : Reverses the diplomatic relation from war to peace. Or from peace to war. Use a check to see current relation. IS DEPRECIATED. USE EXECCHANGERELATION INSTEAD.


ExecAddRegimeMorale([RegimeNr],[Mutation +/- pts])



ExecSetSleep([Regime#],[Sleep=1, Awake=0])

ExecJoinRegime([Losing Regime#],[Added to Regime#],[Including Units 1=yes,0=no])

ExecMessage([Regime1],[Regime2],[Overwrite scndesc >0=yes],[Event Pic Nr (-1=none)]) : if reg1=-1 and reg2=-1 then message is send to all regimes.

  1. Options inside the actual message itself
  2. [tempstring]nr[/tempstring]
  3. [regimename]nr[/regimename]
  4. [hexname]x,y[/hexname]
  5. [unitname]nr[/unitname]
  6. [gamevar]nr[/gamevar] ⇒game var value
  7. [regimevar]regnr,nr[/regimevar] ⇒regime var value
  8. [tempvar]nr[/tempvar]
  9. [hisname]hisnr[/hisname]
  10. [realhisname]hisID[/realhisname]
  11. [commander]hisnr[/commander]
  12. [realcommander]hisID[/realcommander]
  13. [portrait]hisnr[/portrait]
  14. [realportrait]hisID[/portrait]
  15. [date]roundNr[/date]



ExecJoinArea([Areaslot# (0-9)],[Areacode],[To Regime#],[Units flee too areacode (-1=destr,-2=keephex)]) : All units not allied with the new owner will be either flee or be destroyed or removed or keep hex.



ExecDoStructuralDamage([x],[y],[damage pts]) : If you give negative ammount of points it is handled as a repair

ExecSetLandscape([X],[Y],[New LT#])

ExecSetSprite([X],[Y],[New Sprite#])


ExecChangePeopleCombatMod([People#],[PeopleGroupOwner#],[New Combat Mod in %])

ExecMoveTypeModifier([MoveType#],[Percentage of normal movecost (100%=normal)])

ExecUnitTypeModifier([UnitType#],[Percentage of normal combat att/def (100%=normal)])

ExecWheaterColor([Red Component (0=no change, 255=full)],[Green Component (0=no change, 255=full)],[Blue Component (0=no change, 255=full)]) : Changes the colour of the prehex sprite. But only of its core sprite not if its optional 64 border sprites.

ExecChangeRiver([X],[Y],[From River #],[Too River #])

ExecChangeRoad([X],[Y],[From Road #],[Too Road #])

ExecChangeBridge([X],[Y],[Direction = 0(North),1,2,3,4,5(NorthWest)],[-1=no bridge, >=0 = bridge])

AI_SetAIVP([X],[Y],[Regime Nr#],[AIVP amount. 0(none) - 999])

ExecChangeLocationType([X],[Y],[Loctype (-1=remove any location)],[People #])

ExecGiveSupply([X ],[Y],[Supply Points to the top hq of the closest hq to x,y],[Overrule recipient regime with regime #]) : Overule recipient is inactive if put to 0. If no overrule the supplies are given to closest unit owned by regime that owns hex. But >0 is overrule 1=reg 0, 2=reg1 !!!! This +1 shift is inhere to keep backwards compatible with AdvTactics scenarios.

ExecSetRuleVar([Rulevar # ],[New Value],[Behind comma… 0=no action.. >0=divide new value by 100 to set a decimal.]) 32) ExecChangePeople([X],[Y],[Changes the people at location x,y])

ExecGiveReinforcement([X],[Y],[Predef# to use],[Multiplier])

ExecGiveActionCard([Card Nr],[Regime Nr])

ExecReduceReadiness([Regime Nr (-1=all)],[People Nr (-1=all)],[%rdn loss],[%chance per unit])

ExecAddHistoryActionCard([Card Nr],[Regime Nr])

ExecRemoveHistoryActionCard([Card Nr],[Regime Nr])

ExecLTReduceReadiness([Regime Nr],[People Nr (-1=all)],[%rdn loss],[LandscapeType Nr])

ExecLTReduceMorale([Regime Nr],[People Nr (-1=all)],[%mor loss],[LandscapeType Nr])

ExecSetItemCost([ItemType Nr],[Set Prod Cost])

ExecSetBaseMorale([Regnr],[Basemorale]) : Not only sets base morale of regime, but also of unterregimes to the same as well as reducing all morale of all units with the same percentual ammount as the basemorale lost.

ExecChangeVP([X],[Y],[new VP amount. 0(none) - 999])

ExecRemoveActionCard([Card Nr],[Regime Nr])

ExecAIConservative([Regime Nr],[Convervative.. 100% = normal >100% more defensive. <100 more aggressive])

ExecPlayActionCard([Regime Nr],[Action Card Nr])

ExecExecuteEvent([Event Nr]) : IS DEPRECIATED BY CallFunction. tempvar 0,1,4,5 are passed on (but not returned).

ExecActionCardName([Actioncard Nr])

ExecActionCardPPCost([Actioncard Nr],[New PPCost (-1 = keep same)],[PPCost absolute increase or decrease (0=no change)],[PPCost % increase or decrease (0=no % change)])

ExecReplaceLandscapeSprite([Landscape nr]) : Actually loads a new PreHex graphic from the graphics directory.

ExecMutateSFType([AreaSlot],[AreaCode],[From Sftype#],[Too Sftype# (-1=remove)]) : After completion sets # of changed individuals in tempvar[999].

ExecSingleMutateSFType([AreaSlot],[AreaCode],[From Sftype#],[Too Sftype# (-1=remove)]) : Note: Currents turn units take precedence

ExecSingleMutateSFTypeXY([X],[Y],[From Sftype#],[Too Sftype# (-1=remove)]) : Note: Currents turn units take precedence

ExecAntiSupplyRangeMod([MoveType#],[Percentage of current AP (100%=normal)])

ExecChangePeopleCombatModVS([People#],[Versus PeopleGroupOwner#],[New Combat Mod in %])

ExecRemoveTroops([X],[Y],[SFType group],[Percentage to remove])

ExecRemoveTroopsByPeople([X],[Y],[specific people #],[Percentage to remove])

ExecRemoveTroopsByLowMorale([X],[Y],[Morale =< then],[Percentage to remove])

ExecSetLabel [old]([X (tempvar999>0 overwrites datastring)],[Y],[Type (0-10)],[Slot (1-2)]) : If there is a value > 0 in tempvar999 it is ammended to the end of the string.

ExecReadinessLossByArea([Areaslot],[Value of slot],[Readiness loss],[Chance to lose this (x%)])

ExecOffensiveMod([X],[Y],[SfTypeGroup# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecDefensiveMod([X],[Y],[SfTypeGroup# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecOffensiveModByPeople([X],[Y],[People# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecDefensiveModByPeople([X],[Y],[People# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecOffensiveModByRegime([Regime # (-1=all)],[People # (-1=all)],[SfTypeGroup# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecDefensiveModByRegime([Regime # (-1=all)],[People # (-1=all)],[SfTypeGroup# (-1=all)],[Absolute Modifier (0=none, -50 = -50%, +50 = +50%)])

ExecLoad_UnitTransfer([Regime # ],[AreaSlot #],[Max Per Hex])

ExecAreaSpreadOut([AreaSlot # ],[Divideby ])

ExecSetLoctypeDestruct([LocType#],[LandscapeType#],[Sprite #])

CheckPreDef([Predef#]) : Returns unit# of this predef ID#.

ExecCopyActionCard (+Set Name)([From#],[Too#]) : If the Too# specified is a slot higher then existing number of actioncards, the number of actioncards slots will be extended

ExecSetActionCard (+Set Text)([Card#],[TempVar0],[TempVar1],[EventPic#])

ExecGetReconFrom([From Regime#])

ExecAddExperience([People# (-1=all)],[Points to add (+/-)],[Minimum XP],[Maximum XP])

ExecMaxResearch() : Every Suformation thats not in a predef unit that can upgrade if its regime has the research will upgrade

ExecHexActionCard([X],[Y],[ActionCard# (-1=no actioncard)]) : Will place an action card on the hex in question. The card is executed immediatly upon the player conquering the hex. And will cause a popup to appear immediatly (if message used) Only if hex is conquered by combat or direct move in. So always place on locations because they cannot be conquered by ZOC. If an AI regime takes the card it cannot load a new game, select a unit or a hex.

ExecSetHistoricUnitMove([Historic HQ #],[Defend Defined Area #],[Attack Defined Area #],[Stance (1=def,2=norm,3=att)])

ExecChangeAIPower([Regime],[X],[Y],[Power Points]) : If positive power points given it is meant to help influence the behaviour of the AI. This way you can set reinforcements to a certain regime in the area that hex x,y is in. But you can also use this function to set negative powerpoints versus a regime to simulate immediate pressure and force the AI to keep a certain reserve in the area.

ExecPlayEventWav() : Adds a sound file from the sound directory to the next ExecMessage, it will be played when the message is actually shown. So the effect is synchronized.

ExecLoadCampaignRoomBackground([Event Picture# to be used])


ExecPlayEventBackgroundWav() : Loads the sound file from the sound directory and plays it immediatly.

-DEPRECIATED- ExecHistoricalUnitForAddUnit([Historical Unit#],[Copy? (1=yes,0=no)],[Number (only if copy)],[NATO counter # (only if copy, <1=keep same)]) : You should use ExecAddHistoricalUnit instead. Old description: If you want added units to be linked to a historical unit you have to call this exec before you call the addunit. If you make a copy, we'll use the given historical unit as a template but change its name to number + string. By putting a ',' in the string you can then specify the shortname. The shortname is always number+string. Once set it stays valid till changed or end of event in which it is declared.

ExecSetAI([Regime #],[AI (1=yes,0=no)],[ProdBonus(0,100,250)]) : If you want to set a regime to AI player or make an AI a human player.

ExecUnitRdnModify([Unit #],[Absolute modifier pts +/-],[People (-1=all)],[SFTypeGroup (-1=all)]) : Change stats of subformations in a specified unit.

ExecUnitMorModify([Unit #],[Absolute modifier pts +/-],[People (-1=all)],[SFTypeGroup (-1=all)]) : Change stats of subformations in a specified unit.

ExecUnitXpModify([Unit #],[Absolute modifier pts +/-],[People (-1=all)],[SFTypeGroup (-1=all)]) : Change stats of subformations in a specified unit.

ExecUnitApModify([Unit #],[Absolute modifier pts +/-],[MoveTypeGroup (-1=all)],[SFTypeGroup (-1=all)]) : Change stats of subformations in a specified unit.

ExecUnitGiveTroops([Unit #],[Predef Unit#]) : Add all troops in PreDef unit to this Unit.

ExecUnitOffensiveBonus([Unit #],[Absolute modifier pts +/-],[People (-1=all)],[SFTypeGroup (-1=all) (>=100 = specific sftype -100)]) : Change stats of subformations in a specified unit. If you set modifier to 0 it resets the offmod to 0. Each point is a percentage point. If you specify a sftypegroup >=100 then you are actually specifiying a specific SFType Nr.

ExecUnitDefensiveBonus([Unit #],[Absolute modifier pts +/-],[People (-1=all)],[SFTypeGroup (-1=all) (>=100 = specific sftype -100)]) : Change stats of subformations in a specified unit. If you set the modifier to 0 it resets the defmod to 0. Each point is a percentage point. If you specify a sftypegroup >=100 then you are actually specifiying a specific SFType Nr.

ExecUnitSelectable([Unit #]) : The specified unit will now be selectable in the 'select a unit' popup screen. Use this exec in a pre-event from an actioncard.

ExecSetMessageStyle([Message Style (0,1,2)]) : The specified style will be used for the remainder of this event. 0=normal. 1=black, 2=text cloud+black. It also allows you to set an optional footnote (messageNote1). only shown in style 1 + 2. Directly under the main message in italics.

ExecSetMessageNote2() : Sets a string for underwriting of picture of character with text cloud. Shown in style 2.

ExecChangeRelation([RegimeNr1],[RegimeNr2],[Diplomatic Relation #],[Hide Message (1=yes hide)]) : Sets the relation between regime 1 and 2 to relation 0-2. 0=war, 1=peace, 2=allied.

ExecAddRegime([Copy From],[Set Uberregime]) : EXPERT USE ONLY!!!. Only use before start of game. Adds a regime and copies all settings from specified reigme. You can also set name of new regime. You can also set an uberregime here. Automaticly will ally with uberregime.

ExecRemoveRegime([RegimeNr],[Add stuff too RegimerNr]) : EXPERT USE ONLY!!!. Only use before start of game. You can set RegimeNr to -1 and then the exec will try to find a regime with the specified name to delete.

ExecAddOOB([Regime],[Historical Unit]) : Sets the historical unit to the regime and also everything in the OOB of the selected historical unit.

ExecSetRegimeColor([Regime],[Red (0-255)],[Green (0-255)],[Blue (0-255)]) : Sets the color of the regime. And you can overwrite the Name if you want too. Leave string blank to keep name.

ExecAddHistoricalUnit([X],[Y],[Historical Unit],[Dispersion in Hex]) : If Historical unit is a Model an instance of it will be created. If it is not it will be put on the map itself. If you set Dispersion to 0 all will go normal. Set dispersion>0 to simulate scatter effect on same sea/land type and regime type as selected for target hex.

ExecRemoveHistoricalUnit([Historical Unit]) : All units assigned to this exact Historical Unit will be removed.

ExecSetGameVar([GameVar #],[New Value])

ExecSetTempVar([TempVar #],[New Value])

ExecSetRegimeVar([Regime #],[Variable #],[New Value])

ExecSetTempString([Tempstring #],[New Value])

ExecSetStringList([Stringlist ID #],[Row],[Col],[New Value])

ExecMoveRegimeUp([RegNr]) : EXPERT USE ONLY!!!. You can overrule with using name and setting Regnr=-1. Moves this regime to the end of the list of regimes. Do only use in editor or startup screen for it might screw up things if used in game.

ExecSetRecon([X],[Y],[RegNr],[Pts]) : Sets recon for this regime only on this hex only.

ExecChangeCommanderSkill([Unit#],[CombatMod +/-],[MoraleMod +/-],[StaffPts +/-]) : Inrease or diminish the officers stats.

ExecChangeCommanderTemp([Unit# (-1= use hist.unit#)],[TempVar#(1-5)],[New Value],[Use Historical Unit#])

ExecChangeCommanderDescript([Unit#],[New Description])

ExecChangeCommanderOverlay([Unit#],[New overlay filename]) : Reloads the overlay file for this commander. specifying an empty string will result in no overlay

ExecCommanderAddDeckCardUsingStringList([Unit#],[StringList CardList ID#]) : Picks a weighted chance card from the stringlist in question. will not take doubles. will add text to description

ExecCommanderAddAutoEventUsingStringList([Unit#],[StringList EventList ID#]) : Picks a weighted auto-event from the stringlist in question. will not take doubles. will add text to description

ExecAddStringList([Rows],[Cols]) : Adds a whole new stringlist object to the game data. Use the CheckStringListLastID to get its ID, which you need to change or read anything from it.

ExecAddStringListCells([StringList ID],[Extra Rows],[Extra Cols]) : If you specify 0 will NOT add anything. specify 1 for adding one row or col. You can add rows and cols at the same time. Rows are added at the bottom, Cols on the right.

ExecRemoveStringListRow([StringList ID],[Row Number])

ExecRemoveStringListCol([StringList ID],[Col Number])

ExecChangeAIDefensive([Regime],[X],[Y],[Defensive Bonus %]) : >0 is a percentual defensive bonus for defending this area for this regime. NEW AI ONLY

ExecGiveCommanderXP([Unit#],[XP to give or take +/-])

ExecMoveUnit([Unit #],[New X],[New Y]) : Keep in mind combat can occur immediatly after the move. Rebel Battle Mode will be used.

ExecChangeUnitRegime([Unit #],[New Regime#]) : Keep in mind combat can occur immediatly after the move. Rebel Battle Mode will be used.

ExecChangeLandscapeMoveCost([Landscape #],[MovementType #],[AP Cost])

ExecModifyHitpoints([SFType # (-1=all)],[SFTypeGroup # (-1=all)],[Modifier (100=same, 50=half, 200=double) #])

ExecModifyAirOverrule([SFType # (-1=all)],[SFTypeGroup # (-1=all)],[Modifier (100=same, 50=half, 200=double) #])

ExecModifyEntrenchmentSpeed([SFType # (-1=all)],[SFTypeGroup # (-1=all)],[Modifier (100=same, 50=half, 200=double) #])

ExecModifySupplyStock([SFType # (-1=all)],[SFTypeGroup # (-1=all)],[Modifier (100=same, 50=half, 200=double) #])

ExecModifyAttackScore([SFType # (-1=all)],[SFTypeGroup # (-1=all)],[Versus SFTypeGroup # (-1=all)]) : Modifies AttackArt,AttackPower,AttackPowerDef all 3.

ExecModifyUnitSupply([Regime (-1=none)],[Specific Unit (-1=none)],[Modifier % (100=keep same, 50=half, 200=double)],[Modifier absolute (0=nill, -x , +x )]) : Increases or decreases supplies of the unit. cannot go over max supplystore.

ExecRemoveUnits([Regime #])

ExecLoad_HistoricalTransfer([Regime # ])

ExecRemoveTroopsByReinforcementGroup([X (-1 = from unit)],[Y (or unit #)],[Reinforcement group],[Percentage to remove])

ExecChangeCommander([Unit#],[Historical Unit#]) : Replace the commander with that from a historical unit.

ExecSetSupplyMatrix([Source X],[Source Y],[AreaSlot #],[Regime #]) : Sets movecost value on each hex. if not in supply value will be set to 9999. It will not overwrite a lower value with a higher value. So make sure you set the areaslot matrix to 9999 before you call. this is done to allow multiple sources for making the matrix.

ExecClearMatrix([AreaSlot #],[Value]) : Sets the specified slot for all hexes to specified value

SetUberRegime([ForRegime],[UberRegime (-1=none)])

SetCardXY([X],[Y]) : If you are calling a card who needs a hex input. set it with this exec.

ExecRemoveTroopsForNextHistorical([Reinforcement group],[Loss %]) : For each event you have to set the loss levels. These values are reset per event. If set any unit added with AddHistorical will suffer these losses.

ExecSetHistoricalCounter([Historical Unit],[New Counter Value])

ExecSetHistoricalUnitHQ([Historical Unit],[New unit # HQ],[Historical Unit # HQ]) : Sets all units that belong to this historical unit to the unit or historical unit HQ # specified.. Historical ⇐ 0 means unit is used.

ExecAddAntiSupply([X],[Y],[Regime],[Points]) : Must be used in early turn check in order to be used after regular setting of AS and before Supply system…


ExecQuit() : Quits the player back to the main menu. Can only be played from the research hand cards screen!

ExecAIStance([Regime],[Stance (0=no overrule, 1=att, 2=def, 3=meeting)]) : If 0 the regime with most powerpoints is considered the attacker. If 3 too, but if 3 then this regime also gets the meeting flag.

ExecReduceLandInitialEntrench([LandscapeType (-1=all)],[Percentage (100=same. 50=less >100=more)])


ExecReduceAntiStructural([SFType (-1=all)],[Percentage (100=same. 50=less >100=more)])

ExecReduceTroops([SFType (-1=all)],[PeopleType (-1=all)],[Remove x%],[+ remove between 0-y% random])

ExecSFTypePower([SFType],[Targetgroup# (-1=all)],[Attack score],[Defend score])

CallFunction([Name of function to call]) : Case of name does not matter, but must be exact otherwise. The tempvar900-999 and tempstring900-999 will be copied to the receiving function and can be altered by it and will be returned back to the calling function. this way you dont have to use gamevars like in ExecExecute. (You can use these call by name feature to make functionlibs that can be loaded by import all). Tempvar 0,1,4,5 are copied to called function, but not back again.


ExecSFTypeHP([SFType],[Targetgroup# (-1=all)],[Attack HP],[Defend HP])




ExecSFTypeFuelUse([SFType#],[ForMove (10ap)],[ForAttack (combatround)])

ExecSetRegimePeople([Regime# ],[People # (or -1=to leave as is) ],[officerpool # (or-1=to leave as is)])


ExecSetMatrix([Slot],[Operation],[Disallow over sea (0=no, 1=yes)]) : You cannot set operation yet. For now it just subtracts 1 of the value and copies if higher then neighbour. Thus make sure to make a clearmatrix(0) and then set coordinates you want to spread out.

ExecSetHexOwner([X],[Y],[Owner #])

ExecRewardPowerOn([X],[Y],[Power Above],[Multi]) : If AI can get more then power above on X,Y coordinate. all pts above this treshold will be multiplied by multi and added to score. This gives AI incentive to get a certain build up here. so it must be able to hold it to get it.. This is only used in Init AI so if you use uberregime only the uberregime needs this setting. This setting is wiped clean after every AI has played. You thus need to set this in early turn event.

ExecRemoveunit([Unit #]) : Removes specific Unit

ExecSetTurnString([Short String]) : if you set it to '' then it will not overrule the date or round. Keep the string short to make it fit.

ExecSetRound([Round]) : Do not use! It will screw with the statistics. Never set higher. You can only set lower then current round.

ExecSortStringListID([Column# to sort on],[]) : Remember first column is column 0. Highest ends at bottom, lowest at top.

ExecChangeUnitEntrenchment([Unit#],[-/+ entrenchment pts]) : Will auto cut at 0 or maximum entrench for sftype in hex..


ExecSetHistoricUnitToGroup([Historic HQ/Unit/Div #],[To Group with HQ/Unit/Div# in it]) : This should be called in an 'AI Init Check' since it re-orders strategic groups (after makegroups) and before going into strategic analysis (findbeststrategy).

ExecMoveHistoricalUnit([Historical Unit #],[New X],[New Y],[Optional Historical HQ #]) : If you specify >0 for optional HQ all units attached to the HQ will be moved. you can specify -1 for historical unit if you specify hq.

ExecSetUnitName([Unit#],[New Name],[]) : Will set name of all belonging to units historical unit if using historical units. Shortname is only applied if historical unit is present.

ExecDateMode([0=rounds, 1=dates],[days per round])

ExecUnitPeopleModify([Unit #],[Change People# (-1=all)],[Too People#]) : Change the people in the unit.

ExecSetUnitSelected([Unit #]) : Set the unitselected. -1= no unit selected.

ExecAICombatMoveMod([Regime #],[Combat Bonus],[Movement Bonus]) : Combat bonus can be everything between 0-999%, movement bonus between 0-100%.

ExecAIChangeRoleScore([SFType #],[AI Role # (0-49)],[New score]) : Allows you to change AI role scores ingame so to influence AI production

ExecReloadGraphic([Current filename],[New filename]) : expert use only. part or whole of filename (current filename) is looked for in all loaded graphics and replaced by new filename. use only the filename itself like 'background2.png' for the file to be replaced. use only filename like 'background2b.png' for the string that replaces it.

ExecAIProductionResourceComplient() : Will call the AI function that makes sure that production is research complient. If rulevar(875) is active this is called by AI after setting production. However if you script the production with events you might want to call this function add the end of that scripting in some scenarios or give the AI unlimited resources instead.

ExecChangeDipOffer([RegimeNr1],[RegimeNr2],[Diplomatic Offer # (0=none or 1=offer)]) : Does not give message. You have to that manually. Sets the offer mode to either 0= cancel offer or 1=give offer

ExecSetLabel([X ],[Y],[Type (0-10)],[String]) : Slot 1 is always used. Auto complete is used and name can stretch several hexes.


ExecMutateRandomSFType([People (-1=all)],[Random percentage],[From Sftype#],[Too Sftype# (-1=remove)]) : The random percentage determines ammount of sftype to mutate. After completion sets # of changed individuals in tempvar[999].

ExecRemoveTroopsGlobal([SFType group (-1=all)],[People (-1=all)],[Reinforcement Type (-1=all)],[Percentage to remove]) : Remove percentage is not exact in this function… its the chance for each individual that it will be removed. If it is set to 999 empty HQ units will also be removed. If not only empty normal units will be removed.

ExecGiveReinforcement2([SFType#],[People#],[Experience],[Multiplier]) : Uses SetCardXY for coordinate to drop troops input.

ExecSetMoveMatrix([Source X],[Source Y],[AreaSlot #],[MoveType #]) : Sets movecost value on each hex for specified movetype. if not reachable will be set to 9999. It will not overwrite a lower value with a higher value. So make sure you set the areaslot matrix to 9999 before you call. this is done to allow multiple sources for making the matrix. The matrix is calculated for the regime that owns the hex.

ExecSetHisVar([His.Unit ID#],[Type #],[Value],[Nato Counter (0= do not set)])

ExecRemoveHisVar([His.Unit ID#],[Type #])

ExecCommanderAddDeckCard2([Unit# (or -1)],[Historical Unit# (or -1)],[DeckCard#],[Percentage Chance % (or -1,-2,-3,-4,-5,-6)]) : Either specify a normal unit# or a historical unit#. If instead of percentage you specify -1 your remove specified card if present, if you specifify -2 you remove all deck cards. if you specify -3 you'll remove all hand cards and all deck cards. If you specify -4 you'll only remove the hand card and not the deck card. If specify -5 you will not add any card but if the card is present set its chance to 0%. If -6 then you will also not add a card but if card is present set its chance to 100%.

ExecCommanderAddAutoEvent([Unit#],[AutoEvent#],[Percentage Chance %])

ExecSetReconUnit([X],[Y],[RegNr],[Recon points]) : Sets recon for this regime only on this hex and all its neighbours up to range. Uses the ammount of recon points the specified unit# has.

ExecCommanderPool([Historical unit #],[In Pool? 1=yes, 0=no])

ExecClearCommander([Historical Unit# (or -1)],[Clear HandCards (1=yes)],[Clear DeckCards (1=yes)],[Clr Events,StaffSiz,Mormod,combatmod (1=yes)]) : Allows you to clean all cards & events associated with a historical unit.

ExecChangeCommanderSkill2([Historical Unit#],[CombatMod],[MoraleMod],[StaffPts]) : Same as other function. But here the historical unit# instead of the unit# is targeted. And the setting is absolute not +/-.

ExecSwitchUnitModel([Unit#],[To Model ID#],[Change name as if new unit 0=no ,1=yes]) : This function will attempt to change the whole historical unit# of unit# to a new model and will implement the changes immediately. A new name will be also be given if specified so.

ExecClearStringList([Stringlist ID #]) : Delets all rows of this stringlist.

ExecSetPeopleMorale([People #],[Under People Group#],[New Morale],[Reset all troops 0=no,1=yes]) : Reset=1 sets all morale to regime base morale * people morale as if in start of scenario.

AI_SetTacticalScript([Historical Unit ID#],[Hex Target X],[Hex Target Y],[Attack Towards (1-6) -1=no attack])

ExecActionCardText([Actioncard Nr],[New Title],[New Text on card]) : The difference with ExecActionCardName is that you can here also set the text on the card + input can be done with tempstrings with this exec

ExecSetUnitCapacityPoints([Unit#],[LandCap Pts +/-],[RailCap Pts +/-],[]) : Allows you to remove or add capacity points to a unit. Use in late turn so the unit Cap point gain has already been processed before use of this exec.

ExecRemoveTroopsUnderHistorical([SFType group (-1=all)],[Historical Unit],[Reinforcement Type (-1=all)],[Percentage to remove]) : Remove percentage is not exact in this function… its the chance for each individual that it will be removed. Compared to its namesake exec this one only affects units under command of the historical unit (HQ!) specified. Only units directly under the historical unit are affected and HQs are always excluded. (if you want to set the HQs you'll have to do it manually)

ExecSetHistoricalUnitOwner([Old owner #],[New owner #])

ExecSetPbemPlayer([Regime #],[PBEM++ Player number #]) : Expert use only!. You can switch PBEM++ player here. only set to 1=player 1(challenger) or 2=player 2(opponent).

ExecSetDrawGame() : When this is set the game will be considered game over by the PBEM++ server and a draw game at it. Same for non PBEM++ games by the way.

ExecRemoveSupplyUnderHistorical([Historical Unit],[Percentage of supply to leave],[New Supply Consumption % (normal is 100%)]) : this one only affects units under command of the historical unit (HQ!) specified. Only units directly under the historical unit are affected and HQs are always excluded. (if you want to set the HQs you'll have to do it manually)

ExecSetInterceptRdnStop([For Regime (-1=all)],[Percentage for intercept]) : Only affects units with air units in them. percentage example: 75 means only at 75% rdn.

ExecSetHistoricalUnitMaxRecruit([ID#],[MaxRecruit#(-1=unl,0=none)]) : A function that allows you to change the max recruit

ExecSetHistoricalUnitType([ID#],[Type#(5=corps,6=a,7=ag,8=high)]) : A function that allows you to change the type. this is usefull to make 1st panzer army immobile and the sov front too.

ExecChangeDateAdd([add x Day],[add x Month],[add x Year])

ExecSetAllUnitReady([regime. -1=all]) : Sets all units with max supply, ap and readiness.

ExecRemoveActiveOfficersFromStringlist([regime#],[stringlist ID]) : Looks up the officer historical ID in column 0 and sets availability to 0 in column 1. Active officers are officers that are in the pool or on the map in a unit.

ExecMutateRandomSFTypeUnderHis([HistoricalID],[Random percentage],[From Sftype#],[Too Sftype# (-1=remove)]) : The random percentage determines ammount of sftype to mutate. After completion sets # of changed individuals in tempvar[999].

ExecRemovePeopleOfficersFromStringlist([people#],[stringlist ID]) : Looks up the officer historical ID in column 0 and sets availability to 0 in column 1 if the officer has specified people#.

ExecRemoveFromOfficerPool([regime# (-1=all)],[people# (-1=all)],[VarType (-1=ignore condition)],[=VarQty]) : Removes any officers from the officerpool of specified regime who has the specified characeristics. You can deted vartype = varqty to tailormake catch a specific officer.

ExecModifyStockpiles([Under Historical Unit#],[Modifier (100=same, 50=half, 200=double) #]) : The function will cap at maximum stockpiles. So you can specify 999 or more modifier to give unit max. and 0 to set stockpile to nothing.

editor/editor_faqs.txt · Last modified: 2016/02/26 18:51 (external edit)
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki