Community-patch-dll: WarWearinessModifier is working?

Created on 5 Jan 2017  路  20Comments  路  Source: LoneGazebo/Community-Patch-DLL

_1. Mod version (i.e Date - 4/23):_ 2016/12/23

_3. Error description:_ in the ComputeWarWeariness() function at line 5060 of CvCultureClasses.cpp, the m_player->GetWarWearinessModifier() is not used (and it's never used if my ide is correct). So i was wondering if the policies that reduce war weariness are working correctly.

Fixed for upcoming version Need more information

All 20 comments

@ilteroi did we remove this by accident?

Not sure if related, but when I changed this:

ALTER TABLE Policies ADD COLUMN 'WarWearinessModifier' INTEGER DEFAULT 0;

... in this file:

Community Patch/CoreFiles/Core Tables/CoreTableEntries.sql

... to '100' and then '1000', it did not seem to have any effect on my game - I think it was version 12/5. When I asked about it at CivFanatics Enginseer implied the number was applied on policies reducing war weariness. But I had that autocracy tenet, which should be reducing it - still no effect.

Yes, it's totally related

@supermerill : good catch!

probably forgot about it when i rewrote the rise/decay algorithm. should be fixed.

Nice, thanks @ilteroi. Speaking of which, I think we should tame War Weariness just a bit overall. It seems to be a punishing element of unhappiness in the late-game such that players are avoiding ideologies to avoid it.

currently it takes 40 turns until 10% of your population becomes unhappy. then it asymptotically approaches 20%. doesn't sound too bad.

i did fix AI peace logic before christmas, that should help in ending a war and therefore help with war weariness as well.

It IS bad. 20% of population is 200 unhappiness with 1000 pop, which goes on top of other unhappiness sources and doesn't bode well with negative diplo modifiers piling on top of each other in late game.

the question is, how long does the average war last?

depends if we're on quick or marathon.

There is no "average" in late game, it's either a quick roflstomp, or carpets of doom which last forever and each city taking 5-10 turns of continuous bombardment.

the question is, how long does the average war last?

I would say, unless the war is one-sided :

  • 10 turns to kill the main ennemy army
  • Then 10 turns per city you want to take
  • Then 10 turns to negociate peace

So 40 turns is a good approximation of a short-medium war, and 80 turns is a long war.

gamespeed is an interesting point, does it really influence war duration? after all, unit movement is the same. so maybe map size is more important? unit production does take longer, but most units will be purchased ...

but i think we need to take a step back - war weariness as a concept may need a general overhaul in my opinion. what is its purpose? to avoid endless wars? to slow down conquest?

for example right now war score is deliberately ignored, i.e. the winner and the loser are equally affected. you could argue that the loser should suffer more, but that's just an additional punishment - if our purpose is to slow down expansion, then the winner must have an incentive to make peace soon!

i think war weariness should either be massive (eventually) or get removed from the game completely.

War Weariness, I assume, was supposed to emulate USA during Vietnam War, where it had to pull from war due to internal problems (a lot of citizens were literally unhappy over it AND the war itself started as ideological, hence why it requires Ideology in the game and causes unhappiness spike).
Ironically, Freedom has the highest amount of bonus happiness from policies, thus withstands WW better than other two. The Autocracy policy doesn't actually help in fighting WW, just slows it down (maybe), and
has to be chosen between the other level 2 tenets, all which provide tangible benefits, even the Corporation-only one.
I think WW should depend on:

  1. Duration of a longest war, not dependent on max population and lax the scaling up of it. Level 2 Autocracy tenet can remove this part completely.
  2. Cultural Influence between the two warring sides. No particular numbers, but builds each turn (or each several turns if the game can't into decimals for happiness calculation). Doesn't increase if influence over an enemy is 100% or higher.
  3. Same/different Ideology. Faster build-up for warring the same ideology player. Doesn't increase against ideology-less enemies. WC proposal "Cold War" laxes this penalty against different ideologies, but worsens the same ones.
  4. World Ideology. Additional counter against players following it.

Only highest values count (several wars at once don't stack, unless they contribute the highest value for each category). So let's say in a game under "Cold War" an Order civ fights a civ without ideology the longest, another Order civ, a Freedom civ which has 100% influence over it and an Autocracy civ (which is a world ideology). So final counter will be calculated off the duration of the war with the first civ, cultural influence from the third civ, Ideology penalty from the second civ, and World Ideology penalty from the 4th civ.
The war score shouldn't matter, because the point of WW is participating in a war and against whom, not the performance.

Upon signing a peace treaty, WW drops off every turn of said treaty, reaching 0 at the end of it. If there are other wars going, it can't drop off lower than values from those wars.

Maybe some level 3 Tenets can provide various WW-related penalties to enemies during war.

The idea is that every part contributes a little, but all 4 parts can stack up to old WW values. I guess it also becomes more complex and don't have a slightest idea how it should look in the interface in a clear manner. The happiness overview definitely should have a rundown on different WW sources and which player contributes the most. But the idea is also making it a clear numbers system, as opposed to "maybe" system. Hell, the issue itself is started because OP dug in the code, no way in hell to notice this through the normal playthrough, that's how the current system is non-transparent.

What if we make war weariness a factor of war score and puppeted/occupied cities? So, for example, war weariness only increases if you are negative war score (and more rapidly based on how negative the score) or, if neutral/positive war score, based on the number of citizens living in puppeted/occupied cities in your empire?

Indexing WW on Warscore is not a bad idea, but I think it should be also indexed on cultural influence and/or ideologies.

For exemple, if you are at war with a civilisation that has a rank X of influence on you (unknown = 0, exotic = 1, ...), since N turns, with a Warscore W then :

  • Each turn, the War Wearriness increase by X
  • The maximum War Wearriness is N-W (minimum 0), or 2N-W if the civilisation has the same ideology as you.
  • If you are at war with multiple civ, WW given by each war stacks with each others.

Which mean that you never have WW if you're at war against a civ your people doesn't care at all (i.e unknown cultural influence), and you don't have a lot of WW if you're winning the war.

@Radost : in the current implementation only the longest war counts, so point 1 is already implemented. 2 and 3 seem to be similar to @MoiMagnus proposal (except for the stacking part).

@LoneGazebo : that would lead to the winner having no WW, only unhappiness from occupation - which already exists.

@MoiMagnus : definitely possible, but not really much simpler than the current system ... also, it punishes the loser. which brings me back to the main point: why are we doing this? added realism is not really an argument, the question is does it serve a useful game play purpose?

@ilteroi it does control end game 'blitzes' towards a victory without consideration for other factors. I personally like it, I think it could be a little slower to reach the max of 20% potential unhappiness, and I also think that - if nothing else- it should not apply for wars against players lacking an ideology.

Imo War weariness should take into account the death toll (ie damage done to our units). It's strange to take war weariness from a phony war.

(for the "game speed" things, I don't know why I talk about that, sorry).

@LoneGazebo : it only starts to kick in after about 12 turns, so your typical "blitz" won't affect it very much.

but anyway, it's easy to scale it a bit with map size / gamespeed. any proposals here? right now we have 8 turns of lead time, then a sigmoid shaped increase from 0% to 10% after 32 turns, asymptotically approaching 20%.

cultural influence dependency would be nice to have, because it gives culture a defensive role as well. should it influence the steepness of the curve or the max amount of unhappy citizens?

war score dependency i don't like, it simply puts additional pressure on the side that is already losing. since the stated purpose is to slow conquest, we have to do without the added realism here.

@ilteroi I think having it influence steepness makes sense. I'm fine with scrapping WS idea - the asymptotic method is fine with me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MRS-OBAMA picture MRS-OBAMA  路  3Comments

a3kov picture a3kov  路  7Comments

Gartelzwerg picture Gartelzwerg  路  3Comments

TechpriestEnginseer picture TechpriestEnginseer  路  3Comments

saamohod picture saamohod  路  9Comments