merijn_v1
Black Belt
I'm trying to find the courage to do my first modding attempt (aside from drawing maps in civ II a long long time ago)
If I'd want to change the UP of the Inca (from every worked mountaintile giving two food and one production into giving two food and one free citizen). What parts of the code would I have to change for that?
And what programs would I need to acces that code? (/find it?)
It's great to see that you want to try it.

The Incan UP (and many other UPs) are in the CvGameCoreDLL. You can find a folder in the mod folder with that name that contains all source files for building the DLL. Editing the DLL requires 2 steps. The first is editing the code itself, which is done by editing the code in the source files. The second is building the DLL. The link below has a tutorial how to set up everything in order to build the DLL. (The author of that tutorial should be familiar)
https://forums.civfanatics.com/threads/the-easiest-way-to-compile-a-new-dll.608137/
(I recommend building a clean DLL before you make any changes to the code yourself to verify if you installed everything correctly)
The language of the DLL source files is C++. Editing the source files can be done with any text editor, but I highly recommend not using just any. Visual Studio (required anyway for building the DLL) can be used for editing the source files for the DLL. Notepad++ is IMO also a good option, and that one can also be used for editing python. (And has a very useful "search in files" function)
The Incan UP is coded in CvPlot.cpp. (Search for "Inca" and you will easily find it) It should be easy to see what you should do to disable the production on peaks. Adding a free citizen is harder. It can be done in CvCity.cpp. You should probably modify the setWorkingPlot() function by adding the changeFreeSpecialistCount(). I'll leave it up to you to figure out the details. Not because I don't want to help, but because I think that this is the best way to learn it. (And IMO figuring out things like this is what makes modding fun and I don't want to take this part away from you) But feel free to aks for help if you need it.
Last edited: