Warmongering calculation in BNW?

Thanks Kaspergm.

Also I had a look at XML for Vanilla > GnK and BnW and those Warmonger weights haven't been touched since at least 2012 when Vanilla patching more or less completed.

As an aside, threshold for relationships also range from -80 to +80 for GnK and BnW from -50 to +50 in Vanilla, so they've allowed for more room for things to build up.

Code:
		<Row Name="OPINION_THRESHOLD_UNFORGIVABLE">
			<Value>80</Value>
		</Row>
		<Row Name="OPINION_THRESHOLD_ENEMY">
			<Value>40</Value>
		</Row>
		<Row Name="OPINION_THRESHOLD_COMPETITOR">
			<Value>15</Value>
		</Row>
		<Row Name="OPINION_THRESHOLD_FAVORABLE">
			<Value>-15</Value>
		</Row>
		<Row Name="OPINION_THRESHOLD_FRIEND">
			<Value>-40</Value>
		</Row>
		<Row Name="OPINION_THRESHOLD_ALLY">
			<Value>-80</Value>
		</Row>



As noted previously

Code:
		<Row Name="WARMONGER_THREAT_PER_TURN_DECAY">
			<Value>-5</Value>
		</Row>

I am however not sure that we should multiply numbers indicated previously by 100? 2100 score for killing 2 cities? Seems excessive. Multiplying by 10 seems more reasonable and that still puts you on Critical which is not very consistent with my experience where I've Puppeted CS as Venice then took out a neighbour completely and then even grabbed someone else's capital when I got bored later. No mass denunciations, still lots of friends. Those numbers don't make sense from my experience. as I noted earlier to @Vidszhite; bad diplomacy coupled with a modest warmonger penalty is most likely the source of his problems, not that the penalty itself is too severe.

Worth nothing this comment from the source you linked. Note the bolded part.

A SEVERE Warmonger status is then given if > 25% of players have been killed (modified by the Warmonger Hate stat), and CRITICAL if > 40%.

As the number of city states is large, a warmonger status is hard to get this way. Nominally a standard map has 8 Civ and 16 city states, so 24 in total. That means you would have to conquer 6 players to get SEVERE and approximately 9-10 to get critical. I guess MONGOLIA gets a little screwed in this calculation, but hey GHENGIS is what GHENGIS is NOTE : Warmonger hate alters this number up or down.


ASIDES:

Also note that a curious enty
Code:
		<Row Name="OPINION_WEIGHT_SAME_LATE_POLICIES">
			<Value>-5</Value>
		</Row>
		<Row Name="OPINION_WEIGHT_DIFFERENT_LATE_POLICIES">

Likely refers to same ideology / different ideology and that only gives us -5 for same ideology and +5 for different ones.

The interesting part here, and this relates to your comment on why same religion bonuses seem so mild is that the devs have mentioned that Religion becomes less relevant after the Renaissance, but there are no values in the AIDefines for this.

So I believe that these opinion weights determine the cumulative goodwill the AI has towards you and may factor into their final approach, but things like same religion/same ideology likely runs through the grandmaster AI which isn't affected so much by their opinion but practical considerations like expansion, threat assessment and who to attack. These aren't opinion based, so it's likely there's a religion component there that determines how they will approach those sharing same religion/same ideology. hands-on experience tells me the impact of sharing the same religion pre-Renaissance and different ideologies post Industrial is far far larger than those values indicate.

The AI is no longer just a blank slate that tweaked by a single opinion variable, if it ever was even in Civ4. The opinion defines appears to be the front-end of the AI and ends up on the tooltips, but I don't think it runs everything anymore.
 
I am however not sure that we should multiply numbers indicated previously by 100? 2100 score for killing 2 cities? Seems excessive. Multiplying by 10 seems more reasonable and that still puts you on Critical which is not very consistent with my experience where I've Puppeted CS as Venice then took out a neighbour completely and then even grabbed someone else's capital when I got bored later. No mass denunciations, still lots of friends. Those numbers don't make sense from my experience.
The number 1000 is very certain. This is both seen in the XML files (listed as WARMONGER_THREAT_xxxxx_CONQUERED_WEIGHT) but more convincingly, you will see this directly in the code that Gabriel_Pyyrhic posted directly from the .dll source:
Code:
						// Have I met the player who conquered the city?
						if(GET_TEAM(GET_PLAYER(eMajor).getTeam()).isHasMet(getTeam()))
						{
							int iNumCities = max(GET_PLAYER(pOldCity->getOwner()).getNumCities(), 1);
							int [b]iWarmongerOffset = (1000 * GC.getMap().getWorldInfo().GetEstimatedNumCities()) / (max(GC.getGame().getNumCities(), 1) * iNumCities);[/b]
							GET_PLAYER(eMajor).GetDiplomacyAI()->ChangeOtherPlayerWarmongerAmount(GetID(), iWarmongerOffset);
						}
Even if you don't get all the details of the code (which I don't) you should be able to recognize that the bolded line is exactly the formula that Putmalk listed in his post on reddit, except it's not a factor 10 (like he wrote) but the factor 1000, consisten with the XML file.

BUT: It is important to notice that I think the number that comes out of this calculation (2100 in the exacmple discussed) is modified by some other numbers later, of which I don't understand all - I'll get back to that later in the post, but let me just address another part of your post.

Worth nothing this comment from the source you linked. Note the bolded part.
A SEVERE Warmonger status is then given if > 25% of players have been killed (modified by the Warmonger Hate stat), and CRITICAL if > 40%.

As the number of city states is large, a warmonger status is hard to get this way. Nominally a standard map has 8 Civ and 16 city states, so 24 in total. That means you would have to conquer 6 players to get SEVERE and approximately 9-10 to get critical. I guess MONGOLIA gets a little screwed in this calculation, but hey GHENGIS is what GHENGIS is NOTE : Warmonger hate alters this number up or down.
What this paragraph is talking about is NOT related to the numbers we discussed in the first part (based on the formula with the factor 1000). What Gabriel_Pyyrhic says is that there are *two* evaluations going on:
  1. A warmonger score is calculated using the formula 1000*EST(#cities)/MAX(#cities)*TARGET(#cities).
  2. The game evaluated how big a percentage of the overall civilizations on the map you have eliminated.
What the paragraph you quoted talks about is the second of these two. This one will force a warmonger severe label on you if you have eliminated 25 % of the civs on the map (= 6 city states on a normal map) and a warmonger critical label on you if you have eliminated 40 % of the civs on the map (=9.6 civs, i.e. the 9-10 civs listed in the quoted text).

According to Gabriel_Pyyrhal, the game will find which warmonger status (none/minor/major/severe/critical) you should have using both methods, and then apply the higher of these values.


Finally, I would like to addres the modifiers that are done to the warmonger score calculated from the formula used in 1). From the .dll code, I can see the current part:
Code:
				iWarmongerMod = GetWarmongerHate() - /*5*/ GC.getDEFAULT_FLAVOR_VALUE();	// Calculate difference from default
				iWarmongerMod *= /*10*/ GC.getWARMONGER_THREAT_PERSONALITY_MOD();	// This will range from -50 to 50 (%)
				iPlayersKilledPercent += (iPlayersKilledPercent * iWarmongerMod / 100);
If I understand this correctly - and I'm not sure I do, the first line will calculate the difference between the third party civs WarmongerHate value (which should range between 0 and 10) and the default number (5), which will come out in the range +/- 5.
The second line will then make a Modification factor to the warmonger rating which will be 10*the value calculated in first line (?), i.e. between +/- 50 %, as it says in the comment. This is the only part of the code that I can see that modifies the calculated score!

EDIT > I just realized I think actually this percentage modification is done not to the warmonger value calculated on the per-city formula (step 1), but rather the the number of civs you need to conquer (step 2)!

And this is what really puzzles me!! Because like you say, a warmonger rating of 2100 from capturing one city doesn't make sense if the threshold for critical warmonger hate is 200! So what are we missing here? Maybe it's because my understanding of how to read the code is limited - if someone who knows this better than I do can look into it, that would be cool (see here), and if I'm not mistaken, then I do think this formula is way off!



On a sidenote, am I mistaken, or does the calculation of the per-city formula actually do a check to see if you've met the other civilization before doing the calcluation?
 
^ I think we're missing something A score of 2100 for taking 2 cities doesn't make sense at all and even if it's the raw number, it doesn't bear out in gameplay which is more or less the nexus of the complaint.

It also makes no sense for it to evaluate 2 values and make it very easy for the first value to be smashed then make the 2nd value hard to reach unless you go out of your way to eliminate civs and kill city states to change the calculus. Something is being missed for sure. such as the possibility the warmonger score in the AIdefines is base 10 or 100 and not to be taken as face value which if we do it arithmetically, turns the 1000 adjustment back into 100 or 10. It's also possible the 1,000 adjustment is to adjust for the fact the game is returning decimal values ie: 0.52 for a map with 52 cities instead of 52. That changes the numerator from 52,000 if it's a straight 1,000 x52 to 520 which is exactly what the source used.

It's also worth noting The linked thread actually suggests the previous system we're coming off-of, with fixed penalties rather than one scaling based on map seems a lot worse, which makes sense if you view it as an attempt to scale warmonger hate to map size which was highly requested previously. This however isn't helped if you we start off with a numerator based on # of cities by map size x 1000 as it makes the score ALOT worse. Why go through all that trouble to scale by map size then generate these large numbers that cap your score right away. Occam's razor would suggest otherwise.

And if I understand correctly, we no longer get warmonger hate for eliminating city-states, a Civ's minor civ approach, and pledges to protect not withstanding.

Interesting discussion nonetheless.
 
It also makes no sense for it to evaluate 2 values and make it very easy for the first value to be smashed then make the 2nd value hard to reach unless you go out of your way to eliminate civs and kill city states to change the calculus. Something is being missed for sure. such as the possibility the warmonger score in the AIdefines is base 10 or 100 and not to be taken as face value which if we do it arithmetically, turns the 1000 adjustment back into 100 or 10. It's also possible the 1,000 adjustment is to adjust for the fact the game is returning decimal values ie: 0.52 for a map with 52 cities instead of 52. That changes the numerator from 52,000 if it's a straight 1,000 x52 to 520 which is exactly what the source used.
Question is, if some of these numbers are listed in a different base like you suggest, why would that only be for some of them? The decay rate is listed as 5, so if we use the factor of 10 instead of 1000, we get a warmonger rating of 21 and a decay time of 4 turns, which makes just as little sense, and clearly is NOT consistent with what we see in game. A value of 100 would make sense, but I find it very hard to believe that this one value was written in a different base while all the others were regular values (the thresholds, the decay rate, etc.). Anyway, I'll try to ask around in the modders section, I hope someone will have an answer for it.

And if I understand correctly, we no longer get warmonger hate for eliminating city-states, a Civ's minor civ approach, and pledges to protect not withstanding.
What gave you that impression?
 
Question is, if some of these numbers are listed in a different base like you suggest, why would that only be for some of them? The decay rate is listed as 5, so if we use the factor of 10 instead of 1000, we get a warmonger rating of 21 and a decay time of 4 turns, which makes just as little sense, and clearly is NOT consistent with what we see in game. A value of 100 would make sense, but I find it very hard to believe that this one value was written in a different base while all the others were regular values (the thresholds, the decay rate, etc.). Anyway, I'll try to ask around in the modders section, I hope someone will have an answer for it.

I think you're jumping to conclusions though. Decay of 5 is relevant and totally in-line with the warmonger thresholds, which is in the hundreds, with the highest tier being 200+ ; and not thousands. And it scales properly with decay in hate over 10,20,30 turns, not the hundreds you were asserting which on a 2100 hate, might as well not have a decay value as it would take an entire game to whittle it down.

The people who revealed the calcs also very clear used base 10 to inflate the numerator. 52*10 =520

I can see why you're convinced it has to be 1,000 because the code said so, but it's also pulling in variables that we don't see. So is the map size variable 52 or 0.52? I think you're conflating the formulae as explained then making the jump based on the snippet of code provided and saying it must be 1,000 x52 or 52,000 yet a numerator that big is not even hinted at in the code explanation.

In one of the many examples adwcta provided showing the minimal warmonger penalty of taking a city from a large rival with many cities, the warmonger score was calculated to be 0.2 for taking 1 city and he said 'well no one would care in this case'. The implications that taking cities from large empires now no longer penalizes players as heavily as it used to when we had flat penalties is also clearly spelled out by Gabriel

If your assertion is correct, then that 0.2 is going to count for 20 points. That's enough to almost break a tier of warmonger hate from 15 >40 or 40 >70; DoW penalties not included. That's not insignificant.

The most likely scenario is that you are right about it. It is indeed multiplied by a factor of 1000 but the numbers used are decimals. 0.52 for a 52 city standard map, and the result is a 520 numerator not 52,000.




What gave you that impression?


This quote
The penalty for declaring war on a major/city-state has been halved to 2.5, and the penalty for conquering is gone.
 
Anyway, I just got answer from Putmalk, he says the numbers from the formula does use the factor 1000 but, as you suspected, the final value is divided by a factor of 100 to prevent errors from rounding along the way. So indeed, capturing that one city will give you a warmonger score of 21 (from the city itself).

However Putmalk also says that the decay rate is actually ALSO divided by 100, so it decays with 0.05 each turn - meaning that in fact, those 21 points will take 420 turns to get rid of. But ofcourse, it doesn't put you right over the threshold for Critical, so in that regard, it makes better sense. But once those cities start to add up ...

The penalty for declaring war on a major/city-state has been halved to 2.5, and the penalty for conquering is gone.
No, you understand the conquering part wrong. Previously, you get a fixed penalty for eliminating a civ - which you could avoid by letting that civ have one pesky city remaining. That fixed penalty has now been replaced by the per-city penalty - so you will still get the per-city penalty for taking out the City State.
 
I had suspected the decay value is a decimal as well as it would be too easy to remove the penalty and would lead to see-sawing opinions of you as penalties piled up on 1 city conquest then is quickly whittled away.

0.05 (i was thinking 0.5) would explain why the penalty seems to last quite long, but never seems to be overwhelming (in my games) where I do conquer but not explicitly go for a domination VC.

Thanks for doing the ground work on a lot of this. This should go into a war academy article methinks

No, you understand the conquering part wrong. Previously, you get a fixed penalty for eliminating a civ - which you could avoid by letting that civ have one pesky city remaining. That fixed penalty has now been replaced by the per-city penalty - so you will still get the per-city penalty for taking out the City State.

Probably a misunderstanding of what I wrote. Yes I understand city states count as taking of a city so the new warmonger formula penalty will count, but what I meant was the civ elimination penalty is gone. That was a whole class of penalties that is no longer there.

Hence the comment that leaving a conquered civ alive at 1 city no longer spares you from warmongering penalty. Used to be everyone will be ok with you diplomatically then hate you the next turn when you kill off a civ, all from the elimination penalty.
 
Is the penalty for warmongering in any way affected by difficulty level? I had a DOF with a bunch of Civs, two of them who had a DOF with Venice and so far I haven't recieved much of a diplo hit for taking Venice's capital after denouncing and then declaring war (they had 3 purchased city states and gave me one in the peace deal). Only playing on Prince though as I'm getting acclimated to all of the different victory conditions.
 
Not affected by difficulty level. I'm not sure how you're gauging war monger penalty in your case since you mentioned DoF.

You can very easily get the 'you're a warmonger' in the tooltip but AI could be perfectly happy to trade/DoF with you.

Some won't care, which will be mentioned in the tooltip, and it takes quite a lot of concerted conquering to get the really big hit on warmongering.
 
Thanks for doing the ground work on a lot of this. This should go into a war academy article methinks.
Yeah, the only loose end I have is I need to have confirmed, that the civ warmonger-hate flavor apparantly is only applied to the hard-cap %-elimination limit, i.e. the +/- 50% change you get from civs either tolerating or disliking warmonger apparantly is only applied to the number of civs you can eliminate, not to the score calculated from the per-city formula.

Also, one thing I thought about, was that the warmonger hate you get from eliminating civs apparently will never go away? From what I can see, the game will calculate how big a percentage of total civs on the map you have eliminated, and if this is over a certain threshold, you will get warmonger label:
  • 25 % (+/- 50 %) = Warmonger severe
  • 40 % (+/- 50 %) = Warmonger critical
As the number of civs you've eliminated will stay fixed entire game (unless they get revived?), this will mean you are stuck with this entire game, right?
 
So interesting, all this stuff! I really would love if one of the devs could come around and clarify if you got everyhing right or if you missed one or the other little modifier somewhere in the code.

Another question:
What about the new feedback in BNW, regarding a civ's warmonger tolerance.

Does 'They tolerate warmongers' mean that

a) You are considered a wormonger, but they don't care (so much).
(In other words: The warmonger penalty comes on a regular level, but has a smaller effect than usual.)

OR

b) it takes way more "effort" to be considered a warmonger by this civilization, but you managed to pass even their high threshold?
( In other words: The warmonger penalty comes later than usual, but has the same effect if finally applied.)
 
That may be, but question is, does it make for a better game? And I didn't say anywhere that you should be labelled as a warmonger if you go to war a lot, that may be fine - but I shouldn't be labeled a warmonger if someone DoW's me, and I then take some of his cities*, and I most certainly should not be labelled a warmonger by someone who asked me to join the war himself. Thankfully I do think they have changed the last bit in the new system.

* If you want to give me a penalty for taking other players cities, give me a penalty for expanding too aggressively, I could live with that in game context, but putting a warmonger label on me for taking cities from someone who DoW'ed me is just jarring and breaks immersion.

Agree
 
Yes, that is very strange since USA in our real world has to be one of the most warmongering civs and is the biggest advocate for freedom.

You know, I am not an American. I don't even particularly like them as they are often self absorbed individuals. But I am so sick and tired of this lie that the US is a "warmonger". You realize that the wars you are referring to they had allies? What about those countries? You realize that other countries have been involved in invasions as well? You realize that some countries are so violent that their domestic death toll exceeds whatever casualties the US inflicts? You realize that the US has not invaded a country to annex it, except maybe for Texas over a 100 years ago? In context of history the US is downright peaceful. It is a super power though and the countries they fought in lately are hardly peaceful hubs of freedom and happiness that they could have negotiated with.
 
I still would be interested in the answer to this question:

What about the new feedback in BNW, regarding a civ's warmonger tolerance.

Does 'They tolerate warmongers' mean that

a) You are considered a wormonger, but they don't care (so much).
(In other words: The warmonger penalty comes on a regular level, but has a smaller effect than usual.)

OR

b) it takes way more "effort" to be considered a warmonger by this civilization, but you managed to pass even their high threshold?
(In other words: The warmonger penalty comes later than usual, but has the same effect if finally applied.)

Doesn't anybody know the answer? Or is it so trivial, that it is obvious and I should know? Well, I don't! Please tell me then... :)
 
This is a really interesting thread.

Hopefully the answer to this hasn't already been discussed (I haven't found it), but is warmonger decay modified by game speed? 50 turns is peanuts on Marathon, and forever on Quick, so I assume there must be a difference in decay rate.

I'll also note that the penalty for pillaging and stealing civilian units is really low now. All you get is the DoW penalty, right?
 
Back
Top Bottom