[BTS] Help,how to get rid of "You've grown too powerful for us" in permanent alliance?

JoeyYang

Chieftain
Joined
Jun 3, 2019
Messages
2
I know that the permanent alliance need the condition that the new team's military power not to surpass all other players' sum, or it will show "You have grown too powerful for us".
I want to delete that term of judgement, so I can make any alliance I like. But I don't know which file to modify.
Anyone knows please help me, in fact, permanent alliance is my only interest in this game.
 
To change this permanently, you'd have to compile a new DLL. The code is in CvTeamAI.cpp, function AI_permanentAllianceTrade. Here's the snippet (edited for readability):
Code:
if(getPower(true) + GET_TEAM(eTeam).getPower(true) > GC.getGameINLINE().countTotalCivPower() / 2) {
  if(getPower(true) > GET_TEAM(eTeam).getPower(true))
    return DENIAL_POWER_US; // Doing fine on our own
  else return DENIAL_POWER_YOU; // Grown too powerful
}
If you only need a one-time workaround, you could try giving some third party free units through the WorldBuilder in order to increase the TotalCivPower, sign the Permanent Alliance and take the units away again. To make this easier, you could temporarily increase the power value of some unit type through Civ4UnitInfos.xml.
 
To change this permanently, you'd have to compile a new DLL. The code is in CvTeamAI.cpp, function AI_permanentAllianceTrade. Here's the snippet (edited for readability):
Code:
if(getPower(true) + GET_TEAM(eTeam).getPower(true) > GC.getGameINLINE().countTotalCivPower() / 2) {
  if(getPower(true) > GET_TEAM(eTeam).getPower(true))
    return DENIAL_POWER_US; // Doing fine on our own
  else return DENIAL_POWER_YOU; // Grown too powerful
}
If you only need a one-time workaround, you could try giving some third party free units through the WorldBuilder in order to increase the TotalCivPower, sign the Permanent Alliance and take the units away again. To make this easier, you could temporarily increase the power value of some unit type through Civ4UnitInfos.xml.

Many thanks to you, dude, but I don't find CvTeamAI.cpp file in the game folders.Could you tell me where it is ? And I think that maybe I only need to open this file as txt, and then change the code "countTotalCivPower() / 2" to "countTotalCivPower() " , just delete the "/ 2" , and then it will be OK? Do you think it will work ?
 
No, that works for XML and Python files, but the C++ source code needs to be compiled into CvGameCoreDLL.dll. It's normally in Beyond the Sword\CvGameCoreDLL, but it's possible that some digital editions of the game don't include that folder. Anyway, Leoreth's guide that I linked to also contains a link to a repository with the source code (here).

Apart from that, removing the "/2" should work – the power of two teams (and their vassals) can't be greater than the power of all civs, so it should be equivalent to removing the whole power check.
 
Back
Top Bottom