Latest topics

» The Raging Bull
by woofiedog Today at 2:51 pm

» Errors 98% during mission download
by Kozak76 Today at 11:03 am

» Video from SF
by plug_nickel Yesterday at 12:06 pm

» Українська локалізація/Ukrainian local
by will73 Yesterday at 6:40 am

» black tanks
by eagle64 Tue Sep 19, 2017 10:32 am

» Video Achtung Panzer
by plug_nickel Mon Sep 18, 2017 1:45 pm

» 2.3 sta troubleshooting
by cftaurus Mon Sep 18, 2017 1:27 pm

» Ukraine fights against enemy.
by lockie Sun Sep 17, 2017 5:45 pm

» STA2.3 version
by mechanic Sun Sep 17, 2017 7:26 am

September 2017

MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


    Randomness calculation

    Share
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3642
    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 Thu Sep 21, 2017 6:59 pm