Warlords Diplomacy Revamped

Elhoim

Iron Tower Studio Dev
Joined
Nov 3, 2004
Messages
2,895
Location
San Isidro, Argentina.
Warlords Diplomacy Revamped - v1.0 - Input Needed!

With the introduction of Vassal States in the Warlords expansion, the diplomacy in the game became unbalanced. The main problem came with wars between civs with vassals. If you have one vassal, and he is attacked by a civ with 2 or 3 vassals, you declare war on all of them. That is -3 with each of those civs, and -1 with every civ that is pleased with them. So you get lots of negative and PERMANENT modifiers when the one who initialized the war was the other civ. The "You attacked out friend!" modifier with neutral civs can stack up to -10 or more, making diplomacy completly obsolete. The way the war declaration works its IMHO, broken. If they attack your vassal, they are attacking you. So they should declare war on your vassal and on you. But I cannot fix that.

So what I did was to increase the "You attacked out friend!" threshold to Friendly, so they should get angry when you attack their real friends (FRIENDLY=FRIEND), not when you attack their +1 pleased "friends". With this the main problem of the Warlords vassal diplomacy is practically resolved. This is done by a SDK modification made on my request by Gunner.

I also made all permanent modifiers temporary. Many of them will last a long time, but there is always the chance that they dissapear. I still don´t know what the exact value of this length means, but I will try to discover it. This was done by modifying the CIV4LeaderHeadInfos.xml file.

NOTE: These 2 files (the SDK and the XML) can be used separated. You can use one or the other, or both.

Here is Alexander´s Memory decay. The other leaders are very similar to this one.

Spoiler :
<MemoryDecay>
<MemoryType>MEMORY_DECLARED_WAR</MemoryType>
<iMemoryRand>200</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_DECLARED_WAR_ON_FRIEND</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_HIRED_WAR_ALLY</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_NUKED_US</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_NUKED_FRIEND</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_RAZED_CITY</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_RAZED_HOLY_CITY</MemoryType>
<iMemoryRand>200</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_SPY_CAUGHT</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_STOPPED_TRADING</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_HIRED_TRADE_EMBARGO</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_MADE_DEMAND</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_GIVE_HELP</MemoryType>
<iMemoryRand>200</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_REFUSED_HELP</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_ACCEPT_DEMAND</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_REJECTED_DEMAND</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_ACCEPTED_RELIGION</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_DENIED_RELIGION</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_ACCEPTED_CIVIC</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_DENIED_CIVIC</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_ACCEPTED_JOIN_WAR</MemoryType>
<iMemoryRand>150</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_DENIED_JOIN_WAR</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_ACCEPTED_STOP_TRADING</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_DENIED_STOP_TRADING</MemoryType>
<iMemoryRand>50</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_STOPPED_TRADING_RECENT</MemoryType>
<iMemoryRand>30</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_MADE_DEMAND_RECENT</MemoryType>
<iMemoryRand>20</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_CANCELLED_OPEN_BORDERS</MemoryType>
<iMemoryRand>10</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_TRADED_TECH_TO_US</MemoryType>
<iMemoryRand>100</iMemoryRand>
</MemoryDecay>
<MemoryDecay>
<MemoryType>MEMORY_RECEIVED_TECH_FROM_ANY</MemoryType>
<iMemoryRand>20</iMemoryRand>
</MemoryDecay>


And here is Alex&#180;s Attitude modifier. Note that they are multiplied by 100, so a -300 is a -3 ingame. I lowered some of these also.

Spoiler :
<MemoryAttitudePercent>
<MemoryType>MEMORY_DECLARED_WAR</MemoryType>
<iMemoryAttitudePercent>-300</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_DECLARED_WAR_ON_FRIEND</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_HIRED_WAR_ALLY</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_NUKED_US</MemoryType>
<iMemoryAttitudePercent>-200</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_NUKED_FRIEND</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_RAZED_CITY</MemoryType>
<iMemoryAttitudePercent>-200</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_RAZED_HOLY_CITY</MemoryType>
<iMemoryAttitudePercent>-200</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_SPY_CAUGHT</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_GIVE_HELP</MemoryType>
<iMemoryAttitudePercent>100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_REFUSED_HELP</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_ACCEPT_DEMAND</MemoryType>
<iMemoryAttitudePercent>100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_REJECTED_DEMAND</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_ACCEPTED_RELIGION</MemoryType>
<iMemoryAttitudePercent>100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_DENIED_RELIGION</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_ACCEPTED_CIVIC</MemoryType>
<iMemoryAttitudePercent>100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_DENIED_CIVIC</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_DENIED_JOIN_WAR</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_ACCEPTED_STOP_TRADING</MemoryType>
<iMemoryAttitudePercent>100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_DENIED_STOP_TRADING</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_STOPPED_TRADING</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_HIRED_TRADE_EMBARGO</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_MADE_DEMAND</MemoryType>
<iMemoryAttitudePercent>-100</iMemoryAttitudePercent>
</MemoryAttitudePercent>
<MemoryAttitudePercent>
<MemoryType>MEMORY_TRADED_TECH_TO_US</MemoryType>
<iMemoryAttitudePercent>10</iMemoryAttitudePercent>
</MemoryAttitudePercent>


Installation instructions: Just put in your customassets folder in My Documents\My Games\Warlords\ and extract.

Please give me feedback and suggestions so I can achieve a better balance. Thanks!

Well, without further delay, here is the mod: http://forums.civfanatics.com/downloads.php?do=file&id=2439
 
I have the attitude fix in place and it works wonderfully, question on the memory stuff, does it really make much of a difference....

I find Agressive A.I. is about the only way to see a good number of AI VS AI wars so getting great relationships is a bit harder, i'm still on the fence about the memory changes. Any play test data on it to see if we want to use it.
 
This is going into PbP in its next version. Many thanks to you and gunner for it.

Cool! You are welcome!

Hey great job on this one Elhoim, I had been looking for it before but couldn't find it.

Thanks for mentioning me in the writeup. Now I feel important :D

It&#180;s the least I can do. You saved me the trouble of going through all the SDK installation for only one word change! :)

I have the attitude fix in place and it works wonderfully, question on the memory stuff, does it really make much of a difference....

I find Agressive A.I. is about the only way to see a good number of AI VS AI wars so getting great relationships is a bit harder, i'm still on the fence about the memory changes. Any play test data on it to see if we want to use it.

I found the decays and modifiers okay, but I know they need some fine tuning. Try it once and post your thoughts! Thanks!

will there be SDK sources for this mod? Or where can we get them?
tnx

Sorry, I don&#180;t know what you mean with SDK sources... You mean the actual file that was changed instead of the whole dll? Thanks!
 
Yes I would like to see some Source, then I can incorporate this as an Optional GlobalDefine String.
 
Yes, please pose the modified CivCoreDLL file uncompiled, and hopefully annotated which lines were edited in the *.cpp and *.h files of the uncompiled CivCoreDLL.

Thanks!
 
Sorry, I don&#180;t know what you mean with SDK sources... You mean the actual file that was changed instead of the whole dll? Thanks!
thanks for reply, Elhoim

i mean
modified CivCoreDLL file uncompiled, and hopefully annotated which lines were edited in the *.cpp and *.h files of the uncompiled CivCoreDLL
 
This works quite nicely Elhoim. The SDK makes perfect sense to me, but I still can't say I understand the logic behind the .xml portion with memory decays, but I would assume you have tested it and thought it was balanced enough to post.

Using one or both portions of this makes more sense than the default warlords diplomacy in any case. This will definately make a showing in CCP or CEP or whatever name we're going by these days if Impaler has it his way.
 
I prefer the touge-in-check abreviation CCCP for "Civ4 Community Core Project" though the forum is named Comunity Enhancment Project and that was the name TGA used when he started the thread, a few days later the "Official" name proposed by 12Monkeys was adopted on the second page of the "founding" thread here...

http://forums.civfanatics.com/showthread.php?t=167004&page=2
 
It&#180;s funny that a little change has such huge impact! :p

It&#180;s only a small change in a line in CvTeam.cpp:

if (GET_TEAM(GET_PLAYER((PlayerTypes)iJ).getTeam()).A I_getAttitude(eTeam) >= ATTITUDE_PLEASED)
{
GET_PLAYER((PlayerTypes)iJ).AI_changeMemoryCount(( (PlayerTypes)iI), MEMORY_DECLARED_WAR_ON_FRIEND, 1);

Jusy change ATTITUDE_PLEASED to ATTITUDE_FRIENDLY, and that&#180;s all! If you want I can upload a file, but I don&#180;t think it&#180;s really necessary. ;)
 
I still can't say I understand the logic behind the .xml portion with memory decays, but I would assume you have tested it and thought it was balanced enough to post.

Yeah, I still don&#180;t understand it... I don&#180;t think that the number means turns, but one I make it one, it lasts one turn, and two, two. Some guy told me that it may be events, but I&#180;m not quite sure what he meant. Please post if you feel that they are too short or too long.

To give you a parameter of what each number means, I&#180;ll give you an example:

This one is a default number, in vanilla game:

<MemoryType>MEMORY_GIVE_HELP</MemoryType>
<iMemoryRand>200</iMemoryRand>

As you can see, is for when you give help to another civ. In a game they almost never forget when you give them help. So 200 is a "almost never forget". It may forget about it, but it&#180;s very unlikely.

Then we have:

<MemoryType>MEMORY_DENIED_CIVIC</MemoryType>
<iMemoryRand>50</iMemoryRand>

In vanilla, many times civs forget that you denied adopting her favorite civic, so 50 is a somewhat low number. It&#180;s bound to happen anytime during the game.

So I gave the new temporal modifiers number according to this logic. I tried to make it fair, so it&#180;s not "they always forget the good and always remember the bad", but it&#180;s not "I&#180;ll do whatever I want to them because they are going to forget eventually!". Vanilla civ diplomacy was very well balanced, but with the inclusion of vassal states, they completly forgot to rebalance the diplomacy again.

So try it if you can and tell me what you think about it, so we can achieve a new balance, as I think that Firaxis is not going to change this particular issue in a patch... I hope I&#180;m wrong! :D
 
Elhoim said:
It´s funny that a little change has such huge impact! :p

It´s only a small change in a line in CvTeam.cpp:



Jusy change ATTITUDE_PLEASED to ATTITUDE_FRIENDLY, and that´s all! If you want I can upload a file, but I don´t think it´s really necessary. ;)

Awesome! Thanks, Elhoim.
 
I think changing the way the war declarations are made would be the way to correct this.

Taking away the 'declared war on our friend' minus from AI's is not a good idea because there are so little minuses the AI's can get whatsoever. They tend to have much more pluses.

Also for the same reason i think making them forgettable is not good thing.

This way intentionally making serious AI to AI confilcts (with bribing them/asking them to attack somebody with many friends, eventually leaving a lot of untrust in AI-AI relations) is much more difficult if not impossible which is restriction to diplomacy range.

War declaration mechanism should be changed.
 
I think changing the way the war declarations are made would be the way to correct this.

Taking away the 'declared war on our friend' minus from AI's is not a good idea because there are so little minuses the AI's can get whatsoever. They tend to have much more pluses.

Also for the same reason i think making them forgettable is not good thing.

This way intentionally making serious AI to AI confilcts (with bribing them/asking them to attack somebody with many friends, eventually leaving a lot of untrust in AI-AI relations) is much more difficult if not impossible which is restriction to diplomacy range.

War declaration mechanism should be changed.

Yeah, I totally agree with you. My ideal solution would be that in the case of war declarations, the aggressor declares war on both the vassal and the master, instead of the master or vassal declaring war on the aggresor when one is attacked.

Also it would help that the enemy recognizes that attacking his small neighbour would mean an attack on the bigger one...

But that change can only made by Firaxis (which I doubt they will) or a very experienced modder.
 
Or, alternatively, you can conquer your enemies and not make them vassals.
And this vassal protection routine could also be exploited against AI civs with vassals (you attack their vassal and they wil seem the agressor to the others)
 
It&#180;s funny that a little change has such huge impact!

It&#180;s only a small change in a line in CvTeam.cpp:

if (GET_TEAM(GET_PLAYER((PlayerTypes)iJ).getTeam()).A I_getAttitude(eTeam) >= ATTITUDE_PLEASED)
{
GET_PLAYER((PlayerTypes)iJ).AI_changeMemoryCount(( (PlayerTypes)iI), MEMORY_DECLARED_WAR_ON_FRIEND, 1);

Jusy change ATTITUDE_PLEASED to ATTITUDE_FRIENDLY, and that&#180;s all! If you want I can upload a file, but I don&#180;t think it&#180;s really necessary.
 
Back
Top Bottom