PDA

View Full Version : Quick Question



Skyline Pete
03-20-2007, 14:40
Which file contains the code pertaining to how quickly diplomatic relations decrease?

It's giving me the shits having to send diplomats to every factions' city just to keep up a decent alliance with them. I've modded the AI to keep stronger alliances as long as the rating is </= Very Good but that's near impossible to keep without spending half my income on tributes to other factions just to keep an alliance.

Plus at 6 months per turn it doesn't seem realistic to me to have to continually pester the AI with diplomats.

alpaca
03-20-2007, 16:25
The file you look for is descr_faction_standing.txt

Moved to modding questions.

By the way, please also give your threads more meaningful titles in the future ;)

Foz
03-20-2007, 16:40
That code is in descr_faction_standing.txt. It looks like this:


;------------------------------------------
Trigger 0092_Update_Easy_Difficulty
WhenToTest FactionTurnStart

Condition CampaignDifficulty = easy

FactionStanding exclude_factions { } normalise 1.0 50

;------------------------------------------
Trigger 0093_Update_Normal_Difficulty
WhenToTest FactionTurnStart

Condition CampaignDifficulty = medium

FactionStanding exclude_factions { } normalise 0.0 50

;------------------------------------------
Trigger 0094_Update_Hard_Difficulty
WhenToTest FactionTurnStart

Condition CampaignDifficulty = hard

FactionStanding exclude_factions { } normalise -0.5 50

;------------------------------------------
Trigger 0095_Update_Very_Hard_Difficulty
WhenToTest FactionTurnStart

Condition CampaignDifficulty = very_hard

FactionStanding exclude_factions { } normalise -1.0 40

To understand it you should understand normalise too - basically, "normalise -1.0 40" would mean -1.0 is the target value. The game then calculates how far you are from -1.0 relations with each faction, and takes you 1/40th of the way to -1.0. So if you're at -0.6, the difference is -0.4, so you'll lose -0.4/40 = 0.01 standing that turn. The extreme case of perfect relations is 1.0, for a difference of 2.0, and a loss of 2.0/40 = 0.05.

If you're looking to simply parallel the per-year rate of how it deteriorates in vanilla, all you'd need to do is replace each divisor (the 50 or 40) with 4 times its current value, so 200 for the first 3 and 160 for the last one. It won't be quite perfect, but close enough that it should maintain the feel.

Skyline Pete
03-21-2007, 04:11
Thank you for explaining that for me Foz.

Foz
03-21-2007, 04:17
Thank you for explaining that for me Foz.
Np :bow: