Total War: WARHAMMER II

Total War: WARHAMMER II

Make AI Declare War On Everyone More Often, Chaos Wars Everyone
60 Comments
ӄʀȶ ⁧⁧Fuze 17 Aug, 2022 @ 3:26pm 
Well gosh darn sir, glad I didn't start my Deathmaster Snikch campaign yet - subbed.
FiftyTifty  [author] 17 Aug, 2022 @ 3:03pm 
Chaos would skip them.
ӄʀȶ ⁧⁧Fuze 17 Aug, 2022 @ 2:49pm 
And then he never returned... Anyway could you clarify what you meant by "This solves a glaring bug in the vanilla game; the chaos invasion will only be responded to by a select few factions, most just letting them pass by."? What factions - what do you mean other let them pass by? Chaos ignore the smaller ones that arent the main defenders of humanity or what?
FiftyTifty  [author] 2 Nov, 2021 @ 7:00pm 
A vassal from the chaos gate mod? Eh?

If you enable script logging, you can actually find what caused the crash. A text file is created in the install folder of TWW2. If you open it with notepad, and go to the very bottom, near there will be an error message detailing what line caused the crash.

Gimme that, and I'll take a look.
Backstab0 2 Nov, 2021 @ 5:22pm 
i found a bug that when you play chaos faction, and you got a vassal which is from the chaos gate mod. once they've been spawned they will suddenly declare war to all the other factions at the beginning of the end-turn. then the game just crash=.=
FiftyTifty  [author] 28 Oct, 2021 @ 5:03pm 
No.
benettonkkb 28 Oct, 2021 @ 12:06pm 
Does this mod cause factions to randomly be at war with other factions at the beginning of the end-turn? I'm trying to find the mod thats doing that in my games.
FiftyTifty  [author] 16 Jul, 2021 @ 2:16pm 
There is no need to update.
FiftyTifty  [author] 4 Jul, 2021 @ 1:27pm 
That mod just modifies a few data tables relating to AI decisions. This is a script that makes factions, that hate each other, be in war. Completely independent of any other mods.

It's fine.
FiftyTifty  [author] 17 Jun, 2021 @ 10:26pm 
Update: Partially rewrote the script. Faster, and no more errors being plonked into the log.
FiftyTifty  [author] 9 Jan, 2021 @ 12:10pm 
That's because it was uploaded before the current patch. That's all.
AethGorr 9 Jan, 2021 @ 11:32am 
Ah ok. Thx for reply. Cuz i see an "outdated" mark in mod manage
FiftyTifty  [author] 9 Jan, 2021 @ 8:53am 
There's no need for an update. It still works.
AethGorr 9 Jan, 2021 @ 6:04am 
Can i hope for an update?
Dragon32 25 Dec, 2020 @ 4:09am 
@FiftyTifty
OK, gotcha. Thanks for the reply. Guess I should only use this in a Mortal Empires campaign then
FiftyTifty  [author] 24 Dec, 2020 @ 5:24pm 
No, they'll be hostile to all factions, and will attack any that are near first, before searching for other enemies.
Dragon32 24 Dec, 2020 @ 4:18pm 
@FiftyTifty
So that'll restore their behaviour of attacking whoever's conducting a ritual?
FiftyTifty  [author] 24 Dec, 2020 @ 2:22pm 
The issue of Chaos beelining for some far-off faction is due to Chaos starting at very mundane diplomacy disposition values to a bunch of factions. Use this mod so they actually see everyone as a target: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2098958766
Dragon32 24 Dec, 2020 @ 1:24pm 
@FiftyTifty
Been using this mod with a Vortex campaign. Not a complaint but the Chaos armies spawned in through performing the rituals are affected by this, I've had some head off for random places and get wiped out. Chaos will also declare war on the player's intervention armies.

Maybe worth a note about how this mod will affect the Vortex campaign in the Description?

Or, if it's possible, disable affecting Chaos in a Vortex campaign?
FiftyTifty  [author] 21 Dec, 2020 @ 5:32am 
There is no limit to the number of wars any faction can be in
dragon 20 Dec, 2020 @ 1:09pm 
Thanks, another question: is there a 4 war limit for the AI? How would one increase that. (thanks for the mod)
FiftyTifty  [author] 20 Dec, 2020 @ 11:28am 
The AI will also declare on players.
dragon 20 Dec, 2020 @ 8:31am 
Is this for just AI to AI war declare or does it make AI declare on humans too?
FiftyTifty  [author] 5 Dec, 2020 @ 2:17pm 
Ten percent is about right. If the AI is more aggro, it makes peace treaties even more worthless. You can adjust it in the script by changing that iDeclareWarChance number. Have it compare to > 8 or > 7
Vanghoul 5 Dec, 2020 @ 9:45am 
hey I love this mod, but I was looking through your code and found this:

local iDeclareWarChance = cm:random_number(10, 0)
...
(iDeclareWarChance > 9)

Does this mean that, post -200 relations, AIs have 10% chance per turn to war each other?
If so, could this chance be improved a little?
Right now I have dwarvs and moulder at -900 and still no war, hehehe.
modmodmod 15 Nov, 2020 @ 8:15pm 
Good!!
FiftyTifty  [author] 9 Nov, 2020 @ 1:02pm 
yes
يرحمك الله 9 Nov, 2020 @ 12:52pm 
So if it doesn't go under 200- they won't declare on eachother, right?
FiftyTifty  [author] 9 Nov, 2020 @ 12:36pm 
Don't use the original. Use only this mod.

The requirement for one AI faction to declare war is that they have below -200 diplomatic standing with the other faction.
يرحمك الله 9 Nov, 2020 @ 11:20am 
So i need to use your mod alone, or with together with the old version?

And is there a limit or min requeriment for the factions to start a war? :0
PorkNotBeef 23 Oct, 2020 @ 7:23pm 
Glad to hear! Thank ya. =)
FiftyTifty  [author] 23 Oct, 2020 @ 5:41pm 
Aha, found the problem. It'll work now. The bug was that I passed a faction, instead of a faction's name, to the diplomacy relations function.
PorkNotBeef 23 Oct, 2020 @ 10:12am 
I'm unsure if this mod is working... I'm at a point in my campaign where literally every faction is in the double or triple negatives of diplomatic relations yet no one is at war with one another. 200 turns in and the Vampires and Dark Elves, who are the largest powers, have not gone to war despite various trespassings.
Ottocide 24 Sep, 2020 @ 11:20am 
@Jolc3r & @Curle Winner Thank y'all so much for taking the responsibility of this mod; I took a break from WH2 and, to my disappointment, noticed the og version of this mod was outdated. I'm actually glad it has been taken over as it's much better, and you have a collection of fantastic mods that I'm excited to use! You're a Treasure to the wh2 modding community ;)
Jolc3r 22 Sep, 2020 @ 11:34am 
Awesome, very nice. I've been using my version but this seems like it will run much faster than doing it on each faction turn. I'll be using it in sp for sure and will try it in mp to see if it will work.
FiftyTifty  [author] 22 Sep, 2020 @ 9:31am 
Whew this was a mess. I didn't realise I left it in such bad shape. Now the script has been overhauled, tweaked, and fixed for real this time.
FiftyTifty  [author] 22 Sep, 2020 @ 7:53am 
That's a good point. math.random() Always returns the same number. I'll take a look in a wee bit.
Jolc3r 21 Sep, 2020 @ 9:36pm 
Lol, I hadn't noticed someone else had updated this mod already before I uploaded mine.

Anywho, you may want to update your mod so that you don't use a string finder. Your script will run faster if you use something like is_vassal() is_quest_battle_faction() and is_rebel() instead of parsing through strings. Also, the original mod had some crashes that could occur if a faction declared multiple wars on your allies (it's something to do with the UI for defensive wars being called multiple times but having to wait for the player). You may want to limit wars to once per each faction to fix that.

Also should be noted that this is not mp safe due to math.random(), use cm:random_number() for that. Not sure what happens on the end turn for each player though. Could be your script is called when each player ends turn or it might just not work, not sure.
FiftyTifty  [author] 11 Sep, 2020 @ 2:09pm 
I'll hit you up once I'm done making another mod. Almost done with my Beastmen overhaul.
FiftyTifty  [author] 11 Sep, 2020 @ 12:26pm 
That's interesting. Do you go about vassalizing the other factions, so it becomes a clash between two large and diverse empires?

It's very simple to do, but it's outside of what I'm interested in, and I don't have the ability to really test it.
FiftyTifty  [author] 11 Sep, 2020 @ 9:18am 
I make mods that will enhance the sandbox aspects. Don't quite see how only the player being able to declare war will do that.
FiftyTifty  [author] 24 Aug, 2020 @ 12:48pm 
Fixed a regression that caused the script to no longer process. Now it works again.
Kisama 20 Jun, 2020 @ 4:41pm 
The script loads and works now. Thanks!
FiftyTifty  [author] 20 Jun, 2020 @ 12:56pm 
Found the problem. It's that there were capital letters in the file name and the script's main function. It will work just fine now.
FiftyTifty  [author] 20 Jun, 2020 @ 12:33pm 
Right, I renamed them. Try and see if it works now.
Kisama 20 Jun, 2020 @ 12:07pm 
An interesting finding is that, if I renamed the lua file, function name and listener text to test, the log shows it is able to find and execute it:


****************************
Executing Mods
qa_console() not found, continuing
Executing mod function test()
test() executed successfully
****************************

However, the game crashed when I ended my turn
Kisama 20 Jun, 2020 @ 11:33am 
Yes, that entry is present:

add_working_directory "C:/Program Files (x86)/Steam/steamapps/workshop/content/594570/2044694734";
add_working_directory "C:/Program Files (x86)/Steam/steamapps/workshop/content/594570/2096217310";
add_working_directory "C:/Program Files (x86)/Steam/steamapps/workshop/content/594570/2037195655";
mod "better_camera_mod.pack";
mod "CampaignWeather.pack";
mod "make_ai_not_ignore_each_other_chaos_is_jingoist.pack";
mod "Ultimate Lighting and Nights.pack";
FiftyTifty  [author] 20 Jun, 2020 @ 10:44am 
In used_mods.txt is there an entry that has "workshop/content/594570/2096217310" ?
Kisama 20 Jun, 2020 @ 9:42am 
I can't seem to get this mod to work, even with the 1.9.2 beta. From the lua_mod_log.txt, it showed this:


****************************
Executing Mods
qa_console() not found, continuing
aaafyty_make_ai_not_ignore_each_other() not found, continuing
****************************

In the used_mods.txt, I see that the mod has been loaded:

mod "make_ai_not_ignore_each_other_chaos_is_jingoist.pack";

The game loads fine. In my current campaign, after ending my turn, the AI just continued on without declaring war on each other even with poor relationships. Do I need to start a new campaign for the mod to take effect?
FiftyTifty  [author] 19 Jun, 2020 @ 2:30pm 
Updated. With 1.9.2 beta, this was causing a crash on end turn. That's now fixed.