This is a relatively simple mod that allows techs to reduce (or increase) the research costs of other techs.
There is a new XML tag in the CIV4TechInfos.xml
When you add this tag, remember that you will make the change for the XML entry for the tech you want to be modified not the tech you want to do the modifying.
So if you want to make it so that the research cost for Calendar is reduced by X amount with Literature, you have to add the tag to the XML entry for Calendar... not Literature.
Below are two screenshots showing the list of techs before and after Polytheism has been researched... notice how much cheaper Meditation is!
NOTE: I have not created this as a stand-alone mod. It's a modcomp and the XML changes I have made are simply for proof of concept. It's not balanced or intended to be played by itself. This is for modders to integrate into their own mods.
ALSO NOTE: In order to calculate the research cost for a tech, it has to run through all the techs... thus the more techs you add, the more it has to run through. Right now there's no noticeable lag (on my machine at least), but if your mod adds a hundred new techs or something, you might notice some slow down.
There is a new XML tag in the CIV4TechInfos.xml
Code:
<TechResearchModifiers>
<TechResearchModifier>
<TechType>TECH_HUNTING</TechType>
<iModifier>-50</iModifier>
</TechResearchModifier>
</TechResearchModifiers>
When you add this tag, remember that you will make the change for the XML entry for the tech you want to be modified not the tech you want to do the modifying.
So if you want to make it so that the research cost for Calendar is reduced by X amount with Literature, you have to add the tag to the XML entry for Calendar... not Literature.
Below are two screenshots showing the list of techs before and after Polytheism has been researched... notice how much cheaper Meditation is!
NOTE: I have not created this as a stand-alone mod. It's a modcomp and the XML changes I have made are simply for proof of concept. It's not balanced or intended to be played by itself. This is for modders to integrate into their own mods.
ALSO NOTE: In order to calculate the research cost for a tech, it has to run through all the techs... thus the more techs you add, the more it has to run through. Right now there's no noticeable lag (on my machine at least), but if your mod adds a hundred new techs or something, you might notice some slow down.