Eras

No. You can't.

You can add new Eras in the CIV5Eras.xml file, no problem. But two things then break:

1> The tech tree's TechTree.lua is hard-coded to go from ID=0 to ID=6. (Search for "0, 6, 1".) The new era you add will be #7 by default, so you MUST change the .lua file if you want the tech tree to display. There's at least one other instance of hard-coding in that file that I have yet to find (as I'm trying to add new eras for my own mod).
(Note: this is only the DISPLAY of the tech tree. The techs themselves will still be where they're suppose to be, but you'll just get a blank screen where your tech tree used to be.)
Also, the era ID numbers need to go in chronological order. So if you decide you want to insert an era between Industrial and Modern, for instance, you'll need to manually renumber the ID codes of the Modern and Future eras to make room for your new one at ID#5.

2> Certain parts of the game seem to be hard-coded; for instance, the game looks for Future Tech as the final repeatable tech, so you can't just delete it. Likewise, I tried deleting the Future Era and reassigning the techs to one of my new eras and it didn't work too well. If you want to add a new era at the end of the tech tree, then, you'll need to do a LOT of rearranging to make sure every tech still has an era, every era still has at least one tech, the IDs are still in order, and the GridX values don't overlap between eras.
 
The devs should have given Lemmy the game a couple months in advance so that all his great tools could have been ready for launch. :)

No. You can't.

You can add new Eras in the CIV5Eras.xml file, no problem. But two things then break:

1> The tech tree's TechTree.lua is hard-coded to go from ID=0 to ID=6. (Search for "0, 6, 1".) The new era you add will be #7 by default, so you MUST change the .lua file if you want the tech tree to display. There's at least one other instance of hard-coding in that file that I have yet to find (as I'm trying to add new eras for my own mod).
(Note: this is only the DISPLAY of the tech tree. The techs themselves will still be where they're suppose to be, but you'll just get a blank screen where your tech tree used to be.)
Also, the era ID numbers need to go in chronological order. So if you decide you want to insert an era between Industrial and Modern, for instance, you'll need to manually renumber the ID codes of the Modern and Future eras to make room for your new one at ID#5.

2> Certain parts of the game seem to be hard-coded; for instance, the game looks for Future Tech as the final repeatable tech, so you can't just delete it. Likewise, I tried deleting the Future Era and reassigning the techs to one of my new eras and it didn't work too well. If you want to add a new era at the end of the tech tree, then, you'll need to do a LOT of rearranging to make sure every tech still has an era, every era still has at least one tech, the IDs are still in order, and the GridX values don't overlap between eras.

Lemmy might have found a way to actually add/remove eras, but this is how I did it:

Change the Text for Future to my desired era. All the xml strings still show future, but when you see it in game it is Digital Era for example. Adding eras after the "future" era is cake.

I assume if I wanted to make a prehistoric era I would have to bump all the eras in the game so that the ancient becomes prehistoric, classical becomes ancient, etc.


Yeah it took me awhile to figure even that much out. :p
 
Change the Text for Future to my desired era. All the xml strings still show future, but when you see it in game it is Digital Era for example. Adding eras after the "future" era is cake.

That's what I did, but it still didn't work right. I still just get a basically blank screen; it draws the first couple era boxes, but no scroll bar and no individual techs. It's possible that my techs have problems, but I got that same issue when I tweaked the Eras.xml BEFORE adding the edits to Technologies.xml.

Also, as I said, there's a hard-coding in the .lua where it assumes your eras go from ID 0 to 6. You MUST change it if you want additional eras; as far as I can tell, there's no way around that through XML tweaking. (Why didn't they just do the "for Era in EraList" type of loop instead, like they did for everything else..)

What I'm trying to find out is if there's some other hard-coded limit; maybe the tech tree can only handle 100 techs, or maybe GridX can't go above 20, or something along those lines. I've got some ideas about how to test this that I'll try out tonight.
 
That's what I did, but it still didn't work right. I still just get a basically blank screen; it draws the first couple era boxes, but no scroll bar and no individual techs. It's possible that my techs have problems, but I got that same issue when I tweaked the Eras.xml BEFORE adding the edits to Technologies.xml.

Also, as I said, there's a hard-coding in the .lua where it assumes your eras go from ID 0 to 6. You MUST change it if you want additional eras; as far as I can tell, there's no way around that through XML tweaking. (Why didn't they just do the "for Era in EraList" type of loop instead, like they did for everything else..)

What I'm trying to find out is if there's some other hard-coded limit; maybe the tech tree can only handle 100 techs, or maybe GridX can't go above 20, or something along those lines. I've got some ideas about how to test this that I'll try out tonight.

No, there is no hardcoding, tech limit, or gridX limit.

Download my mod and take a look at my era and tech XMLs, and take a look at my tree in the game.

It is quite doable. Most likely you just have something wrong. I spent a couple hours looking at blank tech trees until I finally got it to work for my mod.
 
Thanks for responding but WHAT?

It's not always a good thing to get help huh :lol:

Ok, the simple response is: follow the links in Lemmy's post to his tool that will help you out. Also, download Decimatus' mod and view his xml to see how he did his.
 
Back
Top Bottom