Adding an era

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,695
Location
Near Portsmouth, UK
Eras have to be in the <Eras> table in the correct sequence by ID

They also have to have their Description, ShortDescription and Abbreviation values correctly formed - "TXT_KEY_ERA_{ID}..."

Any other oddities about eras?

If not, I've got some evil SQL ...
 
I don't particularly know what to be looking for in the Eras table, since I've never messed with it, but I would just suggest looking through Enlightenment Era. Unless you already did that, in which case, nevermind.

But you, whoward, above anyone else should know to attach your mod (or at least give us an idea of what you're trying to accomplish)...
 
Other than the inherent issue with tech GridX values when inserting a new era into the middle of the 'tech tree'/eras progression, I can't really think of anythings elseif at the moment.
 
@AW: It would be a modded EE that I'd be attaching!

@Craig_Sutter: Not sure it's easier, but it avoids deleting the entire <Eras> table and re-adding everything

@LeeS: Only concerned with the <Eras> and direct secondary tables - there are fairly easy SQL solutions for shifting the tech tree around already
 
@LeeS: Only concerned with the <Eras> and direct secondary tables - there are fairly easy SQL solutions for shifting the tech tree around already

I really appreciate that SQL tidbit you provided for modifying the tech tree -- I plan to add it to the next version of Future Worlds to help EE-proof it. :3

With that in mind, I'm really curious to see if there's an SQL method to add new Eras dynamically... at least in my case, if there's a way I can just find out what the value of ERA_FUTURE is and add my new eras relative to that (X+1, X+2, etc.) it'd make life a lot easier.
 
Well, users of EE have reported strange affects on the warmonger penalty.

e.g.:

This has been mentioned a couple of times, but I'd like to point out that EE appears to break the Warmonger system. The first time I ran into this issue, I found that when I first attack a civ, they would function perfectly normal. When my War Score (courtesy of CP) would start to rise, they would start offering peace for settlements, ect. However, as soon as I take a city, they refuse to surrender, even if my War Score manages to hit 100, they will still view peace as impossible. Eventually, they did make peace, but it was a crazy long time. As I wasn't sure if this was EE or not, I set up an IGE test where I DoW'd Songhai, and sat some GDRs outside their capital for a bit. Eventually they started asking for peace, but as soon as I took their capital, they didn't want it anymore. I think that the relative army size caused them to then ask for peace, but even after this, there was no warmonger penalty added to the other civs in the game, despite the fact that they had all met each other. I'm really not sure how EE could be causing this issue, but it appears to be. I hope that someone will fix it soon, since it makes the game a bit dull to play.
 
The warmonger thing seems to be just a byproduct of how long the mod has been in development (Cheers for figuring that out by the way Whoward.) As far as the eras as a whole, the only major thing I noticed with them is that you need to have the whole file present instead of just the new era, otherwise a whole host of issues go wrong. Depending on when your era is positioned, you may also need to set up a new World Congress era for it and readjust the number of delegates etc. I think I was able to accomplish this with EE since it seems easier than resolution modding for it, but I didn't make it far enough in the playthrough to double check before release
 
the only major thing I noticed with them is that you need to have the whole file present instead of just the new era, otherwise a whole host of issues go wrong.

From what I can see these are due to assumptions in the Lua about ordering in the database, and naming convention for era descriptions etc

There are ways around these, but the SQL is non-trivial. The advantage is that you then don't have to delete the entire contents of the Eras table and re-add (potentially out-of-date) eras
 
Hi whoward.
In addition on what you wrote in the main post, you have to modify 'NewEraPopup.lua'

adding the new era under "-- Change Image for Era"

Example:
Code:
elseif (strEra == "ERA_NEWERA") then
		lastBackgroundImage = "ERA_newerasplash.dds";

I did this myself and all seem to work fine.

I hope I've been helpful.
Cheers, Ulixes
 
I've spotted that in EE (but had forgotten about it, so thanks for the reminder) - wonder why Firaxis didn't just put the image name in the database - then you don't need to change the Lua ...

(Answers not needed ... as we all know it's "the most moddable civ ever" ;) )
 
Been having a fiddle ... can someone confirm that the EE (v4) tech tree looks like the attached

(there's not a single absolute GridX value anywhere in the code that adds/moves the techs)

TIA

W
 

Attachments

  • EE_TechTree.jpg
    EE_TechTree.jpg
    226.2 KB · Views: 81
Why not use GridX?

Sort Eras, then by mod2 or mod3 (easy to determine).
By not using GridX, have you assigned x by a lot of tech prereq reading? What if some mad man prereq the tech from the same GridX ~ quite possible scenario once tech tree become clustered.
 
Been having a fiddle ... can someone confirm that the EE (v4) tech tree looks like the attached

(there's not a single absolute GridX value anywhere in the code that adds/moves the techs)

TIA

W
Everything appears identical with what I am seeing currently using EE_V4 for that chunk of the tech tree. Tech placements and pipings between them appear same so far as I can see.
 
Why not use GridX?

Sort Eras, then by mod2 or mod3 (easy to determine).
By not using GridX, have you assigned x by a lot of tech prereq reading? What if some mad man prereq the tech from the same GridX ~ quite possible scenario once tech tree become clustered.

I assume he's using GridX, but set up the code so that if you want to move entire Eras worth of technologies, you don't need to define the specific GridX value for each and every tech in the new tree. Instead, I'm guessing his code does it dynamically.
 
Why not use GridX? ...

there's not a single absolute GridX value

I assume he's using GridX, but set up the code so that if you want to move entire Eras worth of technologies, you don't need to define the specific GridX value for each and every tech in the new tree. Instead, I'm guessing his code does it dynamically.

Yep, for example

Code:
UPDATE Technologies SET GridX = GridX + 2
WHERE GridX >= (SELECT GridX FROM Technologies 
                WHERE Era IN (SELECT Type FROM Eras
                              WHERE ID > (SELECT ID FROM Eras
                                          WHERE Type='ERA_RENAISSANCE'))
                ORDER BY GridX LIMIT 1);

to make a "hole" after the Renaissance to put the new techs into.

Almost done, will be posting the full solution soon.
 
Seems pretty absolute to me.

Oh, filthy database stuff.

I assume he's using GridX, but set up the code so that if you want to move entire Eras worth of technologies, you don't need to define the specific GridX value for each and every tech in the new tree. Instead, I'm guessing his code does it dynamically.
I didn't except something so trivial. I don't even get the idea of moving every single tech one by one. :p Even with basics, you should be moving entire eras at once.
 
Mwhahahaha!!!

(Future Tech has been cropped, but the three techs at the end merge into it correctly in game)




(Right click, Open in new tab)
 

Attachments

  • ErasTechTree.jpg
    ErasTechTree.jpg
    551.9 KB · Views: 541
  • CHANGES_ONLY_Prehistoric Era (BNW) (v 13).zip
    14.9 KB · Views: 119
  • CHANGES_ONLY_Enlightenment Era (v 4).zip
    40.3 KB · Views: 104
  • CHANGES_ONLY_Future Worlds (v 1).zip
    9.2 KB · Views: 90
Top Bottom