SimCutie
Warlord
- Joined
- Dec 10, 2005
- Messages
- 197
OOPS! My CHANGELOG is not ready to be released.. It is full of error and under extensive editing.. Don't trust it. *blush*
But I will consider to modify it to be configured only on boot time. (Python Mod should set it on 'OnInit' event time.)
I am not English-native so it may be slow process, please be patient.
This is driving design objective of this implementation.
For example in *YOUR* MOD file...
That is all... And add appropiate TXT_KEY_'s like "TXT_KEY_OPTIONS_MYOPTION1_LABEL"
and "TXT_KEY_OPTIONS_MYOPTION1_LABEL_TT" (for tool tip), "TXT_KEY_OPTIONS_MYOPT2_LABEL",
"TXT_KEY_OPTIONS_MYOPT2_LABEL_TT", "TXT_KEY_OPTIONS_MY_OPT2_DD1" ,
.... "TXT_KEY_OPTIONS_MY_OPT2_DD4" in text XML file.
NO editing of .ini file or CvCustomOption.py. is required.
Civilopedia is not required to work properly. It is mistake.
But Main interface is included to demonstrate Action button faciliy. It should work to see action button. and Show grid/Show resource fix.
I see, So it has no custom option screen check box to be changed by player.The Great Apple said:Surely this should not be runtime config? Event behaviour should be consistant throughout an individual mod, and should be controlled by the modder and not the player.
But I will consider to modify it to be configured only on boot time. (Python Mod should set it on 'OnInit' event time.)
Yes, lack of docs. I am working on it. But too short time until first release time. So I will do major work to supplement lacking docs after first release.The Great Apple said:... Documentation may be a bit lacking - I'd quite like to see examples of how to incorperate a new event manager,
I am not English-native so it may be slow process, please be patient.
No. Only places you should edit are your "EventHandlerRegister()" and handler code in *your* MOD. No editing of .ini file or CvCustomOption.py.The Great Apple said:as well as define new options for the options screen. It would seem that you have to define them in an .ini file, and then in CvCustomOption.py, right?
.
This is driving design objective of this implementation.
For example in *YOUR* MOD file...
Code:
import CvUtilCustom
def EventHandlerRegister( evt_mgr, unused = None ):
import CvCustomEvent
return { CvCustomEvent.EVENT_OPTIONBEGIN : onDrawOption, }
def onDrawOption(argsList):
optscr, canvas, Unused = argsList[:3]
CvUtilCustom.useSection("MY_SECTION")
# Show Checkbox on Option Screen
optscr.addGenericCheckbox( canvas, "MYOption1Checkbox",
"TXT_KEY_OPTIONS_MYOPTION1_LABEL", "MY_SECTION", "my_option1", False )
# show Drop down box...
aszDropdownElements = (
"TXT_KEY_OPTIONS_MY_OPT2_DD0",
"TXT_KEY_OPTIONS_MY_OPT2_DD1",
"TXT_KEY_OPTIONS_MY_OPT2_DD2",
"TXT_KEY_OPTIONS_MY_OPT2_DD3" )
optscr.addGenericDropdown( canvas, "MYOPT2Dropdown",
"TXT_KEY_OPTIONS_MYOPT2_LABEL", aszDropdownElements, "MY_SECTION",
"my_option2", 0 )
def Your_MOD_function():
.........
if CvUtilCustom.getCutomOption("MY_SECTION","my_option1", False) == True :
do do something acction to user choice....
optVal = CvUtilCustom.getCutomOption("MY_SECTION","my_option2", 0)
if optVal == 0 :
.............
elif optVal == 1 or optVal == 2 :
............
elif optVal == 3:
That is all... And add appropiate TXT_KEY_'s like "TXT_KEY_OPTIONS_MYOPTION1_LABEL"
and "TXT_KEY_OPTIONS_MYOPTION1_LABEL_TT" (for tool tip), "TXT_KEY_OPTIONS_MYOPT2_LABEL",
"TXT_KEY_OPTIONS_MYOPT2_LABEL_TT", "TXT_KEY_OPTIONS_MY_OPT2_DD1" ,
.... "TXT_KEY_OPTIONS_MY_OPT2_DD4" in text XML file.
NO editing of .ini file or CvCustomOption.py. is required.
Yeah, some Python files and XML files are included in ZIP file unintentionally. Ignore them ..The Great Apple said:You also seem to have alot of redundant files. From what I can tell the main interface changes aren't in effect, nor the civilopedia changes. We should really get rid of the files which don't actually do anything before the release.
Civilopedia is not required to work properly. It is mistake.

But Main interface is included to demonstrate Action button faciliy. It should work to see action button. and Show grid/Show resource fix.