ZeroK-RTS/Zero-K

Turn hardcoded gadget defs into presets

Opened this issue · 0 comments

Some things don't fit in a unit def customparam and have to be defined in a dedicated config file, e.g. the definition of dirtbag mound:

[UnitDefNames["shieldscout"].id] = {
shrakaPyramidDiff = 140,
posX =
{-8, 0, 8,
-16,-8, 0, 8, 16,
-24,-16,-8, 0, 8, 16, 24,
-32,-24,-16,-8, 0, 8, 16, 24, 32,

But it's defined per-unitdef, so if a modder copies Dirtbag then it won't have the feature. Similar things happen with drones and perhaps others (part of the task is to find the others).

Change this so it's a named preset, e.g. small_mound = { ... } in the config and then Dirtbag gets death_terraform = "small_mound" customparam. Then a ModdedDirtbag (or generally any unit) can also get the customparam to get the behaviour.