Settlement
Browse its members and the signatures that accept or return this type.
Members
139Expand a member to read its notes or open its full entry. Each overload keeps its own identity.
| Member | Signature and description |
|---|---|
| Settlement | int Settlement::population()Reads the settlement's current population count. |
| Settlement | int Settlement::max_population()Reads the settlement's maximum population capacity. |
| str Settlement::name()Copies the selected settlement name bytes into a VM string result with a chained four-byte metadata trailer. |
| void Settlement::ForceAddUnit(Unit)CKS-exposed Settlement::ForceAddUnit, adding a unit to the settlement's Holder bypassing capacity. |
| bool Settlement::AddUnit(Unit)CKS-exposed Settlement::AddUnit, adding a unit to the settlement's Holder without bypassing capacity. |
| bool Settlement::IsFull()CKS-exposed Settlement::IsFull, comparing the settlement's Holder occupancy to capacity. |
| int Settlement::AddUnits(ObjList)Attempts nonforced holder entry for eligible members of a supplied ObjList and returns the number of successful entries. |
| ObjList Settlement::Units()Returns an ObjList view of a settlement holder's unit collection for the Settlement::Units registration. |
| int Settlement::UnitsCount()CKS-exposed Settlement::UnitsCount, returning the settlement's Holder member count at [field]. |
| Settlement | int Settlement::max_units()Returns the capacity at the Settlement's resolved Holder [field] field. |
| int Settlement::health()Settlement::health resolves Settlement[field] and returns the linked Holder health field serialized at [field]. |
| int Settlement::max_health()Settlement::max_health resolves Settlement[field] and returns the linked Holder maximum-health field serialized at [field]. |
| Settlement | int Settlement::stamina()The registered stamina getter returns a nested registry dword at [field]. |
| int Settlement::max_stamina()The registered max_stamina getter returns a nested registry dword at [field]. |
| Settlement | int Settlement::loyalty()Reads raw loyalty and returns it scaled down by 10 for display. |
| void Settlement::SetLoyalty(int)Writes raw loyalty directly from a 0-100 input, bypassing the change accumulator. |
| void Settlement::DecreaseLoyalty(int)Subtracts a scaled non-negative amount from the loyalty change accumulator. |
| Settlement | int Settlement::gold()Returns current gold from the settlement's registered resource store. |
| Settlement | int Settlement::max_gold()Returns maximum gold from the settlement's registered resource store. |
| Settlement | int Settlement::food()Returns current food from the settlement's registered resource store. |
| Settlement | int Settlement::max_food()Returns maximum food from the settlement's registered resource store. |
| void Settlement::SetGold(int)Sets current gold on the resource store to an absolute value, clamped to the store's maximum gold. |
| void Settlement::SetFood(int)Sets current food on the resource store to an absolute value, clamped to the store's maximum food. |
| void Settlement::SetPopulation(int)Writes current population, clamped to at most the settlement's maximum population. |
| void Settlement::AddToPopulation(int)Applies an unconditional signed delta to current population, with no guard or clamp. |
| void Settlement::AddToMaxPopulation(int)CKS AddToMaxPopulation adapter that adds a dword delta after guarded receiver resolution. |
| int Settlement::player()Converts the settlement's owning PlayerInfo identifier to the one-based scripting player number. |
| void Settlement::SetPlayer(int)Changes the settlement's owner. When the player differs from the current one, the stored gold moves to the new owner's statistics and every building of the settlement gets the new owner. |
| bool Settlement::IsValid()CKS native primitive that tests whether an Obj handle is valid; used generically, including on settlement handles. |
| int Settlement::loan()CKS loan adapter that performs wrapped signed scaling of settlement offset [field]. |
| void Settlement::SetLoan(int)CKS SetLoan adapter that overwrites settlement offset [field] with wrapped signed scaling and calls a helper. |
| Building Settlement::GetCentralBuilding()Returns the registry handle stored in the settlement's central-building field. |
| int Settlement::FoodProduction()CKS FoodProduction adapter that reads the settlement dword at offset [field]. |
| int Settlement::GoldProduction()CKS GoldProduction adapter that reads the settlement dword at offset [field]. |
| Settlement | void Settlement::SetFoodProduction(int)Writes the settlement's food production rate unconditionally. |
| Settlement | void Settlement::SetGoldProduction(int)Writes the settlement's gold production rate unconditionally. |
| ObjList Settlement::Buildings()Settlement::Buildings returns an ObjList view at settlement [field], or an allocated empty list for an invalid settlement handle. |
| Building Settlement::Find(str)Find consumes str then Settlement, compares template string bytes and returns the first equal member handle. |
| str Settlement::FirstBldClass()CKS FirstBldClass adapter returning a copy of the Settlement string at [field]. |
| Settlement | bool Settlement::CanBeCaptured(Unit)Description pendingDescription pending. |
| void Settlement::AllowCapture(bool)AllowCapture stores the zero-extended argument byte at Settlement [field]. |
| ObjList Settlement::ObjectsAround(str)Builds an ObjList of settlement-associated objects matching a requested script class. |
| Building Settlement::GetEnterExit()Delegates to a random building with point lookup using point type 12. The meaning of that type is not documented here. |
| Building Settlement::GetWaterSource()Delegates to a random building with point lookup using point type 13. The meaning of that type is not documented here. |
| Building Settlement::GetGoodsSource()Delegates to a random building with point lookup using point type 14. The meaning of that type is not documented here. |
| Building Settlement::GetFixSite()Delegates to a random building with point lookup using point type 15. The meaning of that type is not documented here. |
| Building Settlement::MostDamagedBuilding()Selects the first eligible settlement member with the greatest strictly positive signed damage accumulator and template mask 4096. |
| void Settlement::ClearDamageTaken()ClearDamageTaken writes zero to dword [field] of every iterated settlement member. |
| point Settlement::FindNearEnterExit(point)Searches settlement type12 points and selects the first strict minimum of a transformed integer distance metric. |
| bool Settlement::IsCity()Tests whether the settlement's central building's own UnitTemplate name string matches "GTownhall" or "RTownhall", distinguishing a template-name comparison from a class-name identity test. |
| int Settlement::PopulationDied()Settlement::PopulationDied resolves the settlement handle and returns the integer count at offset [field], returning 0 on failure. |
| void Settlement::GoldConverted(int)Adds an amount to a player-level gold-converted accounting counter without mutating the resource store. |
| void Settlement::GoldSpent(int)CKS GoldSpent adapter that adds an amount to a selected structure's dword at offset [field]. |
| int Settlement::GetSentry()GetSentry calls [field] with field [field] minus one when that field is signed positive, returning integer one; otherwise it returns zero. |
| void Settlement::PutSentry()PutSentry calls [field] with wrapped [field] plus one and then increments dword [field]. |
| void Settlement::DelSentry()Decrements one of two settlement sentry counters with a zero floor on the fallback field. |
| int Settlement::GetNumSentries()GetNumSentries and GetMaxSentries copy the resolved Settlement dwords [field] and [field] respectively, with zero fallback. |
| void Settlement::AddSentries(int)AddSentries adds its integer argument modulo 2^32 to [field], then calls [field] with wrapped [field] plus the same argument. |
| int Settlement::GetMaxSentries()GetNumSentries and GetMaxSentries copy the resolved Settlement dwords [field] and [field] respectively, with zero fallback. |
| void Settlement::AddMaxSentries(int)Settlement::AddMaxSentries adds its signed integer argument directly to the resolved Settlement's dword at [field]. |
| int Settlement::EvalSentries()Description pendingDescription pending. |
| Wagon Settlement::CreateMuleFood(int)Delegates wagon creation with food mode one and returns a Wagon handle or sentinel. |
| Wagon Settlement::CreateMuleGold(int)Resolves a Settlement and delegates the amount to helper [field], returning a Wagon handle or sentinel. |
| Wagon Settlement::CreateBoatFood(int)Calls the linked building spawn helper with the script amount and mode values one, one, then returns a Wagon handle or null. |
| Wagon Settlement::CreateBoatGold(int)Calls the linked building spawn helper with the script amount and mode values zero, one, then returns a Wagon handle or null. |
| Ship Settlement::CreateShip(str)CreateShip constructs a class-named object, applies owner and placement calls, attempts forced holder entry, and restores temporary global state on its normal valid-receiver path. |
| void Settlement::SendMule()SendMule and SendBoat call the same helper with mode zero or one when their linked target passes a relation-bit gate, otherwise clearing that target id. |
| void Settlement::SendBoat()SendMule and SendBoat call the same helper with mode zero or one when their linked target passes a relation-bit gate, otherwise clearing that target id. |
| Settlement | void Settlement::StartSupplyFood(Settlement)Description pendingDescription pending. |
| Settlement | void Settlement::StopSupply()Description pendingDescription pending. |
| void Settlement::UnloadWagon(Wagon)UnloadWagon adds the wagon quantity to the linked settlement resource dword and clamps the wrapping sum by a signed comparison to its capacity. |
| Settlement Settlement::supplied()Follows a fixed chain of settlement registry references and returns the final settlement handle. |
| void Settlement::Run(str)Compiles the requested script with a Settlement argument declaration and dispatches it after successful compilation. |
| int Settlement::UnitsInHolderEval()Sums a native evaluation value across live members of the settlement holder. |
| Settlement | int Settlement::NumTowers()Counts settlement members whose class inherits from Tower. |
| int Settlement::NumTowersBroken()NumTowersBroken counts live Tower descendants whose broken-state field equals 3. |
| Settlement | int Settlement::NumGates()Counts live settlement members that can be converted to Gate. |
| int Settlement::NumGatesBroken()Counts settlement members convertible to Gate whose original-object broken state is 3. |
| int Settlement::EvalDefences()EvalDefences computes a presence score of 300 or 1000 for towers plus 4000 for gates. |
| point Settlement::FindCatapultSpot(point)CKS adapter with unreconciled twenty-byte native input consumption that forwards an extra selector to class lookup and cached point selection. |
| Gate Settlement::BestGate(point)BestGate selects the first Gate with a strictly smaller native position score plus signed field [field] divided by five. |
| void Settlement::OpenAllGates()OpenAllGates traverses gate members and submits opengate commands for gates whose target-state field is not 1. |
| void Settlement::IdleAllGates()IdleAllGates invokes gate virtual slot [field] with argument 1 when its current string does not equal idle. |
| Settlement | bool Settlement::CanBeCaptured()Description pendingDescription pending. |
| Settlement | bool Settlement::IsStronghold()Calls the BaseTownhall-family predicate on a resolved settlement. |
| Settlement | bool Settlement::IsVillage()Returns the village-class predicate for a valid Settlement. |
| bool Settlement::IsOutpost()Tests whether the supplied settlement object inherits from the Outpost script class. |
| bool Settlement::IsTTent()Description pendingDescription pending. |
| bool Settlement::IsShipyard()Returns whether the linked object template inherits BaseShipyard, including the ordinary first-use literal lookup and cache path. |
| bool Settlement::IsAlly(int)Settlement IsAlly resolves the settlement owner and tests bit zero of the indexed player-relation table entry. |
| bool Settlement::IsEnemy(int)Returns the inverse low-bit predicate from a player relation table for a valid settlement. |
| bool Settlement::IsOwn(int)Settlement::IsOwn returns true only when a valid Settlement owner's zero-based index equals idPlayer minus one. |
| bool Settlement::IsIndependent()Returns true when the resolved settlement has linked owner code 14 or 15. |
| bool Settlement::IsIndependentGuarded()Description pendingDescription pending. |
| int Settlement::GetRel(int)Returns a numeric relation code from the associated owner index and the queried player matrix bit. |
| int Settlement::MaxPopulation()Settlement::MaxPopulation resolves a Settlement and returns its dword at [field], with zero as the invalid-object fallback. |
| int Settlement::SupplyCount(str)Counts same-owner buildings of a requested class that are associated with the specified settlement. |
| Settlement Settlement::BestToSupply()Description pendingDescription pending. |
| Barrack Settlement::BestBarrack(int)Selects an eligible barracks in the settlement with the lowest score accepted by its selection procedure. Returns an invalid reference if no candidate is selected. |
| Building Settlement::FindBuilding(str)Returns the first settlement member whose template derives from a requested class name. |
| Building Settlement::FindResearchLab(str)Finds a unit linked to a named research descriptor and returns its Building handle. |
| bool Settlement::CanAfford(int, int)Tests positive signed resource quotients after subtracting the keyed reservation from available gold. |
| bool Settlement::CanAfford(str)Resolves a Settlement and named command, then returns whether a cost check succeeds. |
| bool Settlement::CanAfford(str, int)Compares the requested count with the signed native command affordability count. |
| int Settlement::MaxAffordCount(str)Returns the signed native command affordability count after selecting reservation treatment. |
| bool Settlement::CanResearch(str)CKS scripting primitive reporting whether a settlement is permitted to begin researching an upgrade that is not already researched or in progress. |
| void Settlement::Research(str)Resolves a Settlement and named upgrade, then conditionally submits a research command. |
| int Settlement::Reserve()Returns a signed percentage of army expenditure since the reservation snapshot. |
| void Settlement::StopReserving()Description pendingDescription pending. |
| bool Settlement::ReserveFor(str, int)Updates keyed reservation percent and command, preserving or initializing the army snapshot by branch. |
| int Settlement::GoldSpentOnArmy()Returns the parsed army expenditure key on a valid receiver and omits the integer output on an invalid one. |
| void Settlement::SpentGoldOnArmy(int)Accumulates an amount in a per-game, per-settlement and per-player persistent army-spending counter. |
| int Settlement::GoldSpentOnTech()Returns the parsed technology expenditure key on a valid receiver and omits the integer output on an invalid one. |
| void Settlement::SpentGoldOnTech(int)Adds a signed amount with 32-bit wrap to the keyed technology expenditure value. |
| bool Settlement::CheckTechBudget(str, int)Tests technology expenditure plus adjusted command cost against a signed percentage budget. |
| int Settlement::WaterLsa()Settlement WaterLsa and LandLsa return unsigned linked-object words at [field] or [field] when its template inherits BaseShipyard, otherwise returning zero. |
| int Settlement::LandLsa()Settlement WaterLsa and LandLsa return unsigned linked-object words at [field] or [field] when its template inherits BaseShipyard, otherwise returning zero. |
| int Settlement::GetEconomyScript(int)Description pendingDescription pending. |
| void Settlement::RunEconomyScript(int)Description pendingDescription pending. |
| int Settlement::EconomyScript()Description pendingDescription pending. |
| int Settlement::GetTacticScript(int)CKS handler that invokes the tactic-selection script for a Settlement and player index. |
| void Settlement::RunTacticScript(int)CKS handler that forwards a tactic ID and resolved settlement to the player-AI tactic-task starter. |
| int Settlement::TacticScript()CKS property handler that returns the settlement's current tactic ID after checking whether its task slot remains active. |
| Settlement | GAIKA Settlement::GetGaika()Returns the global AI table word associated with a Settlement. |
| void Settlement::CancelSupply()CancelSupply resolves stoptribute by name and forwards a seven-dword packet beginning with a partially initialized linked-object id to the native dispatch helper. |
| Settlement | bool Settlement::UpgradeBestBarrack(int)Description pendingDescription pending. |
| void Settlement::RepairAll()Scans eligible settlement members and requests one repair command for each member that provides that command and passes the admission checks. |
| ObjList Settlement::TSRecruitArmy(str, int)Builds an ObjList and delegates Settlement tactical recruitment through TSH_RecruitArmy.vs and the universal command path. |
| ObjList Settlement::TSGetAllBarracks()Filters settlement building handles into an ObjList of barracks candidates. |
| ObjList Settlement::TSGetAllArenae()Filters settlement building handles into an ObjList of arena candidates. |
| ObjList Settlement::TSGetAllTemples()Builds an ObjList of eligible settlement members derived from the race-specific temple class. |
| Building Settlement::BestArena()Selects a settlement member derived from BaseArena by the minimum unsigned adjusted score stored in an implementation field. |
| ObjList Settlement::TSArenaRecruit(int)Builds an ObjList and delegates Settlement tactical recruitment through TSH_ArenaRecruit.vs and the universal command path. |
| Settlement | Hero Settlement::TSRecruitHero()Dispatches a hero recruitment strategy script for a Settlement. |
| bool Settlement::TSResearch(str)Applies a TSH_Research command script with a Settlement, research name and temporary result reference. |
| ObjList Settlement::TSTempleRecruit(int)Builds an ObjList and delegates Settlement tactical recruitment through TSH_TempleRecruit.vs and the universal command path. |
| Building Settlement::BestTemple()Chooses the lowest-scoring eligible race-specific temple in a settlement. |
| bool Settlement::IsTeutonTent()Compares an associated settlement object's string to TTent and returns a one-byte boolean. |
| void Settlement::AIRun(str)Looks up the named AI script in the owning player's context and, if found, invokes it with the settlement as its context. |
Return this type
14| Member | Signature and description |
|---|---|
Building::settlementBuilding | Settlement Building::settlement()Resolves a Building's own Settlement-link field into a CKS Settlement reference. |
Unit::GetHolderSettUnit | Settlement Unit::GetHolderSett()Unit::GetHolderSett derives a returned slot word through Unit [field], registry entry [field], and final entry [field]. |
GetSettlementGlobal | Settlement GetSettlement(str)Returns the first settlement whose name matches the supplied text. |
Settlement::suppliedSettlement | Settlement Settlement::supplied()Follows a fixed chain of settlement registry references and returns the final settlement handle. |
GAIKA::settlementGAIKA | Settlement GAIKA::settlement()Returns the settlement handle attached to a GAIKA record, or a null handle. |
Settlement::BestToSupplySettlement | Settlement Settlement::BestToSupply()Description pendingDescription pending. |
IdxToSetGlobal | Settlement IdxToSet(int)IdxToSet returns the handle ID from an indexed global-map settlement pointer, or a null handle for an invalid or empty slot. |
NearestStrongholdGlobal | Settlement NearestStronghold(point, int, int)Description pendingDescription pending. |
NearestStrongholdGlobal | Settlement NearestStronghold(point, int)Description pendingDescription pending. |
NearestStrongholdGlobal | Settlement NearestStronghold(point)NearestStronghold point overload selects the unfiltered BaseTownhall search. |
NearestSetGlobal | Settlement NearestSet(point, str, int, int)NearestSet four-argument overload forwards the class, decremented player and supplied relation mask. |
NearestSetGlobal | Settlement NearestSet(point, str, int)NearestSet three-argument overload forwards the class, decremented player and fixed mask one. |
NearestSetGlobal | Settlement NearestSet(point)NearestSet point overload searches the Building central-building class without player filtering. |
selsGlobal | Settlement sels()Returns the settlement associated with the currently selected settlement object, or the null handle. |
Accept this type
20| Member | Signature and description |
|---|---|
UnitsInSettlementGlobal | Query UnitsInSettlement(Settlement, str)Description pendingDescription pending. |
UnitsAroundSettlementGlobal | Query UnitsAroundSettlement(Settlement, str)Description pendingDescription pending. |
UnitsGuardingSettlementGlobal | Query UnitsGuardingSettlement(Settlement, str)Description pendingDescription pending. |
==Global | bool ==(Settlement, Settlement)Description pendingDescription pending. |
=Global | void =(Settlement&, Settlement)Description pendingDescription pending. |
Settlement::StartSupplyFoodSettlement | void Settlement::StartSupplyFood(Settlement)Description pendingDescription pending. |
EnvWriteStringGlobal | void EnvWriteString(Settlement, str, str)CKS native primitive that writes a string value under a key into a settlement's Env key-value store. |
EnvWriteIntGlobal | void EnvWriteInt(Settlement, str, int)Formats a settlement-scoped environment path and writes a decimal integer value. |
EnvReadStringGlobal | str EnvReadString(Settlement, str)Builds a settlement-scoped environment path and returns the string obtained from the environment lookup helper. |
EnvReadIntGlobal | int EnvReadInt(Settlement, str)EnvReadInt builds a settlement property path and reads its integer value. |
EnvWriteObjGlobal | void EnvWriteObj(Settlement, str, Obj)Description pendingDescription pending. |
EnvReadObjGlobal | Obj EnvReadObj(Settlement, str)Description pendingDescription pending. |
EnvListGlobal | void EnvList(Settlement, str)Description pendingDescription pending. |
RegisterSettlementUpgradeGlobal | void RegisterSettlementUpgrade(Settlement, str)Parses command-definition triples and dispatches settlement property writes. |
AIRunGlobal | int AIRun(str, Settlement, ObjList, Obj, int)Starts a typed AI script task in the current script player's AI context and returns its task identifier. |
AIRunGlobal | int AIRun(int, str, Settlement, ObjList, Obj, int)Attempts to start an AI script task for the supplied one-based player and returns its task identifier or -1. |
SetToIdxGlobal | int SetToIdx(Settlement)SetToIdx reads the resolved Settlement slot-index field. |
IsResearchedGlobal | bool IsResearched(Settlement, str)CKS scripting primitive evaluating whether a technology or upgrade has been researched, supporting both settlement-anchored and player-direct overloads. |
IsResearchingGlobal | bool IsResearching(Settlement, str)CKS scripting primitive reporting whether a technology or upgrade is currently in the "researching" state, with a settlement-anchored overload and a player-direct overload. |
GetCounterUnitsGlobal | void GetCounterUnits(Settlement, IntArray)Tries indexed AI candidates and dispatches a settlement fallback into the resolved integer-array destination. |
Coverage and limits
126 / 139 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.