creepsKit.package
- ..
- .metadata448 B
- README.md2.6 KB
- schema.yaml2.8 KB
README.md
creepKind (dataType contract)
One enemy kind for a tower defense, horde or wave game: its look colour and UI icon, its layer (ground or air), whether it is stealthed, its health, speed, contact damage, size, hover height and flat armour, the gold a kill is worth (bounty) and the lives it costs when it gets through (leak), and the traits it runs (a regenerating shield, healing nearby allies, splitting on death, stealth, boss phases).
creepsKit reads every .data file bound to this contract (creepsKit.creepKind) when Creeps.register() runs and defines each as a spawnerKit enemy kind under its id. The kit's own eleven kinds are in creepsKit.package/kinds/. To tweak a number, edit that file; to add a kind, copy one anywhere in your world, change its id, and call Creeps.register() again (or Creeps.reload()).
| field | meaning |
|---|---|
id, label, description | Identity; id is the spawnerKit kind name used in wave data. |
icon, glyph | An emoji for UI text, and a one or two letter ASCII fallback. |
color | The kind's colour (hex), the same in every style. |
order | Place in Creeps.catalog(). |
tags | Labels for filtering (Creeps.find({ tag = "armored" })). |
layer | ground or air. Air kinds hover hover metres up; only turrets that hit air may target them. |
stealth | Untargetable unless revealed (see traits.stealth). |
health, speed, damage, size, hover | spawnerKit numbers: hit points, metres per second, contact damage, body size, hover height. |
armor | Flat armour subtracted from every hit (at least 15% of a hit always lands; poison and environment damage go around armour). |
bounty, leak | Suggested gold for a kill and lives lost on a leak. |
spawnable | false for kinds only made by other kinds (the splitling). |
traits.shield | amount of shield, recharging at regenRate per second after regenDelay seconds without a hit. |
traits.heal | Every interval seconds, heal allies within radius metres by amount (healsSelf: itself too). |
traits.split | On death, count enemies of kind into appear where it died, spread metres apart, and walk on from there. |
traits.stealth | Hidden until hit (stays revealed revealTime seconds) or within reach of a detecting turret (detectRadius extra metres). |
traits.boss | thresholds (health fractions, e.g. [0.66, 0.33]) start phases 2 and 3: phase 2 multiplies speed by enrageSpeed; phase 3 raises a shield of shieldFraction of max health and summons summonCount of summon. |