Skip to content

2.3 UnitData

jkdev edited this page Feb 4, 2025 · 3 revisions

UnitData contains multiple important parameters concerning unit's stats and values. Lets use baby gragon as example:

"babydragon": {
  "health": 150,
  "defence": 30,
  "movement": 2,
  "range": 1,
  "attack": 30,
  "cost": 10,
  "hidden": true,
  "upgradesFrom": "dragonegg",
  "unitAbilities": [
    "grow",
    "dash",
    "fly",
    "escape",
    "scout",
    "static"
  ],
  "weapon": 7,
  "promotionLimit": 0,
  "idx": 18,
  "growthRate": 3
},

UnitData.type

Specifies enum value of the unit, used as a key:

"babydragon": {
None,
Scout,
Warrior,
Rider,
Knight,
Defender,
Ship,
Battleship,
Catapult,
Archer,
MindBender,
Swordsman,
Giant,
Bunny,
Boat,
Polytaur,
Navalon,
DragonEgg,
BabyDragon,
FireDragon,
Amphibian,
Tridention,
Mooni,
BattleSled,
IceFortress,
IceArcher,
Crab,
Gaami,
Hexapod,
Doomux,
Phychi,
Kiton,
Exida,
Centipede,
Segment,
Raychi,
Shaman,
Dagger,
Cloak,
Cloak_Boat,
Pirate,
Bombership,
Scoutship,
Transportship,
Rammership,
Juggernaut

UnitData.idx

Specifies int enum value of the unit.

"idx": 18,

UnitData.hidden

Specifies if unit is hidden from training in cities.

"hidden": true,

UnitData.cost

Specifies cost of the unit.

UnitData.health

Specifies health of the unit.

UnitData.defence

Specifies defence of the unit.

UnitData.movement

Specifies movement of the unit.

UnitData.weapon

Specifies weapon type of the unit.

UnitData.range

Specifies range of the unit.

UnitData.attack

Specifies attack of the unit.

UnitData.unitAbilities

Specifies unit abilities.

Here is all current vanilla unit abilities:

None,
Dash,
Escape,
Scout,
Sneak,
Hide,
Build,
Persist,
Convert,
Heal,
Swim,
Carry,
Grow,
Fly,
Splash,
Decay,
Navigate,
Crush,
Freeze,
FreezeArea,
AutoFreeze,
Skate,
Fortify,
Creep,
Boost,
Independent,
Poison,
Eat,
Unique,
Explode,
Surprise,
Agent,
Infiltrate,
Detect,
Intercept,
Stiff,
Protect,
Stomp,
AutoHeal,
Static

UnitData.movementTerrain

Specifies movement terrain of the unit.

UnitData.upgradesFrom

Specifies unit which you can upgrade to get current unit.

UnitData.promotesTo

Specifies unit to which current unit promotes.

UnitData.growthRate

Specifies how much turns unit needs to grow to the next upgrade.