[FIXED] Peace treaty does not expire

Never ending peace treaty: This is the NUMBER ONE Bug that needs to be fixed!! It just ruined another game for me...
 
So, I've been waiting and waiting for the peace treaty to end with the Ottomans. I waited 10 turns. It didn't happen, so I thought, OK, maybe ... wait 40 more? Waited 40 more annoying turns, and nothing.

Is this a bug?

Moderator Action: Threads merged. the_J
 
So, I see on page 2 this was to be fixed in the first hotfix (posted Sep 25), well its Oct 20th now, any idea on when this fix will be?
 
Has anyone figured out why some peace treaties trigger this and otehrs don't? I noticed something unusual today during the expiration of a treaty, every turn aftr it expired the game kept telling me the treaty had expired. I believe this was because the computer AI had given me cash per turn over 30 turns, and the peace itself was only for 10 turns.

Perhaps the variables that need to be considered are whether the computer or you initiates the treaty, and whether money is exchanged.

I also have a similar problem in my current game. In my case, every turn since I signed a peace treaty with Ghandi it reminds me that my peace treaty has expired and that I can declar ware. Ghandi also has residual culture surrounding the city that I captured from him, meaning I am having problems building roads between my cities. I assumed that the bugs were related. Has anyone else seen this?
 
It is a brute way to declare war anyway:
1. save game, exit.
2. open file "C:\Program Files\Civilization 5\assets\UI\InGame\WorldView\TradeLogic.lua" in your favorite text editor (probably administrative rights will be needed to save it after changes).
3. Find block of code (I found it in 157-163 lines):
if (pActiveTeam:IsForcePeace(g_iAITeam)) then
Controls.WarButton:SetDisabled(true);
Controls.WarButton:SetToolTipString( Locale.ConvertTextKey( "TXT_KEY_DIPLO_MAY_NOT_ATTACK" ));
else
Controls.WarButton:SetDisabled(false);
Controls.WarButton:SetToolTipString( Locale.ConvertTextKey( "TXT_KEY_DIPLO_DECLARES_WAR_TT" ));
end
3. Change condition in if to guaranted falseness? e.g.:
if (pActiveTeam:IsForcePeace(g_iAITeam) and false ) then
4. load your game, now it is possible to declare war via dialog with leader. Do not now about possible consequences, probably they can be.
5. After declaring war you can return code to original state.
PS The root of the problem is in binary file ("C:\Program Files\Civilization 5\CvGameCoreDLLFinal Release.dll"), and it is hard to determine any more.
 
It is a brute way to declare war anyway:
1. save game, exit.
2. open file "C:\Program Files\Civilization 5\assets\UI\InGame\WorldView\TradeLogic.lua" in your favorite text editor (probably administrative rights will be needed to save it after changes).
3. Find block of code (I found it in 157-163 lines):

3. Change condition in if to guaranted falseness? e.g.:

4. load your game, now it is possible to declare war via dialog with leader. Do not now about possible consequences, probably they can be.
5. After declaring war you can return code to original state.
PS The root of the problem is in binary file ("C:\Program Files\Civilization 5\CvGameCoreDLLFinal Release.dll"), and it is hard to determine any more.

Nice spot man ;)
 
It is a brute way to declare war anyway:
1. save game, exit.
2. open file "C:\Program Files\Civilization 5\assets\UI\InGame\WorldView\TradeLogic.lua" in your favorite text editor (probably administrative rights will be needed to save it after changes).
3. Find block of code (I found it in 157-163 lines):

3. Change condition in if to guaranted falseness? e.g.:

4. load your game, now it is possible to declare war via dialog with leader. Do not now about possible consequences, probably they can be.
5. After declaring war you can return code to original state.
PS The root of the problem is in binary file ("C:\Program Files\Civilization 5\CvGameCoreDLLFinal Release.dll"), and it is hard to determine any more.

Thanks for this however it didn't work for me since I didn't have that code in my file (i.e. no warbutton option set to false). Lucky for me, the "makewarnotlove" mod worked for me :)
 
I had the same problem with Civ 5. I tried the above method but i did not work. After some poking around in the lua files I had succes with this method:


open file "C:\Program Files\Civilization 5\assets\UI\InGame\LeaderHead\LeaderHeadroot.lua" in a text editor.

Find al the lines of command that say:
WarButton:SetDisabled(true);

(it doesn't matter if there is other stuff infront or behind this line)
And change this to
WarButton:SetDisabled(false);

This should make the war button pressable again when talking to leaders in game.

P.S.
I've got no real knowledge about changing command so I just used a trial an error method to fix this so I don't know if this will cause any other problems in the game.

enjoy

P.P.S

Yes we Cannabis!:king:
 
Actually the file to edit is "C:\Program Files\Civilization 5\assets\UI\InGame\LeaderHead\LeaderHeadroot.lua", as gekke henkie said, but the line to change is if (pActiveTeam:IsForcePeace(g_iAITeam)) to if (pActiveTeam:IsForcePeace(g_iAITeam) and false) as panzerok recommended.

Start the game, declare war and get done with it :).
After that you can change it back to the original. I tested it and is working.
 
Top Bottom