Permanent alliances with more than one player?

Ermelinho

Child with the Mirror
Joined
May 8, 2007
Messages
89
Location
Among the Daughters of the Desert
I wanna be able to ally with more than one guy in the game.

which file to change?

thanks
 
you would have to compile a new cvcoregamedll.dll and change the following code in CvPlayer.cpp
Code:
case TRADE_PERMANENT_ALLIANCE:
		if (!(GET_TEAM(getTeam()).isAVassal()) && !(GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isAVassal()))
		{
			if (getTeam() != GET_PLAYER(eWhoTo).getTeam() && !GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isVassal(getTeam()))
			{
				if (!atWar(getTeam(), GET_PLAYER(eWhoTo).getTeam()))
				{
					if (GET_TEAM(getTeam()).isPermanentAllianceTrading() || GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).isPermanentAllianceTrading())
					{
						if ((GET_TEAM(getTeam()).getNumMembers() == 1) && (GET_TEAM(GET_PLAYER(eWhoTo).getTeam()).getNumMembers() == 1))
						{
							return true;
						}
					}
				}
			}
		}
the two instances of == 1 would have to change to a bigger number.
 
Oh! worst case scenario!
now i´ll have to find out how to do that! :crazyeye:

thank you ori!

p.s.: could you tell me which file and line for the number of maximum civs? because i play with a 34 gamecore.dll.... so before i start compiling around i´d like to have all changes done!

or can i decompile and existing .dll, change and recompile it?
 
There is a pretty good guide on compiling the civcoregamedll.dll here.
No you cannot decompile an existing .dll
Regarding 34 Civs or whatever, I think you only have to change the following:
line:
Code:
#define MAX_CIV_PLAYERS	(18)
in CvDefines.h
 
There is a pretty good guide on compiling the civcoregamedll.dll here.
No you cannot decompile an existing .dll
Regarding 34 Civs or whatever, I think you only have to change the following:
line:
Code:
#define MAX_CIV_PLAYERS	(18)
in CvDefines.h

Not to derail or anything, but are you saying if I change that single value in my game core .dll I will be able to have 34 civs?
 
Yes, although the game will run slower the higher that number is (regardless of how many civs you actually play with)

also just change ==1 to >=1 so that as long as you have at least 1 member on your team, and they have at least 1 member on theirs
 
thank you once again, ori.

there´s still something that would be nice to have: naming the team, or making it get a default name (like NATO or warsaw pact or something like that!

maybe if two players ally, the alliance could be named after one of their members capital. afterwards you can invite other players to join the pact (except of their founders). one should also be able to resign from the pact with an latency of 10 turns or something...

would that be realizable?
 
Not to derail or anything, but are you saying if I change that single value in my game core .dll I will be able to have 34 civs?
I havn't done it yet (and I am frankly not interested after seeing how many loops there are that loop through each player - I don't believe my machine wants to think about it :lol:) but it is the only instance I can find were max_players is defined so I'd think so - nothing beats trying though, once you know how to compile its a work of a few minutes and quite a bit of :coffee: while waiting for the compiling ;)
 
thank you once again, ori.

there´s still something that would be nice to have: naming the team, or making it get a default name (like NATO or warsaw pact or something like that!

maybe if two players ally, the alliance could be named after one of their members capital. afterwards you can invite other players to join the pact (except of their founders). one should also be able to resign from the pact with an latency of 10 turns or something...

would that be realizable?

that would be cool, but massively overpowered unless a few rival Civs more or less automatically did the same thing
 
thank you once again, ori.

there´s still something that would be nice to have: naming the team, or making it get a default name (like NATO or warsaw pact or something like that!

maybe if two players ally, the alliance could be named after one of their members capital. afterwards you can invite other players to join the pact (except of their founders). one should also be able to resign from the pact with an latency of 10 turns or something...

would that be realizable?
That would probably be realizable but require some more programming since you would need to rewrite the way permanent alliances are handled (the code above just handles how you can trade (i.e. start) permanent alliances).
Also Krikkitone is right: >= 1 is the way to go just changing the numbers to e.g. == 2 as I proposed last night was a :smoke: move: this would mean you could only trade a Perm Alliance if you already had a partner, but not if you don't :crazyeye:
 
phuh, yeah less :smoke: would be an option for me, too.

there´s one last thing (hopefully) i´d like to solve before I go. since warlords patch v 3.*i dunno* the AI´s behavior towards their vassals really really annoying me. if I have a PA and a (voluntary) vassal, my PA gives away our brand new tech (for free!), so that there´s nothing left i could trade with my vassal. meaning that the "we would like you to research... " option is useless, or just needed to make sure my vassal stays behind in tech.

it wasn´t so in earlier versions. it can´t be that difficult to retract, can it?
 
There is a pretty good guide on compiling the civcoregamedll.dll here.
No you cannot decompile an existing .dll
Regarding 34 Civs or whatever, I think you only have to change the following:
line:
Code:
#define MAX_CIV_PLAYERS	(18)
in CvDefines.h

Do I need to change this file in the main Civ4 folder as well as the BTS folder? I just updated my BTS CvDefines.h file and i still only have 18 teams available.
 
Do I need to change this file in the main Civ4 folder as well as the BTS folder? I just updated my BTS CvDefines.h file and i still only have 18 teams available.
Sorry I was not clear on this:
The CvGameCoreDLL folder contains all files that are necessary to compile a CvGameCoreDLL.dll - so what you need to do is change the value in CvDefines.h then compile the CvGameCoreDLL.dll from these files and replace your old one with that...
 
Sorry I was not clear on this:
The CvGameCoreDLL folder contains all files that are necessary to compile a CvGameCoreDLL.dll - so what you need to do is change the value in CvDefines.h then compile the CvGameCoreDLL.dll from these files and replace your old one with that...


Can you clue me in on how to compile a .dll file ? Or would it be easier to just email me the .dll file ? :) kalelpi314@hotmail.com :goodjob:
 
Can you clue me in on how to compile a .dll file ? Or would it be easier to just email me the .dll file ? :) kalelpi314@hotmail.com :goodjob:

for compiling the .dll follow the link I gave in this post:

There is a pretty good guide on compiling the civcoregamedll.dll here.
No you cannot decompile an existing .dll
Regarding 34 Civs or whatever, I think you only have to change the following:
line:
Code:
#define MAX_CIV_PLAYERS    (18)
in CvDefines.h

I have not compiled a version like this (if you just want the 18+ version you can download Lt. Bob's mod as linked in this quote):

lex: Just grab my 40civs mod from the mod components forum. It includes solver's changes and unless you change the xml files to add my features it won't change the game in any other way than to add >18 civ support and colonies.

http://forums.civfanatics.com/showthread.php?t=234779
 
Back
Top Bottom