Hi
behaviour.json config:
1)
economy.build_delay - when constructor (mobile or factory) finished building it will wait doing nothing for
economy.build_delay seconds before another construction order issued (on per-unit basis, not per-faction).
I don't know in what order difficulties should align, can't say if there's an error about
economy.build_delay for novice or easy.
2) Regular attackers has 2 phases:
a) Defence: AI accumulates units at own base until sum_group_power >=
quota.thr_mod.defence * nearest_enemy_cluster_threat. Lowering
quota.thr_mod.defence should result in more frequent attacks with smaller groups. Also
quota.thr_mod.defence: [<min>, <max>] is internally a single value equal to random(<min>, <max>) just to randomize behaviour a bit.
b) Attack:
quota.thr_mod.attack: [<min>, <max>] - again random(<min>, <max>) - this value multiplies enemy threat (it actually divides AttackGroup power) during target selection, so the lower this value the more AttackGroup will be eager to suicide.
3)
quota.raid: [<min>, <avg>].
Threat (enemy) and power (own) is currently magic values calculated by AI code like
threat = DPS^0.5 * alpha_damage^0.25 * (current_health + current_shield*2)^0.5 * const1
DPS - damage per second (with custom modifiers for status effects like stun or slow);
alphaDamage - single shot damage (with custom modifiers for status effects like stun or slow);
const1 - some precalculated constant to keep values small near 1.0 (instead of 100000.0)
Currently the only way to read threat values for each unit is to recompile AI and manually print it. Few threat examples:
Glaive (cloakraid) = 1.108003;
Duck (amphraid) = 2.12699;
Detriment (striderdetriment) = 257.516357
For
quota.raid=[6.0, 20.0] - first value 6.0 controls minimum power of raid group; 6*cloakraid or 3*amphraid is enough to form a group and start raiding:
6*1.108003 >= 6.0 or 3*2.12699 >= 6.0 or any combination of raiders where total power sum >= 6.0. Second value 20.0 controls maximum number of raiders in a single group: if power of a group exceeds 20.0 another raider won't be assigned to this group.
4)
retreat.builder,
retreat.fighter - default percent of health at which unit will retreat to base (separate for builders and attackers). But per-unit config value overrides it, see
behaviour.cloakcon.retreat for example (also see
Zero-K units for internal-name to human-readable translation, cloakcon==Conjurer).
retreat.shield: [<empty>, <full>] - at <empty> percent of shield unit will retreat to base, when shield regenerates to <full> percent unit will return to battle (0.85 == 85%)