Imperivm Modding WikiCKS · FORMATS · GUIDESEspañol
CKS TYPECKS reference

Squad

Browse its members and the signatures that accept or return this type.

45 members4 return it4 accept it

Members

45

Expand a member to read its notes or open its full entry. Each overload keeps its own identity.

MemberSignature and description
Player

Handler for this function, int Squad::Player(Squad): decodes the player from the Squad value.

Open full entry →
Squad
int Squad::Player()

Handler for this function, int Squad::Player(Squad): decodes the player from the Squad value.

No

Squad No returns the twelve-bit packed squad index.

Open full entry →
Squad
int Squad::No()

Squad No returns the twelve-bit packed squad index.

Eval

CKS scripting bridge returning the cached combat evaluation sum of a squad from offset [field].

Open full entry →
Squad
int Squad::Eval()

CKS scripting bridge returning the cached combat evaluation sum of a squad from offset [field].

State

Returns the squad's numeric state code as an integer obtained from an unsigned 16-bit value.

Scripts compare this result with state constants such as SS_Approach and SS_ApproachWait. This entry does not enumerate the meaning of every code. Behavior with an invalid squad reference is not yet documented.

Open full entry →
Squad
int Squad::State()

Returns the squad's numeric state code as an integer obtained from an unsigned 16-bit value.

SetState

updates a squad's internal state code and records the transition timestamp.

Open full entry →
Squad
void Squad::SetState(int)

updates a squad's internal state code and records the transition timestamp.

StateTime

Squad StateTime returns game [field] minus resolved squad record [field].

Open full entry →
Squad
int Squad::StateTime()

Squad StateTime returns game [field] minus resolved squad record [field].

Size

CKS scripting bridge and internal accessor returning the active unit count of a squad from offset [field].

Open full entry →
Squad
int Squad::Size()

CKS scripting bridge and internal accessor returning the active unit count of a squad from offset [field].

SrcGAIKA

The SrcGAIKA and DestGAIKA handlers return the squad record's 16-bit fields at [field] and [field], respectively.

Open full entry →
Squad
GAIKA Squad::SrcGAIKA()

The SrcGAIKA and DestGAIKA handlers return the squad record's 16-bit fields at [field] and [field], respectively.

DestGAIKA

The SrcGAIKA and DestGAIKA handlers return the squad record's 16-bit fields at [field] and [field], respectively.

Open full entry →
Squad
GAIKA Squad::DestGAIKA()

The SrcGAIKA and DestGAIKA handlers return the squad record's 16-bit fields at [field] and [field], respectively.

GAIKAIn

Squad::GAIKAIn resolves the packed Squad value and returns the zero-extended 16-bit field at squad record [field].

Open full entry →
Squad
GAIKA Squad::GAIKAIn()

Squad::GAIKAIn resolves the packed Squad value and returns the zero-extended 16-bit field at squad record [field].

Leader

CKS scripting bridge resolving a squad's leading unit handle from the head of its member collection.

Open full entry →
Squad
Unit Squad::Leader()

CKS scripting bridge resolving a squad's leading unit handle from the head of its member collection.

Units

Copies the Squad record's [field] member container into a new ObjList.

Open full entry →
Squad
ObjList Squad::Units()

Copies the Squad record's [field] member container into a new ObjList.

SetState

Updates state, masked flags and a game-clock snapshot for a resolved Squad.

Open full entry →
Squad
void Squad::SetState(int, int, int)

Updates state, masked flags and a game-clock snapshot for a resolved Squad.

ClrCmd

Updates a squad command state and notifies member units.

Open full entry →
Squad
void Squad::ClrCmd(int, int, int)

Updates a squad command state and notifies member units.

SetCmd

Updates squad state and flags and submits named zero-argument commands to member units.

Open full entry →
Squad
void Squad::SetCmd(int, int, int, str)

Updates squad state and flags and submits named zero-argument commands to member units.

SetCmd

Resolves the squad reference and delegates a command operation with target point coordinates.

Open full entry →
Squad
void Squad::SetCmd(int, int, int, str, point)

Resolves the squad reference and delegates a command operation with target point coordinates.

SetCmd

Updates squad command state and submits an object-target command to eligible member units.

Open full entry →
Squad
void Squad::SetCmd(int, int, int, str, Obj)

Updates squad command state and submits an object-target command to eligible member units.

Siege

Stores the final state argument before validating the target and delegates member siege planning.

Open full entry →
Squad
void Squad::Siege(Obj, int, int, int)

Stores the final state argument before validating the target and delegates member siege planning.

SendTo

Validates a packed Squad handle and delegates a destination command for an active squad.

Open full entry →
Squad
void Squad::SendTo(GAIKA, int)

Validates a packed Squad handle and delegates a destination command for an active squad.

AIDest

Returns a squad's AI destination identifier with a stored-field fallback.

Open full entry →
Squad
GAIKA Squad::AIDest()

Returns a squad's AI destination identifier with a stored-field fallback.

OrderDest

Resolves a Squad record and returns the order destination selected by a record helper.

Open full entry →
Squad
GAIKA Squad::OrderDest()

Resolves a Squad record and returns the order destination selected by a record helper.

DelOrder

Delegates a packed squad index to the player AI order-release helper.

Open full entry →
Squad
void Squad::DelOrder()

Delegates a packed squad index to the player AI order-release helper.

GetFlags

Behavior awaiting documentation.

Open full entry →
Squad
int Squad::GetFlags()Description pending

Description pending.

TestFlags

Tests whether a squad satisfies all bits in a specified bitmask against its internal flags at offset [field].

Open full entry →
Squad
bool Squad::TestFlags(int)

Tests whether a squad satisfies all bits in a specified bitmask against its internal flags at offset [field].

SetFlags

Behavior awaiting documentation.

Open full entry →
Squad
void Squad::SetFlags(int, int)Description pending

Description pending.

Lock

Behavior awaiting documentation.

Open full entry →
Squad
void Squad::Lock()Description pending

Description pending.

Unlock

Behavior awaiting documentation.

Open full entry →
Squad
void Squad::Unlock()Description pending

Description pending.

LastFightTime

Behavior awaiting documentation.

The extension records this primitive, but does not yet provide a description of its behavior.

Open full entry →
Squad
int Squad::LastFightTime()Description pending

Description pending.

InHolder

Scans squad members and rejects non-null entries with holder word FFFF.

Open full entry →
Squad
bool Squad::InHolder()

Scans squad members and rejects non-null entries with holder word FFFF.

pos

Resolves a squad leader and returns its point or (-1,-1).

Open full entry →
Squad
point Squad::pos()

Resolves a squad leader and returns its point or (-1,-1).

health

Computes current health by summing the [field] dword of each non-null registry object in the resolved squad member traversal.

Open full entry →
Squad
int Squad::health()

Computes current health by summing the [field] dword of each non-null registry object in the resolved squad member traversal.

maxhealth

Computes maximum health by summing the [field] dword of each non-null registry object in the resolved squad member traversal.

Open full entry →
Squad
int Squad::maxhealth()

Computes maximum health by summing the [field] dword of each non-null registry object in the resolved squad member traversal.

food

Sums food dwords of resolved squad members.

Open full entry →
Squad
int Squad::food()

Sums food dwords of resolved squad members.

FoodComing

Sums food amounts of player wagons whose command target belongs to the requested squad.

Open full entry →
Squad
int Squad::FoodComing()

Sums food amounts of player wagons whose command target belongs to the requested squad.

SendFoodWagon

Selects an eligible nearby food wagon (scanning existing wagons and buildings that can spawn one) and constructs/enqueues a "follow" command targeting a hero; its own selection algorithm is substantially richer than a simple nearby-wagon scan.

Open full entry →
Squad
bool Squad::SendFoodWagon(int, int)

Selects an eligible nearby food wagon (scanning existing wagons and buildings that can spawn one) and constructs/enqueues a "follow" command targeting a hero; its own selection algorithm is substantially richer than a simple nearby-wagon scan.

EvalAttach

Scores a candidate unit using squad size, affiliation equality and its virtual level result.

Open full entry →
Squad
int Squad::EvalAttach(Unit, int)

Scores a candidate unit using squad size, affiliation equality and its virtual level result.

Count

Counts squad members whose class template matches a named ancestry chain.

Open full entry →
Squad
int Squad::Count(str)

Counts squad members whose class template matches a named ancestry chain.

HasFreedom

Scans members for a particular object flag or a nonzero class-query result.

Open full entry →
Squad
bool Squad::HasFreedom()

Scans members for a particular object flag or a nonzero class-query result.

CalcGoAround

Chooses an intermediate GAIKA waypoint and reissues squad-member commands to route around an obstruction.

Open full entry →
Squad
bool Squad::CalcGoAround()

Chooses an intermediate GAIKA waypoint and reissues squad-member commands to route around an obstruction.

TakeNearbyItems

Selects an item holder near the squad leader and issues a getitems command.

Open full entry →
Squad
bool Squad::TakeNearbyItems(int)

Selects an item holder near the squad leader and issues a getitems command.

UseTeleport

Stores squad state/time and submits teleport plus point commands for live members.

Open full entry →
Squad
bool Squad::UseTeleport(Obj, int, str, point)

Stores squad state/time and submits teleport plus point commands for live members.

InvadeThroughGate

Behavior awaiting documentation.

Open full entry →
Squad
void Squad::InvadeThroughGate(Obj, int)Description pending

Description pending.

Dump

Delegates a nonzero packed squad value to a diagnostic formatter.

Open full entry →
Squad
void Squad::Dump()

Delegates a nonzero packed squad value to a diagnostic formatter.

AIRun

Forwards a packed squad value to a resolved registered script command.

Open full entry →
Squad
void Squad::AIRun(str)

Forwards a packed squad value to a resolved registered script command.

GetLastAttacker

Behavior awaiting documentation.

Open full entry →
Squad
Obj Squad::GetLastAttacker()Description pending

Description pending.

Return this type

4
MemberSignature and description
GetSquadGlobalSquad GetSquad(int, int)

Handler for this function, Squad GetSquad(int, int): packs player and index into a 4-byte Squad value.

Unit::GetSquadUnitSquad Unit::GetSquad()

Returns the zero-extended squad word linked from a resolved Unit.

SquadList::CurSquadListSquad SquadList::Cur()

Resolves a SquadList cursor and returns the current packed Squad value from its chunked storage.

selsqGlobalSquad selsq()

Selects a candidate with a particular flag and returns its squad selector extended with zero bits.

Accept this type

4
MemberSignature and description
SquadList::AddSquadListvoid SquadList::Add(Squad)

Creates a list entry when necessary and passes the supplied Squad low word to its append helper.

NearestHospitalGlobalGAIKA NearestHospital(Squad)

Scores eligible friendly hospital strongholds for a squad and returns the best GAIKA index.

Gate::InsideGatebool Gate::Inside(Squad)

Tests a native gate/member path predicate universally over squad members.

Gate::OutsideGatebool Gate::Outside(Squad)

Tests the zero-result gate/member path predicate universally over squad members.

Coverage and limits

38 / 45 members with a published description.

These lists come from published signatures. “Accept” counts explicit parameters, excluding the method receiver; reference variants (&) are included. No inheritance hierarchy is asserted. Undocumented names, units and effects remain unresolved.