# Module `CHARACTER_SCRIPT_INTERFACE`

Extensions to the game's character object.

## Functions

GetMemoryAddress () | Returns the memory address of the character object as a hexadecimal string.
GetActionPoints () | Gets the current action points of the character.
SetActionPoints (value) | Sets the action points of the character.
GetInfluence () | Gets the political influence of the character (mpoliticalgravitas).
SetInfluence (value) | Sets the political influence of the character (mpoliticalgravitas).
SetDefaultBodyGuard (unit_key) | Overrides the default bodyguard unit record for a general so that whenever the general is recruited into an army (including re-recruitment after being wounded or disbanded, or through 'Replace this general' in the UI), they receive this unit type as their default bodyguard.

## Functions

GetMemoryAddress ()
  Returns the memory address of the character object as a hexadecimal string.

  ### Returns:

  string memory address (e.g. "0x12345678")
GetActionPoints ()
  Gets the current action points of the character.

  ### Returns:

  integer action points
SetActionPoints (value)
  Sets the action points of the character.

  ### Parameters:

  - value integer new action points
GetInfluence ()
  Gets the political influence of the character (mpoliticalgravitas).

  ### Returns:

  integer influence
SetInfluence (value)
  Sets the political influence of the character (mpoliticalgravitas).

  ### Parameters:

  - value integer new influence
SetDefaultBodyGuard (unit_key)
  Overrides the default bodyguard unit record for a general so that whenever the general is recruited into an army (including re-recruitment after being wounded or disbanded, or through 'Replace this general' in the UI), they receive this unit type as their default bodyguard. The record is stored directly in the persistent GENERALBODYGUARDDETAILS struct (serialised with savegames) and read by the recruitment panel as the pre-selected default choice.

  ### Parameters:

  - unit_key string unit record key (e.g. "attromcavgeneralguards")

  ### Returns:

  boolean true if the record was found and applied, false otherwise

generated by LDoc 1.5.0