Ok, I couldn't believe how easy this was when I added it to my mod tonight so I'll put up a short tutorial so everybody else can start using it to. In my opinion, this is thousands of times more user friendly that having XML or ini file configuration options. This also means you can maintain both flexible configurations and MP compatability easily since the players won't be changing anything in XML or Python. This is an SDK change to add the new options to the list, once you've added them they can be used in python scripts as well.
First, we have the CIV4GameOptionInfos.xml file in your GameInfo folder which needs the new option type added to it, it's also helpful to add in the text too. My change was to add an option to enable/disable my SDK based tile stack limit, here's the new XML entry for the option type:
The description is the text that shows up next to the checkbox in the custom game screen or staging area for MP games. The help text shows up when you mouse-over the option in the menu. bDefault determines the initial state of the checkbox and bVisible can be used to hide the checkbox, both are boolean values, 1 is 'true' and 0 is 'false' or 'on' and 'off' if you prefer.
In the SDK we need to add the enum for our new OptionType to CvEnums.h. Order is important here, make sure you place your new option(s) in the same order both in the enum list and the xml file. Here's my complete list in CvEnums.h:
GAMEOPTION_NO_EVENTS is line # 729.
Once we have a valid enum setup we need to expose it to python in CyEnumsInterface.cpp. Search for python::enum_<GameOptionTypes>("GameOptionTypes") and add yours to the list, here is my change:
Your basically done right there if you're going to use it in python. To use it in custom SDK code you can test the setting of the option like this:
That will return true or false depending on whether the box was checked (true) or un-checked (false) when the player started the game. For my stack limit, I used it in my modified canMoveInto() method in CvUnit.cpp to encapsulate the entire code and only run it if the option was enabled with a simple if statement:
Like I said at the begining, I was amazed at how easy this was. Just make sure you remember to do a clean build otherwise your new options won't display since the NUM_GAMEOPTIONS value will not update otherwise and if that doesn't update no addition options will showup in the game.
Oh, the python code for checking a game option is (assume gc = CyGlobalContext()):
So if custom options are important and you're sick of trying to explain how to enable/disable features of your mod here's your solution 
First, we have the CIV4GameOptionInfos.xml file in your GameInfo folder which needs the new option type added to it, it's also helpful to add in the text too. My change was to add an option to enable/disable my SDK based tile stack limit, here's the new XML entry for the option type:
Code:
<GameOptionInfo>
<Type>GAMEOPTION_STACK_LIMIT</Type>
<Description>TXT_KEY_GAME_OPTION_STACK_LIMIT</Description>
<Help>TXT_KEY_GAME_OPTION_STACK_LIMIT_HELP</Help>
<bDefault>1</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>
In the SDK we need to add the enum for our new OptionType to CvEnums.h. Order is important here, make sure you place your new option(s) in the same order both in the enum list and the xml file. Here's my complete list in CvEnums.h:
Code:
NO_GAMEOPTION = -1,
GAMEOPTION_ADVANCED_START,
GAMEOPTION_NO_CITY_RAZING,
GAMEOPTION_NO_CITY_FLIPPING,
GAMEOPTION_FLIPPING_AFTER_CONQUEST,
GAMEOPTION_NO_BARBARIANS,
GAMEOPTION_RAGING_BARBARIANS,
GAMEOPTION_AGGRESSIVE_AI,
GAMEOPTION_LEAD_ANY_CIV,
GAMEOPTION_RANDOM_PERSONALITIES,
GAMEOPTION_PICK_RELIGION,
GAMEOPTION_NO_TECH_TRADING,
GAMEOPTION_NO_TECH_BROKERING,
GAMEOPTION_PERMANENT_ALLIANCES,
GAMEOPTION_ALWAYS_WAR,
GAMEOPTION_ALWAYS_PEACE,
GAMEOPTION_ONE_CITY_CHALLENGE,
GAMEOPTION_NO_CHANGING_WAR_PEACE,
GAMEOPTION_NEW_RANDOM_SEED,
GAMEOPTION_LOCK_MODS,
GAMEOPTION_COMPLETE_KILLS,
GAMEOPTION_NO_VASSAL_STATES,
GAMEOPTION_NO_GOODY_HUTS,
GAMEOPTION_NO_EVENTS,
GAMEOPTION_STACK_LIMIT, // World Piece
Once we have a valid enum setup we need to expose it to python in CyEnumsInterface.cpp. Search for python::enum_<GameOptionTypes>("GameOptionTypes") and add yours to the list, here is my change:
Code:
.value("GAMEOPTION_NO_EVENTS", GAMEOPTION_NO_EVENTS)
/*** World Piece Begin ***/
.value("GAMEOPTION_STACK_LIMIT", GAMEOPTION_STACK_LIMIT)
/*** World Piece End ***/
.value("NUM_GAMEOPTION_TYPES", NUM_GAMEOPTION_TYPES)
Your basically done right there if you're going to use it in python. To use it in custom SDK code you can test the setting of the option like this:
Code:
GC.getGameINLINE().isOption(GAMEOPTION_STACK_LIMIT)
Code:
if ( GC.getGameINLINE().isOption(GAMEOPTION_STACK_LIMIT) )
Oh, the python code for checking a game option is (assume gc = CyGlobalContext()):
Code:
gc.getGame().isOption(GameOptionTypes.GAMEOPTION_STACK_LIMIT))
