Total War: WARHAMMER II

Total War: WARHAMMER II

567 ratings
AI Declares War on Each Other More Updated
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Tags: mod, Campaign
File Size
Posted
Updated
132.733 KB
21 Sep, 2020 @ 8:05pm
6 Jan, 2021 @ 10:04am
6 Change Notes ( view )

Subscribe to download
AI Declares War on Each Other More Updated

Description
UPDATE: Now compatible with the Mod Configuration Tool 2.0! If you don't use it, mod will use default values. If you do, you can now access a new menu entry for MCT where you can change the values. Bear in mind that the upper bound for the random number MUST be higher than the lower bound and the opinion threshold. Otherwise the script wouldn't do anything. If you find any issues let me know.

INTRO
Continuation of Anyndel's excellent mod. Updated with new script magic so that it works in mp and doesn't cause desyncs. Should also run better since I made some optimization changes. If you don't care about the mp compatibility, this alternative version might run faster since it will only do a check at the end of the player turn.


DESCRIPTION:
This mod makes it so that AI will be forced to declare war on others if they dislike each other. AI factions will not declare war on each other even if they really dislike each other (even at -1000 standing!) if they are both at war with the human player or if the AI considers they have enough wars going on at the moment, and usually war with the player is enough wars for most factions.


HOW IT WORKS
What this mod does is that if an AI faction reaches an opinion threshold (default of -100) or worse with another AI faction, it will roll a random number between 0 and -500 (default). If the standing is less than the random number roll, the AI will declare war. Meaning that starting at -100, an AI has 1 in 5 chances of declaring war to the AI it dislikes, and as the standings deteriorate the more likely it is that they will declare war. At -250 they will have a 50% chance to declare war per turn and at -500 and beyond it will be 100%, though unlikely they will reach that point before having declared war before with this mod.

I've excluded vassals and rebel factions from these checks to prevent strange behavior and made them only able to declare a war once per turn. This should help avoid crashes when a player is called in as a defensive ally when multiple wars occur and the UI can't keep up.

Also bear in mind that this edit will make the AI declare more wars between races that have opinion penalties already, making those races have a harder time (like chaos factions) since they will be at war with a lot of people.


COMPATIBILITY:
Since this is just a script, this should be compatible with most mods except maybe major overhauls like SFO or what have you. They are massive behemoths and I have no desire to test them specifically, although it should work. Use at your own peril.

Save game compatible and safe to add/remove mid-game.

Ignore out of date warnings, this will be compatible forever. Use Kaedrin's Mod Manager instead of the CA one.

Special thanks to woadvader on the original mod for his suggestions on how to solve some of the hangs/crashes and performance issues.
151 Comments
Layth36 14 May, 2024 @ 5:33am 
@Jolc3r is there any easy/clear indicator that'd tell you if the mod is working? Besides waiting for RNG to pop war declarations
Jolc3r  [author] 22 Feb, 2023 @ 4:15pm 
Nope, provided as is. I have no intention on revisiting WH2 to check whether my mods still work. There have not been any updates that break this. YMMV.

If it doesn't work for some reason, feel free to upload a working version.
barsarrus 22 Feb, 2023 @ 2:23pm 
appears as not updated, you know if author will update I still play Warhammer 2
Jolc3r  [author] 18 Sep, 2022 @ 10:54am 
It also might be a better idea to change the script to only run once for all factions at player turn start instead of for every faction. It will definitely perform much better, especially with so many factions in WH3.
MrSoul 18 Sep, 2022 @ 10:47am 
Interesting, thank you for sharing that too, look into those tables while I'm at it, and good luck too with own mods o7
Jolc3r  [author] 18 Sep, 2022 @ 10:44am 
Sure thing, good luck!

As a fyi, I will not be porting this over to WH3.

I find the AI in WH3 is much better about being aggressive and declaring wars on their own, plus they've broken up a lot of the hugboxes of chaos/ordertides so theres enough racial variety to make the AI not like each other thus declaring wars.

There are some personality + main threat + faction potential tables that basically do the same thing this does, just without using scripts.
MrSoul 18 Sep, 2022 @ 10:41am 
thx for quick response/will do a quick check to compare notes! Yeah, that sounds like im on the right path here then. Really appreciate it if only for a quick sanity check for myself haha Getting better, but I'm still learning a lot about lua and how it works with the game.
Jolc3r  [author] 18 Sep, 2022 @ 10:38am 
I can't remember off the top of my head. Might have been using math.random instead of cm:random_number and also checking several factions that are reserved (like rogue armies, brayherds, etc.).

You can download the old script and do a diff on the changes.
MrSoul 18 Sep, 2022 @ 8:48am 
Hey, hope doing well. Just wanted to ask quickly, working on a project for 3 to also edit Anyndel's old script. Gone through all tutorials etc, think got my script to be MP compat but wanted to double check with someone has experience. Just if can top of your head, and if possible to explain in a general sense: what was it in the old script that was causing MP desyncs? Thank you if you have the time!
MarineCARMINE 27 Aug, 2022 @ 8:36am 
Hope to see this mod in WH3. :)