Latest topics

» STA(Steel Tank Add-on) 3.2 (Steel Fury)
by lockie Yesterday at 1:42 pm

» The Sun Comes Up, the Sun Goes Down
by woofiedog Thu Nov 16, 2017 9:17 pm

» Variants of the "Sherman"
by mechanic Thu Nov 16, 2017 12:19 pm

» The Soviet Story
by Tanker Wed Nov 15, 2017 3:15 pm

» Легкий танк Т-50/Light tank T-50
by will73 Tue Nov 14, 2017 6:19 pm

» Campaign: Otto Carius (WIP)
by lockie Tue Nov 14, 2017 11:57 am

» Lieutenant Z. Kolobanova "To Stand to the Death!" Battle of Voiskovitsy
by frinik Tue Nov 14, 2017 1:08 am

» Ukraine fights against enemy.
by lockie Mon Nov 13, 2017 2:17 pm

» Video from SF
by geoweb35 Mon Nov 13, 2017 1:00 pm

November 2017

MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   

Calendar Calendar


    Randomness calculation

    Share
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3720
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Randomness calculation

    Post by lockie on Thu Mar 19, 2015 4:22 pm

    SF may calculate randomness of the units appearing.
    Let's take T-34/76 dif. modifications.
    ...data\k42\loc_rus\levels\levels\common\common_units.engcfg
    In the block random()
    We may see the next random units under the common name rkka_mtank4.
    rkka_mtank4,rkka_t34_stz,rkka_t34_war,rkka_t34_183,,;
    where
    rkka_t34_stz,550,2,rkkau_t34_stz,1,rkka_crew_t34,1,,,,,,;//Stalingrad Tractor Zavod (STZ) production, 1942
    rkka_t34_war,550,0.5,rkkau_t34_war,1,rkka_crew_t34,1,,,,,,;//Autumn 1941 production
    rkka_t34_183,550,1,rkkau_t34_183,1,rkka_crew_t34,1,,,,,,;//Kharkiv Tractor Factory N.183, 1942
    2/0.5/1 are the numbers of randomness.
    The calculation is:
    2+0.5+1=3.5

    Thus:
    For rkka_t34_183 we've the next random:
    3.5=100%
    1=x%
    x=1*100/3.5=29%
    For rkka_t34_war x=0.5*100/3.5=14%
    For rkka_t34_stz x=2*100/3.5=57%

    Finaly the randomness of appearing under the unit name rkka_mtank4 will be:
    1. 57% appear rkka_t34_stz
    2. 27% appear rkka_t34_183
    3. 14% appear rkka_t34_war
    It does that in game more often will appear tank T-34/76 STZ, coz it has appearance=57%.

    Thanks to will73 for help.

      Current date/time is Sat Nov 18, 2017 9:33 am