How to implement static wars? (Two factions stay at war no matter what.)

Users who are viewing this thread

ltshadez

Recruit
I've seen a few mods implement this, such as ACOK and AWOIAF, so how would one make a locked war between two factions that never ends until the other faction is wiped out?

I'm wanting to add it to gabrilduro's old mods, American Revolution and Civil War, so that the titular wars actually occur.
 
I kinda gotcha. Please try to follow the logic below. It's a bit long, but very informative, and as beginner friendly as I managed to make it.

Open up the factions.txt of the mod you're editing. The first two lines will likely be:

"factionsfile version 1
34
"

With this 34 likely being another number in the mod you're editing. It represents the total amount of factions in a certain mod (which is usually more than the number of kingdoms, because it also includes factions like commoners, outlaws, the player, deserters and some deleted stuff like dark knights and undead.

After these two lines, there will likely be a lenghty amount of lines that look more or less like:

"
0 fac_commoners Commoners 0 11184810
0.000000 0.100000 -0.600000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.100000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.200000 -0.200000 -0.700000 0.000000 0.000000 0.000000 0.000000

"
Each of these define the faction, the name of the faction, and some more stuff that isn't relevant. What you're looking for are all those spaced sequences full of zeros. Each set of zeros represents the current faction's relation with another faction, which ranges from 1.000000 to -1.000000. Positive value is friendly, 0 is neutral, negative value is hostile.

You can count how many sequences of zeros there are, but I'll spare you: it's the same amount declared at the very start of factions.txt (in this case, there's 34).

Notice how the third set of zeros from the fac_commoners above is -0.600000. This means they have negative relations with the third faction of this module (which is fac_outlaws, to which all outlaws except deserters belong). If you check the fac_outlaws which I'll paste below, you'll see that they too have -0.600000, but with the second faction of the mod, which is fac_commoners

"
0 fac_outlaws Outlaws 33280 8947848
0.000000 -0.600000 0.500000 0.000000 -0.050000 -0.500000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.150000 -0.050000 -0.050000 -0.050000 -0.050000 -0.050000 -0.050000 -0.050000 0.000000 0.000000 0.000000 0.000000 -0.600000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

"

From here onwards, it's fairly obvious. Find the factions you want to be enemies, discover what is their number is (tip: they are always one of the fac_kingdom_some number) and adjust their zero values with each other accordingly.
 
What is the best way to force a static war between two factions in which neither sues for peace, it just keeps going until one wipes out the other.
 
Back
Top Bottom