[G&K] Player 2 can't make Declarations of Friendship with AI

JSMCAG

King
Joined
Oct 26, 2009
Messages
780
So, my brother and I were playing HotSeat (me as Sweden, him as The Netherlands) and, mid-game, we noticed that he (Player 2) couldn't make Declarations of Friendship with AI controlled Civilizations.

I (Player 1) could make Declarations of Friendship as usual (either by asking them directly under "Discuss", or accepting when they would ask me).

My brother (Player 2), however, could not ask them some of the time.
If they came to him to ask a Declaration of Friendship, he could accept, and everything worked well.
If he asked them (under "Discuss"), one of two things would happen:
  1. The button worked fine, and they would refuse (everything's normal so far)
  2. Pressing the button would do nothing - the AI wouldn't say anything, the button was still there (it usually disappears), it was as if it was never pressed to begin with...
I suspect the second would only occur when the AI would accept it (but, since it was bugged, it wouldn't do anything)...

This behavior occurred regardless if I had a Declaration of Friendship with them or not:
I had a Declaration of Friendship with The Netherlands (my brother), Byzantium, Austria and Babylon. I did not have one with The Aztecs nor The Huns...
My brother couldn't make a Declaration of Friendship with any of them (except, maybe, me - we didn't test this), it would bug out (including with The Huns, he was also Friendly with them)...

Because of this, i made a test hotseat save to see if i can reproduce the bug again, with success...
After loading the attached save and, as Player 2 (Ethiopia), if you try to make a Declaration of Friendship with India, nothing happens...
During Player 1's turn (The Celts' turn), India asked for a Declaration of Friendship with them, which was accepted. Since Player 1 also has a Declaration of Friendship with Player 2, India now is on good terms with Player 2, but if Player 2 tries to make a Declaration of Friendship themselfs, it bugs out and nothing happens... If my suspicions are correct, it means India WOULD accept the Declaration of Friendship, but it's not working...
The same thing happens with Polynesia, pressing the button has no response (Polynesia is also Friendly with Player 2, and has a Declaration of Friendship with Player 1 as well)... Not with Carthage, however, which is Guarded towards Player 2 - Pressing "Shall we make a join Declaration of Friendship?" works correctly, and Dido refuses.

I apreciate it if someone else would try this and, if the same happens, then would report back! :)

Sorry if my English is wonky, I'm not a native speaker :) Hopefully, i got my message across...
 
So, my brother and I were playing HotSeat (me as Sweden, him as The Netherlands) and, mid-game, we noticed that he (Player 2) couldn't make Declarations of Friendship with AI controlled Civilizations.

I (Player 1) could make Declarations of Friendship as usual (either by asking them directly under "Discuss", or accepting when they would ask me).

My brother (Player 2), however, could not ask them some of the time.
If they came to him to ask a Declaration of Friendship, he could accept, and everything worked well.
If he asked them (under "Discuss"), one of two things would happen:
  1. The button worked fine, and they would refuse (everything's normal so far)
  2. Pressing the button would do nothing - the AI wouldn't say anything, the button was still there (it usually disappears), it was as if it was never pressed to begin with...
I suspect the second would only occur when the AI would accept it (but, since it was bugged, it wouldn't do anything)...

This behavior occurred regardless if I had a Declaration of Friendship with them or not:
I had a Declaration of Friendship with The Netherlands (my brother), Byzantium, Austria and Babylon. I did not have one with The Aztecs nor The Huns...
My brother couldn't make a Declaration of Friendship with any of them (except, maybe, me - we didn't test this), it would bug out (including with The Huns, he was also Friendly with them)...

Because of this, i made a test hotseat save to see if i can reproduce the bug again, with success...
After loading the attached save and, as Player 2 (Ethiopia), if you try to make a Declaration of Friendship with India, nothing happens...
During Player 1's turn (The Celts' turn), India asked for a Declaration of Friendship with them, which was accepted. Since Player 1 also has a Declaration of Friendship with Player 2, India now is on good terms with Player 2, but if Player 2 tries to make a Declaration of Friendship themselfs, it bugs out and nothing happens... If my suspicions are correct, it means India WOULD accept the Declaration of Friendship, but it's not working...
The same thing happens with Polynesia, pressing the button has no response (Polynesia is also Friendly with Player 2, and has a Declaration of Friendship with Player 1 as well)... Not with Carthage, however, which is Guarded towards Player 2 - Pressing "Shall we make a join Declaration of Friendship?" works correctly, and Dido refuses.

I apreciate it if someone else would try this and, if the same happens, then would report back! :)

Sorry if my English is wonky, I'm not a native speaker :) Hopefully, i got my message across...

Confirmed. Having the exact same problem, actually found this post doing a google search hoping someone had found the solution. Pretty lame. :confused:
 
Same problem here. I've installed diplo_fix from sticky thread but it didin't work :( Bug also appears in BNW.
 
I am also experiencing this problem. Does anyone know a workaround? There doesn't seem to be many posts about it.

I usually play multiplayer with a friend with 6 or 7 AI opponents and I am always player 2. Some time during the game, when I press the 'Shall we make a joint declaration of friendship' option with an AI, it just doesn't do anything. This is really hampering my game as I am now unable to sign research agreements with certain AI whilst my fellow human player is able to.

Does anyone know any more about this?
 
My wife and I play with BNW and we see this ALL the time. Player 2 has a very hard time getting a Declaration of Friendship with an AI. It will work on occasion, but it seems like once the bug crops up with an AI, then it will be permanently broken with that AI.

To repeat, the AI has no problem saying No to player 2, but it seems like when they are likely to say Yes, then the button asking for a DoF does nothing. You can click on it forever, and it won't acknowledge the clicks.

This is very annoying and very common. Anyone have any specific knowledge of this problem?
 
Anyone figure out any solution for this? This is happening in BNW too. It really ruined my plan to go for a Science victory in a game with friends as I couldn't make Research Agreements with the AI.
 
When Player 1 have a Friendship with KI A, Player 2 can´t ask KI A for Friendship,
the Button is not functional.

Can anyone help?
 
This bug is still existing!

If the host player makes a declaration of friendship with any AI-CIV, all other players can't declare friendship with them, it just happens nothing if the button is clicked. If a non-host player declares friendship the host still can declare friendship with the AI-CIV. This is a serious issue since 2012. I can't believe it still exists. Any help or fix would be appreciated.

I have BNW btw...
 
Should I now declare CIV 5 officialy as dead? Are we the only few people on the world, who recognized this bug. In my eyes this is a MAJOR bug, as it completely destroys diplomacy in ANY multiplayer game. It's so annoying. Even if there is no hope for a patch from the devs, isn't there somebody, who can provide info on how to fix it in something like a fan patch?
 
This bug is still existing!

If the host player makes a declaration of friendship with any AI-CIV, all other players can't declare friendship with them, it just happens nothing if the button is clicked. If a non-host player declares friendship the host still can declare friendship with the AI-CIV. This is a serious issue since 2012. I can't believe it still exists. Any help or fix would be appreciated.

I have BNW btw...

Could you provide a savefile please? It'd preferably be one that is after the DoF has happened. Once the savefile is loaded up, I can start nosing about the game state to see what went awry.

Also, don't be so melodramatic about this bug. The reason nobody has responded with anything interesting so far is 1) there are relatively few people here who have the knowhow to look into multiplayer-related bugs (since modded multiplayer Civ5 is a PITA, and you'd ideally start modding things to track down a bug), 2) of those people, not many browse the Bug Reports forum, 3) multiplayer-oriented players tend to focus on bugs that affect gameplay between human players, while people who focus on AI diplomacy are rarely concerned with multiplayer, and 4) nobody's provided a goddamn savefile to work with.
 
Could you provide a savefile please? It'd preferably be one that is after the DoF has happened. Once the savefile is loaded up, I can start nosing about the game state to see what went awry.

Also, don't be so melodramatic about this bug. The reason nobody has responded with anything interesting so far is 1) there are relatively few people here who have the knowhow to look into multiplayer-related bugs (since modded multiplayer Civ5 is a PITA, and you'd ideally start modding things to track down a bug), 2) of those people, not many browse the Bug Reports forum, 3) multiplayer-oriented players tend to focus on bugs that affect gameplay between human players, while people who focus on AI diplomacy are rarely concerned with multiplayer, and 4) nobody's provided a goddamn savefile to work with.

This is a pretty serious bug for people who don't know a large number of other Civ 5 players...as soon as one AI is in the game, it's tainted by the DOF not working.

Where would I find the save file if I play using Steam on Mac OS X Yosemite? I am playing Civ 5 with all the standard downloads, G&K as well as BNW and all the other minor additions and such, no mods. My current game where I'm Polynesia (not hosting) and my friend is Mongolia (hosting) is having the issue and I can get DOF declined, but when they would accept the friendship, the button has zero visible functionality. I'm a pretty casual Civ 5 player and only play online with one friend, 12 players total (2 humans, 10 AI), and whoever the host is can always do DOF's and therefore research agreements with AI, but 2nd player cannot.

I have tested where I swap to a different slot/team (i.e. host being team/slot 5 and me being team/slot 6) but it still does not work. The bug is definitely that only the host can make DOF with AI, or at least the 2nd human player cannot - have not tried with more human players.

Anyway, where was I...I want to get you this save file. Where can I find it? I'm not familiar with Civ 5 code but I am decent with finding stuff in computers, so maybe you could direct me or I could look up how to do it. Look for an uploaded save file here in next 24 hours, I'll try to figure it out on my own.

Sorry if I break any forum etiquette in this reply, as I've never done this before and this bug is just so annoying that I had to jump into this conversation...I've checked this very same thread regularly for years now to see if someone was still here.

Also, if you find a solution for this bug, would you mind sharing it with me so my friend and I can play without the bug? I would really appreciate it...not familiar with modding the game, but hopefully it won't prevent us from going online any playing each other using Steam?

Not to sound cheesy, but help me Delnar_Ersike, you're my only hope.

-Genghis Con
 
This is a pretty serious bug for people who don't know a large number of other Civ 5 players...as soon as one AI is in the game, it's tainted by the DOF not working.

Where would I find the save file if I play using Steam on Mac OS X Yosemite? I am playing Civ 5 with all the standard downloads, G&K as well as BNW and all the other minor additions and such, no mods. My current game where I'm Polynesia (not hosting) and my friend is Mongolia (hosting) is having the issue and I can get DOF declined, but when they would accept the friendship, the button has zero visible functionality. I'm a pretty casual Civ 5 player and only play online with one friend, 12 players total (2 humans, 10 AI), and whoever the host is can always do DOF's and therefore research agreements with AI, but 2nd player cannot.

I have tested where I swap to a different slot/team (i.e. host being team/slot 5 and me being team/slot 6) but it still does not work. The bug is definitely that only the host can make DOF with AI, or at least the 2nd human player cannot - have not tried with more human players.

Anyway, where was I...I want to get you this save file. Where can I find it? I'm not familiar with Civ 5 code but I am decent with finding stuff in computers, so maybe you could direct me or I could look up how to do it. Look for an uploaded save file here in next 24 hours, I'll try to figure it out on my own.

Sorry if I break any forum etiquette in this reply, as I've never done this before and this bug is just so annoying that I had to jump into this conversation...I've checked this very same thread regularly for years now to see if someone was still here.

Also, if you find a solution for this bug, would you mind sharing it with me so my friend and I can play without the bug? I would really appreciate it...not familiar with modding the game, but hopefully it won't prevent us from going online any playing each other using Steam?

Not to sound cheesy, but help me Delnar_Ersike, you're my only hope.

-Genghis Con

The save files will most likely be in [your Home folder]/Documents/Aspyr/Sid Meier's Civilization 5/Saves if you're using the native OSX version of Civ5. If you're using the Windows version inside an emulator (e.g. Wine, Parallels, PlayOnMac), they'll be in [your My Documents folder for that emulator]/My Games/Sid Meier's Civilization 5/Saves.

Unfortunately, if the problem is with the C++ code, and it'll most likely be with the C++ code since that's where all the DoF code is, the solution will come as a DLL mod, and DLL mods do not work on native OSX and Linux versions of Civ5. This is because us modders only have access to the Windows CvGameCoreDLL code, Aspyr did not release their OSX and Linux code for modder use.
 
Here's a saved game with the problem, player 2 (who had the problem) was using the Aztecs.
 

Attachments

  • I-suck.Civ5Save
    1.3 MB · Views: 342
Holy moley, found the source. It turns out it's a UI bug, Firaxis left out a single line in OnButton6() within the DiscussionDialog.lua file. The line in question?

Code:
local iActivePlayer = Game.GetActivePlayer();

If this line is placed in the beginning of OnButton6(), players can DoF freely. Note, of course, that it's always best to introduce file modifications by creating a new mod with ModBuddy, copying over the original file into the new mod, making changes to the file there, and then building and playing with the mod, instead of modifying the original files outright. What a weird oversight...

Moderators, please mark this bug as confirmed for BNW, with the fix to it noted above.
 
Firaxis left out a single line in OnButton6() within the DiscussionDialog.lua file.

What do you mean?

Cut of my original lua
Spoiler :
Code:
-- BUTTON 6
----------------------------------------------------------------
function OnButton6()
    g_InstanceManager:ResetInstances();
    	
	local pPlayer = Players[Game.GetActivePlayer()];
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

	local iButtonID = 6;
	local iFromUIDiploEvent = -1;

	-- Discussion mode brought up by the human
	if (g_DiploUIState == DiploUIStateTypes.DIPLO_UI_STATE_DISCUSS_HUMAN_INVOKED) then
		
		-- Discussion Root Mode
		if (g_iInvokedDiscussionMode == g_iModeDiscussionRoot) then
			-- Ask the AI player to work together
			if (not pAIPlayer:IsDoF(iActivePlayer) and not pAIPlayer:IsDoFMessageTooSoon(iActivePlayer)) then
				iFromUIDiploEvent = FromUIDiploEventTypes.FROM_UI_DIPLO_EVENT_HUMAN_DISCUSSION_WORK_WITH_US; Game.DoFromUIDiploEvent(iFromUIDiploEvent, g_iAIPlayer, 0, 0 );
			end
			--if (not pAIPlayer:IsWorkingAgainstPlayerMessageTooSoon(iActivePlayer, 0)) then
				--iFromUIDiploEvent = FromUIDiploEventTypes.FROM_UI_DIPLO_EVENT_HUMAN_DISCUSSION_WORK_WITH_US; Game.DoFromUIDiploEvent(iFromUIDiploEvent, g_iAIPlayer, 0, 0 );
			--end
			--g_iInvokedDiscussionMode = g_iModeDiscussionWorkAgainst;
			--OpenLeadersPanel();
		end
    -- Default mode
    elseif (g_DiploUIState == DiploUIStateTypes.DIPLO_UI_STATE_DEFAULT_ROOT) then
		
	end	
end
Controls.Button6:RegisterCallback( Mouse.eLClick, OnButton6 );
 
What do you mean?

Cut of my original lua
Spoiler :
Code:
-- BUTTON 6
----------------------------------------------------------------
function OnButton6()
    g_InstanceManager:ResetInstances();
    	
	local pPlayer = Players[Game.GetActivePlayer()];
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

	local iButtonID = 6;
	local iFromUIDiploEvent = -1;

	-- Discussion mode brought up by the human
	if (g_DiploUIState == DiploUIStateTypes.DIPLO_UI_STATE_DISCUSS_HUMAN_INVOKED) then
		
		-- Discussion Root Mode
		if (g_iInvokedDiscussionMode == g_iModeDiscussionRoot) then
			-- Ask the AI player to work together
			if (not pAIPlayer:IsDoF(iActivePlayer) and not pAIPlayer:IsDoFMessageTooSoon(iActivePlayer)) then
				iFromUIDiploEvent = FromUIDiploEventTypes.FROM_UI_DIPLO_EVENT_HUMAN_DISCUSSION_WORK_WITH_US; Game.DoFromUIDiploEvent(iFromUIDiploEvent, g_iAIPlayer, 0, 0 );
			end
			--if (not pAIPlayer:IsWorkingAgainstPlayerMessageTooSoon(iActivePlayer, 0)) then
				--iFromUIDiploEvent = FromUIDiploEventTypes.FROM_UI_DIPLO_EVENT_HUMAN_DISCUSSION_WORK_WITH_US; Game.DoFromUIDiploEvent(iFromUIDiploEvent, g_iAIPlayer, 0, 0 );
			--end
			--g_iInvokedDiscussionMode = g_iModeDiscussionWorkAgainst;
			--OpenLeadersPanel();
		end
    -- Default mode
    elseif (g_DiploUIState == DiploUIStateTypes.DIPLO_UI_STATE_DEFAULT_ROOT) then
		
	end	
end
Controls.Button6:RegisterCallback( Mouse.eLClick, OnButton6 );

You'll notice that the function uses the variable iActivePlayer without actually declaring or defining it. If you declare it and define it as the number it's meant to be, Game.GetActivePlayer(), then the function will work properly for multiplayer games (where GetActivePlayer() need not be the first player slot).
 
I have now changed

Code:
	local pPlayer = Players[Game.GetActivePlayer()];
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

to

Code:
	local iActivePlayer = Game.GetActivePlayer();
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

and nothing.

What am I doing wrong?
 
I have now changed

Code:
	local pPlayer = Players[Game.GetActivePlayer()];
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

to

Code:
	local iActivePlayer = Game.GetActivePlayer();
	local pTeam = Teams[pPlayer:GetTeam()];
	local pAIPlayer = Players[g_iAIPlayer];

and nothing.

What am I doing wrong?

Was this done by mod? Did you remember to turn on VFS override for the file?
 
Top Bottom