Skip to content

Historical Units

← EXE Functions · code catalog

Friendly names for EXE category 13. Each maps to a top-level EXE code.


AddHistoricalUnit

AddHistoricalUnit(x: int, y: int, historicalUnitId: int, dispersionInHex: int)  ·  exe 110

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. Set x=-1 to only create a new historical unit (based on specified model) and not place any unit on the map.

Parameters

  • x (int) — X
  • y (int) — Y
  • historicalUnitId (int) — Historical Unit ID
  • dispersionInHex (int) — Dispersion in Hex

Example: exe(110,12,8,1,1)


RemoveHistoricalUnit

RemoveHistoricalUnit(historicalUnit: int)  ·  exe 111

All units assigned to this exact Historical Unit will be removed.

Parameters

  • historicalUnit (int) — Historical Unit

Example: exe(111,1)


ChangeCommanderSkill

ChangeCommanderSkill(unit: int, combatmod: int, moralemod: int, staffpts: int)  ·  exe 119

Inrease or diminish the officers stats.

Parameters

  • unit (int) — Unit#
  • combatmod (int) — CombatMod +/-
  • moralemod (int) — MoraleMod +/-
  • staffpts (int) — StaffPts +/-

Example: exe(119,1,1,10,10)


ChangeHisTempValue

ChangeHisTempValue(unit: int, tempvar: int, newValue: int, useHistoricalUnit: int)  ·  exe 120

Keep in mind you can also use hisvars to store data. of which you have unlimited quantity. For aiZoneListNr only number above >0 are considered valid.

Parameters

  • unit (int) — Unit# (-1= use hist.unit#)
  • tempvar (int) — TempVar#(1-5), 6=aiZoneListNr
  • newValue (int) — New Value
  • useHistoricalUnit (int) — Use Historical Unit#

Example: exe(120,1,1,1,1)


ChangeCommanderDescript

ChangeCommanderDescript(hisUnitId: int, newDescription: string)  ·  exe 121

No in-game description provided; behaviour inferred from the function name.

Parameters

  • hisUnitId (int) — His Unit ID#
  • newDescription (string) — New Description

Example: exe(121,1,'Text')


ChangeCommanderOverlay

ChangeCommanderOverlay(unit: int, newOverlayFilename: string)  ·  exe 122

Reloads the overlay file for this commander. specifying an empty string '' will result in no overlay

Parameters

  • unit (int) — Unit#
  • newOverlayFilename (string) — New overlay filename

Example: exe(122,1,'Name')


CommanderAddDeckCardUsingStringList

CommanderAddDeckCardUsingStringList(unit: int, stringlistCardlistId: int)  ·  exe 123

Picks a weighted chance card from the stringlist in question. will not take doubles. will add text to description

Parameters

  • unit (int) — Unit#
  • stringlistCardlistId (int) — StringList CardList ID#

Example: exe(123,1,1)


CommanderAddAutoEventUsingStringList

CommanderAddAutoEventUsingStringList(unit: int, stringlistEventlistId: int)  ·  exe 124

Picks a weighted auto-event from the stringlist in question. will not take doubles. will add text to description

Parameters

  • unit (int) — Unit#
  • stringlistEventlistId (int) — StringList EventList ID#

Example: exe(124,1,1)


GiveCommanderXP

GiveCommanderXP(unit: int, xpToGive: int)  ·  exe 130

No in-game description provided; behaviour inferred from the function name.

Parameters

  • unit (int) — Unit#
  • xpToGive (int) — XP to give or take +/-

Example: exe(130,1,10)


CreateCommander

CreateCommander(regime: int, overruleOfficerPoolStringlistId: int)  ·  exe 131

No in-game description provided; behaviour inferred from the function name.

Parameters

  • regime (int) — Regime #
  • overruleOfficerPoolStringlistId (int) — Overrule Officer Pool StringList ID (-1=dont)

Example: exe(131,4,1)


RemoveTroopsForNextHistorical

RemoveTroopsForNextHistorical(reinforcementGroup: int, loss: int)  ·  exe 149

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.

Parameters

  • reinforcementGroup (int) — Reinforcement group
  • loss (int) — Loss %

Example: exe(149,1,50)


SetHistoricalCounter

SetHistoricalCounter(historicalUnit: int, newCounterValue: int)  ·  exe 150

No in-game description provided; behaviour inferred from the function name.

Parameters

  • historicalUnit (int) — Historical Unit
  • newCounterValue (int) — New Counter Value

Example: exe(150,1,1)


SetHistoricalUnitHQ

SetHistoricalUnitHQ(historicalUnit: int, newUnitHq: int, historicalUnitHq: int)  ·  exe 151

Sets all units that belong to this historical unit to the unit or historical unit HQ # specified.. Historical <= 0 means unit is used.

Parameters

  • historicalUnit (int) — Historical Unit
  • newUnitHq (int) — New unit # HQ
  • historicalUnitHq (int) — Historical Unit # HQ

Example: exe(151,1,1,1)


MoveHistoricalUnit

MoveHistoricalUnit(historicalUnit: int, newX: int, newY: int, optionalHistoricalHq: int)  ·  exe 183

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.

Parameters

  • historicalUnit (int) — Historical Unit #
  • newX (int) — New X
  • newY (int) — New Y
  • optionalHistoricalHq (int) — Optional Historical HQ #

Example: exe(183,1,1,1,1)


SetHisVar

⚠️ Deprecated / obsolete. Avoid in new mods.

SetHisVar(hisUnitId: int, type: int, value: int, natoCounter: int)  ·  exe 203

No in-game description provided; behaviour inferred from the function name.

Parameters

  • hisUnitId (int) — His.Unit ID#
  • type (int) — Type #
  • value (int) — Value
  • natoCounter (int) — Nato Counter (0= do not set)

Example: exe(203,1,1,1,1)


RemoveHisVar

RemoveHisVar(hisUnitId: int, type: int)  ·  exe 204

No in-game description provided; behaviour inferred from the function name.

Parameters

  • hisUnitId (int) — His.Unit ID#
  • type (int) — Type #

Example: exe(204,1,1)


CommanderAddDeckCard2

CommanderAddDeckCard2(unit: int, historicalUnit: int, deckcard: int, percentageChance: int)  ·  exe 205

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%.

Parameters

  • unit (int) — Unit# (or -1)
  • historicalUnit (int) — Historical Unit# (or -1)
  • deckcard (int) — DeckCard#
  • percentageChance (int) — Percentage Chance % (or -1,-2,-3,-4,-5,-6)

Example: exe(205,1,1,1,50)


CommanderAddAutoEvent

CommanderAddAutoEvent(unit: int, autoevent: int, percentageChance: int, hisUnitIdOverrule: int)  ·  exe 206

No in-game description provided; behaviour inferred from the function name.

Parameters

  • unit (int) — Unit#
  • autoevent (int) — AutoEvent#
  • percentageChance (int) — Percentage Chance % (-1=delete if present)
  • hisUnitIdOverrule (int) — His.Unit ID overrule#

Example: exe(206,1,1,50,1)


ClearCommander

ClearCommander(historicalUnit: int, clearHandcards: bool, clearDeckcards: bool, clrEvents: bool)  ·  exe 209

Allows you to clean all cards & events associated with a historical unit.

Parameters

  • historicalUnit (int) — Historical Unit# (or -1)
  • clearHandcards (bool) — Clear HandCards (1=yes)
  • clearDeckcards (bool) — Clear DeckCards (1=yes)
  • clrEvents (bool) — Clr Events,StaffSiz,Mormod,combatmod (1=yes)

Example: exe(209,1,1,1,1)


ChangeCommanderSkill2

ChangeCommanderSkill2(historicalUnit: int, combatmod: int, moralemod: int, staffpts: int)  ·  exe 210

Same as other function. But here the historical unit# instead of the unit# is targeted. And the setting is absolute not +/-.

Parameters

  • historicalUnit (int) — Historical Unit#
  • combatmod (int) — CombatMod
  • moralemod (int) — MoraleMod
  • staffpts (int) — StaffPts

Example: exe(210,1,1,10,10)


SetHisVar2

SetHisVar2(hisUnitId: int, type: int, value: int, smallgfx: int)  ·  exe 241

If a smallGfx is specified the value and the smallgfx will be displayed for officers.

Parameters

  • hisUnitId (int) — His.Unit ID#
  • type (int) — Type #
  • value (int) — Value
  • smallgfx (int) — SmallGfx (-1= no smallgfx)

Example: exe(241,1,1,1,1)


SetHistoricalUnitName

SetHistoricalUnitName(historicalUnitId: int, newName: string, newShortName: string)  ·  exe 251

No in-game description provided; behaviour inferred from the function name.

Parameters

  • historicalUnitId (int) — Historical Unit ID
  • newName (string) — New name
  • newShortName (string) — New short name

Example: exe(251,1,'Name','Name')


SetHistoricalSmallGfx

SetHistoricalSmallGfx(historicalUnitId: int, newSmallGfxSlot: int)  ·  exe 279

No in-game description provided; behaviour inferred from the function name.

Parameters

  • historicalUnitId (int) — Historical Unit ID
  • newSmallGfxSlot (int) — New Small Gfx slot#

Example: exe(279,1,1)


SetHistoricalColor

SetHistoricalColor(historicalUnitId: int, redModifier: int, greenModifier: int, blueModifier: int)  ·  exe 291

Remember you cannot set the color using Historical unit colors, only the modifier to the regime or people color of the counter. For example -50 or +100.

Parameters

  • historicalUnitId (int) — Historical Unit ID
  • redModifier (int) — Red modifier
  • greenModifier (int) — Green modifier
  • blueModifier (int) — Blue modifier

Example: exe(291,1,200,100,50)


SetHistoricalRegime

SetHistoricalRegime(historicalUnitId: int, regimeSlot: int)  ·  exe 307

Sets the historical to the correct regime.

Parameters

  • historicalUnitId (int) — Historical Unit ID
  • regimeSlot (int) — Regime slot#

Example: exe(307,1,4)


This doc was generated from extracting data from Shadow Empire version 1.32a on 2026-06-05 06:56 UTC.