Hidden GameOptions and the Civ4 Config

I have been using 'ForceGameOptions = 1' for a while to no avail unfortunately. If I want no barbarions I get raging barbarions instead...

Because I've added a checkbox at the top (so it can be accessed easily) all the options are out by one. With "if CyGame().isOption(i):" I can check if an option is on. If it is then turn it off and set the one before it on. Therefore no more raging barbarions.

for i in range(24):
if CyGame().isOption(i): #is option on
if i == 0 :
CyGame().setOption(i , false)
#turn this option off this is inteference from my checkbox

else:
CyGame().setOption(i , false)
#this is the wrong option as it's out by one
CyGame().setOption(i - 1 , true)
#so the option before it is the actual option the gamer wants
 
Uh - If you changed the order of the gameoptions in the CIV4GameOptionInfos, that would explain your problem. The order is hardcoded. You need to add new gameoptions to the end.
 
Sorry for our misunderstanding hopefully I've explained things better further down.
 
If it's not your cup of tea I quite understand I just thought I'd mention it. :)

??

I told you what is causing your issue. Either you don't understand, in which I can try to re-explain, or you don't believe me, which is your loss...
 
I'm really sorry if I've upset anyone, that wasn't my intention.

I think though I might understand where our wires are getting crossed. I'm using the checkbox as a button and in the getCustomMapOptionDefault function in the Highlander map file I have this bit of code:

if(gc.getGame().isOption(0)):
CvScreensInterface.showCustomInterface()

which opens a screen then afterwards the code above runs telling Civ to ignore the extra checkbox. Does that make more sense?
 
I was mulling it over last night and I decided I haven't explained this terribly well.
So I thought I'd have another go...

From experience and talking to people it appears that indeed the options are hard coded - option 0
is advanced start, option 1 is no city razing etc. They can't be changed, however the
checkboxes can be placed anywhere the first put last the last placed first, whatever you want to do.

The trick then is in marrying the correct checkbox with the correct option and this is what the code does it's an error checker. So if as in this scenario an extra checkbox is at the top the checkboxes below now point to the next option along. ie select the advanced start checkbox and get instead the no city razing option.

This statement (if CyGame().isOption(1): ) checks to see if the second option "no city razing" is true.

Because the checkboxes are out by one the gamer actually wanted "advanced start"

So this line ( CyGame().setOption(1 , false) ) turns the option "no city razing" off

and this ( CyGame().setOption(0 , true) ) turns the correct option "advanced start" on.

I mention this out of interest sake as I've only tested it with BTS and will it work with Civ 5? Don't know...
 
Top Bottom