Latest topics

» Campaign "Steel Beast" (Pz.V "Panther") WIP
by mechanic Today at 12:29 pm

» Легкий танк Т-50/Light tank T-50
by will73 Yesterday at 10:00 pm

» Танк Пантера Д/А/Г/ Panther ausf.D,A,G
by lockie Yesterday at 5:52 pm

» il2 Sturmovik Stalingrad
by lockie Yesterday at 3:51 pm

» SF STA1.2 demo version?
by woofiedog Sun Nov 19, 2017 3:30 pm

» Video from SF
by geoweb35 Sun Nov 19, 2017 11:24 am

» How to get STA3.2 mod?
by lockie Sat Nov 18, 2017 6:18 pm

» STA(Steel Tank Add-on) 3.2 (Steel Fury)
by lockie Fri Nov 17, 2017 1:42 pm

» The Sun Comes Up, the Sun Goes Down
by woofiedog Thu Nov 16, 2017 9:17 pm

November 2017

MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   

Calendar Calendar


    What does parameters of the object in SF?

    Share
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3726
    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 Tue Nov 21, 2017 8:14 pm