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

Hero

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

29 members4 return it3 accept it

Members

29

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

MemberSignature and description
FormKeepMoving

For nonzero continuation, refreshes formation movement, sets hero state 3 and a flag, stores the integer as VM wait ticks and reports status 1. Zero continuation clears the flag and reports status 0.

Open full entry →
Hero
void Hero::FormKeepMoving(int)

For nonzero continuation, refreshes formation movement, sets hero state 3 and a flag, stores the integer as VM wait ticks and reports status 1. Zero continuation clears the flag and reports status 0.

FormSetupAndMoveTo

After holder-related waits, the point overload clears the Hero path controller, passes the point, two integers, and bool to formation destination change; on success it installs a new controller, enables formation move mode, and sets Hero [field] to 3.

Open full entry →
Hero
void Hero::FormSetupAndMoveTo(point, int, int, bool)

After holder-related waits, the point overload clears the Hero path controller, passes the point, two integers, and bool to formation destination change; on success it installs a new controller, enables formation move mode, and sets Hero [field] to 3.

FormSetupAndMoveTo

After holder-related waits, clears the hero path controller and selects an object destination change or a point destination derived from the object, depending on an object flag. On success, installs a new controller and sets hero state 3.

Open full entry →
Hero
void Hero::FormSetupAndMoveTo(Obj, int, int, bool)

After holder-related waits, clears the hero path controller and selects an object destination change or a point destination derived from the object, depending on an object flag. On success, installs a new controller and sets hero state 3.

TimePastLastAttack

Returns the current game tick value minus the Hero's stored last-attack tick, or the current value when the Hero handle is invalid.

Open full entry →
Hero
int Hero::TimePastLastAttack()

Returns the current game tick value minus the Hero's stored last-attack tick, or the current value when the Hero handle is invalid.

LastAttacker

Hero::LastAttacker copies Hero [field] into a returned object's low word and zeroes result dword 1.

Open full entry →
Hero
Obj Hero::LastAttacker()

Hero::LastAttacker copies Hero [field] into a returned object's low word and zeroes result dword 1.

army

Hero::army returns an ObjList wrapper pointing to the resolved Hero at [field], increments the list reference counter at [field], and uses an empty newly allocated list if receiver resolution fails.

Open full entry →
Hero
ObjList Hero::army()

Hero::army returns an ObjList wrapper pointing to the resolved Hero at [field], increments the list reference counter at [field], and uses an empty newly allocated list if receiver resolution fails.

maxarmy

Reads the Hero army capacity field for this function.

Open full entry →
Hero
int Hero::maxarmy()

Reads the Hero army capacity field for this function.

IsHeroArmyFull

Compares army count and capacity for this function.

Open full entry →
Hero
bool Hero::IsHeroArmyFull()

Compares army count and capacity for this function.

FormRadius

For a valid Hero, FormRadius calls [field] on Hero [field] and pushes its four-byte result; an invalid Hero yields zero.

Open full entry →
Hero
int Hero::FormRadius()

For a valid Hero, FormRadius calls [field] on Hero [field] and pushes its four-byte result; an invalid Hero yields zero.

FormPathLeft

For a valid Hero with a nonnull formation path object at Hero [field] then [field], FormPathLeft returns the result of that object’s virtual method at vtable [field]; otherwise it returns zero.

Open full entry →
Hero
int Hero::FormPathLeft()

For a valid Hero with a nonnull formation path object at Hero [field] then [field], FormPathLeft returns the result of that object’s virtual method at vtable [field]; otherwise it returns zero.

HasArmy

Hero::HasArmy returns whether the resolved Hero dword at offset [field] is nonzero.

Open full entry →
Hero
bool Hero::HasArmy()

Hero::HasArmy returns whether the resolved Hero dword at offset [field] is nonzero.

SetFormation

SetFormation resolves the supplied string in the formation map and, when found and Hero [field] exists, passes the string text to the formation object shape-setting helper; unknown names and invalid Heroes call the error helper.

Open full entry →
Hero
void Hero::SetFormation(str)

SetFormation resolves the supplied string in the formation map and, when found and Hero [field] exists, passes the string text to the formation object shape-setting helper; unknown names and invalid Heroes call the error helper.

formation

For a valid Hero, the formation getter copies the text of the shape object reached through Hero [field] and formation [field] into a VM string result; an invalid Hero returns an empty string.

Open full entry →
Hero
str Hero::formation()

For a valid Hero, the formation getter copies the text of the shape object reached through Hero [field] and formation [field] into a VM string result; an invalid Hero returns an empty string.

DetachArmy

Delegates Hero::DetachArmy to the army cleanup routine.

Open full entry →
Hero
void Hero::DetachArmy()

Delegates Hero::DetachArmy to the army cleanup routine.

CancelArmyBoard

Delegates Hero::CancelArmyBoard to a holder and army validation routine.

Open full entry →
Hero
void Hero::CancelArmyBoard()

Delegates Hero::CancelArmyBoard to a holder and army validation routine.

SetFinalPartyOrientation

Stores the transformed orientation request point for this function.

Open full entry →
Hero
void Hero::SetFinalPartyOrientation(point)

Stores the transformed orientation request point for this function.

GetFinalPartyOrientation

Returns the transformed stored orientation point for this function.

Open full entry →
Hero
point Hero::GetFinalPartyOrientation()

Returns the transformed stored orientation point for this function.

HasFinalPartyOrientationRequest

Tests the stored orientation request pair for this function.

Open full entry →
Hero
bool Hero::HasFinalPartyOrientationRequest()

Tests the stored orientation request pair for this function.

SetSkill

Resolves the hero reference and delegates the skill-level update.

Open full entry →
Hero
void Hero::SetSkill(int, int)

Resolves the hero reference and delegates the skill-level update.

GetSkill

CKS scripting bridge returning current skill level for a given skill index.

Open full entry →
Hero
int Hero::GetSkill(int)

CKS scripting bridge returning current skill level for a given skill index.

UseSkill

Resolves a Hero handle and returns whether the native Hero skill dispatcher accepted the supplied skill ID.

Open full entry →
Hero
bool Hero::UseSkill(int)

Resolves a Hero handle and returns whether the native Hero skill dispatcher accepted the supplied skill ID.

AvailableSkillPoints

CKS scripting bridge resolving hero pointer and returning unspent available skill points.

Open full entry →
Hero
int Hero::AvailableSkillPoints()

CKS scripting bridge resolving hero pointer and returning unspent available skill points.

SkillInEffect

Resolves a Hero and tests whether an indexed skill-effect slot differs from the -1 sentinel.

Open full entry →
Hero
bool Hero::SkillInEffect(int)

Resolves a Hero and tests whether an indexed skill-effect slot differs from the -1 sentinel.

autocast

Resolves a Hero and reads bit 2 from its flags dword at [field].

Open full entry →
Hero
bool Hero::autocast()

Resolves a Hero and reads bit 2 from its flags dword at [field].

SetAutocast

Clears or sets a flag in the resolved Hero according to the boolean argument.

Open full entry →
Hero
void Hero::SetAutocast(bool)

Clears or sets a flag in the resolved Hero according to the boolean argument.

AIGetSkillToDevelop

Initializes two output references, evaluates 25 Hero skill slots through mutable target and weight references, and scans a virtual draw against admitted weights.

Open full entry →
Hero
void Hero::AIGetSkillToDevelop(int&, int&)

Initializes two output references, evaluates 25 Hero skill slots through mutable target and weight references, and scans a virtual draw against admitted weights.

TSAdvHeroSkills

Converts two IntArray references to temporary handles and invokes the player-specific TSH_HeroSkills.vs universal command.

Open full entry →
Hero
void Hero::TSAdvHeroSkills(IntArray&, IntArray&)

Converts two IntArray references to temporary handles and invokes the player-specific TSH_HeroSkills.vs universal command.

_EnableAllSkills

Resolves a Hero and zeroes its 25 skill-level bytes directly.

Open full entry →
Hero
void Hero::_EnableAllSkills()

Resolves a Hero and zeroes its 25 skill-level bytes directly.

IsArmyOutside

Returns whether the hero army list lacks a resolvable member with an active holder field.

Open full entry →
Hero
bool Hero::IsArmyOutside()

Returns whether the hero army list lacks a resolvable member with an active holder field.

Return this type

4
MemberSignature and description
Obj::AsHeroObjHero Obj::AsHero()

Returns a Hero reference when the object has the hero category; otherwise returns a null reference.

Unit::heroUnitHero Unit::hero()

Returns an eight-byte Hero handle containing the resolved Unit's linked Hero slot.

Settlement::TSRecruitHeroSettlementHero Settlement::TSRecruitHero()

Dispatches a hero recruitment strategy script for a Settlement.

selhGlobalHero selh()

Selects a candidate with a particular flag and returns its encoded hero reference.

Accept this type

3
MemberSignature and description
AttachedUnitsGlobalQuery AttachedUnits(Hero, str)

Builds a class-filtered query of units attached to a resolved hero.

Unit::AttachToUnitbool Unit::AttachTo(Hero)

Resolves Unit and Hero, rejects invalid or virtual [field] positive operands, then returns whether Unit helper [field] accepts the Hero.

Unit::DetachFromUnitvoid Unit::DetachFrom(Hero)

After valid/dead checks, calls Unit helper [field] only when Hero [field] matches Unit [field].

Coverage and limits

29 / 29 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.