Parameters
Listed below are parameters that you will find using functions for all the classes needed for modding.
| Parameter | Description | Variable/Class |
|---|---|---|
| co | Refers to the current CO in play. | co class |
| map | Refers to the current map in play (including game rules, players). | gamemap class |
| unit | Refers to the current unit of interest. | unit class |
| posX/x | Refers to the position of the current tile along the X axis (left to right). | int |
| posY/y | Refers to the position of the current tile along the Y axis (top to bottom). | int |
| atkPosX | Refers to the position of the attacker along the X axis (left to right). | int |
| atkPosY | Refers to the position of the attacker along the Y axis (top to bottom). | int |
| defPosX | Refers to the position of the defender along the X axis (left to right). | int |
| defPosY | Refers to the position of the defender along the Y axis (top to bottom). | int |
| isDefender | Refers to what the current unit is doing in battle, attacking or defending, returns true if it was your unit being attacked else it is false. | boolean |
| attacker | Refers to the unit that is currently attacking. | unit class |
| defender | Refers to the unit that is currently defending. | unit class |
| damage | Refers to the incoming damage to the unit, includes chip damage numbers (0-100+). | int |
| attackerBaseHp | Referes to the attackers hp. | int |
| luckmode | Refers to the luck roll when the attack action occurs. | int |
| action | Refers to the current action that is being performed, returns as a game action class. | gameaction class |
| id | Refers to unit ID. | string |
| fuelCost | Refers to the amount of fuel used to move. | int |
| building | Refers to the building of interest. | |
| income | Refers to the income you get for a particular building. | int |
| index | could't have a clue. | |
| info | Refers to the CO info page. | |
| unitID | Refers to the unit ID that is currently being looked at. | str |
| powerSurplus | Refers to surplus on the co power e.g 1 if one more star is filled over the normal co power. | int |
| turnMode | Refers to the state of the current turn, AiTurnMode_StartOfDay, AiTurnMode_DuringDay, AiTurnMode_EndOfDay | gameenum |
| unitCount | Refers to the amount of units owned by the player. | int |
| count | there is a unitcount in the same parameter. | int |
| repairUnits | Refers to the amount of units that need to be repaired. | int |
| indirectUnits | Refers to the amount of indirect units. | int |
| directUnits | Refers to the amount of direct units. | Int |
| enemyUnits | Refers to the amount of enemy units. | Int |