DefenseMultiplier and DefenseDivider should be upgraded from crude integer multipliers to percent multipliers, similar to other mechanics.
The reason is simple. Using small integers for bonuses allows no finer gradation or tuning.
Consider a unit which defends at 8, and you want to give it small a bonus in a special context, The smallest bonus you could give it is a full 2x, raising it all the way up to an invincible 16. When we consider other defense bonuses in the game -- such as from terrain or veteran levels, many are lower than 2x and allow the ability to specify fine gradations.
Consider this has already been done in other areas, for example:
[effect_city_walls] type = "Defend_Bonus" value = 200
Tuning the relative strengths of things to all work together in a ruleset is a very fine art. Often differences as small as 5% or 10% wildly alter game dynamics. The current crude integer multiplier system forces game designers to paint fine details with a huge roller paint brush. It has resulted in no ruleset in existence ever being able to tune out its imbalances. It has held us back and alienated finer talent from moving freeciv to much higher levels.
#1 Updated by S.C. L. over 1 year ago
I apparently can't mark this resolved myself, but it's done:
PR#16 on Github; also attached as a patch.
- The help text for DefenseDivider and DefenseDividerPct might be confusing. Dividing defense is effectively equivalent to multiplying attack, so it could be rephrased like this, either as part of this or as a separate issue.
- In the same vein, defense dividers could be properly replaced with attack multipliers. This would make the civ2 ruleset technically no longer accurate, but it would be more straightforward and reduce rounding in defense calculations, making combat marginally more precise. That would of course be a separate issue.
- Alternatively, the defense multipliers and dividers could be united into one calculation. Since this patch changes the defense multiplier cache to store a percentage instead of an integer multiplier, this cache could actually include the defense divider. That way, other code (e.g. AI) could directly use that value without dealing with the details.
#2 Updated by S.C. L. over 1 year ago
- File 0001-Fixed-typo-relating-to-defense-multiplier-migration-.patch 0001-Fixed-typo-relating-to-defense-multiplier-migration-.patch added
Added a missing
/100 in AI code that may have caused AI to vastly overvalue units with defense multipliers.
#6 Updated by Marko Lindqvist about 1 year ago
- File 0033-Add-DefenseMultiplierPct-DefenseDividerPct-combat-bo.patch 0033-Add-DefenseMultiplierPct-DefenseDividerPct-combat-bo.patch added
- Category set to General
- Status changed from New to Resolved
- Assignee changed from S.C. L. to Marko Lindqvist
Marko Lindqvist wrote:
Can we have this as a single patch?
Combined them myself.