Module FACTION_SCRIPT_INTERFACE
Extensions to the game's faction object.
Functions
| GetMemoryAddress () | Returns the memory address of the faction object as a hexadecimal string. |
| GetTreasury () | Gets the amount of gold (treasury) for the faction. |
| SetTreasury (value) | Sets the amount of gold (treasury) for the faction. |
| SetFactionLeader (new_character[, old_character[, heir_coming_of_age]]) | Sets a new leader for the faction. |
Functions
- GetMemoryAddress ()
-
Returns the memory address of the faction object as a hexadecimal string.
Returns:
-
string
memory address (e.g. "0x12345678")
- GetTreasury ()
-
Gets the amount of gold (treasury) for the faction.
Returns:
-
integer
amount of gold
- SetTreasury (value)
-
Sets the amount of gold (treasury) for the faction.
Parameters:
- value integer new amount of gold
- SetFactionLeader (new_character[, old_character[, heir_coming_of_age]])
-
Sets a new leader for the faction.
If
old_characteris provided, the game fires a succession event. Ifheir_coming_of_ageis true, firesfaction_succession_heir_comes_of_ageinstead of the default succession event.Parameters:
- new_character userdata the character to become the new leader
- old_character userdata the outgoing leader (triggers succession event if provided) (optional)
- heir_coming_of_age boolean fire the heir-comes-of-age event variant (default false) (optional)