[.86][Bug] City Militia Issues

The whole city militia system is a little rough. For one thing, after a successful battle, having 5 city militia defending, two of them disappeared from the city screen. They took no damage, but are no longer counted as defenders for that city. This is really hurting city defense. 

There is also the fact that city militia will be favored over garrisoned units for defense, kicking out my more powerful bowmen for weakling defenders. That should not be happening. I would much rather a change where the garrison fights first and then the enemy has to attack a second time and defeat the militia. Or else allow more than 18 units to start in a tactical battle.

I think a better solution for city militia is to spawn them with a summoning spell in front of my garrisoned units, rather than counting them as units for the battle.

1,358 views 3 replies
Reply #1 Top

Hmmm... When I switched to Localdataonly, I can have any number of defenders. Very odd. I will test it some more.

Reply #2 Top

Q:  Can I edit the quality of my city militia?

 

Reply #3 Top

Yes, but it is a very odd xml. In CoreUnits.xml, search for city militia. There is one for each race, so any change you do has to be done for every one. It will take some know how to give them armor if that is what you are thinking. This is the weapon choosing system:

<EquipmentUpgradeDef>
<EquipmentSlot>Weapon</EquipmentSlot>
<SelectionCriteria>MaximizeSum</SelectionCriteria>
<ComparisonAttribute>UnitStat_Attack_Blunt</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Cutting</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Pierce</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Cold</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Fire</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Lightning</ComparisonAttribute>
<ComparisonAttribute>UnitStat_Attack_Poison</ComparisonAttribute>
</EquipmentUpgradeDef>

The reason they took armor off them was probably to avoid needing to deal with encumbrance. I modded my game to give -4 Init at 50%, -8 Init at 75%, and -12 Init at 100%. Pretty much kills a unit to have too much weight so I haven't messed with city guards, except to add an archer version. This can be done by duplicating every race's city defender entries, deleting all the max sums and creating a new unitstat_attack_ranged and then adding points of this to each bow. A shortbow has two points. A Yew Longbow has 50. The numbers are arbitrary, but they allow the game to pick the best bow as the game goes on. Rather complicated I know.