Latest topics

» Expanded Units MOD Update:
by KurtTank Yesterday at 8:27 pm

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

» STA 3.3 corrupt file ?
by lockie Yesterday at 6:09 pm

» Video from SF
by geoweb35 Fri Feb 23, 2018 10:35 am

» Ride the Tiger
by woofiedog Wed Feb 21, 2018 9:13 pm

» AnotherBattleEffectMOD(ABEM)for STA3.2
by woofiedog Wed Feb 21, 2018 8:50 pm

» Screenshots funny and serious :)
by woofiedog Wed Feb 21, 2018 8:47 pm

» Варіанти Т-34-76 в житті та в грі (T-34 variants live and game)
by woofiedog Wed Feb 21, 2018 8:18 pm

» Ukraine fights against enemy.
by lockie Tue Feb 20, 2018 3:55 pm

February 2018


Calendar Calendar

    What does parameters of the object in SF?

    TSF Member
    TSF Member

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

    What does parameters of the object in SF?

    Post by lockie on Sun Oct 26, 2014 8:24 pm

    This is a very interesting topic! Coz in spite the request: we need more new tanks - this request does nothing. And u know why. To make new battle with new tanks we need new polygon, i.e. for the Africa mission or Europe campaign. It does that new polygon BADLY needs new objects (houses, fences, courtyard ones, etc ...)!
    Or for each new mission we've to use what we already have. And to provide more atmosphere of the mission, each time to start the mission we must close our left/right eye and imagine that we take place in the Western Europe or in Africa Cool (Khm-m, du they know it's an acid?)
    Suppose, there are enough questions, let's start what the parameters of the SF objects does Smile
    First of all I'd like to pay attention to the "flag". In our case term "flag" does feature of the object.
    Usually, there are four flags to be used:
    //0x01 - take the shadow: suppose it does to operate with shadow calculating
    //0x02 - take the track: suppose it does to have track`s print on the object or go along the bridge without damaging
    //0x04 - it's easy one - does object is transparency for AI
    //0x08 - means object has no collisions for the infantry
    //0х20 - for beauty, means does nothing

    I'll continue on with flags, but let's see how to add one flag to other.
    This is 16hex calculation. Means we may calculate to "9", then start ridiculous for us human things, but not for the PC Smile
    I.e 10 means A, 11 means B
    12 - C
    13 - D
    14 - E
    15 - F
    It's enough, give PC calculator a job Smile

    So, we want to make barrage, i.e. "sand bag". It must has the next features:
    - no collisions for the infantry  (flag 0x08)
    - take the track (flag 0x02)
    It does: 08+02=10 in hex 0xa
    And infantry will go through our "sand bag" without problem. BUT it won't be fun! let's make each soldier jump over the fence/barrage.
    In this case our flag is equivalent to 0x0e. It does "14", means: 8+4+2=14.
    There are some common flags:

    0x10 - house
    0x28 - bush_sp1 flora
    0x2c - bushn1 flora
    0x1b - part of bridge
    0x0a - concrete block
    0x0b - bridge
    0x0c - wire barrage

    Let's have a look on the building "tent".\k42\loc_rus\levels\LEVELS\obj_cfg\objects\builds.engcfg

    //object type for map
    type = %OT_BUILDING%;

    //model name, located here:\k42\loc_rus\go\builds\
    mesh = tent01;

    //object name, located here:\k42\loc_rus\text\STA_units.text
    name = txt_ob_tent;

    //LOD's quantity, could be "0" means there is only one LOD, i.e. for grass or simple object like stick
    mesh_lods = 3;

    //weight, "-" means how long object will fly
    wei = -10;

    //material, unfortunately there was no cotton, so I used wood
    material = wood;

    //solidity (impulse). How easy object could be destroyed under hit of shell or tank pushing. Usually for the houses the values are "30 000".
    imp = 5000;//tank pushing
    imp_dem = 4500;//shell hit

    //fire probability, for the house the value is 0.15
    flame_p = 0.10;

    //collision type
    flags = 0x10;

    //shared net, I've no idea what it does. Leave as it is.
    shared = true;

    //destruction name. this variables consis of many parts, which which will appear after building will be
    //destroyed. Located here:
    destr_desc = tent_d;

    To be continued.

      Current date/time is Sun Feb 25, 2018 2:45 am