Trouble deleting tech tree

ChaK_

Chieftain
Joined
Oct 3, 2010
Messages
28
Hey fellow modders.

I'm "working" on a specific map, and I'd like that map to be played at a certain time, with only certain technologies available.

So yesterday I tried to find how to alter the tech tree. I found the CIV5Technologies.xml, and started to mod it.

I could without any problem delete futur tech, nuclear fusion with the <Delete> tag, but as soon as I delete all the "future era" technologies everything breaks.

The whole tech tree goes blank, no tech anymore, and the whole "table" is graphically broken (scrolling is gone, middle age is half out of the screen...

I should add that even with the bug, technolgies are effectively restricted.

Another bug being, as soon as I delete the last 3 era (futur, modern and industrial), my starting warriors becomes...mechanised infantry, and in the ressources bar I have aluminium and uranium.... weird

Anyone found a solution to delete, or hide technologies? I don't know if there is a hidden "hidden" attribute or something.

I hope you undertand my bad english, and thanks for your answers.
 
Hi

you can simply make the tech unresearchable (it's ok in CIV4, haven't tried in CIV5) or manually delete all the prerequest tech for a certain line of techs (the tech prerequest info locates at the last part of CIV5Technologies.xml).
 
There is a <Disable> attribute, so you can just set that to true. However, I'm not sure if that will actually hide the techs; I don't remember if they still appear in the techtree or not. If they do, you can just change their <GridX> and <GridY> values to -1.
 
disable="1" did the trick, thanks :)

would be good to have a list of the attributes :(
 
Deleting techs is hard to do. There are many other XML files that refer to techs, including: Buildings, Policies, Processes, Improvements, HandycapInfos, Routes, Promotions, Units and Civs, and maybe more. You have to remove all references to a particular tech before you can delete that tech.
 
Chak, when you say Disable="1" did the trick, did it hide the techs you disabled form the tech tree or are they still there but red and locked?
 
I'm guessing the reason it froze is because you didn't delete the Future ERA, in CIV5Eras.xml (I think it's in the BasicInfos directory) when you deleted the techs. In TechTree.lua, the logic it uses for labeling the eras in the tech tree is to step through each era, go through every tech associated with that era, find the minimum and maximum GridX values, and use those to draw the vertical line separators. If you delete every tech within an era but don't delete the era, what values does it use? Hence the freeze.

There are a lot of things like this. If you delete a unit, do you remember to delete its unit class? Same goes for buildings. So deleting requires ensuring that there isn't something else referencing the now-missing element. (Thankfully, most of the other parts are more generic; promotions, AI, and such have units tied to them, not the other way around.)
This also makes adding new elements a bit painful at first; sure, you've added a new building to the game, but did you also remember to add a BuildingClass, a flavor, tech prerequisites, resource prerequisites, icon, civilopedia text... the list goes on. Many of these will simply give junk results if you don't set them (like the civilopedia text), but others will freeze everything up.
 
Back
Top Bottom