(March 2nd, 2015, 08:52)WhiteMage Wrote: kyrub et al.,
How does the MOO code generate researchable techs for each race? What is the exact algorithm? And probability?
Tech generation:
The algorithm for every 5-techs tier:
a) the techs are taken always from the top of the tier (starting with the highest level and going down)
b) Psilons are adjudged the ratio of 75%, every other race 50%
c) special exceptions for Silicoids are run (part of planetology techtree and the reduced waste tree is always skipped)
d) for every tech, the ratio from b) is compared to d1..100. If lower or equal to the result, the tech is admitted
e) except for the case if the total number of already admitted techs in this tier reached 3 (this may happen in weapon tree a bit more, especially with Psilons)
f) the results are arranged from lowest to highest and written
g) the program checks if the 5-tier has at least 1 tech researchable, if not we go back to a)
----------------------
After all techs are written, the whole file is re-checked for
a) the availability of at least 1 planetary shield technology
b) the availability of at least 1 IRC technology
c) the availability of at least 1 missile technology (scatter-packs included, torpedoes not included)
d) the availability of Range 4 or Range 5 technology (this is nonsense, obviously, because there has to be one of them in that tier already)
e) if one of these checks fails, the whole file of results is dumped and we restart.
Artifact - this seems so ridiculous, I am not even sure I read it right.
There are max 200 rounds of this:
a) a random tech field is chosen
b) d1..30 (yes you read right) is compared to current tech level of the field, if lower next round
c) else a check is run if the tech on that level exists
d) then a check if the tech was not already researched
e) then the is admitted
Derelict
the same, except that d1..31 is used.
Takeover
a) For every factory, d1..50 is compared to 1
b) For every hit from step a, the max number of tech chosens is increased
c) in last step, the available techs are taken one by one, until we reach the max number
If I understand well, the techs from Comp section are always first and the techs from weapons the last to take. This is very poor desing, something I have seen in AI tech stealing as well. I hope you change that.
Orion
no idea. See OSG.