Scocou
Chieftain
This post won't be of interest to veteran mod'ers/programmers/scripters.
For you ol' timey, non-XML types like me (who hasn't programmed since Turbo Pascal in '92); I found the existing tutorial to fall somewhat short (no offense intended, it was my deficiency) of helping me accomplish my goal - to disable research of specific techs, by civilization (not globally). After some research and experimentation I managed to figure it out, perhaps some other new mod'er may find the following info useful...
For my example, we will disable America's ability to research both Pottery and Mining (nerf!!). Additionally, we will prevent France from researching Sailing (take that, Napoleon!).
As you can see in the attached screen-shots below, the restricted down-tree techs' icons/buttons will remain unchanged, only the specifically disabled techs will display a lock and be red. You can click on any of them with no effect aside from the standard sound (no lockup/freezing, as indicated in an alternate method).
As a minor note, there is no entry in the tech-tree legend (see abv. pic) explaining the red icon/button. Perhaps some artistic individual will modify the art files to correct this omission...
Enjoy... and cheers!
For you ol' timey, non-XML types like me (who hasn't programmed since Turbo Pascal in '92); I found the existing tutorial to fall somewhat short (no offense intended, it was my deficiency) of helping me accomplish my goal - to disable research of specific techs, by civilization (not globally). After some research and experimentation I managed to figure it out, perhaps some other new mod'er may find the following info useful...
For my example, we will disable America's ability to research both Pottery and Mining (nerf!!). Additionally, we will prevent France from researching Sailing (take that, Napoleon!).
- Create a file in your mod's XML directory, naming it something like: XML/Civilizations/CivilizationOverride.xml
- Open the file with your favorite text editor (or ModBuddy, if you prefer) and paste-in this snippet;
Code:[FONT="Arial"]<?xml version="1.0" encoding="utf-8"?> <!-- Created by whoever on 12/26/2010 8:57:20 PM --> <GameData> <Civilization_DisableTechs> <Row> <CivilizationType>CIVILIZATION_AMERICA</CivilizationType> <TechType>TECH_POTTERY</TechType> </Row> <Row> <CivilizationType>CIVILIZATION_AMERICA</CivilizationType> <TechType>TECH_MINING</TechType> </Row> <Row> <CivilizationType>CIVILIZATION_FRANCE</CivilizationType> <TechType>TECH_SAILING</TechType> </Row> </Civilization_DisableTechs> </GameData>[/FONT]
- Save and close the file.
- Add a typical new OnModActivated/UpdateDatabase entry for your CivilizationOverride.xml file and rebuild your mod (or manually edit your .modinfo/md5, if you don't use ModBuddy).
- Fire-up Civ5 and enable your mod in the usual manner.
As you can see in the attached screen-shots below, the restricted down-tree techs' icons/buttons will remain unchanged, only the specifically disabled techs will display a lock and be red. You can click on any of them with no effect aside from the standard sound (no lockup/freezing, as indicated in an alternate method).
Spoiler :

Spoiler :

As a minor note, there is no entry in the tech-tree legend (see abv. pic) explaining the red icon/button. Perhaps some artistic individual will modify the art files to correct this omission...
Enjoy... and cheers!
