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

Gameoption bug

Discussion in 'Civ4 - MOO2Civ' started by TC01, Jul 15, 2010.

  1. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Don't know if you're already aware of this, but I think I found out why the gameoption menu is a little messed up when going through the DLL source files.

    CvEnums.h has this code, defining six new gameoptions:

    Code:
    //Ass: Added by Kael 07/02/2008
    	GAMEOPTION_ASSIMILATION,
    	GAMEOPTION_FLEXIBLE_DIFFICULTY,
    	GAMEOPTION_CHALLENGE_BARBARIAN_WORLD,
    	GAMEOPTION_CHALLENGE_CUT_LOSERS,
    	GAMEOPTION_CHALLENGE_HIGH_TO_LOW,
    	GAMEOPTION_CHALLENGE_INCREASING_DIFFICULTY,
    //Ass: End Add
    However, in the XML, only five new gameoptions are defined.

    Spoiler New Gameoption Infos :
    Code:
    		<GameOptionInfo>
    			<Type>GAMEOPTION_ASSIMILATION</Type>
    			<Description>TXT_KEY_GAME_OPTION_ASSIMILATION</Description>
    			<Help>TXT_KEY_GAME_OPTION_ASSIMILATION_HELP</Help>
    			<bDefault>1</bDefault>
    			<bVisible>1</bVisible>
    		</GameOptionInfo>
    		<GameOptionInfo>
    			<Type>GAMEOPTION_FLEXIBLE_DIFFICULTY</Type>
    			<Description>TXT_KEY_GAME_OPTION_FLEXIBLE_DIFFICULTY</Description>
    			<Help>TXT_KEY_GAME_OPTION_FLEXIBLE_DIFFICULTY_HELP</Help>
    			<bDefault>0</bDefault>
    			<bVisible>1</bVisible>
    		</GameOptionInfo>
    		<GameOptionInfo>
    			<Type>GAMEOPTION_CHALLENGE_CUT_LOSERS</Type>
    			<Description>TXT_KEY_GAME_OPTION_CHALLENGE_CUT_LOSERS</Description>
    			<Help>TXT_KEY_GAME_OPTION_CHALLENGE_CUT_LOSERS_HELP</Help>
    			<bDefault>0</bDefault>
    			<bVisible>1</bVisible>
    		</GameOptionInfo>
    		<GameOptionInfo>
    			<Type>GAMEOPTION_CHALLENGE_HIGH_TO_LOW</Type>
    			<Description>TXT_KEY_GAME_OPTION_CHALLENGE_HIGH_TO_LOW</Description>
    			<Help>TXT_KEY_GAME_OPTION_CHALLENGE_HIGH_TO_LOW_HELP</Help>
    			<bDefault>0</bDefault>
    			<bVisible>1</bVisible>
    		</GameOptionInfo>
    		<GameOptionInfo>
    			<Type>GAMEOPTION_CHALLENGE_INCREASING_DIFFICULTY</Type>
    			<Description>TXT_KEY_GAME_OPTION_CHALLENGE_INCREASING_DIFFICULTY</Description>
    			<Help>TXT_KEY_GAME_OPTION_CHALLENGE_INCREASING_DIFFICULTY_HELP</Help>
    			<bDefault>0</bDefault>
    			<bVisible>1</bVisible>
    		</GameOptionInfo>


    If you remove the "GAMEOPTION_CHALLENGE_BARBARIAN_WORLD," from CvEnums.h (and CyEnumInterface.cpp) and compile a new DLL, the other gameoptions below it in the enums listing should work properly and the "ghost" gameoption should go away.

    Alternatively, you could add a GAMEOPTION_CHALLENGE_BARBARIAN_WORLD to its proper place and simply set bVisible to 0 to prevent it from showing up. That should work too.
     
  2. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,048
    Location:
    In orbit
    Well, thx very much. :) (Couldn't figure out why it got messed up...)

    I'll make sure to include it in v. 5.2 or upload a patch. ;)

    (Errr... ofcourse we do have a Bug/Error thread stickied...)
     
  3. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Oops.

    I was thinking this was the Star Trek forum, where there is no bug/errors thread, and so whenever I report an error I make a new thread for it.
     
  4. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,048
    Location:
    In orbit
    Hey! This isn't the Star Trek forum! :lol:
     
  5. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Clearly... it's just I'm so used to posting errors there when I'm working on the DLL of another Final Frontier mod other than my own.

    Speaking of that- I've successfully compiled a DLL with both the FF+ and the MOO2Civ code included.
     
  6. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,048
    Location:
    In orbit
    (O-o I appear to have missed a reply here, so: ) Cool! :goodjob:
     

Share This Page