Locking Specific Techs, by Civilization

Scocou

Chieftain
Joined
Dec 17, 2010
Messages
18
Location
On an island, in the Pacific
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!).

  1. Create a file in your mod's XML directory, naming it something like: XML/Civilizations/CivilizationOverride.xml
  2. 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]
  3. Save and close the file.
  4. 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).
  5. Fire-up Civ5 and enable your mod in the usual manner.
After starting your new game hit <F6>, the disabled tech's icon/button will be red and have a lock icon adjacent to it. All techs down-tree (those that have the disabled tech as a prerequisite) will also be rendered not researchable.

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!:salute:
 
Is there an easy way to make all techs after a certain point (say just before Gunpowder) unresearchable for all civs WITHOUT having to put a line in for each tech under each civ?

I've tried the following things already and none have worked (for each tech of course):

<Technologies>
<Delete type="TECH_AGRICULTURE"/>
</Technologies>

<Technologies>
<Row>
<Type>TECH_AGRICULTURE</Type>
<Disable>True</Disable>
</Row>
</Technologies>

<Technologies>
<Row>
<Type>TECH_AGRICULTURE</Type>
<Disable>1</Disable>
</Row>
</Technologies>

I have not tried making the techs pre-reqs for themselves yet, that seemed like a lot of work too.

*Edit* the indents didn't work but I assure you that my syntax in mod buddy was correct :p
 
Is there an easy way to make all techs after a certain point (say just before Gunpowder) unresearchable for all civs WITHOUT having to put a line in for each tech under each civ?

I've tried the following things already and none have worked (for each tech of course):

<Technologies>
<Delete type="TECH_AGRICULTURE"/>
</Technologies>

<Technologies>
<Row>
<Type>TECH_AGRICULTURE</Type>
<Disable>True</Disable>
</Row>
</Technologies>

<Technologies>
<Row>
<Type>TECH_AGRICULTURE</Type>
<Disable>1</Disable>
</Row>
</Technologies>

I have not tried making the techs pre-reqs for themselves yet, that seemed like a lot of work too.

*Edit* the indents didn't work but I assure you that my syntax in mod buddy was correct :p


Disabling is as easy as this.

<Technologies>
<Update>
<Where Type="TECH_PARTICLE_PHYSICS"/>
<Set Disable="true"/>
</Update>
<Technologies>

If you don't want the Tech to show up on the Tech Tree a safe and easy way to get rid of it is to simply move it out of view. Doing this avoids any problems that deleting a tech can cause whereby random files are still trying to reference that specific tech.

<Update>
<Set GridY="27" />
<Where Type="TECH_PARTICLE_PHYSICS" />
</Update>

Here I've just move Particle Physics high out of site after disabling it, all through XML and easily reversible.
 
You can also disable by era:

<Technologies>
<Update>
<Where Era="ERA_(era to disable)"/>
<Set Disable="true"/>
</Update>
<Technologies>

Remember, however, that writing it this way will disable ALL of a era's techs, so be careful. If you don't replace the repeating tech (Future Tech by standard), once you research the last available tech, the game will not progress!
 
I've been doing some research for creating a mod where technology sort of stops. Is that possible? Using the world builder is there some way to just disable techs so that no further research is possible or maybe it just goes into future tech or something? I was thinking of disabling Rifling, Steam Power, Navigation, Military Science, and Dynamite. This would give me a sort of late middle ages/early Renaissance thing I was going for. Would this work or would the game just crash. I'd appreciate any help.
 
You can also disable by era:

<Technologies>
<Update>
<Where Era="ERA_(era to disable)"/>
<Set Disable="true"/>
</Update>
<Technologies>

But where do I put this text? What kind of file to I write it in? I'm utterly new to Civ modding/fiddling, so can anyone provide a little bit of info on where to do this?
 
But where do I put this text? What kind of file to I write it in? I'm utterly new to Civ modding/fiddling, so can anyone provide a little bit of info on where to do this?

Welcome to Civ 5 Modding! The ways of modding in Civ5 are a bit different than Civ 4.
The best way to get started would be to read Kael's Guide found here: http://forums.civfanatics.com/showthread.php?t=385009

that should get you going, and if you have any more questions feel free to start a thread in the main Civ 5 Creation & Customization forum.

Good Luck!
 
Please, could you explain the meaning of "Add a typical new OnModActivated/UpdateDatabase entry for your CivilizationOverride.xml file" and how to do it?
Thank you so much.
 
See http://steamcommunity.com/sharedfiles/filedetails/?id=120875856

About 2/3 of the way down the tutorial. You can ignore the parts about art creation as they are not relevant to your question.

And also this is a really really really old thread. I don't think any of the previous commenters are even active members anymore, at least so far as modding goes.
 
Top Bottom