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

Building

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

46 members14 return it8 accept it

Members

46

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

MemberSignature and description
BestTarget

Selects a target from a spatial search around a Building and returns its CKS handle.

Open full entry →
Building
Obj Building::BestTarget()

Selects a target from a spatial search around a Building and returns its CKS handle.

Attack

Executes a guarded, possibly waiting Building attack that spawns an arrow shot on its firing path.

Open full entry →
Building
bool Building::Attack(Obj)

Executes a guarded, possibly waiting Building attack that spawns an arrow shot on its firing path.

GetEnterPoint

calculates the entrance point coordinates of a building relative to an approaching unit.

Open full entry →
Building
point Building::GetEnterPoint(Unit)

calculates the entrance point coordinates of a building relative to an approaching unit.

GetExitPoint

Resolves an exit point from a Building, an Obj template category, and an incoming point.

Open full entry →
Building
point Building::GetExitPoint(Obj, point)

Resolves an exit point from a Building, an Obj template category, and an incoming point.

GetExitPoint

Resolves an exit point from a Building, an incoming point, and a boolean mode.

Open full entry →
Building
point Building::GetExitPoint(point, bool)

Resolves an exit point from a Building, an incoming point, and a boolean mode.

GetPoint

Behavior awaiting documentation.

Open full entry →
Building
point Building::GetPoint(int, int)Description pending

Description pending.

settlement

Resolves a Building's own Settlement-link field into a CKS Settlement reference.

Open full entry →
Building
Settlement Building::settlement()

Resolves a Building's own Settlement-link field into a CKS Settlement reference.

IsBroken

Generic CKS-exposed Building::IsBroken, true when the shared broken-status field equals 3.

Open full entry →
Building
bool Building::IsBroken()

Generic CKS-exposed Building::IsBroken, true when the shared broken-status field equals 3.

IsCentralBuliding

Reads the template-level is_central_building flag through the object's own template pointer.

Open full entry →
Building
bool Building::IsCentralBuliding()

Reads the template-level is_central_building flag through the object's own template pointer.

RRepair

Conditionally repairs a broken Building to a health percentage above the broken threshold and refreshes its damage visuals.

Open full entry →
Building
void Building::RRepair()

Conditionally repairs a broken Building to a health percentage above the broken threshold and refreshes its damage visuals.

GetExitVector

Building GetExitVector returns template dwords at [field] and [field], with (-1,-1) for a sentinel first dword.

Open full entry →
Building
point Building::GetExitVector()

Building GetExitVector returns template dwords at [field] and [field], with (-1,-1) for a sentinel first dword.

PopTransportationUI

Resolves the Building, checks its class descriptor and converts an embedded interface to a town hall interface before passing it to a UI allocation operation.

Open full entry →
Building
void Building::PopTransportationUI()

Resolves the Building, checks its class descriptor and converts an embedded interface to a town hall interface before passing it to a UI allocation operation.

GetGlobalSpell

Looks up the first global-spell vector entry associated with a resolved town hall and pushes its initial dword.

Open full entry →
Building
int Building::GetGlobalSpell()

Looks up the first global-spell vector entry associated with a resolved town hall and pushes its initial dword.

GlobalSpellStart

Starts a global-spell operation for a town hall when the first integer is in the range zero through five.

Open full entry →
Building
void Building::GlobalSpellStart(int, int)

Starts a global-spell operation for a town hall when the first integer is in the range zero through five.

GlobalSpellStart

Starts a global-spell operation for a town hall with three script integers when the first is in the range zero through five.

Open full entry →
Building
void Building::GlobalSpellStart(int, int, int)

Starts a global-spell operation for a town hall with three script integers when the first is in the range zero through five.

GlobalSpellStop

Stops a town hall's global-spell entry by delegating to the global spell manager.

Open full entry →
Building
void Building::GlobalSpellStop()

Stops a town hall's global-spell entry by delegating to the global spell manager.

SetGlobalSpellData

Passes a town hall and an integer to a global-spell vector updater.

Open full entry →
Building
void Building::SetGlobalSpellData(int)

Passes a town hall and an integer to a global-spell vector updater.

WindOfWisdom

Stonehenge-gated Building primitive with two-path candidate collection and capped signed level-to-XP dispatch, retaining concrete storage and override prerequisites.

⚠ Only partly documented so far.

Open full entry →
Building
void Building::WindOfWisdom(int)

Stonehenge-gated Building primitive with two-path candidate collection and capped signed level-to-XP dispatch, retaining concrete storage and override prerequisites.

Starvation

Invokes a rectangle scan that reduces a linked object counter and qualifying wagon food.

Open full entry →
Building
void Building::Starvation()

Invokes a rectangle scan that reduces a linked object counter and qualifying wagon food.

SoothingRain

Scans matching buildings and adds 300 divided by the script argument to linked settlement gold.

Open full entry →
Building
void Building::SoothingRain(int)

Scans matching buildings and adds 300 divided by the script argument to linked settlement gold.

DivineSacrifice

Collects eligible Druid objects for a Stonehenge town hall and invokes their divine-sacrifice operation.

Open full entry →
Building
void Building::DivineSacrifice()

Collects eligible Druid objects for a Stonehenge town hall and invokes their divine-sacrifice operation.

GetSoothingRainObjects

Counts buildings found by the SoothingRain map scan while passing zero to its gold mutator.

Open full entry →
Building
int Building::GetSoothingRainObjects()

Counts buildings found by the SoothingRain map scan while passing zero to its gold mutator.

IsStonehengeControlable

Tests whether a Stonehenge-centered map scan yields a positive counter.

Open full entry →
Building
bool Building::IsStonehengeControlable()

Tests whether a Stonehenge-centered map scan yields a positive counter.

StonehengeNumControllingMages

Returns a counter from a Stonehenge-centered map scan.

Open full entry →
Building
int Building::StonehengeNumControllingMages()

Returns a counter from a Stonehenge-centered map scan.

itemtypes

Returns the Building template string registered as Building::itemtypes.

Open full entry →
Building
str Building::itemtypes()

Returns the Building template string registered as Building::itemtypes.

minlevel

Returns the Building template dword registered as Building::minlevel.

Open full entry →
Building
int Building::minlevel()

Returns the Building template dword registered as Building::minlevel.

levelperitem

Returns the Building template dword registered as Building::levelperitem.

Open full entry →
Building
int Building::levelperitem()

Returns the Building template dword registered as Building::levelperitem.

ClearDamageTaken

Building::ClearDamageTaken writes zero to the resolved Building's dword at [field].

Open full entry →
Building
void Building::ClearDamageTaken()

Building::ClearDamageTaken writes zero to the resolved Building's dword at [field].

CountMages

Returns a count of eligible script objects in a Stonehenge-centered circle.

Open full entry →
Building
int Building::CountMages()

Returns a count of eligible script objects in a Stonehenge-centered circle.

SetUITarget

Building::SetUITarget writes the target object's 16-bit registry slot to Building [field], or 65535 when the target does not resolve.

Open full entry →
Building
void Building::SetUITarget(Obj)

Building::SetUITarget writes the target object's 16-bit registry slot to Building [field], or 65535 when the target does not resolve.

GetUITarget

Building::GetUITarget returns the handle stored at building [field] and returns a null handle when resolution fails.

Open full entry →
Building
Obj Building::GetUITarget()

Building::GetUITarget returns the handle stored at building [field] and returns a null handle when resolution fails.

GetNumSentrySlots

Building::GetNumSentrySlots returns the sentry slot count dword at template [field] and lacks a safe fallback for invalid handles.

Open full entry →
Building
int Building::GetNumSentrySlots()

Building::GetNumSentrySlots returns the sentry slot count dword at template [field] and lacks a safe fallback for invalid handles.

GetSentryClassName

Building::GetSentryClassName returns the Building template string stored at [field].

Open full entry →
Building
str Building::GetSentryClassName()

Building::GetSentryClassName returns the Building template string stored at [field].

Research

Resolves a named command descriptor and invokes research with temporary command-cost context.

Open full entry →
Building
void Building::Research(str)

Resolves a named command descriptor and invokes research with temporary command-cost context.

GetEnterExit

Delegates to a random point lookup using point type 12. The meaning of that type is not documented here.

Open full entry →
Building
point Building::GetEnterExit()

Delegates to a random point lookup using point type 12. The meaning of that type is not documented here.

GetWaterSource

Delegates to a random point lookup using point type 13. The meaning of that type is not documented here.

Open full entry →
Building
point Building::GetWaterSource()

Delegates to a random point lookup using point type 13. The meaning of that type is not documented here.

GetGoodsSource

Delegates to a random point lookup using point type 14. The meaning of that type is not documented here.

Open full entry →
Building
point Building::GetGoodsSource()

Delegates to a random point lookup using point type 14. The meaning of that type is not documented here.

GetFixSite

Delegates to a random point lookup using point type 15. The meaning of that type is not documented here.

Open full entry →
Building
point Building::GetFixSite()

Delegates to a random point lookup using point type 15. The meaning of that type is not documented here.

IsVeryBroken

Building::IsVeryBroken returns true when current health is below integer maximum health divided by twenty.

Open full entry →
Building
bool Building::IsVeryBroken()

Building::IsVeryBroken returns true when current health is below integer maximum health divided by twenty.

IsBarrack

Evaluates a Building through the native barracks-family class predicate and returns a VM boolean.

Open full entry →
Building
bool Building::IsBarrack()

Evaluates a Building through the native barracks-family class predicate and returns a VM boolean.

GetDefenderCls

Building::GetDefenderCls returns one of two Building strings for Outpost descendants according to selector 1 or 2.

Open full entry →
Building
str Building::GetDefenderCls(int)

Building::GetDefenderCls returns one of two Building strings for Outpost descendants according to selector 1 or 2.

GetDefendersMax

Building::GetDefendersMax returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

Open full entry →
Building
int Building::GetDefendersMax(int)

Building::GetDefendersMax returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

GetDefendersOut

Returns one of two defender-out counters for buildings whose associated object derives from Outpost.

Open full entry →
Building
int Building::GetDefendersOut(int)

Returns one of two defender-out counters for buildings whose associated object derives from Outpost.

GetStartLevel

Building::GetStartLevel returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

Open full entry →
Building
int Building::GetStartLevel(int)

Building::GetStartLevel returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

GetEndLevel

Building::GetEndLevel returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

Open full entry →
Building
int Building::GetEndLevel(int)

Building::GetEndLevel returns Building field [field] or [field] for Outpost descendants and selectors 1 or 2.

GetOutpostFood

Building::GetOutpostFood returns Building field [field] for Outpost descendants and zero otherwise.

Open full entry →
Building
int Building::GetOutpostFood()

Building::GetOutpostFood returns Building field [field] for Outpost descendants and zero otherwise.

Return this type

14
MemberSignature and description
Obj::AsBuildingObjBuilding Obj::AsBuilding()

Returns a Building reference when the object has a compatible building category.

Unit::GetBuildingUnitBuilding Unit::GetBuilding()

Returns a Building handle containing the resolved Unit's linked Building slot.

Settlement::GetCentralBuildingSettlementBuilding Settlement::GetCentralBuilding()

Returns the registry handle stored in the settlement's central-building field.

Settlement::FindSettlementBuilding Settlement::Find(str)

Find consumes str then Settlement, compares template string bytes and returns the first equal member handle.

Settlement::GetEnterExitSettlementBuilding Settlement::GetEnterExit()

Delegates to a random building with point lookup using point type 12. The meaning of that type is not documented here.

Settlement::GetWaterSourceSettlementBuilding Settlement::GetWaterSource()

Delegates to a random building with point lookup using point type 13. The meaning of that type is not documented here.

Settlement::GetGoodsSourceSettlementBuilding Settlement::GetGoodsSource()

Delegates to a random building with point lookup using point type 14. The meaning of that type is not documented here.

Settlement::GetFixSiteSettlementBuilding Settlement::GetFixSite()

Delegates to a random building with point lookup using point type 15. The meaning of that type is not documented here.

Settlement::MostDamagedBuildingSettlementBuilding Settlement::MostDamagedBuilding()

Selects the first eligible settlement member with the greatest strictly positive signed damage accumulator and template mask 4096.

Settlement::FindBuildingSettlementBuilding Settlement::FindBuilding(str)

Returns the first settlement member whose template derives from a requested class name.

Settlement::FindResearchLabSettlementBuilding Settlement::FindResearchLab(str)

Finds a unit linked to a named research descriptor and returns its Building handle.

Settlement::BestArenaSettlementBuilding Settlement::BestArena()

Selects a settlement member derived from BaseArena by the minimum unsigned adjusted score stored in an implementation field.

Settlement::BestTempleSettlementBuilding Settlement::BestTemple()

Chooses the lowest-scoring eligible race-specific temple in a settlement.

selbGlobalBuilding selb()

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

Accept this type

8
MemberSignature and description
Unit::SetBuildingUnitvoid Unit::SetBuilding(Building)

Unit::SetBuilding writes the Building argument's 16-bit registry slot to Unit [field], or 65535 when the Building does not resolve.

Druid::SetStonehengeDruidvoid Druid::SetStonehenge(Building)Description pending

Description pending.

EnvWriteStringGlobalvoid EnvWriteString(Building, str, str)

Requests a string write under an environment key scoped to the specified building and its settlement. Arguments are the building, the key and the string.

EnvWriteIntGlobalvoid EnvWriteInt(Building, str, int)

Formats a building-scoped environment path and delegates an integer value as decimal text to the environment writer.

EnvReadStringGlobalstr EnvReadString(Building, str)

Formats a building-scoped environment path and returns a managed string from its reader helper.

EnvReadIntGlobalint EnvReadInt(Building, str)

Formats a building-scoped environment path and returns the integer produced by its reader helper.

EnvWriteObjGlobalvoid EnvWriteObj(Building, str, Obj)

Formats a building-scoped key and encodes an object identifier for the environment writer.

EnvReadObjGlobalObj EnvReadObj(Building, str)

Formats a building-scoped key and writes an Obj result with initialized low16 identifier and zero offset.

Coverage and limits

45 / 46 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.