Author Topic: Tech cost formula  (Read 4561 times)

0 Members and 1 Guest are viewing this topic.

Offline Yitzi

Tech cost formula
« 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.
« Last Edit: November 12, 2014, 06:32:45 AM by sisko »

Offline Ford_Prefect

Re: Tech cost formula
« Reply #1 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?



Offline Yitzi

Re: Tech cost formula
« Reply #2 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.

Offline Ford_Prefect

Re: Tech cost formula
« Reply #3 on: October 29, 2014, 03:07:27 AM »
Thanks for the clarification.  :D

Re: Tech cost formula
« Reply #4 on: October 22, 2018, 06:04:07 PM »
Sorry, misread the explanation. Deleting.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Kri'lan taught me of the resonance and how to feel it. After much training, I could see ? the very surface under our feet, Planet itself ? is a living, fluctuating nexus of energy, violent, beautiful and quite unstable. And I could also feel its cousins ? distant mirrors on the other side of the space-time continuum ? the far-flung Manifolds.
~Prophet Cha Dawn 'The Betrayer and I'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 36.

[Show Queries]