Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => The Theory of Everything => Topic started by: Yitzi on May 28, 2013, 06:11:49 PM

Title: Tech cost formula
Post by: Yitzi on May 28, 2013, 06:11:49 PM
Ok, I looked at the code and got the actual formula (there are a handful of missing pieces, though.)  So here's the formula; notable changes from the given formula are in bold:

TECHS: Techs you've discovered already (including trading/pods/artifacts, but not the ones you started with).  However, there's one variable that is added, and another that's subtracted; I'm not sure what they are, as I haven't found where they happen, but I think they're just discovered techs that are counted differently by the program (I think the one that's added is techs previously discovered this turn).  Minimum of 1, maximum of 4999.
MOSTTECHS: Highest number of techs discovered by anyone.  The same variable as before is added, but the one that was subtracted isn't here.
DIFF: This is 1 on citizen difficulty, 2 on specialist, 3 on talent or librarian, 4 on thinker, 5 on transcend.

The formula is then:
1. Find (DIFF*4)+8AIs instead use 29-(DIFF*3).  Apply to this a minimum of 12-TECHS, and a maximum of 12+TECHS.
2. Take TECHS, and subtract TURNS/8 (or TURNS/12 with tech stagnation), to a minimum of 0 and a maximum equal to the result of step 1 (or 1.5 times the result of step 1 with tech stagnation)
3. Add the result of step 2 to the result of step 1.
4. Take MOSTTECHS-TECHS and divide by 5, rounding up.  Subtract this from the result of step 3, but no more than 30% the result of step 3 (rounding normally) plus 1.  AIs instead divide by a number dependent on difficulty, ranging from 3 on Transcend to 8 on Citizen, and the maximum percentage ranges from 0% plus 1 on citizen to 50% plus 1 on transcend.
5. Take TECHS, and add 1 for factions with a natural penalty to research, or subtract 1 for factions with a natural bonus to research.  Apply a minimum of 1.  Multiply this by the result of step 4.
6. Modify by WORLDSIZE and faction and alpha(x).txt tech cost modifiers, and add 50% with tech stagnation.
Title: Re: Tech cost formula
Post by: Ford_Prefect on October 28, 2014, 12:55:42 PM
I have a question.

Quote
1. Find (DIFF*4)+8.  AIs instead use 29-(DIFF*3).  Apply to this a minimum of 12-TECHS, and a maximum of 12+TECHS.

What do you mean by apply?  Do you mean add, or something else?   Is it (DIFF*4)+8+12-TECHS and 29-(DIFF*3)+12+TECHS?
or is it 12 - (DIFF*4)+8?


Title: Re: Tech cost formula
Post by: Yitzi on October 28, 2014, 03:33:11 PM
I have a question.

Quote
1. Find (DIFF*4)+8.  AIs instead use 29-(DIFF*3).  Apply to this a minimum of 12-TECHS, and a maximum of 12+TECHS.

What do you mean by apply?  Do you mean add, or something else?   Is it (DIFF*4)+8+12-TECHS and 29-(DIFF*3)+12+TECHS?
or is it 12 - (DIFF*4)+8?

By applying a minimum/maximum, I mean enforcing that minimum/maximum.  So if difficulty is 5, so you get (DIFF*4)+8=28, but you only have 3 techs, step 1 gives you only 12+3=15.
Title: Re: Tech cost formula
Post by: Ford_Prefect on October 29, 2014, 03:07:27 AM
Thanks for the clarification.  :D
Title: Re: Tech cost formula
Post by: Alpha Centauri Bear on October 22, 2018, 06:04:07 PM
Sorry, misread the explanation. Deleting.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 14.

[Show Queries]