1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Tech Tree grows way out to the right

Discussion in 'Civ5 - Creation & Customization' started by Drawmeus, Aug 17, 2015.

  1. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    Hi folks,

    Sorry if this has been answered before, I tried some searches but came up empty, pretty sure I don't know what terms I need to be searching for, unfortunately.

    I'm updating my old (currently non-functional) Epochs mod for BNW and I'm running into a problem where the tech tree is growing out to the right 3-4 screens past the last column that has a Tech in it. I haven't been able to figure out what's causing it and I'd appreciate any leads anyone could give.

    Attached a screenshot to show what I mean:
    Spoiler :

    (If I scroll all the way over to the right, there's nothing there)

    I can provide any other info needed to diagnose the problem.

    EDIT: Error occurs if I have even 1 technology in the Information Era.

    EDIT2: FIGURED IT OUT.

    Tl;dr version: had a ERA_FUTURE tech at column 0, which causes TechTree.lua to decide that the width of the Information Era (ERA_FUTURE) should be final column - initial column = 33 columns.

    (Slightly longer version: it was my 'placeholder' tech that broke it. For those of you who haven't done a complete tech tree replacement before, if you wipe the prior tech tree rather than simply hiding it, a lot breaks and you have to set your unit dependencies, AI strategies, etc to some placeholder tech to be able to load the mod while you work on it. By the time the mod is finished, of course, you should be able to remove that placeholder tech, but while working on it it can get pretty unpleasant. My placeholder tech was ERA_FUTURE but GridX 0, which made the game throw up all over ERA_FUTURE when it came time to build the tech tree).
     

    Attached Files:

  2. kaspergm

    kaspergm Deity

    Joined:
    Aug 19, 2012
    Messages:
    4,958
    Did you reduce the number of eras/technologies? I'm pretty sure the width of the tech-tree is determined in a separate file (TechTree.xml if I'm not mistaken), so I think if you reduce the number of techs but don't scale the tree accordingly (not even sure if that's possible) you'll end up with a lot of blank to the right. Anyway, that's my guess.
     
  3. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    Haven't touched number of eras. I've greatly increased the number of techs - every other era scaled automatically, this one scaled too much.

    EDIT: Error occurs if I have even 1 technology in the Information Era.
    EDIT2: Figured it out. Figures that I spent 2 days on this on-and-off and got it within an hour of posting this thread. Details in the OP.
     
  4. kaspergm

    kaspergm Deity

    Joined:
    Aug 19, 2012
    Messages:
    4,958
    That is often how it is, sadly: You spend 10 times as much time tracking down one stupid error than doing the entire rest of the mod. XD So just to understand you (so I can learn from this) when you add more columns to tech tree, game scales it automatically? Do you know if that also works if you add more columns and/or more eras than in the original game?
     
  5. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    Columns, yes, eras, don't know.

    I have the same 8 eras in the base game, but each of them is 4 columns of tech. Having picked through TechTree.lua, I suspect it would work, but haven't tried it.
     

Share This Page