The h and ccp files would be the C++ and the py would be Python. All of these can be edited with just about any text editor, but only the Python files can be run as is. The C++ files need to be compiled into machine code (computer language) and this is what makes it so fast.OK, let me try and get a handle on this. So the Python stuff is all the files i see with the .h and .cpp suffixes. And I assume it is the files with the .py suffix?
The way the game is setup is that the game itself is a compiled executable file programmed with C++. It is augmented by additional C++ code in the DLL file - and the "makefiles" for this is what people refer to as the System Developer's Kit, or SDK - it is made up of the .h and .ccp files you mentioned.
But the DLL also code offers "hooks" that the modder can attach Python code to. This is what mechaerik was talking about. But you don't need to figure out where to connect you Python stuff quite yet, because you need to make some decisions first. Like if your mod is going to be based on an existing mod (like BUG) - or if you are going to attempt to make everything from scratch yourself (which isn't the easier option, but could prove to be better for learning).
No, no... Look at any mod you've downloaded. It was a Assets folder of its own, and it in turn has a Python folder. This is where the Python modules for your mod go.I assume anything I change from the BTS version, I place in my Mod directory in the exact same file structure?
I have one question - what is the 100 turn length? From what turn to what turn? When does it begin? Why doesn't this apply to the whole game session?The Idea: A city can generate revolutionaries matching some or all of the entrenched soldiers of the city.
The Trigger: Any time the city goes into revolt through conquest, espionage, or event.
Length: 100 turns
Results: a 5 percent chance per turn that "revolutionaries" spawn next to the city equal to one-quarter (rounded down) of the entrenched troops.
These "Revolutionaries" take on the flag of the barbarians and behave thus.
No, no... There are practically no pre-defined Python modules (except for the interface stuff) in CivIV. You make up your own and get to set things up exactly as you like.Is there a place where each of the .py files are detailed as to what they do? For example, can I reference something that tells me what "AbandonRazeDemolish.py" does? Or do I just need to open each one and figure it out?
If you look at other peoples mods, then you need to be able to read and understand what their Python modules do. Some are documented, some are not. But you wanna be able to make you own modules, not just use other's.
So, in the following tutorial we will first be creating the code for your script, then we will be putting the whole script together into a Python module. Only then will we need to worry about what to do with your .py file. Hopefully you are a bit clearer on what (if anything) you wanna base your mod on by then.
To what extent you will be reading up on Python as this thing progresses is up to you, but things will be much clearer if you try to study the topics we will be covering... (I'll even post helpful links.)
I'll post a first "lesson" soon. Perhaps I should start another thread, in case anyone else wants to follow this also?