I have been trying to tweak the GG thresholds a bit and found them to be rather strange. In GlobalDefines, there is:
The GREAT_GENERALS_THRESHOLD makes sense (the starting threshold), but the GREAT_GENERALS_THRESHOLD_INCREASE doesn't make sense. 50 means it does what it does now. 0 makes it go up at half the GREAT_GENERAL_THRESHOLD and -1 makes it go down.
The formula the system uses to calculate it is (located in CvPlayer::createGreatPeople):
----------------------
What I am ultimately after:
I would like it changed so that GREAT_GENERAL_THRESHOLD_INCREASE of 0 means the GG threshold doesn't increase; a value of 10 would mean that the threshold would predictably increase by 10xp with each GG; a value of -1 would mean that it would decrease by one with each GG and a value that is the same as the starting threshold increase (ie, 30) will behave as it normally does (adding 30 each time, 30/60/90/120). This makes sense to me.
Unfortunately, I do not have the software nor the practical expertise with C++ to make the changes.
I would imagine that all that would be needed to be changed would be the above algorithm into:
... one hopes. Basically, changing the formula to be GG_THRESHOLD_INCREASE * number of generals created.
Could anyone help with this? If it's done, far more flexibility and control can be made in the XML where people can come up with different GG scales and patterns. Thanks heaps in advance.
Code:
<DefineName>GREAT_GENERALS_THRESHOLD_INCREASE</DefineName>
<iDefineIntVal>50</iDefineIntVal>
</Define>
<Define>
<DefineName>GREAT_GENERALS_THRESHOLD</DefineName>
<iDefineIntVal>30</iDefineIntVal>
</Define>
The formula the system uses to calculate it is (located in CvPlayer::createGreatPeople):
Code:
if (bIncrementExperience)
{
incrementGreatGeneralsCreated();
changeGreatGeneralsThresholdModifier(GC.getDefineINT("GREAT_GENERALS_THRESHOLD_INCREASE") * ((getGreatGeneralsCreated() / 10) + 1));
for (int iI = 0; iI < MAX_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).getTeam() == getTeam())
{
GET_PLAYER((PlayerTypes)iI).changeGreatGeneralsThresholdModifier(GC.getDefineINT("GREAT_GENERALS_THRESHOLD_INCREASE_TEAM") * ((getGreatPeopleCreated() / 10) + 1));
}
}
}
----------------------
What I am ultimately after:
I would like it changed so that GREAT_GENERAL_THRESHOLD_INCREASE of 0 means the GG threshold doesn't increase; a value of 10 would mean that the threshold would predictably increase by 10xp with each GG; a value of -1 would mean that it would decrease by one with each GG and a value that is the same as the starting threshold increase (ie, 30) will behave as it normally does (adding 30 each time, 30/60/90/120). This makes sense to me.
Unfortunately, I do not have the software nor the practical expertise with C++ to make the changes.
I would imagine that all that would be needed to be changed would be the above algorithm into:
Code:
if (bIncrementExperience)
{
incrementGreatGeneralsCreated();
changeGreatGeneralsThresholdModifier([B]GC.getDefineINT("GREAT_GENERALS_THRESHOLD_INCREASE") * getGreatGeneralsCreated()[/B]);
for (int iI = 0; iI < MAX_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).getTeam() == getTeam())
{
GET_PLAYER((PlayerTypes)iI).changeGreatGeneralsThresholdModifier([B]GC.getDefineINT("GREAT_GENERALS_THRESHOLD_INCREASE_TEAM") * getGreatGeneralsCreated()[/B]);
}
}
}
Could anyone help with this? If it's done, far more flexibility and control can be made in the XML where people can come up with different GG scales and patterns. Thanks heaps in advance.