全面战争:战锤2

全面战争:战锤2

Make AI Declare War On Everyone More Often, Chaos Wars Everyone
60 条留言
Exғz 2022 年 8 月 17 日 下午 3:26 
Well gosh darn sir, glad I didn't start my Deathmaster Snikch campaign yet - subbed.
FiftyTifty  [作者] 2022 年 8 月 17 日 下午 3:03 
Chaos would skip them.
Exғz 2022 年 8 月 17 日 下午 2:49 
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  [作者] 2021 年 11 月 2 日 下午 7:00 
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 2021 年 11 月 2 日 下午 5:22 
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  [作者] 2021 年 10 月 28 日 下午 5:03 
No.
benettonkkb 2021 年 10 月 28 日 下午 12:06 
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  [作者] 2021 年 7 月 16 日 下午 2:16 
There is no need to update.
FiftyTifty  [作者] 2021 年 7 月 4 日 下午 1:27 
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  [作者] 2021 年 6 月 17 日 下午 10:26 
Update: Partially rewrote the script. Faster, and no more errors being plonked into the log.
FiftyTifty  [作者] 2021 年 1 月 9 日 下午 12:10 
That's because it was uploaded before the current patch. That's all.
AethGorr 2021 年 1 月 9 日 上午 11:32 
Ah ok. Thx for reply. Cuz i see an "outdated" mark in mod manage
FiftyTifty  [作者] 2021 年 1 月 9 日 上午 8:53 
There's no need for an update. It still works.
AethGorr 2021 年 1 月 9 日 上午 6:04 
Can i hope for an update?
Dragon32 2020 年 12 月 25 日 上午 4:09 
@FiftyTifty
OK, gotcha. Thanks for the reply. Guess I should only use this in a Mortal Empires campaign then
FiftyTifty  [作者] 2020 年 12 月 24 日 下午 5:24 
No, they'll be hostile to all factions, and will attack any that are near first, before searching for other enemies.
Dragon32 2020 年 12 月 24 日 下午 4:18 
@FiftyTifty
So that'll restore their behaviour of attacking whoever's conducting a ritual?
FiftyTifty  [作者] 2020 年 12 月 24 日 下午 2:22 
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://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2098958766
Dragon32 2020 年 12 月 24 日 下午 1:24 
@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  [作者] 2020 年 12 月 21 日 上午 5:32 
There is no limit to the number of wars any faction can be in
dragon 2020 年 12 月 20 日 下午 1:09 
Thanks, another question: is there a 4 war limit for the AI? How would one increase that. (thanks for the mod)
FiftyTifty  [作者] 2020 年 12 月 20 日 上午 11:28 
The AI will also declare on players.
dragon 2020 年 12 月 20 日 上午 8:31 
Is this for just AI to AI war declare or does it make AI declare on humans too?
FiftyTifty  [作者] 2020 年 12 月 5 日 下午 2:17 
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 2020 年 12 月 5 日 上午 9:45 
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 2020 年 11 月 15 日 下午 8:15 
Good!!
FiftyTifty  [作者] 2020 年 11 月 9 日 下午 1:02 
yes
يرحمك الله 2020 年 11 月 9 日 下午 12:52 
So if it doesn't go under 200- they won't declare on eachother, right?
FiftyTifty  [作者] 2020 年 11 月 9 日 下午 12:36 
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.
يرحمك الله 2020 年 11 月 9 日 上午 11:20 
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 2020 年 10 月 23 日 下午 7:23 
Glad to hear! Thank ya. =)
FiftyTifty  [作者] 2020 年 10 月 23 日 下午 5:41 
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 2020 年 10 月 23 日 上午 10:12 
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 2020 年 9 月 24 日 上午 11:20 
@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 2020 年 9 月 22 日 上午 11:34 
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  [作者] 2020 年 9 月 22 日 上午 9:31 
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  [作者] 2020 年 9 月 22 日 上午 7:53 
That's a good point. math.random() Always returns the same number. I'll take a look in a wee bit.
Jolc3r 2020 年 9 月 21 日 下午 9:36 
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  [作者] 2020 年 9 月 11 日 下午 2:09 
I'll hit you up once I'm done making another mod. Almost done with my Beastmen overhaul.
FiftyTifty  [作者] 2020 年 9 月 11 日 下午 12:26 
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  [作者] 2020 年 9 月 11 日 上午 9:18 
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  [作者] 2020 年 8 月 24 日 下午 12:48 
Fixed a regression that caused the script to no longer process. Now it works again.
Kisama 2020 年 6 月 20 日 下午 4:41 
The script loads and works now. Thanks!
FiftyTifty  [作者] 2020 年 6 月 20 日 下午 12:56 
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  [作者] 2020 年 6 月 20 日 下午 12:33 
Right, I renamed them. Try and see if it works now.
Kisama 2020 年 6 月 20 日 下午 12:07 
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 2020 年 6 月 20 日 上午 11:33 
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  [作者] 2020 年 6 月 20 日 上午 10:44 
In used_mods.txt is there an entry that has "workshop/content/594570/2096217310" ?
Kisama 2020 年 6 月 20 日 上午 9:42 
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  [作者] 2020 年 6 月 19 日 下午 2:30 
Updated. With 1.9.2 beta, this was causing a crash on end turn. That's now fixed.