Time Paced Technology Progress System - Your opinion needed

Cyrus of Persia

Warlord
Joined
Feb 26, 2011
Messages
114
I'll keep this as short as possible. I came up with this concept in Civ3 days but wasn't really able to implement it. I have refined it since then and I would like to see if there is any interest in it from the community for me to produce it publically.


The System:
This system creates a predefine rate of technology progress through time for the world such that all era's and technologies will come about more or less when they should. Then the system allows each civ to get ahead or fall behind within limits relative to this axis based on how much focus they put on science.

(If you are familiar with Paradox's games and how techs work, this is similar).


Purpose & Goal:
The purpose of designing this system is to achieve the following:

  • Create a more challenging and realistic experience for the player with regards to technology advancement.
  • Prevent runaway technology situations where a civ (AI or player) gets way ahead of others or of the time period.
  • Prevent any civ from falling too far behind, enabling more competent opposition for the player.
  • Preventing situations where overall world technology is noticeably ahead or behind it's time.
  • Simulate the concept of "technology trickle down" from more advanced nations to lagging nations.
  • Simplicity.
  • Ease of implementation. (Small amount of code added)
  • No interference with other game elements.
  • AI comprehensible.


How it works:
This system works by having it's own world clock and it's own technology reference with regards to world time.
It then observes a civ's technological position in time and decides how far ahead or behind the civ is.
Then it adjusts the cost of the next tech for the civ such that the more ahead it is of world time the more expensive it becomes for it to achieve the next tech, and vice versa; the further back the cheaper the same tech becomes for the civ.


Expected outcomes:
  • Civs that have less science power will fall behind a few techs but no more and this lag will be consistent and not perpetually increasing. If they gain more science ability they can reach back to normal time.
  • Rich civs or ones with high science power or expenditure will fall ahead a number of tech from world time and will stay there as long as they have that scientific advantage, but the lead will stay consistent and will not be perpetually increasing.
  • Player can gain technological lead by increasing science expenditure but not dominate.
  • Player is no longer forced to keep up with the AI's higher tech rate if he doesn't want to, you can stay in your normal budget and still keep up, though you may have to concede a small lag in tech. It's a choice.
  • Time progress is always the same in every game. (Adjustable by game time length; ex: fast, normal, marathon)
  • If an AI is born suddenly with technology that is several eras behind, it will catch up relatively quickly and join the world and not in an arbitrary way.
  • I've made it very balanced so it's very intuitive and sensible.
  • Requires no AI understanding or changes and the AI can work perfectly fine with it.
  • Works with all Difficulty levels.
  • Creates additional tactical choices for the player with regards to application of "free tech gaining" choices and their timing.


Drawbacks:
  • Requires some restructuring and cost adjustments to the techs tree.


Please tell me if you find this interesting and useful (or not) and if you'd want to see this available as a mod component.

Thanks :).
 
Of course we are interested in your mod component! :)

You will read regularly here or there people stating that their game is not interesting any more because of too big tech descrepancies between players, or inadequate timing for researching them.

Curious also to see what solution you used: python or dll?

Not so many people might respond though because nowadays civ4 players are mostly attached to big mods, which may have implemented their own method.
 
Cool!

Well, I need programming help with this because I am not familiar with Civ4's python code and such.


Anyone willing to support me?
 
great idea. I thought about a tech diffusion model among your contacts and neighbours. I'd like to test this if it's got legs.
 
Just an update.

With Isenchine's help we did some testing, and I realized I can't achieve what I want the way I want it within python. So I have to go SDK and C++.

So stay tuned, I'm digging deep :). Wish me luck.... and maybe give me some guidance if you can :). Thank you.
 
Well my friend, I could seriously use some programming help.

Because I couldn't get anyone to assist me I ended up reading C++ for 3 days straight and now I'm a programmer!!

My lack of familiarity with the game code is a nig challenge for me, so if you can help me there it would be awesome.



Anyway, the code is 75% done. Getting there soon.
 
It's done.

I've produced the first working version. It's not fully refined, but it's working correctly.

What's left is to make it so it can adapt different situations like games starting in later eras where time get's skewed and the ability to save data in save games so that saving and reloading doesn't mess it up.

I will do a release soon.
 
Ok. It's complete. Here is first release.

Please play a game or 2 with it and tell me how it fairs out.
Version: 0.1a


How it works:
This mod makes it exponentially more difficult to get too far ahead of others technologically. It allows for civs to get approximately 7-8 techs ahead or behind the times. but no more.


Drawbacks / side effects:
  • At start of games there is a bit of difference between games starting at ancient era and games starting in later eras. Games starting in later eras typically are 7 to 8 techs ahead of where they should be according to this mod. This happens only when you start the game in later eras. to fix this and set it to 0, the games starting at Ancient era would get skewed by 7 or 8 techs. I have selected a middle ground so that both systems will experience minimal effect. As a result when you start a game at ancient era you will start the game being 3 techs "behind the times" which will make your initial 5 or 6 researches go faster. And in later era starts you'll start about 4 techs ahead of the times, which will make things go slower at first. But in both cases things will fall back to normal within 20 to 25 turns.
  • Because the system is altering the amount of research being done, the progress bar "estimates" will not be accurate when you are ahead or behind. This can be fixed in future releases.
  • changes to some tech costs may be necessary.
  • This system does not work well with "tech skipping". Skipping techs will allow a civ to gain advantage in later eras and will allow some circumventing of this system. Therefore it is recommended that tech tree progress requirements be changed such that every tech would be an "AND" requirement of at least 1 other tech, and making all techs required as you progress forward. (although the system still works as is and is still a big improvement over vanilla).
  • Currently the formulas are designed to work with default game speeds and default tech tree. Will likely not work correctly if you have added lots of techs to your tech tree or changed the number of turns per game speed.


Testing and feedback:
Due to the default tech tree not being uniformly spreed out and balanced, you may experience that during certain times you'll fall ahead or you'll fall behind for a little while, and there will be some oscillation in your progress even though your money input may not have suddenly been increased or decreased. So, any of you folks that decides to play or test this mod please report back and tell me which areas in the tech tree you found this to be happening. Thank you.


Installation:
Extract zip file in your BTS "...\Mods" directory.

I will also produce an altered tech tree that is balanced and works well with this new mechanic in the future and will release it.

I will release the source code for this as well for integration elsewhere.

Download:
Click link below.
 

Attachments

FYI The following Image shows the way tech costs are altered (if you can read graphs).

x = number of tech ahead or behind

y = cost modifier.

at 0 tech difference your y is 1 which means no cost effects.
 

Attachments

  • formula final.JPG
    formula final.JPG
    87.4 KB · Views: 75
This is a really interesting idea, and I am looking for things that will help keep the ai 'competitive' with the player in FTTW, but if the techs are hard coded it is not going to work for me as everything is different to vanilla...

I would be interested in hearing more about how the code actually adjusts things and what it actually does to the science system in game.

For example, is beaker production by buildings now irrelevant in your mod?
or is all kinds of scientific input taken into account and costs are just adjusted when a Civ gets too far in front or behind?

It is an interesting concept though, and I follow with interest!
 
How it works: In depth

As I've mentioned before my mod changes nothing and leaves everything in tact and working.


What it does is:

It counts how many techs you have right now.
It looks at how many techs you started with.
It looks at the game speed to determine how many turns this game is gonna be.
Then it assumes that all techs should be researched by the time 90% of total game time is played, giving players 10% time to battle it out at max tech (50 turns out of 500, for normal game speed). This is what Firaxis had in mind too (which they fail at).
Then it decides if all techs where to be researched by 90% game time, then how long should each tech take on average? In the case of a normal speed game, 450 turns / 90 techs = 5 turn per tech.
Then the mod continually observes how many techs you have and which turn it is, and decides if you are staying at 5 turns per tech or you are faster or slower. For example, by turn 100 you should have 20 techs. if you have 22 techs, you are ahead.
Then, it takes your tech difference and creates a modifier from it using formulas I've given it.
It then applies that modifier to the total science output from your nation before being added to your research. (includes everything: buildings, specialist, modifiers, slider, etc.)

That's why if you change the number of techs or game length it can mess it up right now. How I've designed it its very easy to custom tailor to each mod. But also I intend to use XML code for these variables so they are not hard coded, but that requires knowledge of how to associate gamecore variables with xml variables which I don't have yet. If someone can help me there it will be easy peazy.

I have already come up with how to make it so it can adapt to all kinds of modified game speeds and lengths, but it requires quite a bit of coding and better understanding of gamecode and time.

I've also come up with a better system that gives each tech a "default" year (for example: flight = 1900, atomic bomb = 1945). This year is added as an additional variable in the XML for each tech, the same way as <iCost> works for example. Then the dll reads the year of the current tech and decides if its early or on time or behind and adjusts your research rate against that tech accordingly. But as you can see, this one requires a lot more work; basically the ability to correctly add another variable in the XML and in the tech memory arrays, the ability to calculate years and turning them into turns. All of which is doable, but hard for me.
 
Nice idea. I actually like the simpler idea better than the one based on year of invention (not to mention that many of the 'techs' in BtS are in the wrong era anyway). And it's also easier to merge with different mods. There is one thing though, in every civ game ever the tendency is always relatively slow tech progress in the beginning and very fast tech progress in the end. The normal pace is rather something like a tech every 7-8 turns in the beginning and every 2-3 turn in the end. So you could perhaps tweak the calculation to take that into account.
 
Nice idea. I actually like the simpler idea better than the one based on year of invention (not to mention that many of the 'techs' in BtS are in the wrong era anyway). And it's also easier to merge with different mods. There is one thing though, in every civ game ever the tendency is always relatively slow tech progress in the beginning and very fast tech progress in the end. The normal pace is rather something like a tech every 7-8 turns in the beginning and every 2-3 turn in the end. So you could perhaps tweak the calculation to take that into account.

That's great feedback. Thanks, I can use this info.

So do you think it should remain like that? I actually would like to know how long should each section of the tech tree take, because I can adjust this progress to any rate I want and even give it curvature so its not always the same.
 
I'm not sure. I think players will have all kinds of opinions about that. Some faster progress in the beginning and a little slower in the end of a game wouldn't hurt game play. Maybe a good way would be to simply divide number of tech by era. And then create some tags for determining when every era is supposed to start. That way you can easily tweak the mod according to your preferences.
 
Back
Top Bottom