Tech Diffusion

Hey Afforess,

Do you think you can slow the tech spread rate down a bit? I liked the balanced back in AND, which was significantly slower. You normally don't really notice it unless you are an era behind...but right now, I can often get half a dozen techs cheaply every time I research one expensive tech (e.g., after I rush iron working, all the ancient techs are basically half way done) All in all, seem to make the game a lot easier for human players AFAICT.

But of course, designer's decision :D

Tech diffusion doesn't start until you are at least 6 techs behind the lead technological players, but that can be easily modified to whatever you want. Do a test for me. Open the TechDiffusion.lua and change these values on the top of the file to

Code:
iTechsBehindReq = 12;
iTechsBehindFullBenefit = 24;

And see how you like it. I appreciate the feedback, you seem to be the first to report back, other than the v1 bug reports. ;)
 
btw, Emigration does not use InGame.xml

So since Emigration does not use Ingame.xml there should be no conflicts or what?

Asking because it's still listed as an incompatible mod in the top post.

EDIT: Sorry: misread it, you say Treegrowth is incompatible. Damn, I use that one and like it too.

\Skodkim
 
I appreciate the feedback, you seem to be the first to report back, other than the v1 bug reports. ;)

Here's some feedback.
I love the basic concept of the mod; too many games on the middle difficulties end up with a huge tech gap. On Prince, in most games I'll have a 15-20 tech lead once I'm in the Modern era, with my civ building every wonder before the others even reach those techs. Last night I was gifting Giant Death Robots to city-states at war, and watching them conquer the #2 and #3 civs. (I don't want to bump up to much higher difficulties because of all the OTHER bonuses the AIs get there.)

So yes, returning a Civ4-style Tech Diffusion is a HUGE plus, and I was a bit disturbed to hear that this wasn't in the core game already. I'd personally recommend against stacking in too many features, though; I'd bet a lot of us like the basic concept but don't really want too many hidden factors, especially since human players will be much better at controlling those factors than an AI would. Maybe just make a "Basic" and an "Advanced" version of the mod if you want to continue stacking functionality on. If not, I'll have to integrate the core part of this mod into my own works (with credit attributed, of course) in its most basic form.

That being said, I haven't looked through the code myself, so I have no idea if some of the following are possible, but I'd really like to see several "stubs" added so that users can tweak the tech diffusion through simpler XML changes within their own mods. Changing the starting values is the obvious thing, but I'm talking about integration into other XML files. For instance, I'd like:
1> The ability to only have Tech Diffusion start at a specific tech (for both the person gaining the bonus AND the AIs who are checked)
2> The ability to automatically increase the diffusion rate at certain techs
3> The ability to increase the diffusion rate by building certain buildings/wonders

Let me explain. I'm working on an Alpha Centauri mod, with most of the SMAC tech tree basically stuck onto the end of the modern era. Tech Diffusion would go a long way towards ensuring that the game even makes it to those eras, but I wanted a bit more.
Two of the wonders I was planning had been based on the Civ4 "Internet" wonder (gain a tech if three other civs have it). The Planetary Datalinks was a National wonder that would give you a tech if four others had it, and the endgame Telepathic Matrix world wonder would give you a tech if ANY others had it. But I actually like your diffusion concept better, which means I just need to be able to tweak the values on the fly.

Using your notation, I'd like iTechsBehindReq to start at, say, 8, once you reach Writing. Reaching the Computers technology would change it to 6. Building the Planetary Datalinks would change it to 4. Building the Telepathic Matrix would change it to 1.

So, is this possible?
 
Here's some feedback.
I love the basic concept of the mod; too many games on the middle difficulties end up with a huge tech gap. On Prince, in most games I'll have a 15-20 tech lead once I'm in the Modern era, with my civ building every wonder before the others even reach those techs. Last night I was gifting Giant Death Robots to city-states at war, and watching them conquer the #2 and #3 civs. (I don't want to bump up to much higher difficulties because of all the OTHER bonuses the AIs get there.)

So yes, returning a Civ4-style Tech Diffusion is a HUGE plus, and I was a bit disturbed to hear that this wasn't in the core game already. I'd personally recommend against stacking in too many features, though; I'd bet a lot of us like the basic concept but don't really want too many hidden factors, especially since human players will be much better at controlling those factors than an AI would. Maybe just make a "Basic" and an "Advanced" version of the mod if you want to continue stacking functionality on. If not, I'll have to integrate the core part of this mod into my own works (with credit attributed, of course) in its most basic form.

Glad you like it. So far, it doesn't do anything fancy, just what the OP says it does.
That being said, I haven't looked through the code myself, so I have no idea if some of the following are possible, but I'd really like to see several "stubs" added so that users can tweak the tech diffusion through simpler XML changes within their own mods. Changing the starting values is the obvious thing, but I'm talking about integration into other XML files. For instance, I'd like:
1> The ability to only have Tech Diffusion start at a specific tech (for both the person gaining the bonus AND the AIs who are checked)
2> The ability to automatically increase the diffusion rate at certain techs
3> The ability to increase the diffusion rate by building certain buildings/wonders

Let me explain. I'm working on an Alpha Centauri mod, with most of the SMAC tech tree basically stuck onto the end of the modern era. Tech Diffusion would go a long way towards ensuring that the game even makes it to those eras, but I wanted a bit more.
Two of the wonders I was planning had been based on the Civ4 "Internet" wonder (gain a tech if three other civs have it). The Planetary Datalinks was a National wonder that would give you a tech if four others had it, and the endgame Telepathic Matrix world wonder would give you a tech if ANY others had it. But I actually like your diffusion concept better, which means I just need to be able to tweak the values on the fly.

Using your notation, I'd like iTechsBehindReq to start at, say, 8, once you reach Writing. Reaching the Computers technology would change it to 6. Building the Planetary Datalinks would change it to 4. Building the Telepathic Matrix would change it to 1.

So, is this possible?

Sure. It would be easy. Check that the player has the tech, and if he does, change the number. ;)
 
Sure. It would be easy. Check that the player has the tech, and if he does, change the number. ;)

Well, it'd be easy to put the change into the Diffusion logic, presumably, but how about the OTHER direction? What I'm asking is, can you make the Diffusion mod such that someone can integrate this into their own XML scenario mod without having to change the parameters the diffusion mod itself uses (which'd affect other mods as well)? One single, tunable Diffusion mod usable by dozens of other people, instead of each having to make a unique version of the mod for each scenario they want to make?

Ideally, there'd be a new table stub in CIV5Technologies.xml for "DiffusionRate". Setting it to, say, "-2" would reduce the default value (8 in this case) to a new value (6). And if the default is 6 and I wanted my particular mod to start it at 8, I'd just put +2 at Agriculture. Possibly invert the signs to stick with the "positive numbers are good" convention of Civ5.

And the Wonders part is the critical one. I can live with a flat value of 6 for the early eras, but I really need the ability to give a better diffusion to those wonders I'd mentioned. If need be I'm sure I can make a version specific to my mod that checks for WONDER_PLANETARY_DATALINKS and such, but my question is whether it would be possible to add a generic DiffusionRate entry into the CIV5Buildings.xml file for anyone else to use.
 
Well, it'd be easy to put the change into the Diffusion logic, presumably, but how about the OTHER direction? What I'm asking is, can you make the Diffusion mod such that someone can integrate this into their own XML scenario mod without having to change the parameters the diffusion mod itself uses (which'd affect other mods as well)? One single, tunable Diffusion mod usable by dozens of other people, instead of each having to make a unique version of the mod for each scenario they want to make?

Ideally, there'd be a new table stub in CIV5Technologies.xml for "DiffusionRate". Setting it to, say, "-2" would reduce the default value (8 in this case) to a new value (6). And if the default is 6 and I wanted my particular mod to start it at 8, I'd just put +2 at Agriculture. Possibly invert the signs to stick with the "positive numbers are good" convention of Civ5.

And the Wonders part is the critical one. I can live with a flat value of 6 for the early eras, but I really need the ability to give a better diffusion to those wonders I'd mentioned. If need be I'm sure I can make a version specific to my mod that checks for WONDER_PLANETARY_DATALINKS and such, but my question is whether it would be possible to add a generic DiffusionRate entry into the CIV5Buildings.xml file for anyone else to use.

Sure... I think. Early reports say that you can add new XML columns, and the SQL database reads them, just that the DLL has no clue about them. But Lua could use them.

Let me test some new XML parameters for you. ;)
 
Yes - You can add new columns to XML tables, at least with SQL. I'd be more than happy to supply some tags for you to modify diffusion with. Could you make a list for me?
 
Yes - You can add new columns to XML tables, at least with SQL. I'd be more than happy to supply some tags for you to modify diffusion with. Could you make a list for me?

Personally, I'd say you'd want:

GlobalDefines.xml:
DiffusionAmount (don't know the math you use, but this'd be an integer percentage at the full separation, i.e. "10" might mean you get 10% of the price of a tech per turn if every other civ already has it.)
DiffusionTechsBehind (default 12) - the number of techs at which you get full benefit
DiffusionStartMultiplier (default 50) - multiplier (in percent) at which the benefits of diffusion start, so by default you'd get no diffusion until you were 6 techs back. If you want the full benefit to be at 12 techs but that there'd be a benefit at even 1 tech back, just set this to 0.

Technologies.xml
DiffusionPrereqTech (boolean, default false)- is this the prereq tech to turn on diffusion at all? Ideally, it'd make sure that all civs involved reached this tech when calculating the bonus.
DiffusionTechsChange (default 0) - improvement to DiffusionTechsBehind as the result of reaching a tech, integer difference, positive meaning good (so "2" means change the 12 to a 10, which'd change the 6 for the partial diffusion to a 5 as well.)
DiffusionAmountChange (default 0) - increase to DiffusionAmount as the result of reaching a tech
(I don't think you need a DiffusionStartMultiplierChange.)

Buildings.xml
DiffusionTechsChange (default 0) - change to DiffusionTechsBehind as the result of building a building/wonder, similar to above
DiffusionAmountChange (default 0) - see above

While I didn't put DiffusionAmountChange in my original suggestion, it's exactly the right sort of effect to tie to the Nethack Terminus wonder. So if it's possible, this'd be really nice.

I'd think that should do it; I don't think there'd be a point in tying it to a unit or anything, although maybe you'd want to add the Buildings entries to the Projects.xml table as well for completeness.
 
I've tried the mod. I like the idea, but my opinion is that the diffusion is too fast and shouldn't begin until you've reached some point in the tech tree. Looking forward to updates ^^
 
Hi, Afforess. I'm glad to see that you have already begun to mod in Civ5. I will download and use it right now~ lol

BTW. Do you have a plan of moving the AND to Civ5? At the least for just moving the techniques tree and the buildings, units with it. ( All right, I agreed about that to add these have already made it a huge project. )
 
No, I don't have a plan, or timetable. I plan on leaving the addition of new content to other players. I personally dislike adding new content, I find it tedious and boring, and other modders seem to like it well enough, so I'll just let them do it. That's why I built AND ontop of RoM, so I could avoid adding new content. In AND, I have created very little content myself, most of it has been borrowed from others.

I much prefer adding new features, and you'll notice that all my Civ5 mods are what I consider, feature mods, not content mods. They add new abilities without adding new objects. That was my style with AND as well, and I plan on continuing it.

Zappara and others I've collaborated with are already aware of my wishes, and I plan on being the one adding new features Zappara needs, or players want, instead of creating content.
 
No, I don't have a plan, or timetable. I plan on leaving the addition of new content to other players. I personally dislike adding new content, I find it tedious and boring, and other modders seem to like it well enough, so I'll just let them do it. That's why I built AND ontop of RoM, so I could avoid adding new content. In AND, I have created very little content myself, most of it has been borrowed from others.

I much prefer adding new features, and you'll notice that all my Civ5 mods are what I consider, feature mods, not content mods. They add new abilities without adding new objects. That was my style with AND as well, and I plan on continuing it.

Zappara and others I've collaborated with are already aware of my wishes, and I plan on being the one adding new features Zappara needs, or players want, instead of creating content.

I'm with you there. :lol: The newest civ I've designed for RifE was designed solely to show off new features I wanted to add (Specifically, the ability to gather commerces from trade routes, and the ability to modify trade commerce/yields via building as well as trait). It's always more interesting to add features.
 
I'm with you there. :lol: The newest civ I've designed for RifE was designed solely to show off new features I wanted to add (Specifically, the ability to gather commerces from trade routes, and the ability to modify trade commerce/yields via building as well as trait). It's always more interesting to add features.

It's nice to see I'm not the only one who dislikes adding a lot of content. I'll break down and add a tech or two, but honestly, I added far more C++ code in AND than I did XML. Probably 25:1 ratio.

Anyway, I plan on add new XML columns for this mod and Active City defense so that other XML mods can use it easily, and have XML modify the effects very easily.
 
This mod is obviously a great idea for backward or liberated AI. But in the first game in which I used it, following an unusual beeline gave me four free techs from the start of the tree. It's never been that many since, but shouldn't there be a way to prevent a successfully researching human player to effectively get a bonus?
 
All my mods are public domain, no copyrights of any kind. Use at will.
 
this mod is a bit outdated: it uses a pPlayer:IsWorkingWithPlayer function, which is not more available. I have slightly modified it: using pPlayer:IsFriends instead of the above, also added extra buffs with Defensive Pact, Declaration of Friendship (with major civ), or ally with minor. So the whole list of conditions is:
  1. Current Era < Others Current Era
  2. At war
  3. Allows open borders
  4. Friends
  5. Ally of minor
  6. Defensive Pact
  7. DoF

I also made it lesser verbose in FireTuner, with one summarizing line for each civ. It looks like:
Code:
TechDiffusion: Free Beakers for Siam: 432 in 10 tech(s)

See attachment.
 

Attachments

  • TechDiffusion.zip
    1.8 KB · Views: 105
this mod is a bit outdated: it uses a pPlayer:IsWorkingWithPlayer function, which is not more available. I have slightly modified it: using pPlayer:IsFriends instead of the above, also added extra buffs with Defensive Pact, Declaration of Friendship (with major civ), or ally with minor. So the whole list of conditions is:
  1. Current Era < Others Current Era
  2. At war
  3. Allows open borders
  4. Friends
  5. Ally of minor
  6. Defensive Pact
  7. DoF

I also made it lesser verbose in FireTuner, with one summarizing line for each civ. It looks like:
Code:
TechDiffusion: Free Beakers for Siam: 432 in 10 tech(s)

See attachment.

Sounds good - I'll give it a try!
 
Just to let people know, this mod messes up the free Great Person you get from the Meritocracy policy. Could it be ingame.xml causing problems? (I'd heard using that has issues)
 
Top Bottom