Mod Options Screen

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,135
Location
an Aussie in Boston
I'm trying to set up an options screen for my mod so that people can the settings in-game (similar to the HOF screens added to the options screen). I have a stand alone screen that I can display but I cannot get it to accept the 'exit' button click via a callback.

I've basically copied the CvOptionsScreen and the associated callback with no luck. Is there some trick to this?

Or does anyone have / know of a mod that does this so I can steal their code :D?
 
I have finished this some time ago.
You will find a tutorial here:
http://forums.civfanatics.com/showthread.php?t=176058

I didn't update this tutorial a long time, because the feedback was quite low.
My internal version is much more advanced and is used in the "Caesium-Mod" at the german community.
If I find some time in the next days, I will upload my version of the mod chooser and write a little tutorial how to use it. But I won't give a big tutorial an every code change like I did last time.

Matze
 
Matze,

A copy of your mod selector would be very useful. The code was useful but I seem to be doing all of what you suggest. I have a new callback file that python cannot seem to find and I'm looking forward to seeing your version of this to see how you handled it.
 
I worked on this some more last night - started with slightly modified versions of the CvOptionsScreen.py and the associated callback file (al la HOF). I made direct copies and changed 'Options' to 'RuffMod'. I also updated the code to call the screen. Well, I can display the modified Options screen from the menu, I also have a key combination that calls the options screen up - the 'exit' button works either way I call the screen up.

However, the 'exit' button doesn't work on my copied RuffModScreen. I get the python code error message ...

ERR: Call function handleExitButtonInput failed. Can't find module CvRuffModScreenCallbackInterface

I look in the "\CustomAssets\python\entrypoints" folder and the file 'CvRuffModScreenCallbackInterface.py' is there looking back at me. Why isn't it being loaded? I look in the python code and I cannot find any code that actually loads the 'CvOptionsScreenCallbackInterface.py' file. I hate this game sometimes :mad:
 
You have to import the callback file in the header of CvModOptionsScreen.py and CvCustomEventManager.py

Matze
 
MatzeHH said:
You have to import the callback file in the header of CvModOptionsScreen.py and CvCustomEventManager.py
Really? I cannot see where the options call back is imported into the optionsscreen.py file. But ok, I will give it a try and see.
 
Back
Top Bottom