Mxt-dot / BetterAI

Europa Universalis 4 Mod, improving the AI
7 stars 3 forks source link

PEACE_DESPERATION_FACTOR #33

Closed tagadanar closed 3 years ago

tagadanar commented 4 years ago

Hey, enjoying this mod, I frequently try updates, in the last patch 2 days ago, you've set this define : PEACE_DESPERATION_FACTOR = 450

base value is 40, this make ally called into war offer white peace when their capital is under siege (not captured), like almost instantly the country have about -250 reason to stay in the war, and sign a white peace, taking a prestige and trust hit, before anything can be done to defend their capital, even if the ally called still have more troops than all enemies involved.

great work anyway :)

Mxt-dot commented 4 years ago

Hmm does this happen with OPMs or also with big nations?

I intentionally set it this high because I want to reach -200 enthusiasm when 60-70% of the country is sieged up (-200 = almost guaranteed peace). Those last 30-40% are the cause of most of the war-debt since the country has no income but often maintains a strong enough army to hold back for some time.

If the desperation factor happens too fast for OPMs, I can have a look into it and tweak perhaps balance it with other values, cause I would really like sieging to have a strong effect on the war enthusiasm.

Also thanks for the feedback, especially on here!

tagadanar commented 4 years ago

It does make small nation and opm quite easy to peace out of wars, but my case happened when calling France against Burgundy, Burgundy+vassals sieged Paris and another castel, France went sieging some burgundian fort, and after 2 month of war, with no siege finished, France white peaced out.

I reloaded this game to retry, went to protect Paris first and could play the war during one year, winning with like 20% war score, and burgundy went on Paris again, making France white peace in about a month.

I had 20k troop, France had like 60k in 3 20k stacks, Burgundy+vassal was about 45k soldier.

Mxt-dot commented 4 years ago

I'm currently playing around with the various factors and I'll try to avoid instances where AI likes to peace out quickly. This whole thing is a bit more difficult than anticipated since the paradox modifiers are completely misleading :( This whole war enthusiasm stuff is so barebones when you look at it a bit closer. Lots of modifiers, only 1 or 2 actually useful ones...

But I'm working on it!

AgainstBronchitis commented 4 years ago

I noticed this also but didn't pay much attention to it because I thought it was a vanilla WAD. Yeah, it's definitely not just OPMs, I was able to peace out Morroco when they were allied to Mameluks in a month.

Being able to peace out ally OPMs quickly actually felt refreshing though as they're not really a challenge but just add to micro.

Mxt-dot commented 3 years ago

I did some changes a few days ago!

You can still peace out OPMs, though not instantly at the beginning of the war. Otherwise one could just go and peace them out one by one at the beginning (as you mention). On the other hand, the nations should still peace out way more quickly depending on occupation, and wars should not take longer than ~15 years. So, hopefully it's something for everyone :D

Personally it feels like an improvement, though I would love to hear your feedback on it

https://github.com/Mxt-dot/BetterAI/commit/f6aa2bf88043f0d56984fc5d0d1cc4d048e4c3f0 tweaked war enthusiasm for certain types of wars

https://github.com/Mxt-dot/BetterAI/commit/5f091c478f7d85f7a52f6f3c5f45abe3bd500a03#diff-6e86169de37d78a2586abed51302f370 changed various factors for military strength, desperation etc.

tagadanar commented 3 years ago

I'll test it when I got time :) thx !

tagadanar commented 3 years ago

played a bit with the current version, it felt much better 👍

tagadanar commented 3 years ago

to add more feedback, AI peace out very fast when their capital/territory is under siege, but after some years in the war, and it seem more linked to their army/manpower than before, which is nice. I'd say it's a bit too fast because sieged province lower their enthusiam as much as occupied one, but knowing the way AI think helps, I just defend more their territory if I want them to stay in the war longer.

On a related subject, I wish AI would defend more their capital, since it's such an important factor for war score and desperation.. most of the war I play vs AI, they tend to go siege something far away, giving me time to rush their capital and peace out juste after I sieged it down, even if they would have enough troop to fight me off on their capital fort if they regrouped.

(also, fort building in the capital is a nice help for the AI, giving them much needed time to act vs player)

anyway, still feels better than paradox :)

Mxt-dot commented 3 years ago

@tagadanar thanks for the feedback and kind words!

but after some years in the war, and it seem more linked to their army/manpower than before, which is nice.

Yup actually that link between army/manpower was always there, but it (at most) influenced like +-5 enthusiasm which is like nothing. I removed the "relative strength" value since this was a pretty deceiving one, and honestly quite broken. Instead I balanced everything around the length of war and the manpower to simulate the commitment of the nation in dire times.

I'd say it's a bit too fast because sieged province lower their enthusiam as much as occupied one, but knowing the way AI think helps, I just defend more their territory if I want them to stay in the war longer.

Yeah I'm kind of torn on that one. Sometimes the AI is fully sieged up but is completely able to come back. Then there are the other 90+% of situations where the AI is sieged up to like 70+% of its land and is just further accumulating debt without any chance of coming back. It's a tradeoff yeah, and I wish I could simulate the "hope" of coming back in the war, but paradox give any possibility of adding new values or tweaking the curve on which they operate...

On a related subject, I wish AI would defend more their capital, since it's such an important factor for war score and desperation.. most of the war I play vs AI, they tend to go siege something far away, giving me time to rush their capital and peace out just after I sieged it down, even if they would have enough troop to fight me off on their capital fort if they regrouped. (also, fort building in the capital is a nice help for the AI, giving them much needed time to act vs player)

I tried some stuff with the ai_army script that was hailed in the dev diary somewhere around 2018, but this feature seems to be inherently broken/nonfunctional, so there's sadly no way for me to influence it apart from trying out some dll injections into the code. Though then I might aswell completely rework the AI and behavior that way :D

The capital forts are exactly the reason for that. I hate when the AI travels around and someone comes and assaults their capital to get easy warscore.