How to Fix The Tech Tree Wires?

HorseshoeHermit

20% accurate as usual, Morty
Joined
Apr 5, 2013
Messages
1,467
Location
Canada
I have successfully created a mod that rearranges the Ancient and Classical Era technologies, giving them a new logic for their prerequisites. The tree functions as it should. But those damn wires are being drawn every way they're not supposed to.

The wires are controlled by some automatic generator, and it's fine so long as every tech requires only techs from the previous X-coordinate, but ask for one step over, and suddenly they break and recurve and do all kinds of nonsense with no basis in the logic.

I'll get a picture up (can't right now), but, for instance, I've redesigned Horseback Riding out of existence, reassigned Civil Service to require Writing and Currency, and I lined up Writing with Civil Service. Nothing in the way. Should just be a straight line, right? But as long as I do things that way, there's a broken wire out of Writing that draws in the direction of Theology.

My question is simple though. How do you get the tree not to fuss with you? I am modding within the Community Patch.

edit: See in the files... Mining has a tiny part of its wire missing - it's even weirder than the other glitch.
I'll also provide the civ5mod for troubleshooting.
 

Attachments

  • 20170601154259_1.jpg
    20170601154259_1.jpg
    211.7 KB · Views: 407
  • 20170601154306_1.jpg
    20170601154306_1.jpg
    220 KB · Views: 395
  • Vox Populi Ancient Era (v 6).civ5mod
    2.8 KB · Views: 296
Last edited:
Every time I've seen this before, it's due to a prerequisite assignment that is still in the Technology_PrereqTechs database that shouldn't be there or one that should be there but isn't.

Are you using SQLite Manager? It's a web-browser add-on that lets you examine Civ V databases, especially the "Civ V Debug Database". One should never attempt to mod Civ V without this tool! :lol:

Once you have SQLite Manager installed, you can open the Debug Database then look more closely at the Prereq Techs table. It shows all the prerequisites the game uses to place those gold lines between the techs. Look at the tech with one of those lines that are broken - with a line either going into the tech box or leaving it. Scroll down the table in SQLite and look for all the prerequisites associated with that tech. I'll bet that you find a row in the table that should be deleted or changed to a different prereq tech. And sometimes the error is that tech needs to be a prereq of another, more advanced tech.
 
Last edited:
I inspected the DebugDatabase with SQLite Manager, and found everything is as it was supposed to be. The incorrect wire and the wire break persist.
 
You've still got all the Vanilla prereqs, as best I can see. In order to fix the pipes, you'll need to delete all the old prereqs that are no longer valid - not just add new ones instead. See my Enlightenment Era mod (link in my signature) for an example on how to do this
 
I do not. See this latest revision for yourself. The behaviour is correct, but the lines are messed up.

Your strategy appears to be to add the intended prereqs in one file, and remove each unintended one explicitly in another file. My mod executes these queries:

Code:
--Prereqs
DELETE FROM Technology_PrereqTechs WHERE TechType = 'TECH_CIVIL_SERVICE';
INSERT INTO Technology_PrereqTechs
   (TechType, PrereqTech)
VALUES
   ('TECH_CIVIL_SERVICE', 'TECH_WRITING'),
   ('TECH_CIVIL_SERVICE', 'TECH_CURRENCY'),
   ('TECH_CIVIL_SERVICE', 'TECH_HH_DRAMA');

DELETE FROM Technology_PrereqTechs
WHERE TechType IN (SELECT (Type) FROM Technologies WHERE Era = 'ERA_ANCIENT' OR Era = 'ERA_CLASSICAL');

Then I assign the intended prereqs just after those lines. The use of SQLite manager on the debug database produces the same evidence as inspecting the original SQL - the logic is as intended. I know the subquery worked right because Trapping and Sailing work right.

I'm just so surprised that the tree has been servile and compliant for other modders, that no one has dealt with this issue. I just thought there was some trick.
 

Attachments

  • Vox Populi Ancient Era (v 7).civ5mod
    3 KB · Views: 259
Top Bottom