[BTS SDK] Varied Tech Costs

SevenSpirits

Immortal?
Joined
Jul 7, 2007
Messages
512
Varied Tech Costs 1.0
Compatible with Beyond the Sword.

Savegames are not compatible between this and normal BTS.

Note: this mod is based off of Bhruic's patch 1.101 for 3.13. All this means is that by using the included mod, you are also using that patch. No extra effort is required.

Download
http://forums.civfanatics.com/downloads.php?do=file&id=7458

Installation
Unzip into the <your_bts_folder>/Mods, so that inside Mods there is Varied Tech Costs, and inside that there is Assets.

Start the game and load the mod.

What does it do?
Varied Tech Costs adds some slight random variation to the costs of techs. It can do this both on a a global and on a per-player basis.

Why?
The normal tech tree is static, and although situations change from game to game, there are still always some techs that are great to rush to, and others that you should put off for a long time. If you play a lot, you probably know what these are and follow similar tech paths from game to game.

Having the costs of the techs vary a bit removes that. Now you have to reevaluate your tech path every game.

Varying the costs globally works fine for this. But per-player variation is cool too, for additional reasons. First, it makes it so you can research something that you are good at researching, and trade it to another player who researched something that they are good at. It makes it so the best tech path isn't the same for everyone. Second, the AIs normally tend to research a lot of the same stuff. This provides an additional factor that can make them choose different techs from each other and from you.

I like to have a combination of global variance and player variance, rather than just player variance. That way, if I see I can get Meditation for cheap, it might be because I have a competitive advantage at it... or, it might be because everyone does. I don't really know.

Personally, I've had a lot of fun with this. I had one game where I randomly came up as Julius Caesar in the jungle... and Bronze Working and Iron working were about 1.5 times their normal cost! That hole was hard to dig myself out of.

How?
I added five fields to GlobalDefines.xml. You can edit them if you want. They define normal distributions from which random variance is drawn and then applied to tech costs.
GLOBAL_TECH_COST_VARIANCE_MU and GLOBAL_TECH_COST_VARIANCE_SIGMA define the distribution that affects global tech costs. PLAYER_TECH_COST_VARIANCE_MU and PLAYER_TECH_COST_VARIANCE_SIGMA define the distribution that affects per-player costs.

TECH_COST_VARIANCE_MULTIPLICATIVE_MODE tells it whether to adjust them multiplicatively or additively. If it's 1, then "half cost" and "double cost" are opposite adjustments. If it's 0, then "+50% cost" and "-50% cost" are opposite adjustments.

So how do the distributions affect the costs? For each tech, a number is pulled from the distribution. With the default settings, this might be something like 0.1. (or -0.1). Then, if it's not in MULTIPLICATIVE_MODE, it adds one to that number and multiplies the result by the tech cost. If it IS in MULTIPLICATIVE_MODE, then instead it multiplies the tech cost by e^(that number). The results are pretty similar, with the major difference being that the former method can give more steeply discounted techs more frequently.

Each distribution is applied separately.

The default values are:
-Both variances are set to 0.15
-One of the means is set to -0.05
-The mode is 1 (multiplicative)

I chose multiplicative mode because I think in Civ, halving and doubling are a bit more opposite than adding or subtracting a percent. This is because techs get much more expensive the farther up the tech tree you go. To make up for the net increase in total tech cost, (e.g. 2 + 1/2 is more than the original 1 + 1), I reduced costs across the board by 5%. It's a small change.

Modder information
CvGameCoreDLL.dll (changed source files are included)
XML/GlobalDefines.xml (just added the new defines at the end)
 
Top Bottom