I've been trying to access the bool's located in the userprofile.txt. Basically what I want to do take my difficulty options and make them options that you can select when you start a new game (I also want to add one city challenge and the debugAI stuff too)
Anyways I figured the best way to test is with the CityCaptureoptions since fromafar put in the profile anyways. I modified the ldl and it toggles but I've copied everything in the spnewgamerulesscreen and even added a bit to profileDB and to gamesettings. But it seems that the toggle won't set the profile.
I'm getting the feeling that bloodlust and pollution options found in that window are not implemented am I right/ where am I going wrong on this?
I'd rather not update the svn with this code, i don't think it wil impact much, but does anyone now what i'm missing?
Ah, I didn't realize it was a visible thing. But what does it mean by visible? I see everything is pretty much set to false. does that mean its not accessible outside of editing the userprofile.txt? It looks like it doesn't impact whether or not the line appears in userprofile.txt.Originally posted by Fromafar
Did you make the variable visible - i.e. remove the 5th parameter of Var - in the ProfileDB constructor?
I'll mess around a bit.
EDIT: I think the visible was part of it. The other part is that I see that graphicscreen.cpp has code like this:
versus the spnewgamerulesscreen that does thisCode:...somecode... static aui_Switch *s_politicalBorders = NULL, ...somecode... static BOOL s_politicalBordersToggled = FALSE; ...somecode... void graphicsscreen_checkPress(aui_Control *control, uint32 action, uint32 data, void *cookie ) { if ( action != (uint32)AUI_SWITCH_ACTION_PRESS ) return; uint32 checkbox = *((uint32*)cookie); void (ProfileDB::*func)(BOOL) = 0; uint32 state = data; switch(checkbox) { case GS_POLITICALBORDERS: func = &ProfileDB::SetShowPoliticalBorders; s_politicalBordersToggled = TRUE; break;
Code:void spnewgamerulesscreen_switchPress(aui_Control *control, uint32 action, uint32 data, void *cookie ) { switch ( action ) { case AUI_SWITCH_ACTION_ON: case AUI_SWITCH_ACTION_OFF: for ( sint32 i = 0;i < k_NUM_RULESBOXES;i++ ) { if ( control == s_checkBox[i] ) { switch ( i ) { case RULE_GENOCIDE: g_theProfileDB->SetAlienEndGame( !s_checkBox[i]->IsOn() ); break; case RULE_POLLUTION: g_theProfileDB->SetPollutionRule( s_checkBox[i]->IsOn() ); break;
both appears to be swtich boxes and similar. the one thing i see iffernt is that the political border code actual calls a private bool s_politicalborder but thats after the set code (correspondingly foundin profileDB.h)
so the part thats blowing my mind is where does the set part actually set it to true (or false) how does that get back to profiledb?



Reply With Quote





Bookmarks