(Created page with "Air Units' stats and properties can be modified as a whole, by using the '''GameEnums.UnitType_Air''' variable.For instance: <syntaxhighlight lang="javascript"> CO_TEST.getOffensiveBonus = function (co, attacker, atkPosX, atkPosY, defender, defPosX, defPosY, isDefender, action,luckmode, map) { if (co.getIsCO0() === true) { switch (co.getPowerMode()) { case GameEnums.PowerMode_Power: if (attacker.getUnitType() === GameEnu...")
 
No edit summary
 
(23 intermediate revisions by 3 users not shown)
Line 23: Line 23:


Increases the Offense of Air Units by 30% during the CO Power.
Increases the Offense of Air Units by 30% during the CO Power.


==Modifying stats or properties of specific Units==
==Modifying stats or properties of specific Units==
Each Unit can be modified through a comparison of the UnitID. The Unit ID  can be obtained through '''unit.getUnitID()''' And it's of a String type.
Each Unit can be modified through a comparison of the UnitID. The Unit ID  can be obtained through '''unit.getUnitID()''' And it's of a String type.


Possible values are:
Possible values are, along with their weapon names:
{| class="wikitable"
{| class="wikitable" style="margin:auto;text-align: center"
!colspan="10"|Ground Units
|+ Air units and their weapon strings
|-
!Air Units !!Primary Weapon String!! Secondary Weapon String
|-
|'''K_HELI'''<ref>Same Unit as Battlecopters</ref> || WEAPON_AIR_TO_GROUND_MISSILE ||WEAPON_K_HELI_MG
|-
|'''T_HELI'''<ref>Same Unit as Transport Copters</ref>|| N/A||N/A
|-
|'''DUSTER'''<ref>Same Unit as that from Days of Ruin/Dark Conflict</ref>|| WEAPON_AIRPLANE_MG||N/A
|-
|'''BOMBER'''||WEAPON_BOMB||N/A
|-
|'''STEALTHBOMBER'''||WEAPON_STEALTHROCKET||N/A
|-
|'''TRANSPORTPLANE'''||N/A||N/A
|-
|'''FIGHTER'''||WEAPON_AIR_TO_AIR_MISSILE||N/A
|-
|'''WATERPLANE'''<ref>Same Unit as that from Days of Ruin/Dark Conflict</ref>||WEAPON_WATERPLANE_MISSILE||N/A
|-
|'''ZCOUNIT_KIROV'''<ref>CO Unit of Tasha, Eagle, Waylon</ref>||WEAPON_BOMB||N/A
|-
|-
|style="text-align: center;"|'''INFANTRY'''
|'''BLACK_BOMB'''||N/A||N/A
|style="text-align: center;"|'''MECH'''
|style="text-align: center;"|'''SNIPER'''
|style="text-align: center;"|'''MOTORBIKE'''<ref>Same Unit as that from Days of Ruin/Dark Conflict</ref>
|-
|-
|style="text-align: center;"|'''ZCOUNIT_PARTISAN'''<ref>CO Unit of Kindle, Alexander</ref>
|style="text-align: center;"|'''ZCOUNIT_COMMANDO'''<ref>CO Unit of Sensei, Sophie, Sami  </ref>
|style="text-align: center;"|'''ZCOUNIT_RANGER'''<ref>CO Unit of Cairn </ref>
|style="text-align: center;"|'''ZCOUNIT_AT_CYCLE'''<ref>CO Unit of Grimm, Flak, Roboandy, Beast, Mary </ref>
|}
|}


Line 52: Line 63:


[[Category:Units]]
[[Category:Units]]
[[Category:UnitIDs]]
[[Category:Modding tutorials]]

Latest revision as of 02:49, 30 September 2026

Air Units' stats and properties can be modified as a whole, by using the GameEnums.UnitType_Air variable.For instance:

CO_TEST.getOffensiveBonus = function (co, attacker, atkPosX, atkPosY,
    defender, defPosX, defPosY, isDefender, action,luckmode, map) {

    if (co.getIsCO0() === true) {
            switch (co.getPowerMode()) {

            case GameEnums.PowerMode_Power:
                if (attacker.getUnitType() === GameEnums.UnitType_Air) {
                    return 30;
                }
            break; 
       //rest of the code goes here
       }

    }

}


Increases the Offense of Air Units by 30% during the CO Power.

Modifying stats or properties of specific Units

Each Unit can be modified through a comparison of the UnitID. The Unit ID can be obtained through unit.getUnitID() And it's of a String type.

Possible values are, along with their weapon names:

Air units and their weapon strings
Air Units Primary Weapon String Secondary Weapon String
K_HELI[1] WEAPON_AIR_TO_GROUND_MISSILE WEAPON_K_HELI_MG
T_HELI[2] N/A N/A
DUSTER[3] WEAPON_AIRPLANE_MG N/A
BOMBER WEAPON_BOMB N/A
STEALTHBOMBER WEAPON_STEALTHROCKET N/A
TRANSPORTPLANE N/A N/A
FIGHTER WEAPON_AIR_TO_AIR_MISSILE N/A
WATERPLANE[4] WEAPON_WATERPLANE_MISSILE N/A
ZCOUNIT_KIROV[5] WEAPON_BOMB N/A
BLACK_BOMB N/A N/A


Of these, the ones with the ZCOUNIT_ prefix are Units specific to COs that cannot be deployed by the rest.

Notes

  1. ↑ Same Unit as Battlecopters
  2. ↑ Same Unit as Transport Copters
  3. ↑ Same Unit as that from Days of Ruin/Dark Conflict
  4. ↑ Same Unit as that from Days of Ruin/Dark Conflict
  5. ↑ CO Unit of Tasha, Eagle, Waylon