Technologies and Eras

Drog

Chieftain
Joined
Oct 13, 2010
Messages
9
Several mods have touched on the problem but none give what I believe would be the ideal solution : require all technologies of one era be researched before advancing to the next era.

Get on a hill and fortify, incoming wall o' text!

In a recent game Rome had gunpowder units but I don't believe they even had writing or mathematics discovered. This solution would prevent the abrupt technological jumps that occur with longswords to gunpowder, for example. It would extend the duration of eras and useful lifespan of unit types without drastically altering the overall game duration or balance.

It's simple enough to force prerequisite technologies, however it looks like crap in the technology tree. I was thinking the community at large may enjoy this mod, however to properly implement this is beyond my limited modding capabilities.

In an effort to straighten the tech tree visual issues out I hit upon a great mod, "Dark Ages - Prolong Medieval Warfare" by Jeremy Norton. My efforts to find and contact Jeremy directly have failed utterly (and perhaps he has no interest in this anyways), however I really liked his solution of a new and blank technology between eras. This works out well visually for the tree structure when you have so many dependencies, once you require all techs of one era before moving to the next. I was thinking a 0 research cost Classical, Renaissance, Industrial, etc technology that is required to change eras with all pre and post dependencies linked to it would work nicely.

Not sure how the mechanics of the game would handle a 0 cost technology, if you could auto-grant it when all the pre-req's are met, or if you'd still be limited to using a turn to "research" it; I suppose that wouldn't be too drastic of a penalty and could even be compensated for to preserve overall game duration.

If anybody has the knowledge to knock this surprisingly code-heavy yet simplistic in theory mod out, I'd greatly appreciate it. I'm guessing the community at large may as well, based on the prevalence of posts and mods concerning these issues.

Or if you have an even more elegant solution to the technological pacing flaws of this game, present them here!

I suppose if you see some flaw with my idea you could post it here as well.
 
Or if you have an even more elegant solution to the technological pacing flaws of this game, present them here!

There IS a better, if not more elegant, solution to most of this. For the record, earlier Civ games had this same issue; it was too easy for a civ to overspecialize and beeline down one side of the tech tree. So, the solution in Civ5 is the same one quite a few people used in Civ4:

Have more techs contain dependencies that require techs from the other "side" of the tree.

Now, you can take this too far, of course. You don't want lines to cross, or else it'll look strange in the tech tree. But in the ideal case, you can take a "pyramid" approach:

If a tier (column) on the tech tree has techs A, B, C, D, and E, and the next tier has F, G, H, and I, then have F depend on A and B, G depend on B and C, H depend on C and D, and I depend on D and E. On the next tier, tech J might depend on F and G, K depend on G and H, and so on.

The result is that while you can still have a lopsided research distribution, your best technology can't be more than two or three tiers above your lowest unresearched tech. In my future-tech mod, the techs are generally laid out this way for nine tiers of technologies; with two "pure" research lines running along the edges of the tree, everything else basically branches off of those in this diagonal grid pattern.

Now, to apply this fully to the existing tech tree would take a lot of editing and rebalancing, but you can make a few cross-connections at strategic places that should greatly reduce the effect you're talking about. Even if the new prerequisites are a bit nonsensical at times, it wouldn't be any worse than some of the existing ones (Globalization being two steps removed from Penicillin?) and would greatly help the balance issue.

One advantage/disadvantage of this method is that it doesn't rigidly define the Eras (which your suggested method does). Personally, I like the idea that people can enter a new era in a variety of ways, but your mileage may vary.
 
Or if you have an even more elegant solution to the technological pacing flaws of this game, present them here!
In my old Civ 4 mod I replaced the standard game speed with 'Turns per Era' and simply doubled the cost of techs more advanced than the current era and halved the costs of techs from the pervious era. My goal was similar but I didn't want to completely prevent beeline strategies and at the same time i didn't want to overcomplicate the tech tree. Some people complained that it was too gamey but it was very effective. Later I changed it to graduate the tech costs rather than the hard turn limits, that eliminated the odd effect of switching to the next era while you have a ton of points in a tech causing you to finish it with a bunch of carryover for another tech but effectively the gameplay effect was unchanged. It was also pretty easy to code into the DLL. It was possible in Python but slow since the cost calc was run every turn for every player and every tech and every time, again for every tech, when you opened the tech tree.

I haven't dug much into LUA in Civ 5 yet but I image there will be a method to control which technologies you can reasearch so for your idea it should be pretty easy to hook into that and simply block techs for the next era until all techs in the current era have been researched. That would, in my opinion, be more elegant that adding a zero cost tech or mucking up the connections too much ;)
 
Well I've been working on a mod to require all technologies of one era be researched before advancing to the next, but I keep running into problems that I haven't the foggiest how to solve.

Problem 1 : Pipes act wonky
Problem 2 : Each technology is limited to 4 prerequisites, and I need 6 to have a blank tech to represent the change in eras.*
Problem 3 : Any technology has a minimum research cost of 1, there-by necessitating a turn researching it. I don't know how to auto-grant a tech when pre-req's are met (or if it's even possible).

Unless I come across or figure out a solution or workaround to these problems I won't bother putting this mod out into the wild, BUT I'm toying with Spatzimaus's suggestion of having more techs contain dependencies from the other "side" of the tree. This would eliminate the need for an empty tech between eras, though problems 1 and 2 would more than likely still be issues.

The recommended methodology of
If a tier (column) on the tech tree has techs A, B, C, D, and E, and the next tier has F, G, H, and I, then have F depend on A and B, G depend on B and C, H depend on C and D, and I depend on D and E. On the next tier, tech J might depend on F and G, K depend on G and H, and so on.
seems a tad complex to me at the moment (on paper at least, probably much simpler if I could see it)...it would also more than likely run into the 4 pre-req cap and odd piping.

Anybody have thoughts or suggestions on any of this?

* - The blank tech was the first idea I came up with to separate eras, figuring it to be less cluttered visually than cross-linking first tier techs of one era with the last tier techs of the previous.
 
you could raise up the and_preReqs to a higher number, say 9 or 10... in the global defines.xml

then for each tech that is at the beginning tier of each era, you could make them require all the last tier techs of the previous era.
 
you could raise up the and_preReqs to a higher number, say 9 or 10... in the global defines.xml

then for each tech that is at the beginning tier of each era, you could make them require all the last tier techs of the previous era.

Ah ha, so that's how you fix that eh? A gentleman and a scholar you are, sir!

So does
Code:
		<Row Name="NUM_OR_TECH_PREREQS">
			<Value>3</Value>
		</Row>
mean you can have 3 ORPrereqTechs? I've played around with them but it seems limited to one, and overwrites normal PrereqTechs, and is an unpopulated table by default. Overall quite mysterious. That, and I obviously don't know what I'm doing, but I won't let that stop me!
 
The recommended methodology of (my stuff) seems a tad complex to me at the moment (on paper at least, probably much simpler if I could see it)...it would also more than likely run into the 4 pre-req cap and odd piping.

No, no problem with the prereq cap. No tech would require more than 2 other techs, under that system, and none of the lines would ever cross.

Here, I'll try to illustrate in ASCII text, mimicking the standard tech tree layout. The underscore characters are because I don't trust the width of the space character on this board software, nothing more.
A_J_
_F_O
B_K_
_G_P
C_L_
_H_Q
D_M_
_I_R
E_N_
(this is 9 rows, you actually have 10 to work with, but go with it for now.)

Each tech depends on the one or two techs connected to it diagonally in the previous column. So A and B are the prerequisites for F, B and C are required for G, C and D are for H, and so on. J only depends on F (or possibly only on A, if you'd prefer that sort of layout), and N only depends on I; the rest of the techs listed would have exactly two prerequisites.
To keep this consistent, stick the "pure" techs in the top and bottom rows with the "applied" stuff in the middle. So in my future mod, the biology/psionic techs are along the top of the tree, the theoretical physics ones are along the bottom, and everything in the middle is what you get when you mix these extremes together (computers, nanotechnology, terraforming, etc.).

The upshot is that if you want, say, tech Q, you'd have to take B, C, D, and E; only A on that first tier could be skipped to take Q. That's because Q would require LM, which'd require GH and HI, and so on down the line. Effectively, it'd be impossible to leave unobtained techs on a given tier if you want a tech four or five tiers above that one.

As I said, if you're editing the existing trees, you can get a similar effect without being very disruptive, just by adding a few cross-dependencies at strategic places. I did the same thing back in Civ4, especially in the industrial and modern ages, to make it harder to beeline for tanks and such; it made a HUGE difference.
 
no its not limited and its not unused either, look down further to the tech_types... the reason it may not work for you is because you likely tried to update, but instead you need to add to it.

You may need to delete the tech types first, then re-create them to make it work, but I'm absolutely sure you can do it, because there are already technologies that require more than 1 ;)

look at the mods that limit the era, ie. end at medieval era mod... you'll see that it delete's the tech type Future tech, basically any technologies that future tech requires, then re-adds them.. thats basically what you need to do, except for all the techs at the beginning of any era.
 
First of all thanks a bunch for the help, this piece of info
you could raise up the and_preReqs to a higher number, say 9 or 10... in the global defines.xml
was the best info I've found all day. However I could use some further clarification. I was asking about the ORPrereqTechs, and I think the last post that started with
no its not limited and its not unused either
was talking about the regular PrereqTechs - the ones that already exist in the game. If this is the case, any info on ORPrereqTechs would be most appreciated for future use. If I'm mistaken and you were indeed talking about the ORPrereqTechs then I need some other clarification :
Spoiler :

look down further to the tech_types

Do you mean these (in GlobalDefines.xml)?
Code:
                <Row Name="NUM_OR_TECH_PREREQS">
			<Value>3</Value>
		</Row>
		<Row Name="NUM_AND_TECH_PREREQS">
			<Value>4</Value>
		</Row>
		<Row Name="NUM_UNIT_AND_TECH_PREREQS">
			<Value>3</Value>
		</Row>
		<Row Name="NUM_BUILDING_AND_TECH_PREREQS">
			<Value>3</Value>
		</Row>
If so :
Spoiler :
The AND_TECH_PREREQS is the one that affects the normal pre-req table (Technology_PrereqTechs) - specifically the max number of pre-req's that can be used. Based on that, I'm guessing OR_TECH_PREREQS affects the Technology_ORPrereqTechs table? However this table (when viewed in SQLite Manager) is unpopulated, and I haven't found anything (by default) that inserts to it. I did find a mod that used 6 ORPrereq's and as far as I could tell only the first worked, which has also been my experience playing around with ORPrereq's. Even though the previous code snippet would indicate 3 could be used. I'm sure I'm missing something here, just can't figure out what. Also, I've got no clue what unit_and_tech and building_and_tech prereq's are for.


If not :
My only other guess at what tech_types you're referring to are the technologies and their pre-req's set up in CIV5Technologies.xml, which doesn't use any ORPrereq's. It sets the table up but leaves it unpopulated.

You may need to delete the tech types first, then re-create them to make it work, but I'm absolutely sure you can do it, because there are already technologies that require more than 1

More than 1 ORPrereqTech, not PrereqTech?
This is how I'm currently clearing out old and setting up new prerequisites.
Code:
DELETE FROM Technology_PrereqTechs
WHERE TechType = 'TECH_CHIVALRY';
INSERT INTO Technology_PrereqTechs (TechType, PrereqTech) VALUES ('TECH_CHIVALRY','TECH_CIVIL_SERVICE');

 
I was thinking about the same thing you are working on, albeit from a slightly different angle.

My idea was to still allow players to beeline to a new age, but associating a cost with doing so.
This cost would be to disable all remaining techs of the given age that have not yet been discovered - so if you rushed to the classical age without researching Masonry, too bad, no City Walls, Quarrys or Pyramids for you.
Of course the tech tree would have to be rearranged to make "accidental" aging less likely, and the AI flavors would have to be adjusted to allow the different AI personalities to make use of this properly.
Once a player reached a new age, all skipped techs of the age before the last would automatically be made available to him - i.e. upon reaching medieval age you'd get all techs of the ancient age you skipped for free.

Unfortunately, there doesn't seem to be a way (currently) to make techs unavailable or available to a certain player, which makes realizing the idea impossible.
Too bad, I was also planning on making something like the MoO2 tech tree, where (unless you had creative) each player had to pick one of three available techs any time he advanced. Ah well, maybe if and when the SDK is released.

I'll be keeping an eye on your mod idea, though - definately sounds promising.
_____
rezaf
 
First of all thanks a bunch for the help, this piece of info was the best info I've found all day. However I could use some further clarification. I was asking about the ORPrereqTechs, and I think the last post was talking about the regular PrereqTechs - the ones that already exist in the game. If this is the case, any info on ORPrereqTechs would be most appreciated for future use. If I'm mistaken and you were indeed talking about the ORPrereqTechs then I need some other clarification

Pretty sure that previous post was talking about ORPrereqTechs, since that was the context of the conversation at the time. ORPrereqTechs work exactly as you'd expect them to though. As Shiggs said, they're not limited to one, and they don't overwrite normal PrereqTechs. The only problem I've encountered using them is that the techtree doesn't actually bother to display pipes linking techs to their if their prereq is an OR, but it's a trivial fix.
 
I'll be keeping an eye on your mod idea, though - definately sounds promising.
Thanks for expressing your interest! Always nice to see.

Pretty sure that previous post was talking about ORPrereqTechs, since that was the context of the conversation at the time.

So I guess OR stands for or, meaning you can get to a technology via any of the ORPrereq's instead of all of them...duh.
 
Yes, precisely. You can mix and match and prereqs with or prereqs as well. So you can have a Tech A that requires one of Techs B or C, and Tech D and E also.
 
Well I've got everything hammered out except the "blank" technologies for era changes. I was going with this rather than linking all techs at the end of one era to the beginning of another to avoid clutter in the tree, however I did have to re-route a few things such as archery and optics.

Anyways, the problem is a minimum science cost of 1, necessitating a turn researching what I'd prefer to be automatically granted. I'm guessing it could be done in LUA, with the SerialEventEraChanged event, however I have no idea where to go from there as I've got no knowledge of LUA. If anybody could help out or offer alternative solutions please do.

Or would folks rather just see technologies linked and skip the blank tech and screw the clutter?
 
Or would folks rather just see technologies linked and skip the blank tech and screw the clutter?

Well, personally I'd still be in favor of linking the techs more, because I LIKE the idea that you can cross into a new age before completely finishing the previous one. Forcing everyone to fill out an era before moving on just results in a lot of turns that just feel "wasted".
More crosslinking would solve most of your issues. Not all of them, but most. The biggest advantage of this method is in the tech tree; no problems with lines not being drawn correctly, and more importantly, no need to "widen" the tree to make room for a new tech between each pair of eras.

But there's another solution you might consider:

Make the "blank" techs not be blank.

If you want to keep them as 1-turn (0-cost) techs, then give them something trivial. Not a new unit or building, but some "rule" change. +10% to Great Person birth rate, to offset the ever-increasing cost? +10% to worker construction speed? There are quite a few options in the Technologies.xml file. So upon reaching the end of an era, you'll spend 1 turn researching the end-of-era tech, get some little bonus, and move on to the next age.

Or you could make them be a full-cost tech, and so maybe you COULD put in a new building or unit at some of these. Some suggestions:
From Ancient to Classical: the Aqueduct (+1 happy, food storage 20%, and remember to reduce the Hospital's bonus to compensate)
Renaissance to Industrial: the Engineer (improved Worker, works at 150% speed, has 3 MP, ignores terrain costs and river crossings as if he were a scout)
I'm sure you could come up with others.

Third option, rearrange the existing techs, so that maybe Engineering IS the intermediate tech between the Ancient and Classical eras. No need to give it a new effect; it's just that now, all of the final-column Ancient techs would be prerequisites for Engineering, and all of the Classicals would depend on it. (Repeat for other boundaries as needed.)
 
Something else you could do if this is still in the works is have the "dark ages" tech grant a free tech when it is completed. In that manner you could have it cost as much as a 1st tier tech of the age in question or a little bit more darkness in the dark age.
 
grant a free tech when it is completed
This is what I was trying to do but couldn't figure out how. Currently you just have to spend a turn researching the blank tech for each era change. I haven't really been playing Civ5 much lately but the mod seems to work as-is. If you guys want to mess with it I can publish it if you like.
 
This is what I was trying to do but couldn't figure out how. Currently you just have to spend a turn researching the blank tech for each era change. I haven't really been playing Civ5 much lately but the mod seems to work as-is. If you guys want to mess with it I can publish it if you like.

Make a Great Scientist unit, but remove its ability to build an improvement (only grant free tech).

In the Traits xml, grant every civilization a trait that will grant you that free great scientist when the technology is completed. You don't have to document it (i.e. don't have to say in the civilization dawn of man screen) that you are doing it. When the tech is complete, you'll receive the great scientist, giving you a free tech when it is completed.
 
You could also make these "dark ages" truly dark by making the tech cost the same as a top tier tech from the previous era. Would definitely slow down the game.
 
Top Bottom