Home › Dev CE (experimental) › GameGreatPeople

Experimental: needs Dev CE (fork of the Community Extension, release zip and source). A GameCore that adds these Lua methods by calling engine functions directly. Not part of the upstream Community Extension, single-player testing only. Descriptions on these pages were written by an AI assistant from decompiled code and are marked inferred unless a test result confirms them.

GameGreatPeople

16 methods (Dev CE test build). this is found with the game's own IGameGreatPeople instance resolver (plain).

Method Signature Purpose (AI-written, inferred) Tested Engine function Current
AddGuarantee GameGreatPeople:AddGuarantee(ePlayer: integer, eClass: integer, eEra: integer) Appends a guarantee record (class, player, era) to the guarantee vector at offset 0x150. plumbing ✓
this ✓ (oracle)
— 0x208f60
AwardFreePersonByClass GameGreatPeople:AwardFreePersonByClass(ePlayer: integer, eClass: integer) → boolean Gives a player the next great person of a given class from the game's great-person timeline, if the class index is valid and a person is available. plumbing ✓
this ✓ (oracle)
Game::GreatPeople::AwardFreePersonByClass 0x208fd0
CalculatePersonCost GameGreatPeople:CalculatePersonCost(eClass: integer, eEra: integer) → number Computes the era-scaled point cost of a great person: base cost from the era definition (0x2c), compounded by 30 percent steps when the era is ahead of the current era, adjusted for game speed and rounded down to a multiple of a global parameter. plumbing ✓
this ✓ (oracle)
— 0x2090b0
CanClaimPerson GameGreatPeople:CanClaimPerson(ePlayer: integer, eIndividual: integer) → boolean Checks the individual is in the available list with valid fields, that the player can recruit it, and that it is not yet claimed. plumbing ✓
this ✓ (oracle)
— 0x209220
CheckLapsedClaims GameGreatPeople:CheckLapsedClaims() For each available timeline entry that has a claimant, recruits the person for that player. plumbing ✓
this ✓ (oracle)
— 0x209fd0
CountPeopleAnywhereInTimeline GameGreatPeople:CountPeopleAnywhereInTimeline(eClassFilter: integer) → number Counts valid entries in both timeline lists (recruited at 0xd0 and available at 0x100), optionally filtered by class. plumbing ✓
this ✓ (oracle)
— 0x20a160
DoTurn GameGreatPeople:DoTurn() Per-turn update: if the flag at 0xb8 is false it initialises the timeline and assigns the flag, then checks guarantees for all players and classes and resolves lapsed claims. plumbing ✓
this ✓ (oracle)
— 0x20a8d0
GetAvailablePersonByClass GameGreatPeople:GetAvailablePersonByClass(eClass: integer) → number Returns the available individual in the timeline slot indexed by class, or -1 if the slot is invalid. plumbing ✓
this ✓ (oracle)
— 0x20bec0
GetAvailablePersonEraByClass GameGreatPeople:GetAvailablePersonEraByClass(eClass: integer) → number Returns the era of the available person in the slot indexed by class, or -1. plumbing ✓
this ✓ (oracle)
— 0x20bf30
GetMaximumPeopleAllowedInTimeline GameGreatPeople:GetMaximumPeopleAllowedInTimeline(eClass: integer, bIgnoreClassMaximums: boolean) → number Returns the maximum number of people of the class allowed in the timeline, from the map's per-class limit and, for flagged classes, the belief class counts. plumbing ✓
this ✓ (oracle)
— 0x20c350
GetNumActiveClaims GameGreatPeople:GetNumActiveClaims(ePlayer: integer) → number Counts available-list entries whose claimant (offset 0x10) equals the player. plumbing ✓
this ✓ (oracle)
— 0x20c4f0
GetNumPeopleReceived GameGreatPeople:GetNumPeopleReceived(ePlayer: integer) → number Counts recruited-list entries whose recruiter (offset 0x10) equals the player. plumbing ✓
this ✓ (oracle)
— 0x20c530
GetPersonBeenRecruitedBy GameGreatPeople:GetPersonBeenRecruitedBy(eIndividual: integer) → number Returns the player who recruited the individual, searched in the recruited list. plumbing ✓
this ✓ (oracle)
— 0x20cab0
HasPassiveEffect GameGreatPeople:HasPassiveEffect(eIndividual: integer) → boolean Returns true if a modifier query for great person birth modifiers returns any definitions. plumbing ✓
this ✓ (oracle)
— 0x20d030
IsPersonAnywhereInTimeline GameGreatPeople:IsPersonAnywhereInTimeline(eIndividual: integer) → boolean Returns true if the individual appears in either the recruited list or the available list. plumbing ✓
this ✓ (oracle)
— 0x20d390
IsPersonClaimedAnywhereInTimeline GameGreatPeople:IsPersonClaimedAnywhereInTimeline(eIndividual: integer, ePlayer: integer) → boolean Returns true if an entry for the individual with claimant equal to the player exists in the recruited or available list. plumbing ✓
this ✓ (oracle)
— 0x20d3e0

Details

AddGuarantee

Arguments: ePlayer — player receiving the guarantee; eClass — great person class; eEra — era of the guarantee (inferred)

Writes - guarantee vector at 0x150 gets a 12-byte entry

Input checks: Ignored if ePlayer or eClass is -1; eEra not checked; no duplicate check.

Multiplayer: may-desync, adds synchronised game state. Risk: medium (no validation of era). Confidence of the reading: high.

AwardFreePersonByClass

Arguments: ePlayer — receiving player; eClass — great person class index

Writes - indirect via GrantPerson (player great-person state)

Side effects - calls GrantPerson (likely spawns the unit and updates records)

Input checks: class index range-checked; entry with any of first three fields -1 returns false; ePlayer is only passed to EditPlayer unchecked

Preconditions - valid player id - gameplay thread

Multiplayer: may-desync: grants a unit/person; must be called identically on all clients. Risk: medium (creates a great person, unchecked player id). Confidence of the reading: medium.

Verified from the code - range check 0 <= class < (end-begin)/0x18 - three int fields of the entry must not be -1 - calls GrantPerson(entry, player, scratch struct)

Inferred - entry is the next-available great person record for that class - scratch struct is default grant parameters

Open questions - what the three checked fields are - GrantPerson side effects

CalculatePersonCost

Arguments: eClass — great person class; not used in the decompiled body (inferred); eEra — era whose base cost is used

Input checks: Out-of-range era keeps cost at INT_MAX before scaling; class unused.

Multiplayer: read-only, computes cost only. Risk: low (pure getter). Confidence of the reading: medium.

CanClaimPerson

Arguments: ePlayer — player index used to index the per-player array; eIndividual — great person individual searched in available list

Input checks: Returns false if not in available list, fields are -1 or not recruitable; ePlayer not range-checked here.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: medium.

CheckLapsedClaims

Writes - opens the vector at 0xf0 for editing - indirectly recruits people via RecruitPerson

Side effects - RecruitPerson side effects

Input checks: Skips entries with any -1 core field or no claimant.

Multiplayer: may-desync, recruits great people. Risk: medium (triggers recruitment). Confidence of the reading: medium.

CountPeopleAnywhereInTimeline

Arguments: eClassFilter — class to count, or -1 for all

Input checks: Skips entries with -1 core fields; -1 filter means all classes.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

DoTurn

Writes - timeline initialisation - init flag at 0xa8

Side effects - CheckGuarantees and CheckLapsedClaims effects

Input checks: No inputs.

Multiplayer: may-desync, advances great person state. Risk: medium (turn processing). Confidence of the reading: medium.

GetAvailablePersonByClass

Arguments: eClass — class used as index into the available list

Input checks: Returns -1 if eClass is out of range or slot has -1 fields.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

GetAvailablePersonEraByClass

Arguments: eClass — class used as index into the available list

Input checks: Returns -1 if eClass is out of range or slot has -1 fields.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

GetMaximumPeopleAllowedInTimeline

Arguments: eClass — great person class; bIgnoreClassMaximums — skip the map-defined class limit

Input checks: Returns 0 if map or class definition invalid; no other range check.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: medium.

GetNumActiveClaims

Arguments: ePlayer — player index used to index the per-player array

Input checks: No validation; -1 counts unclaimed entries.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

GetNumPeopleReceived

Arguments: ePlayer — player index used to index the per-player array

Input checks: No validation; -1 counts entries with no recruiter.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

GetPersonBeenRecruitedBy

Arguments: eIndividual — great person to look up

Input checks: Returns -1 if the individual is not in the list.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

HasPassiveEffect

Arguments: eIndividual — great person individual checked

Input checks: Returns false for -1, out-of-range index or missing game or effects objects; the query does not appear to be filtered by individual in this function.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: medium.

IsPersonAnywhereInTimeline

Arguments: eIndividual — great person searched

Input checks: No validation.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.

IsPersonClaimedAnywhereInTimeline

Arguments: eIndividual — great person searched; ePlayer — player index used to index the per-player array

Input checks: No validation.

Multiplayer: read-only, pure getter. Risk: low (pure getter). Confidence of the reading: high.