Home › Dev CE (experimental) › UnitGreatPerson

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.

UnitGreatPerson

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

Method Signature Purpose (AI-written, inferred) Tested Engine function Current
ChangeActionCharges ✓ UnitGreatPerson:ChangeActionCharges(iChange: integer) Adds a delta to a great person's remaining action charges, ignoring changes that would drop below zero, and sends an event. plumbing ✓
effect ✓ (GetActionCharges)
Unit::GreatPerson::ChangeActionCharges 0x398f70
HasUsedActionCharges UnitGreatPerson:HasUsedActionCharges() → boolean Returns true if the great person used charges (+0x10) is below the individual definition value at +0x48; false if the individual definition is invalid. plumbing ✓ — 0x3995a0

Details

ChangeActionCharges

Arguments: iChange — delta to charges

Writes - action charges at this+0x10

Side effects - sends Reporting::Event 0x9c3482f5 with unit id when applied

Input checks: If the new total would be negative, the call silently does nothing (no clamp, no event).

Preconditions - gameplay state

Multiplayer: safe-deterministic. Risk: low (Checked integer change). Confidence of the reading: high.

Verified from the code - rejects results below zero - event only on success

Inferred - field is remaining actions

HasUsedActionCharges

Input checks: Checks the individual index against the definition table.

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