Module twdll_battle_unit
Functions for interacting with battle units.
Functions
| GetMemoryAddress (unit) | Returns the memory address of the real battle unit object. |
| GetChargeBonus (unit) | Gets the unit's charge bonus from the nested stats object. |
| GetMeleeAttack (unit) | Gets the unit's melee attack from the nested stats object. |
| GetBaseMorale (unit) | Gets the unit's base morale from the nested stats object. |
| GetSomeFloatValue (unit) | Reads an example float stat from the nested stats object at offset 0x110. |
| GetFatigue (unit) | Gets the unit's fatigue level. |
Functions
- GetMemoryAddress (unit)
-
Returns the memory address of the real battle unit object.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
string
memory address (e.g. "0x12345678")
- GetChargeBonus (unit)
-
Gets the unit's charge bonus from the nested stats object.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
integer
charge bonus
- GetMeleeAttack (unit)
-
Gets the unit's melee attack from the nested stats object.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
integer
melee attack
- GetBaseMorale (unit)
-
Gets the unit's base morale from the nested stats object.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
integer
base morale
- GetSomeFloatValue (unit)
-
Reads an example float stat from the nested stats object at offset 0x110.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
number
value
- GetFatigue (unit)
-
Gets the unit's fatigue level.
Parameters:
- unit userdata the battle unit object (first argument)
Returns:
-
integer
fatigue