Here is the Ffh2 code for increasing difficulty and flexible difficulty (below void CvGame::doTurn() in the CvGamer.cpp file), if it helps in anyway and you guys are interested:
Hmm, actually there should be more to it elsewhere, heh.
Spoiler :
Code:
if (isOption(GAMEOPTION_CHALLENGE_INCREASING_DIFFICULTY))
{
changeIncreasingDifficultyCounter(1);
/*************************************************************************************************/
/** Xienwolf Tweak 12/13/08 **/
/** ADDON (Modification for Gamespeed) merged Sephi **/
/** Modifies Challenge escalation based on Gamespeed **/
/*************************************************************************************************/
/** ---- Start Original Code ---- **
if (getIncreasingDifficultyCounter() >= 50)
/** ---- End Original Code ---- **/
if (getIncreasingDifficultyCounter() >= 75 * GC.getGameSpeedInfo(getGameSpeedType()).getGrowthPercent() / 100)
/*************************************************************************************************/
/** Tweak END **/
/*************************************************************************************************/
{
if (getHandicapType() < (GC.getNumHandicapInfos() - 1))
{
for (iI = 0; iI < MAX_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).isAlive())
{
if (GET_PLAYER((PlayerTypes)iI).isHuman())
{
GC.getInitCore().setHandicap((PlayerTypes)iI, (HandicapTypes)(getHandicapType() + 1));
}
}
}
setHandicapType((HandicapTypes)(getHandicapType() + 1));
changeIncreasingDifficultyCounter(getIncreasingDifficultyCounter() * -1);
}
}
}
if (isOption(GAMEOPTION_FLEXIBLE_DIFFICULTY))
{
if (!GC.getGameINLINE().isGameMultiPlayer())
{
changeFlexibleDifficultyCounter(1);
/*************************************************************************************************/
/** Xienwolf Tweak 12/13/08 **/
/** ADDON (Modification for Gamespeed) merged Sephi **/
/** Modifies Challenge escalation based on Gamespeed **/
/*************************************************************************************************/
/** ---- Start Original Code ---- **
if (getFlexibleDifficultyCounter() >= 20)
/** ---- End Original Code ---- **/
if (getFlexibleDifficultyCounter() >= 50 * GC.getGameSpeedInfo(getGameSpeedType()).getGrowthPercent() / 100)
/*************************************************************************************************/
/** Tweak END **/
/*************************************************************************************************/
{
for (iI = 0; iI < MAX_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).isAlive())
{
if (GET_PLAYER((PlayerTypes)iI).isHuman())
{
if (getPlayerRank((PlayerTypes)iI) <= (countCivPlayersAlive() / 3) && getHandicapType() < (GC.getNumHandicapInfos() - 1))
{
GC.getInitCore().setHandicap((PlayerTypes)iI, (HandicapTypes)(getHandicapType() + 1));
setHandicapType((HandicapTypes)(getHandicapType() + 1));
changeFlexibleDifficultyCounter(getFlexibleDifficultyCounter() * -1);
}
if (getPlayerRank((PlayerTypes)iI) > (countCivPlayersAlive() * 2 / 3) && getHandicapType() > 0)
{
GC.getInitCore().setHandicap((PlayerTypes)iI, (HandicapTypes)(getHandicapType() - 1));
setHandicapType((HandicapTypes)(getHandicapType() - 1));
changeFlexibleDifficultyCounter(getFlexibleDifficultyCounter() * -1);
}
}
}
}
}
}
}
//FfH: End Add
Hmm, actually there should be more to it elsewhere, heh.