1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Flexible Difficulty - adjust timing?

Discussion in 'Civ4 - Fall from Heaven' started by Grunthex, Sep 15, 2011.

  1. Grunthex

    Grunthex Prince

    Joined:
    Oct 21, 2001
    Messages:
    366
    Location:
    Calgary, Canada
    As the title says, I'm looking for a way to adjust the number of turns between the difficulty changes if you use the flexible difficulty option. I love the option, but it just seems so fast, that you're always at one end or another if you play a good slow game speed.
     
  2. arcticnightwolf

    arcticnightwolf Emperor

    Joined:
    Jun 8, 2008
    Messages:
    1,301
    Location:
    Prague, Czech Republic
    file CvGame.cpp function CvGame::doTurn()

    this part:
    Spoiler :
    Code:
        if (isOption(GAMEOPTION_FLEXIBLE_DIFFICULTY))
        {
            if (!GC.getGameINLINE().isGameMultiPlayer())
            {
                changeFlexibleDifficultyCounter(1);
    /*************************************************************************************************/
    /**	Xienwolf Tweak							12/13/08											**/
    /**																								**/
    /**						Modifies Challenge escalation based on Gamespeed						**/
    /*************************************************************************************************/
    /**								---- Start Original Code ----									**
                if (getFlexibleDifficultyCounter() >= 20)
    /**								----  End Original Code  ----									**/
                if (getFlexibleDifficultyCounter() >= 20 * GC.getGameSpeedInfo(getGameSpeedType()).getGrowthPercent() / 100)
    /*************************************************************************************************/
    /**	Tweak									END													**/
    /*************************************************************************************************/
    
    there might not be the xienwolf's changes, so in that case it will be only:
    Spoiler :
    Code:
        if (isOption(GAMEOPTION_FLEXIBLE_DIFFICULTY))
        {
            if (!GC.getGameINLINE().isGameMultiPlayer())
            {
                changeFlexibleDifficultyCounter(1);
                if (getFlexibleDifficultyCounter() >= 20)
    change the "20" to whatever value you want
     
  3. Grunthex

    Grunthex Prince

    Joined:
    Oct 21, 2001
    Messages:
    366
    Location:
    Calgary, Canada
    Thanks! Is a .cpp file something I have to re-compile after making changes, or does the game do that on the fly when I start it up?
     
  4. arcticnightwolf

    arcticnightwolf Emperor

    Joined:
    Jun 8, 2008
    Messages:
    1,301
    Location:
    Prague, Czech Republic
    you have to recompile it
     

Share This Page