Military power score.

@ilteroi, can you give us a little rundown on the function?



Should be just levels, since it is "getLevel()"



Should we separately measure the value of each promotion? Although measuring levels is close enough, various promotions aren't exactly equal in worth. For a level 4 unit, it could either be:

- Archer: 3 Volley + Range
- Archer: 2 Barrage + 2 Defense

How quantifiable is promotions such as "Logistic" (Attack twice) and "2 Cover"? Should we give an exact value to these promotions? Or should we use it to multiply the iPower score (calculated by base combat strength and levels)?

With reference to ilteroi and Omen_Of_Peace 's model and considering only one unit, should we get something like this?

- Spearman (11) x Level 4 (1.36) x Stalwart (1.2)
- Spearman (11) x Level 4 (1.36) x Cover (1.1) x Cover(1.1)

As can be seen in this example, Stalwart and cover have situational use. Covers are available eariler and good against ranged units but does not aid melee defense. Stalwart on the other hand is more well-rounded, provide defense to all attacks and give 1 more level or Drill. Maybe also separately consider the "Shock" or "Drill" promotions?

The issue with hardcoding promotions like that is its not very flexible for mod mods and the like. For example, one of the reasons that G likes the happiness system is its flexibility if other people change elements of the game. I think the same would apply here, you wouldn't want the power coding to go nuts just because someone change some promotions with a mod mod.
 
Should we separately measure the value of each promotion? Although measuring levels is close enough, various promotions aren't exactly equal in worth.

Besides what stalker said about modmods, I don’t like the idea of some promotions having more “value” since it encourages boring pigeonholed promotion tracks to optimize gameplay. One of the reasons why I come back to this mod over the base games is how viable all choices seem to be. I’d rather have the freedom to pick promotions that are relevant to the terrain and function of my units rather than having to wring my hands about not picking woodsman because minmaxing.
 
Many lower difficulty players are from vanilla civ5 and are not used to maintaining a reasonably sized army, so they're more likely to complain about AI being aggressive. As said, AI army size is also lower to fit the difficulty.
 
please let's not go overboard with the changes. also please keep in mind i didn't invent this scheme, i'm just trying to improve it.

anyway, let's talk about concrete points.

1. should your military score depend on the number of cities you own or the number of plots you own? if so, how?

2. should base unit power be the actual unit power from the database? are those values correct? would it perhaps be better to combine combat strength and mobility instead?

3. i dislike hardcoding individual promotions, so just looking at the level of the unit seems a good solution.

4. should low unit health really reduce unit power to zero? combat strength is calculated differently (50% at 1hp iirc)

5. any other factors which could be important? in general simpler is better ... but what about vassals? defensive pacts?
 
1. should your military score depend on the number of cities you own or the number of plots you own? if so, how?

2. should base unit power be the actual unit power from the database? are those values correct? would it perhaps be better to combine combat strength and mobility instead?

3. i dislike hardcoding individual promotions, so just looking at the level of the unit seems a good solution.

4. should low unit health really reduce unit power to zero? combat strength is calculated differently (50% at 1hp iirc)

5. any other factors which could be important? in general simpler is better ... but what about vassals? defensive pacts?

1. A malus for number of cities isn't bad concept, but the current implementation makes it too large of a factor. Easy solution is to just scrap it. If it is kept, it needs to be really small.

2. I think just strength without mobility is fine (if you add mobility, there are other intangibles you could argue as well).

3. I'm actually impressed that it considers promotions at all, unit level is a good enough approximation.

4. I'm okay with injured units contributing less.

5. I don't think defensive pacts or vassals should be a part of a civ's personal military score. Wonders like Great Wall and Alhambra might make sense though.
 
Last edited:
2, 3. Let's not count promotions, only levels. I'm actually all for dropping unit strength as a factor, and use unlock tech instead (for UUs that unlock at an earlier tech, count the original tech). This way a skirmisher would be worth as much as a swordsman or a quinquereme, but less than a composite bowman. Currently I think melee CS is used which makes ranged units worse at tributing.

4. 50% unit score at "0hp" seems fine. Make sure it scales from the unit's max hp (instead of 100) to 0, since hp varies per unit.

5. Defensive pacts, vassals, wonders etc. should not be included in military score since it's used for tributing city states which shouldn't care about these. Only units should count.
 
1. Ideally I would say it would scale according to "fronts" or some approximation of that, but that might be too esoteric. But that would be the best actual approximation; if you have 10k power and 1 front you have as much power to defend that front as someone with 20k but 2 fronts. If that isn't possible I'd suggest removing or significantly reducing how much it matters, since someone with 5 cities spread pretty far out doesn't have a better military than someone with 10 cities in the same area.

2. Base CS imo, don't use mobility

3. Yep, level is good

4. I'd suggest using the same strength calculation the game uses for unit HP

5. Defensive Pacts no, but I do think vassals should be used. Vassals are just extensions of yourself for war-diplomacy, a civ with 50k military and vassal(s) totaling another 30k should be considered scarier than one with 60k, because in any war situation it is 80k worth of military score.
 
1. should your military score depend on the number of cities you own or the number of plots you own? if so, how?
...
4. should low unit health really reduce unit power to zero? combat strength is calculated differently (50% at 1hp iirc)
...
5. .... in general simpler is better ...

1. Why should military score depend on the number of owned cities at all? And, if so, why should the score be reduced then? IMO a big strong army is even stronger, if there is a stronger infrastructure to maintain it. And big empires can buy or build new units much faster, if necessary.

4./5. Maybe it is enough to simply check if a unit is injured or not. While injured, units could count 0.75 of their original score (or any other percentage). Why? Maybe the score would be less volatile while at war, so hopefully weak AI would be less tempted to declare war on strong empires.
 
1. Why should military score depend on the number of owned cities at all? And, if so, why should the score be reduced then? IMO a big strong army is even stronger, if there is a stronger infrastructure to maintain it. And big empires can buy or build new units much faster, if necessary.
The idea was that a larger empire has more land that it needs to defend, so it needs a larger army. The simplified ratio used isn't often close to accurate in practice.
 
I like the idea of a city or tile scaler but I can see how this could hurt the AI's ability to properly guage threats.

Maybe make the calculation ignore cities that have military near them? A garrison perhaps?
 
I like the idea of a city or tile scaler but I can see how this could hurt the AI's ability to properly guage threats.

Maybe make the calculation ignore cities that have military near them? A garrison perhaps?

Part of the problem is that the AI doesn't properly gauge threats right now due to how diluted military score is from city count. I had a situation where one civ was very close to my military score despite them having maybe 10 units max compared to almost 100 of my units (which were also higher tech units and more promoted), but I had ~30 cities vs his 4. So the AI sees that they have a similar military score to me and declare war, and then get completely steamrolled by my army which is objectively superior in every way.
 
  • Like
Reactions: 4CV
Part of the problem is that the AI doesn't properly gauge threats right now due to how diluted military score is from city count. I had a situation where one civ was very close to my military score despite them having maybe 10 units max compared to almost 100 of my units (which were also higher tech units and more promoted), but I had ~30 cities vs his 4. So the AI sees that they have a similar military score to me and declare war, and then get completely steamrolled by my army which is objectively superior in every way.

I don't know for certain that's the reason, but I would have to agree that (at least on King) the AI seems to have absolutely no sense of their chances when declaring on me. This is particularly evident when they declare, lose three units on my first turn after war is declared and then immediately disappear until it's time to peace out.
 
I think the fundamental notion of using city count in military strength is fine, we just need to keep tweaking the formula.

For example, put in some diminishing adjustments. I think it makes sense to note that a 4 city civ needs a fewer units to defend versus a 10 city. But a 10 city vs 20...there isn’t much difference there. If the formula can account for that it may work better
 
ok, new implementation done: we now sum up the attack strength for all units, add 10% per promotion and garrisoned units are discounted by half. that's it.
 
So if you're trying to get that last few points for tribute, you move your garrisons out of their cities?
 
ok, new implementation done: we now sum up the attack strength for all units, add 10% per promotion and garrisoned units are discounted by half. that's it.

A reasonable model. If its possible to go one more level of complexity, I would actually lower the promotion bonus to 5%, but grant a big bonus (25% or so) if the unit is level 4 or higher. Level 1-3 promotions are nice but they don't radically change things, its level 4 when units start to really hit above their weight class.
 
I don't know for certain that's the reason, but I would have to agree that (at least on King) the AI seems to have absolutely no sense of their chances when declaring on me. This is particularly evident when they declare, lose three units on my first turn after war is declared and then immediately disappear until it's time to peace out.

I have had AI declare war on me in this most recent game in very strikingly stupid ways because despite having 1-2 military tech higher (I'm currently attacking Rifleman with Modern Armor) and over 120 filled supply because I'm still not first in military strength due to how many cities I own. They also seem to ignore my vassal and allied CS strength when deciding, or don't value it highly enough, considering they'll think its a good idea to declare against 75% of the world's military.

Also, I'd guess this feeds into how easy it is to bribe AI into terrible wars? Japan was bribed into declaring on me when I was 2 military techs above them with my and my 2 vassals entire armies on their border. The war was over so fast I had to sit around for like 4 turns doing nothing to wait for Peace to be an option so they could capitulate.
 
I have had AI declare war on me in this most recent game in very strikingly stupid ways because despite having 1-2 military tech higher (I'm currently attacking Rifleman with Modern Armor) and over 120 filled supply because I'm still not first in military strength due to how many cities I own. They also seem to ignore my vassal and allied CS strength when deciding, or don't value it highly enough, considering they'll think its a good idea to declare against 75% of the world's military.

Also, I'd guess this feeds into how easy it is to bribe AI into terrible wars? Japan was bribed into declaring on me when I was 2 military techs above them with my and my 2 vassals entire armies on their border. The war was over so fast I had to sit around for like 4 turns doing nothing to wait for Peace to be an option so they could capitulate.

I really wish that either players got the same benefit (easily bribing wars) or that the AI could stop allowing that. It's intensely frustrating when you have one or two powerful enemies and they'll just constantly bribe the other, much weaker civs into wars that would be suicidal if I didn't mostly just choose to ignore those declarations rather than exploit them.

At least I assume they're bought. I usually see the "Blah blah brokered war against you!" if I have a spy in the purchaser's capital in the cases I'm thinking of; the rest of the time, I just intuit it based on the fact that they usually have no military nearby and those wars will frequently end without a single skirmish if I don't pursue anything.
 
Top Bottom