Softened killstack: defend bonus in stacks

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Ignatus
Hardened
Posts: 230
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Softened killstack: defend bonus in stacks

Postby Ignatus » Sun Jul 07, 2019 5:59 pm

While no killstack results on "stacks of doom" marching around, killstack results in one successful horseman wasting 10 phalanxes in one attack. Can we try an intermediate effect: give stacked units defend bonuses so that their chances to defend grows in bigger (until some size) stacks? We assume that while a single phalanx defend the escorted diplomats demoralize enemies, workers build reduits etc., however the defender is only one and has finite hp. For example, if all units in a game have hp=20 and fp=1, then let's add to effects.ruleset something like this:

Code: Select all

;2 units defense 115%
[effect_stack_2_defense]
type = "Defend_Bonus"
value = 15
reqs = {"type", "name", "range", "present"
 "MaxUnitsOnTile", 1, "Local", FALSE
  "CityTile", "CityCenter", "Local", FALSE
  "ExtraFlag", "NoStackDeath", "Local", FALSE}

;3 units defense 124%
[effect_stack_3_defense]
type = "Defend_Bonus"
value = 9
reqs = {"type", "name", "range", "present"
 "MaxUnitsOnTile", 2, "Local", FALSE
  "CityTile", "CityCenter", "Local", FALSE
  "ExtraFlag", "NoStackDeath", "Local", FALSE}
;...
;8 units defense 148%
[effect_stack_8_defense]
type = "Defend_Bonus"
value = 3
reqs = {"type", "name", "range", "present"
 "MaxUnitsOnTile", 7, "Local", FALSE
  "CityTile", "CityCenter", "Local", FALSE
  "ExtraFlag", "NoStackDeath", "Local", FALSE}

The numbers can be found in Excel file. They are adjusted so that with attack value equal to the defense one without the effect the units in equal full-health stacks will die with equal probability (the defending stack loses more often then wins but its units if alive are alive all and can get exp, while from won attackers at average about a half units die while all but one are unscratched but no veterans). Of course the assumption that basically att=def is false in most cases, for 2fp attackers that attack 2fp targets we should use dp(10) column and for other strong attackers recalculate with the strength ratio they most likely have. Finding a defending force for given success probability is difficult (we solve a big power equation, in the table they were adjusted manually), hardly it will be ever done precisely for each case by the game, also AI hardly understands it, but it is actually doable in Freeciv 2.6. What you think about this as a general ruleset idea?
Attachments
Book.zip
xlsx, you'll understand it
(9.33 KiB) Downloaded 10 times

Lachu
Elite
Posts: 391
Joined: Sat May 04, 2013 2:19 pm

Re: Softened killstack: defend bonus in stacks

Postby Lachu » Sun Jul 07, 2019 6:14 pm

Civilization 6 implements similar feature. Each unit placed near unit of the same player gives small defend bonus and small attack bonus.