Gerikes
User of Run-on Sentences.
So, while fooling around with the options screen, I decided to make this mod. The idea is that you can type a python command into the box and get the results. I decided that since I haven't been able to find a way to open up an in-game python shell yet and that since I already had the text box working that I'd take the next step.
Primarily, it could be useful to other people, especially if their mods might involve needing to know the values of certain aspects of the game at various times, such as variables, which the screenshot attached shows an example of. Other things might be testing what functions in the api do, such as the setWinner() function.
I have to warn you, however, that the program runs by utilizing the eval() command. Basically, that means that anything you type in the box WILL be run without remorse. Hopefully, you know that this could be dangerous if a friend who has it in for you and some python knowledge jumped on the computer while Civ4 was running, but I think you should be okay. Besides, you probably can't do more damage then if you were to actually write a python script yourself, right? Just remember, don't blame me if you screw something up.
Function Returner (Note that the README is missing where to put the CvOptionsScreenCallbackInterface.py file. This goes in the "python\entrypoints" folder. Thanks kandolf
)
Bugs:
Probably : o)
Fun functions:
Here are some functions I was able to have some fun with. Search the API for other good ones...
Primarily, it could be useful to other people, especially if their mods might involve needing to know the values of certain aspects of the game at various times, such as variables, which the screenshot attached shows an example of. Other things might be testing what functions in the api do, such as the setWinner() function.
I have to warn you, however, that the program runs by utilizing the eval() command. Basically, that means that anything you type in the box WILL be run without remorse. Hopefully, you know that this could be dangerous if a friend who has it in for you and some python knowledge jumped on the computer while Civ4 was running, but I think you should be okay. Besides, you probably can't do more damage then if you were to actually write a python script yourself, right? Just remember, don't blame me if you screw something up.

Function Returner (Note that the README is missing where to put the CvOptionsScreenCallbackInterface.py file. This goes in the "python\entrypoints" folder. Thanks kandolf

Bugs:
Probably : o)
Fun functions:
Here are some functions I was able to have some fun with. Search the API for other good ones...
- CyEngine().setUpdateRate(2) Doubles the "update rate" of the game, graphically. Makes pretty much everything graphically faster (notice I said "faster", not "smoother"). Not sure of any negative impact this may have other than having your battle scenes over in half a millisecond and such. You can set it higher than 2 also and get a more responsive game but without much in terms of animation. To set back to default, set to a rate of 1.
- CyGame().setWinner(0,2) Win by Conquest Victory
- CyGlobalContext().getPlayer(0).setGold(10000) Sets your treasury to have 10000 gold.