How to add options?

Chiyu

Prince
Joined
Jun 9, 2006
Messages
412
Location
Limburg, The Netherlands
Hey,

I wonder why I can't add any options to the options screen.. For example, I'm trying to make an option to disable a certain religion. The code is simple, just something like this.

<GameOptionInfo>
<Type>GAMEOPTION_NO_RELIGION_JUDAISM</Type>
<Description>TXT_KEY_GAME_OPTION_NO_RELIGION_JUDAISM</Description>
<Help>TXT_KEY_GAME_OPTION_NO_RELIGION_JUDAISM_HELP</Help>
<bDefault>0</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>

However, no matter what I do, this option won't appear at the end of the list. And if I try to shuffle the options in the list, the game will simply crash.

Any help or explanation?
 
Okay, thanks :).
I copied the CvEnums.h file into my Assets folder and added the options I want to in the list under
"enum DllExport GameOptionTypes // Exposed to Python
{
NO_GAMEOPTION = -1,"

but... they still don't show up. Does this mean that just copying and pasting the CvEnums part is not enough? I'm a noob when it comes to SDK things :(.
 
I think you need to edit CyEnumsInterface.cpp. E.g.
Code:
.value("GAMEOPTION_NO_ESPIONAGE", GAMEOPTION_NO_ESPIONAGE)
 
Not that hard. But there are a few tools to install and set up.
In my signature is a link to a howto (and to other links with more info).
 
All right.. So I actually managed in getting the options to show up, with file (thanks again for the instructions, all three of you :)).
It looks nice, as you can see here.

However.. Even if I turn the options, they don't seem to do anything. I can still research Meditation, for instance. (I'll give the religions each their own tech later, because disabling their initial techs will most likely screw up the techtree.)
What did I wrong?
Below is a screenshot of the code in python, perhaps there is something wrong with this?

noreligions.png
 
Almost all the python callbacks are disabled by default for performance reasons. To enable that one, open up XML\PythonCallbackDefines.XML and change the following from 0 to 1.
Code:
	<Define>
		<DefineName>USE_CANNOT_RESEARCH_CALLBACK</DefineName>
		<iDefineIntVal>0</iDefineIntVal>
	</Define>
 
That helped :). But once again, a new problem occured.
For some reason, it is possible to disable the first religion (Judaism), also known as "GAMEOPTION_NO_RELIGION_0". The technology (Monotheism), can't be researched. However, all other religious technologies, are not disabled :(.


Edit: after some more testing, it turns out that the last of these options; "No Mesoamericanism" in fact disables the first religion (Judaism). What's going on here?
 
Back
Top Bottom