Latest topics

» First battle of the T-26. 1936, Spain
by lockie Yesterday at 7:11 pm

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

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

» Video from SF
by plug_nickel Wed Sep 20, 2017 12:06 pm

» Українська локалізація/Ukrainian local
by will73 Wed Sep 20, 2017 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

September 2017

MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


    What does parameters of the object in SF?

    Share
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3643
    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:
    ...\data\k42\loc_rus\levels\levels\obj_cfg\objects\builds:
    //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".
    ...data\k42\loc_rus\levels\LEVELS\obj_cfg\objects\builds.engcfg

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

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

    //object name, located here: ...data\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:
    //data\k42\loc_rus\levels\LEVELS\common\common_res.engcfg
    //Entry:
    Code:
    tent_d,obj_cfg\objs.engcfg,01_d_fund_pl,dust_br,1,5,0,0,0,0,0,false;
    tent_d,obj_cfg\objs.engcfg,02_d_rama_pl,dust_br,1,0.145,2.227,1.066,15,,,true;
    destr_desc = tent_d;

    To be continued.

      Current date/time is Fri Sep 22, 2017 5:33 am