DLL Request: Warmonger adjustments

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,699
Location
Near Portsmouth, UK
Current situation
- code is in CvDiplomacyAIHelpers:: ApplyWarmongerPenalties() and CvDiplomacyAIHelpers:: GetWarmongerOffset()
  • Warmonger penalties only apply between majors, but are applied if a major captures a major or minor city
  • Penalties are applied only to majors that the attacker has met
  • Penalty is halved if the 3rd party major is also at war with the defending player
  • Penalty for capturing a major city is the same as for a minor city
  • Penalty is divided by the number of cities left in the defenders empire
  • Warmonger decay is a fixed amount per turn

Consider six major civs, A thru F, on a single long thin landmass. Each major has only met their immediately adjacent neighbour(s), ie, A has only met B, B has met A and C, C has met B and D, D has met C and E, E has met D and F, and F has only met E

C declares war on D and captures one of D's cities, the following warmonger penalties are applied
  • A gets no warmonger adjust against C
  • B gets a warmonger adjust against C
  • D gets a warmonger adjust against C (obviously!)
  • E gets no warmonger adjust against C
  • F gets no warmonger adjust against C


Problems with the current situation
There is no consideration of ...
  • Civs the defender has met
  • DefPact agreement(s)
  • the aggressor
  • joint wars (ie "will you go to war with me against ...")
  • approach between the 3rd party major and the warring majors
  • capturing a major or minor city
  • the size of the city captured
  • for capturing the capital.
  • approach between players on the decay rate


(The modded DLL currently has a lot of adjustments for World Congress resolutions, but these only apply late game and when passed.)
 
Proposed changes
D should always gets the full warmonger adjust against C

There is no consideration of civs the defender has met
- It should be E (who D has met and is complaining to about C attacking them) and not B (who D has not met) who should get the warmonger adjust against C - even though C has not met E.
(If B is to receive a warmonger adjust against C it should be reduced - after all the victor writes history ... "D is the maniacal tyrant who C is helping the people rise up against" ... which B can't argue with having never met D)

There is no consideration of DefPact agreement(s)
- If D has a DefPact with anyone they should also get the full warmonger adjust against C

There is no consideration of the aggressor
- C declared war on D, but if D captures a city from C they get the same penalty as when C captures a city from D, there should be a reduction

There is no consideration of joint wars (ie "will you go to war with me against ..."), only mutual wars (when the penalty is halved)
- D asks B to join a war against C ...
... B (or D) captures a city from C, there should be NO warmonger adjust with D (or B)
... C captures a city from B (or D), there should be NO warmonger adjust with D (or B)

There is no consideration of approach between the 3rd party major and the warring majors
- Assume B has also met D. If B is friendly towards C and hostile to D, why should B get the same warmonger adjust against C as when B is hostile towards C and friendly to D?
Assign an approach score to C and D from the perspective of B
MAJOR_CIV_APPROACH_HOSTILE = 6
MAJOR_CIV_APPROACH_AFRAID = 4
MAJOR_CIV_APPROACH_GUARDED = 3
MAJOR_CIV_APPROACH_NEUTRAL = 2
MAJOR_CIV_APPROACH_FRIENDLY = 0
Calculate (approach_attacker - approach_defender) (eg, neutral-neutral = 0, afraid-neutral = 2 and friendly-hostile = -6) and use that as an additional adjustment (eg approach_diff * 10% adjustment)

There is no consideration of capturing a major or minor city - the penalty is the same.
- Base penalty for a minor city should be different for a major city

There is no consideration of the size of the city captured, only the number of cities left in the empire after the attack - size 1 city is worth as much as a size 20 city.
There is also no consideration for capturing the capital.
- Adjustment should be based on pop of city captured vs total pop in empire (and multiply the capital by a factor, eg 2)

There is no consideration of the approach between players on the decay rate
- Decay rate should be modified by approach, friends are more likely to forgive and forget, enemies are more likely to hold a grudge
 
Agreed. All great proposals.

Especially the warmonger penalties from taking cities from civs that attacked you have been annoying me for a long time.

Is this something you're working on now?

\skodkim
 
Oh my goodness, Yes x All.

It's safe to say not taking the aggressor into account has always bothered many, but I've always been particularly annoyed that joint wars and city size aren't accounted for. I've never really given much consideration to civs only the defender has met, but accounting for them makes a lot of sense.
 
Is this something you're working on now?

Not immediately, but it's been bothering me for some time so I thought I'd get my ideas "down on paper".

Implementation will be non-trival - having to remember who declared war on who and who's involved in joint wars.

I've just updated the original posts to include warmonger decay (which is just a fixed rate per turn and doesn't take into account the approach between the civs)
 
I've just updated the original posts to include warmonger decay

Wondering if the decay rate should be "normalised" to a base of 1000? On the grounds that when you really, really, really, really hate someone it's not that much different to just really, really, really hating them - memory is a function of both time and event.

So, if warmonger score is 1000 or less (the standard base score for capturing a city), the per turn decay will be 5 (the base decay rate). But if the warmonger score was 3000 (say) the decay for that turn would be 3000/1000 * 5, ie 15
 
There is no consideration of ...
* the size of the city captured

The standard algorithm is

iWarmongerBase = 1000;
iWarmongerPenalty = iWarmongerBase / max(1, iNumCities-1)

so the penalty for capturing a city in a five city empire is 1000/4 ie 250 regardless of size of the city. And the penalty for the penultimate and last city is 1000.

I'm leaning towards

iWarmongerPenalty = (iWarmongerBase / (iNumCities-1)) * (iCityPop / ((iTotalPop-iCityPop)/(iNumCities-1)))
 
I added quite a few mods in CSD that looked at ideology and religion, among other things, to determine the value of a warmonger penalty when applied. Most of them are going to be made part of the CBP as well, as they operate on the same level of nuance as what you propose, whoward. They're part of the preexisting modifications you mentioned.

G
 
(..) They're part of the preexisting modifications you mentioned.

G

Does that mean I should definitely not add the new "AI - Warmonger Adjustments" mod on WHoward's Pick'N'Mix site to a fresh game that also features the Community and Balance Patch?
 
I had met Shaka, but Attila had not. I started a war against the Huns to help a city state, and Shaka didn't care. That's what you wanted to achieve, correct?

It makes sense, anyway.
 
Has this already been incorporated fully into CPP? Tried adding Whowards new Warmonger adjustments minimod and found out that the table entries already existed in CPP.

\Skodkim
 
So it isn't enabled in cpp even though the table entries are found in the mod?

Whowards uses his warmonger adjustment mod to do this so I guess one could take his mod and delete everything but the part that actually enables the adjustments..?

\Skodkim
 
So it isn't enabled in cpp even though the table entries are found in the mod?

Whowards uses his warmonger adjustment mod to do this so I guess one could take his mod and delete everything but the part that actually enables the adjustments..?

\Skodkim

Sorry, I was typing on my phone. I'm going to enable it in the next release- the data is there, but I wanted to make sure my integration was correct before turning it on.
G
 
Top Bottom