Technology Modding

fdrpi

Prince
Joined
Feb 14, 2012
Messages
371
Location
Massachusetts
Hi, me again. :)

From the modding I've done so far (in XML), I've discovered that everything that a technology changes has a line of code in each other technologies' code blocks for the same thing. For example, all technologies have a line of code for enabling irrigation, but they are all set to zero except for civil service.

But what if you want to make a tech do something no other tech does? For example, I want future tech to give 2 :food: and 1 pop upon discovery the first time.

How does one go about doing this?
 
For this, you would need Python or SDK. The second one (+1 pop in all cities) would be no problem in Python, but the first one is a little trickier and might require SDK. Or it might just be Python. Not sure.
 
another alternative (if you don't want to edit python) would be to edit the xml by copying and adding stuff that already exist. for example, if you want +1pop with future tech, you can add a building in this tech that gives +1 pop in all cities by copying what the hanging gardens wonder does. the new building could be called smth relative to the tech, like "human/bio genetics research facility" and could be a national wonder (building available for all civs) or world wonder (building available for one civ) :) .

another idea to give more food to all cities without having to edit python is through improvements by technology (same way as biology gives +1 food for farms) or by civic (same way as state property gives +1 food to workshops).
or maybe you could add a national/world wonder building that gives +2 food in all cities (not 100% sure for that) :)
 
I've discovered that everything that a technology changes has a line of code in each other technologies' code blocks for the same thing.
This is the same for all the XML files, What tags appear in the xml, the order, type, etc are entered in the schema.xml file that is located in each of the xml folders. You can add or take away tags in the schema, then add them to the xml file itself.
But what if you want to make a tech do something no other tech does? For example, I want future tech to give 2 :food: and 1 pop upon discovery the first time.
To make the new tags do something like add two food you have to change the sdk code. The SDk is compacted into the CvGameCoreDLL.dll file in the Assests folder but the editable files are supplied with BTS in the CvGameCoreDLL folder. These codes are linked to the new xml files and your done, easy no? Maybe not
But there are Tuts on doing this and help can be got here, with patience it can be done, or maybe someone has already done it, or similar if you search.
 
Top Bottom