Skip to content

Hex & Areaslots

← CHK Functions · code catalog

Friendly names for CHK category 4. Each maps to a top-level CHK code.


CheckHexOwner

CheckHexOwner(x: int, y: int)  ·  chk 2

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(2,12,8)


CheckUnitsFrom

CheckUnitsFrom(areaSlot: int, areaCode: int, regimeNr: int, not_From_PeopleNr: int)  ·  chk 8

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

Parameters

  • areaSlot (int) — AreaSlot
  • areaCode (int) — AreaCode
  • regimeNr (int) — RegimeNr
  • not_From_PeopleNr (int) — Not From PeopleNr

Example: chk(8,1,1,4,2)


CheckLandscapeType

CheckLandscapeType(x: int, y: int)  ·  chk 11

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(11,12,8)


CheckLandscapeSprite

CheckLandscapeSprite(x: int, y: int)  ·  chk 12

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(12,12,8)


CheckSlot

CheckSlot(x: int, y: int, slot: int)  ·  chk 13

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

Parameters

  • x (int) — X
  • y (int) — Y
  • slot (int) — Slot#

Example: chk(13,12,8,1)


CheckHQFor

CheckHQFor(x: int, y: int)  ·  chk 24

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(24,12,8)


CheckSFTypeInArea

CheckSFTypeInArea(areaSlot: int, areaCode_1_all_hexes: int, sFType: int, regime: int)  ·  chk 31

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

Parameters

  • areaSlot (int) — AreaSlot
  • areaCode_1_all_hexes (int) — AreaCode (-1=all hexes)
  • sFType (int) — SFType
  • regime (int) — Regime

Example: chk(31,1,1,1,4)


CheckPowerPointsInArea

CheckPowerPointsInArea(areaSlot: int, areaCode: int, regime: int, land_only_0_no_check_1_land_theater_only: int)  ·  chk 32

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

Parameters

  • areaSlot (int) — AreaSlot
  • areaCode (int) — AreaCode
  • regime (int) — Regime
  • land_only_0_no_check_1_land_theater_only (int) — Land only (0=no check, 1=land theater only)

Example: chk(32,1,1,4,1)


CheckSFTypeInXY

CheckSFTypeInXY(x: int, y: int, sFType_1_all: int, regime: int)  ·  chk 33

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

Parameters

  • x (int) — X
  • y (int) — Y
  • sFType_1_all (int) — SFType (-1=all)
  • regime (int) — Regime

Example: chk(33,12,8,1,4)


CheckSFTypeGroupInXY

CheckSFTypeGroupInXY(x: int, y: int, sFType_Group_1_all: int, regime: int)  ·  chk 40

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

Parameters

  • x (int) — X
  • y (int) — Y
  • sFType_Group_1_all (int) — SFType Group (-1=all)
  • regime (int) — Regime

Example: chk(40,12,8,1,4)


CheckLocTypeXY

CheckLocTypeXY(x: int, y: int)  ·  chk 55

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(55,12,8)


CheckStrucPtsXY

CheckStrucPtsXY(x: int, y: int)  ·  chk 56

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(56,12,8)


CheckSpecialType

CheckSpecialType(x: int, y: int)  ·  chk 76

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(76,12,8)


CheckSpecialSprite

CheckSpecialSprite(x: int, y: int)  ·  chk 77

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(77,12,8)


CheckHexVP

CheckHexVP(x: int, y: int)  ·  chk 98

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(98,12,8)


CheckHexPeople

CheckHexPeople(x: int, y: int)  ·  chk 102

Returns people number of location here. if any. if not returns -1.

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(102,12,8)


CheckHexName

CheckHexName(x: int, y: int)  ·  chk 115

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(115,12,8)


CheckLocName

CheckLocName(locNr: int)  ·  chk 116

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

Parameters

  • locNr (int) — LocNr

Example: chk(116,1)


CheckHexLocNr

CheckHexLocNr(x: int, y: int)  ·  chk 117

Returns -1 if no Location in hex. 0 or higher if present.

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(117,12,8)


CheckRoadType

CheckRoadType(x: int, y: int, direction: int)  ·  chk 124

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.

Parameters

  • x (int) — X
  • y (int) — Y
  • direction (int) — Direction

Example: chk(124,12,8,1)


CheckRiverType

CheckRiverType(x: int, y: int, direction: int)  ·  chk 125

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.

Parameters

  • x (int) — X
  • y (int) — Y
  • direction (int) — Direction

Example: chk(125,12,8,1)


CheckBridge

CheckBridge(x: int, y: int, direction: int)  ·  chk 126

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.

Parameters

  • x (int) — X
  • y (int) — Y
  • direction (int) — Direction

Example: chk(126,12,8,1)


CheckRoadTypeSpecific

CheckRoadTypeSpecific(x: int, y: int, specific_Road_Type: int)  ·  chk 129

Check is specied roadtype is present in this hex. Returns 1 if is. Returns 0 if not.

Parameters

  • x (int) — X
  • y (int) — Y
  • specific_Road_Type (int) — Specific Road Type

Example: chk(129,12,8,1)


CheckMoveOriginX

CheckMoveOriginX(x: int, y: int)  ·  chk 193

You should only call this function if ExecSetMoveMatrix or ExecSetSupplyMatrix has been called before it. Any hex that has a moveable score (<9999) and that is not the source hex of the matrix called will have an origin. These 2 functions (x and y) will return that origin coordinate. -1 is returned if no origin hex is available.

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(193,12,8)


CheckMoveOriginY

CheckMoveOriginY(x: int, y: int)  ·  chk 194

You should only call this function if ExecSetMoveMatrix or ExecSetSupplyMatrix has been called before it. Any hex that has a moveable score (<9999) and that is not the source hex of the matrix called will have an origin. These 2 functions (x and y) will return that origin coordinate. -1 is returned if no origin hex is available.

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(194,12,8)


CheckSlotOwnerPercentage

CheckSlotOwnerPercentage(areaSlot: int, startval: int, endval: int, owner: int)  ·  chk 201

Returns a percentage of the specified areaslots between start and endvalue occupied by owner regime slot#

Parameters

  • areaSlot (int) — AreaSlot#
  • startval (int) — Startval (>=)
  • endval (int) — Endval (<=)
  • owner (int) — Owner

Example: chk(201,1,1,1,1)


CheckSlotNotInAIList

CheckSlotNotInAIList(areaSlot: int, startval: int, endval: int, max_Dist: int)  ·  chk 202

Within areaslot returns a value out of the range between start and endvalue occupied by current regime owner slot# closest to SetAreaXY specified. Returns -1 if nothing found. Function only looks within supply range of SetAreaXY and only within MaxDist.

Parameters

  • areaSlot (int) — AreaSlot#
  • startval (int) — Startval (>=)
  • endval (int) — Endval (<=)
  • max_Dist (int) — Max Dist

Example: chk(202,1,1,1,1)


CheckSlotValueFirstXY

CheckSlotValueFirstXY(areaSlot: int, value: int, what_1_x_2_y_3_reg: int)  ·  chk 203

Within areaslot returns the x,y coordinate first found with the value given (x or y). Only values >= 1 work.

Parameters

  • areaSlot (int) — AreaSlot#
  • value (int) — Value
  • what_1_x_2_y_3_reg (int) — What? 1=x,2=y,3=reg

Example: chk(203,1,1,1)


CheckNeighbour

CheckNeighbour(x: int, y: int, direction: int, mode: int)  ·  chk 223

Direction=1-6. Mode=1 returns X. Mode=2 returns Y. Returns -1 if neighbour is off-map.

Parameters

  • x (int) — X
  • y (int) — Y
  • direction (int) — Direction
  • mode (int) — Mode

Example: chk(223,12,8,1,1)


CheckLocationID

CheckLocationID(locationSlot: int)  ·  chk 239

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

Parameters

  • locationSlot (int) — LocationSlot#

Example: chk(239,1)


CheckLocationSlot

CheckLocationSlot(location_ID: int)  ·  chk 240

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

Parameters

  • location_ID (int) — Location ID

Example: chk(240,1)


CheckHexLocNr2

CheckHexLocNr2(x: int, y: int)  ·  chk 257

Only use of Supply Bases and Sources. Returns -1 if no Location in hex. 0 or higher if present.

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(257,12,8)


CheckLocTypeXY2

CheckLocTypeXY2(x: int, y: int)  ·  chk 258

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

Parameters

  • x (int) — X
  • y (int) — Y

Example: chk(258,12,8)


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