Latest topics

» Computer Overhaul
by woofiedog Yesterday at 9:16 pm

» Twilight Zone
by woofiedog Yesterday at 3:17 pm

» New & Updated Models(Нові Моделі)
by Glushak Yesterday at 11:08 am

» STA v2.3 - Still No GMP 1, 2, and 3 Scenarios
by plug_nickel Yesterday at 10:52 am

» Video from SF
by plug_nickel Yesterday at 10:51 am

» Game Missions Pack #02 (GMP 2.37)
by Pointer Yesterday at 2:27 am

» Armor That Never Made the Battlefield
by woofiedog Wed Jul 26, 2017 5:24 pm

» Ukraine fights against enemy.
by lockie Wed Jul 26, 2017 4:43 pm

» The Sun Comes Up, the Sun Goes Down
by woofiedog Tue Jul 25, 2017 11:13 pm

July 2017


Calendar Calendar

    What does parameters of the object in SF?

    TSF Member
    TSF Member

    Posts : 3561
    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 Fri Jul 28, 2017 3:43 am