1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

How to Fix The Tech Tree Wires?

Discussion in 'Civ5 - Creation & Customization' started by Horseshoe_Hermi, May 28, 2017.

Tags:
  1. Horseshoe_Hermi

    Horseshoe_Hermi 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,004
    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.
     

    Attached Files:

    Last edited: Jun 1, 2017
  2. Horseshoe_Hermi

    Horseshoe_Hermi 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,004
    Location:
    Canada
    Bumperino because I've attached files.
     
  3. Horseshoe_Hermi

    Horseshoe_Hermi 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,004
    Location:
    Canada
    Nothing?
     
  4. sman1975

    sman1975 Chieftain

    Joined:
    Aug 27, 2016
    Messages:
    230
    Location:
    San Antonio, TX
    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: Jun 14, 2017
  5. Horseshoe_Hermi

    Horseshoe_Hermi 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,004
    Location:
    Canada
    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.
     
  6. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,124
    Location:
    Aotearoa
    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
     
  7. Horseshoe_Hermi

    Horseshoe_Hermi 20% accurate as usual, Morty

    Joined:
    Apr 5, 2013
    Messages:
    1,004
    Location:
    Canada
    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.
     

    Attached Files:

Share This Page