[Help Request] Technology Tree

Horem

Emperor
Joined
Apr 1, 2010
Messages
1,721
Location
Wales, UK
Hi Folks,
I am after a bit of help regarding a change I made to the Tech Tree. I altered the Table to add a Column in an sql file, like so:-
Code:
ALTER TABLE Technologies ADD COLUMN Tier INT;
I then populated the new Tier Column with an xml file, like so:-
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 11/6/2016 11:39:11 PM -->
<GameData>
   <Technologies>
       <!-- Only changing Tier items in this section -->
       <!-- Ancient Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_IRRIGATION"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_ANIMAL_HUSBANDRY"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_THE_WHEEL"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_ASTROLOGY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_POTTERY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MASONRY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MINING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_SAILING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_WRITING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_BRONZE_WORKING"/>
       </Update>
       <!-- Classical Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_CELESTIAL_NAVIGATION"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_ARCHERY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_CURRENCY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MATHEMATICS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_HORSEBACK_RIDING"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_IRON_WORKING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_SHIPBUILDING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_ENGINEERING"/>
       </Update>
       <!-- Medieval Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_MILITARY_TACTICS"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_STIRRUPS"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_CONSTRUCTION"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_ASTRONOMY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MILITARY_ENGINEERING"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MACHINERY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_APPRENTICESHIP"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_CARTOGRAPHY"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_EDUCATION"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_CASTLES"/>
       </Update>
       <!--RenaissanceEra -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_GUNPOWDER"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_BANKING"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_SIEGE_TACTICS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_MASS_PRODUCTION"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_SQUARE_RIGGING"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_PRINTING"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_METAL_CASTING"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_MILITARY_SCIENCE"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_SCIENTIFIC_THEORY"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_ECONOMICS"/>
       </Update>
       <!--Industrial Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_INDUSTRIALIZATION"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_BALLISTICS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_STEAM_POWER"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_RIFLING"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_SANITATION"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_STEEL"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_CHEMISTRY"/>
       </Update>
       <!--Modern Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_ELECTRICITY"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_FLIGHT"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_REPLACEABLE_PARTS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_RADIO"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_COMBUSTION"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_ADVANCED_BALLISTICS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_PLASTICS"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_COMBINED_ARMS"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_ADVANCED_FLIGHT"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_NUCLEAR_FISSION"/>
       </Update>
       <!--Atomic Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_COMPUTERS"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_ROCKETRY"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_TELECOMMUNICATIONS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_COMPOSITES"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_SYNTHETIC_MATERIALS"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_SATELLITES"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_GUIDANCE_SYSTEMS"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_LASERS"/>
       </Update>
       <Update>
           <Set Tier="3"/>
           <Where TechnologyType="TECH_STEALTH_TECHNOLOGY"/>
       </Update>
       <!--Atomic Era -->
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_ROBOTICS"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_NANOTECHNOLOGY"/>
       </Update>
       <Update>
           <Set Tier="1"/>
           <Where TechnologyType="TECH_NUCLEAR_FUSION"/>
       </Update>
       <Update>
           <Set Tier="2"/>
           <Where TechnologyType="TECH_FUTURE_TECH"/>
       </Update>
   </Technologies>
</GameData>

That is all working as intended, I can see the alterations in the database. The problem arises when you actualy start a game and look at the Tech Tree, it is all goofed up:-
SS2.jpg

SS1.jpg


I do not realy understand why it would act like this tbh. I am guessing something in the lua for the tech tree has got messed up due to my new column, I just do not have a clue what or how to fix it. If someone could point me at what I should fix/change would be most appreciated!
 
I assume you've misidentified the cause of the problem, the screenshots look like the results of technology costs being altered.

The horizontal alignment of technologies is maintained automatically and sorted by the cost of the technologies.
 
Hi Horem,

I encountered the same problem when I started playing around with it. The problem occurs with prereqtechs, so using your screenshot as an example: if you had Horseback Riding a prereqTech for Archery, the lines would go apeshit like that because it's ahead of Archery. Similarly, the problem might also occur if you haven't set a prereqTech for something. Check your prereqs over and you might be able to pinpoint the problem. I hope that helps.
 
I assume you've misidentified the cause of the problem, the screenshots look like the results of technology costs being altered.

The horizontal alignment of technologies is maintained automatically and sorted by the cost of the technologies.

You correct in saying the Costs have changed, I have changed them, they are still graded the same as vanilla, just higher. It was working fine before I changed the Table and cleared the cache. I may well have miss identified the issue. I commented out my table additions and it is still happening :(

Well, I did not expect Costs to effect the way the Tree is displayed, at all. How anoying.

Hi Horem,

I encountered the same problem when I started playing around with it. The problem occurs with prereqtechs, so using your screenshot as an example: if you had Horseback Riding a prereqTech for Archery, the lines would go apeshit like that because it's ahead of Archery. Similarly, the problem might also occur if you haven't set a prereqTech for something. Check your prereqs over and you might be able to pinpoint the problem. I hope that helps.

I have not messed with the Pre Req's. I use Hajee's No B-lining mod, and it works fine on its own.
 
You were right Ryika. I commented out Hajee's tech costs to apply my own, unknowing that he had restructured them. Thanx for the help!
 
You were right Ryika. I commented out Hajee's tech costs to apply my own, unknowing that he had restructured them. Thanx for the help!

The cost was so time consuming, that i had to just uniform them in a linear fashion instead of trying to use the devs method for cost
 
I like the Linear, suits me. Took me ages to realise you had adjusted the costs and even longer to realise cost effects placement (stupid idea tbh).
 
Back
Top Bottom