Latest topics

» Screenshots funny and serious :)
by Jamrom2 Today at 6:47 am

» Computer Overhaul
by frinik Today at 4:19 am

» New & Updated Models(Нові Моделі)
by will73 Yesterday at 5:45 pm

» Video from SF
by frinik Yesterday at 2:15 pm

» Місії на заказ/Mission request
by lockie Yesterday at 11:49 am

» Great pictures from the movies.
by woofiedog Sat Jul 22, 2017 8:38 pm

» Here's To Swimmin' With Bow Legged Women
by woofiedog Sat Jul 22, 2017 8:28 pm

» Effects. New textures. Experiments.
by woofiedog Sat Jul 22, 2017 1:07 pm

» Танк Пантера Д/А/Г/ Panther ausf.D,A,G
by frinik Sat Jul 22, 2017 4:12 am

July 2017

MonTueWedThuFriSatSun
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Calendar Calendar


    Randomness calculation

    Share
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3555
    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 Mon Jul 24, 2017 1:38 pm