Latest topics

» Woofie the Dog's Skin Shop
by KurtTank Today at 2:35 pm

» STA(Steel Tank Add-on) 3.3 (Steel Fury)
by lockie Today at 7:37 am

» SSM 2.7 how can i get this file????
by matrix501 Today at 3:15 am

» Як скачати СТА3.2?
by matrix501 Today at 12:30 am

» new to steel fury
by matrix501 Yesterday at 10:25 pm

» Screenshots funny and serious :)
by woofiedog Yesterday at 5:28 pm

» Ukraine fights against enemy.
by lockie Sun Mar 18, 2018 12:16 pm

» Game Missions Pack #04 (GMP 4.16)
by lockie Thu Mar 15, 2018 1:07 pm

» New & Updated Models(Нові Моделі)
by will73 Tue Mar 13, 2018 2:52 am

March 2018


Calendar Calendar

    Vehicles import tutorial

    TSF Member
    TSF Member

    Posts : 3775
    Join date : 2014-07-24
    Age : 51
    Location : Ukraine, Kyiv

    Vehicles import tutorial

    Post by lockie on Thu Nov 13, 2014 3:15 pm

    This is a very tricky and interesting topic, because every user wants to know what does armor_str, how to force vehicle to move, what the gunsight is attached to etc.
    Useful links:
    1. Import 3D model infantryman by will73.
    2. How to implement the building by MaxFH.
    3. Mounting infantry on the tank by lockie
    4. Unit decoding by lockie
    5. How to put already prepared 3D model in the game/Як вставити модель ВЖЕ ГОТОВОЇ техніки в SF(UA language). Tutorial by lockie, post N6.


    This example is based on the config from the "Panther G":
    It is located here:\k42\loc_rus\levels\levels\tech_cfg\pantherg.engcfg

      //object/vehicle type, mark on the map
      type    =   %OT_TANK%;
      //mesh (*.go) filename
      mesh   =   pantherg;
      //number of LODs, 3 Lods is the most wanted. Works with fewer but more lods is better!
      mesh_lods=   2;
      //weight in kilograms
      mass   =   44800;
      //height. depends on where the center of the vehicle is located. Usually, 2m.
      drop_h   =   2.0;
      //points (of mass * distance from center of gravity)
    To calculate check out FAQ, post #6 Q:What is parameter "center mass"?
      //Battle efficiency. How many soldiers cost the unit. In our case Panther corresponds to 17 soldiers.
      effect   =   17;
      //name (for localization files) This is for the name that shows up in the editor and in the game. Found here: Steel Fury - Kharkov 1942\data\k42\loc_rus\text\STA_units.text
      name   =   txt_tn_pantherg;

      //engine torque in kg*m
      engine_m   =   1000.0;
      //engine power in HP
      engine_pow   =   700;
      //define the inertia of the engine
      eng_tau      =   0.5;

      //engine friction coefficient
      eng_friction   =   2000;
      //engine RPM
      min_w      =   600.0;
      max_w      =   3200.0;

      //gear ratios
      gear_k      =   -2.6, 0, 3.45, 2.0, 1.8, 1.5, 1.0, 0.7, 0.46;
      //Efficiency of gear in %
           //gear_kpd   =   1.0, 1.0, 1.0, 0.8, 0.6, 0.5, 0.4, 0.3, 0.2;
      gear_kpd   =   1.0, 1.0, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.08;
      //sound list (for voice commands)
      snd_list   =   levels\levels\common\snd_list_ger.engcfg;

      //fuel consumption for 100km
      fuel_rash   =   300;
      //fuel tank capacity in litres
      fuel_tank   =   730;
      //battery capacity in Ampere/h
      acc_capacity   =   300;
      //battery consumption for engine start, in Amperes
      eng_start_cur   =   600;
      //onboard systems consumption in Amperes
      suo_cur      =   20;
      //engine electric consumption, in Amperes (0 for diesel engines)
      eng_cur      =   10;
      //Electric current generated by the engine, KW
      gen_power   =   3;

      //list of crew members defined in common_units and places.cfg
      wp_decode   =   wp_driver, wp_gunner, wp_commander, wp_loader, wp_mgunner;  
      //tank tracks sound
      snd_pillars   =   track_panther;
      //engine sound
      snd_engine   =   diesel_5;
      //gearbox sound
      snd_gear   =   gear;
      snd_starter   =   starter_panther;

      //sound frequency, Hz
      sndp_base_freq   =   22000;
      //change the frequency of the current sound
      sndp_base_freq_k =   0.5;

      //base frequency of the engine sound, Hz
      snde_base_freq   =   22000;
      //scaling coefficient for engine sound frequency
      snde_base_freq_k =   3.0;

      //defines the width of a ford that can be crossed and enable to avoid bumping with other units. Higher value is better for bumping, but bad for the ford crossing.
           If value "10"  then it has 100% probability it will drown in the river. Mostly it's length of the vehicle
      bb_round   =   5.0;

      //configuration of the interface
      interf_cfg   =   interf\interf.engcfg;
      //deformation, use only for the guns and trucks
     // deform         =    true;
      //armor thickness, mm
      armor_thick   =   100;
      //armor thickness for AI
      arm_fwd      =   80;
      arm_side   =   60;
      arm_back   =   40;
      arm_up      =   17;

      //Visibility (high/low profile)
      vis_factor   =   2.5;

      //armor map
      armor_map   =   armor_maps\pantherg_armor.tga;
      //armor quality
      armor_qual   =   1.0;
      //armor fragility, less fragility - less chance that crewmember will be hit. Ideal value is "0" - no fragments at all.
      armor_frail   =   0.3;
      //armor strength! empiric coefficient to define the hardness of the armor. Usually it has value "2000". In case of hardened surface armor (i.e. BT-5), then coefficient should be 2100. Let's say each "100" will add ~30mm additional armor.
      armor_str   =   2100;

      //rotate by hands. For AA guns, i.e. Flak 36 or mortar
      //manual_rot      =   false;
      //stationary unit. For AA guns, i.e. Flak 36 or pillboxes
      //immobile      =    true;

      //exhaust smoke fragment name
      smk_gen   =   s_smoke_01, s_smoke_02;

      //cockpit config file, interior model file is explained in this file
      cocpit      =   cocpits\coc_pantherg.engcfg;
    //fake_cocpit = true;//don't show cockpit model, for APC

      //dummy for water crossing
      water_line   =   s_waterline;

      //trailer dummy, hookpoint or hitch. not implemented. this parameter is unuseful.
      pricep      =;

      //moved by hands. for guns
      //move_hands   =;

      //no shadows, used for example on the planes
      //no_shadows   =   true;

    And now the entries like wheels and sights:
    Most entries are taken from the panther but there are others as well!

    How these lists work.

    First is the name of which entry in your tech.cfg file it is. The tech files are located here: Steel Fury - Kharkov 1942\data\k42\loc_rus\levels\LEVELS\tech_cfg, in this example we partly are using pantherg.engcfg as an example
    Second is a number on which parameter it is on that entry and an explanation on what that entry does.
    Third, an example of an entry with the numbers above.

    In your tech.cfg

    1. cpillars()

    2.  1      Name of the track in your common_res
         2      Weight
         3      Left lever, braking when turning left
         4      Right lever, braking when turning right
         5      Drive type
         6      Friction
         7      Maximum adherence when clutching gear, clutch slip, higher number stronger clutch
         8      Traction weight
         9      Step for splitting geometry. Lower number more steps on the tracks, 0.1 is good enough and recommended.
         10      Coefficient modifier
         11      Traction sideways, higher number more traction. Good setting for making bigger tanks turning slower and feel more "heavy"
         12      Number of wheels, count the wheels on your model and in your tech.cfg file
         13      List of wheels, check your tech.cfg
         14      The path of where the tracks are attached on/by the wheels

    3.     1          2  3  4   5  6         7       8    9     10   11     12  13                                                        14
           jtiger_r, 1, 1, 0,  1,  0.002,  1000, 1.0, 0.1, 1.0, 1.3,   11,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10,        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2;
           jtiger_l, 1, 0, 1,  1,  0.002,  1000, 1.0, 0.1, 1.0, 1.3,   11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,  21,   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2;

    And now the entries:


    1    Name of the wheel in your mesh/go file
    2    Lower damping
    3    Upper damping
    4    spring rate
    5    Mass/weight
    6    Powered wheel for cars/trucks, For tanks it is the drive sprockets
    7    Steering wheel, ruler wheel
    8    direction of the individual movement (true/false)
    9    Suspension travel Y Axis, left/right               \
    10   Suspension travel z Axis, up/down                } should be 0 (zero) for drivesprockets and idler wheels
    11   Suspension travel x Axis, forward/backward   /  
    12   Maximum upper displacement
    13   Maximum lower displacement
    14   Steering ratio
    15   Moment on inertia on wheels, on tracked wheels no difference.
    16   Braking power, must use on wheels that have contact with ground
    17   Friction when staying still
    18   Radius modifier (track placement against the wheel, higher number closer to the wheel, used on for example the drive sprockets)
    19   Adhesion, stuck on ground, clutch steering
    20   Resistance to turn

    1                 2           3            4              5   6  7        8      9  10 11  12   13    14   15    16     17      18     19   20
    d_wheel_01,  kv1dn_d, kv1up_d, kv1spr_t,   40, 0, false,  true, 0, -1, 0,   0.0, 0.0,  0.0, 30.0, 90.0, 0.001, 0.05, 1.0, 1.0;
    d_wheel_02,  kv1dn_d, kv1up_d, kv1spr_t,   40, 0, false,  true, 0, -1, 0,   0.3, 0.1,  0.2, 30.0, 90.0, 0.001, 0.0,  1.0, 1.0;
    d_wheel_03,  kv1dn_d, kv1up_d, kv1spr_t,   40, 0, false,  true, 0, -1, 0,   0.2, 0.1,  0.2, 30.0, 90.0, 0.001, 0.0,  1.0, 1.0;
    d_wheel_04,  kv1dn_d, kv1up_d, kv1spr_t,   40, 0, false,  true, 0, -1, 0,   0.2, 0.1,  0.2, 30.0, 90.0, 0.001, 0.0,  1.0, 1.0;
    d_wheel_05,  kv1dn_d, kv1up_d, kv1spr_t,   40, 0, false,  true, 0, -1, 0,   0.1, 0.0,  0.0, 30.0, 90.0, 0.001, 0.0,  1.0, 1.0;


    1    Name of the track in your common_res
    2    Weight
    3    Left lever, braking when turning left
    4    Right lever, braking when turning right
    5    Drive type
    6    Friction
    7    Maximum adherence when clutching gear, clutch slip, higher number stronger clutch
    8    Traction weight
    9    Step for splitting geometry. Lower number more steps on the tracks, 0.1 is good enough and recommended.
    10   Coefficient modifier
    11   Traction sideways, higher number more traction. Good setting for making bigger tanks turning slower and feel more "heavy"
    12   Number of wheels, count the wheels on your model and in your tech.cfg file
    13   List of wheels, check your tech.cfg
    14   The path of where the tracks are attached on/by the wheels

    1          2  3  4   5  6         7       8    9    10   11     12   13                                                       14
    jtiger_r, 1, 1, 0,  1, 0.002,  1000, 1.0, 0.1, 1.0, 1.3,   11,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10,        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2;
    jtiger_l, 1, 0, 1,  1, 0.002,  1000, 1.0, 0.1, 1.0, 1.3,   11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,  21,   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2;


    1.  name of fragment on your model
    2.  name of wheel connected infront of suspension arm
    3.  name of wheel connected behind of suspension arm

    1                2                  3
    d_caret_00,  d_wheel_01 ,               ;
    d_caret_01,  d_wheel_02 ,               ;
    d_caret_02,                    ,d_wheel_03;
    d_caret_03,                    ,d_wheel_03;

    A few notes about carets, or suspension. Game engine makes a difference between left and right side, so depending on which side
    the arms is gonna be you need to change if suspensions attachment to the hull is infront or behind the wheel!


    1.   Turret name for weapons() entry and your workplaces.cfg
    2.   Traverse fragment, the turret for example
    3.   Elevation fragment, a gunmantle for example
    4.   Traverse - left in degrees
    5.   Traverse - right in degrees
    6.   Elevation up in degrees, for the gunmantle
    7.   Elevation down in degrees, for the gunmantle
    8.   Traverse speed deg/sec
    9.   Elevation speed deg/sec
    10.   Electrical traverse speed deg/sec
    11.   Electrical elevation speed deg/sec

    1            2                3                4       5      6     7      8    9   10  11
    head1,     db_head,     d_gunmask,  180,  180,  18,   8,     20, 10, 30, 0;
    head2,     d_mgun_02, d_mgball,       14,    14,   7,   7,     30, 10,   0, 0;


    1.   Name of weapon, must be same as the weapon entry in common_res
    2.   Dummy from where the shot is fired
    3.   Recoil fragment
    4.   Turret on which the gun is mounted
    5.   Loaders workplace. The crew member that is loading this weapon. Use workplaces tech file
    6.  Dummy for gun breech, used for interiors, so not necessary if no interior exist!
    7.  distance of the gun breech
    8.  the position of the shell/case
    9.  ?
    10. ?

    1         2                   3          4        5               6         7      8   9  10
    KWK42, s_gun,           db_gun, head1, wp_loader,  s_klin,   0.1,   0, 1, 0;
    MG34,   s_mgun_01,             , head1, wp_loader;
    MG34,   s_mgun_02,             , head2, wp_mgunner;


    1.   Name of ammunition, must be same as in common_res
    2.   Amount/quantity of ammo
    3.   ?
    4.   the number on the keyboard when changing ammo. 0 corresponds key 1

    1               2      3  4
    PZGR39_42, 37  , 0, 0;          
    PZGR40_42, 5    , 0, 0;
    SPRGR_42,  40   , 0, 1;

    BUL_792, 4800;


    1.   Sight name for the vehicle
    2.   Camera dummy, same name as the camera on your 3d model
    3.   This is the reticle name, taken from your common_res file
    4.   Gunsight shaking
    5.   Group of sights, what crewmember is using it
    6.   Modelled part of rotating sights, for example the drivers sight on the panther g

    1                      2                                 3                     4        5
    sig_gunner,        s_camera_gunner,            tzf5fn,              0.0,    sig_gunner, ;
    sig_driver,          s_camera_driver,             pz4_sight,         0.0,    sig_driver, ;
    sig_mgunner,      s_camera_mgunner,          pz4mgun,          0.0,    sig_mgunner, ;
    sig_mgunner,      s_camera_mgunner2,        pz4_sight_hole,  0.0,    sig_mgunner, ;
    sig_commander,  s_camera_commander_01,  pz4_sight,         0.0,   sig_commander, ;


    1.   What crewmember is using the hatch
    2.   Name of the hatch on your 3d model
    3.   How many degrees its opening
    4.   How many snaps of the hatch untill fully opened
    5.   Opening "snap" when starting the game

    1                      2                       3     4  5  6
    commander,        d_hatch_01,       115, 1, 0, 1;


    1.  Fragment name, part on your 3d model
    2.  Number in percents chance. How randomly the fragment is gonna be used when loading game. 0 is never, 1 is always

    1                    2
    d_schurzen_01, 0.0;
    d_schurzen_02, 0.0;

    Now its time for crew places config. This file you find here: Steel Fury - Kharkov 1942\data\k42\loc_rus\levels\LEVELS\tech_cfg\misc

    And the entries:

    1 Name of the crewmember, use: list of crewmembers in the tech.cfg and also work_places() in the tech.cfg
    2 Flags, see the list below! This is mostly ai behavior, what can it do and what cant it do.
    3 Importance of the place, which will be occupied in first turn, if crew-member dead
    4 What is the crewmembers controls, guns etc, other words what work does he have!
    5 Add turrets name ie: head1, head2 etc, find these in your tech.cfg file.
    6 User interface for the crewmember
    7 What sights and optics is it using, check sights() in the tech.cfg Group of sights, should be in your tech.cfg
    8 What crewmember is responsible for that hatch. This crewmember opens that hatch mentioned in your tech.cfg
    9 Dummy name in your mesh/go file for that crewmember. Dummy of the working place inside tank. Where gunner will take place s_gunner, where commander will take place s_commander etc
    10 Dummy name in your mesh/go file for that crewmember when unbuttoned
    11 Mesh hitbox for that crewmember
    12 Mesh hitbox for that crewmember when unbuttoned
    13 Dummy name in your mesh/go file for that crewmember when bailing out
    14 Name of the crewmembers mesh/go file, it is also for the animations. Check anims.engcfg
    15 Name of animations, check \levels\levels\common and file anims.engcfg

    1             2       3      4        5          6         7            8       9           10                 11        12                13                14             15
    wp_driver, 0x38, 0.10, driver,  head1 , driver, sig_driver, driver, s_driver, s_driver_out,  p_driver, p_driver_out, s_driver_exit, pz4_driver, %ROLE_DRIVER%;

    //WPF_VISIBLE  = 0x00000001,        //crew-member is visible
    //WPF_COLL   = 0x00000002,        //crew-member may collision/bump into
    //WPF_LIVE   = 0x00000004,        //crew-member walks himself
    //WPF_SETSIDE  = 0x00000008,        //player assign the side(USSR, GER, USA, GBR)
    //WPF_USER   = 0x00000010,16       //player may take a seat
    //WPF_INOUTCTRLS = 0x00000020,32    //disables the controls when unbuttoned
    //WPF_AIGUNBLOCK = 0x00000040,64    //turns off the AI controls, AI cant use gun
    //WPF_BLOCK =  0x00000080,128 //don't show the weapon of the crew-members in the tank
    //0x18/24=16+8     -                  //player take a seat, assign the side
    //0x19/25=16+8+1   -                  //player take a seat, assign the side, crew-member is visible
    //0x38/56=32+16+8  -                  //disables controls when unbuttoned, player take a seat, assign the side
    //0x49/73=64+8+1 -                  //turns off the AI controls, player assign the side, crew-member is visible
    //0х58/88=64+16+8  -                  //turns off the AI controls, player take a seat, player assign the side
    //0x1b/27=16+8+2+1 -                  //player may take a seat, player assign the side, crew-member may collision, crew-member is visible
    //0x9b/155=128+16+8+2+1 -    //don't show weapon, player controlled, player assign the side, may collision, crewmember is visible
    //0x99/153=128+16+8+1 -         //don't show weapon, player may take a seat, player assign the side, crewmember visible

    A few notes on the configs:
    Its not necessary to delete something you change or if you make a new line for experiment. Just comment it out with a double forward slash like this: //
    It makes the game not to read that line, also good to add comments if you need.
    Also, each entry starts with { and ends with } Its easy to forget them and/or accidentally remove them!

    An example of the two new notes:


         //group, fragment name, angle of opening, quantity of positions, current position
                   commander,        d_hatch_01,                115, 1, 0, 1;
    //             commander,        d_hatch_02,                100, 1, 0, 1;
                   driver,                d_hatch_03,                -90, 1, 0, 1;

    //camera, head shaking, group, FOV, connection, view left/right, view up/down, binocular, zoom, camera position: x, y(up), z(horizon)
    ,  0.04, sig_loader, 60.0, 6, -175, 175, 175, 175, true,  6, 0, 0.25, 0.25;

    Last edited by lockie on Tue May 23, 2017 1:53 pm; edited 22 times in total
    TSF Member
    TSF Member

    Posts : 3775
    Join date : 2014-07-24
    Age : 51
    Location : Ukraine, Kyiv

    Re: Vehicles import tutorial

    Post by lockie on Thu Nov 13, 2014 3:30 pm

    In your common_res, found here:\k42\loc_rus\levels\LEVELS\common\common_res.engcfg



    1 Name, used in your tech.cfg file
    2 Flags
    3 Type
    4 Name of the gun the shells is used with
    5 Muzzle velocity, m / s
    6 Length of the barrel, also called caliber
    7 ArmorPiercing action
    8 Normal at which ricochet
    9 Kummulutiv action (for piercing the core dimeter)
    10 Explosive action
    11 Fragmentation
    12 Incendiary
    13 Projectile weight kg
    14 Weight of explosives, kg
    15 Air resistance k1
    16 The influence of gravity m / s ^ 2
    17 CWE in x
    18 CWE on a
    19 The tendency to fracture
    20 Length of engine (gas generator)
    21 The effect of wind
    22 Air resistance k2
    23 Air resistance k3
    24 Sound of contact with the ground
    25 The sound of falling armor
    26 Sound when hitting a building
    27 The sound of falling in water
    28 Sound of contact with human
    29 Sound of projectile
    30 Type the goals of AI
    31 Effective range, in meters
    32 Penalty for shot AI
    33 Name of the shells in your .text file
    34 The pattern of explosion
    35 Pattern rebound
    36 The pattern of fragments
    37 Modes of the projectile (0 - no gap, 0x1 - to strike, 0x2 - slow, 0x4 - Enter the distance)
    38 Time of detonation, ms
    39 The minimum delay time, ms
    40 The maximum delay time, ms
    41 Number of steps
    42 Color tracer
    43 Time of burning tracer
    44 The reliability of operation of the projectile
    45 Number of rounds for the sprite interface
    46 Shell name of the mesh/model file in your .go folder
    47 Cartridge name of the mesh/model file in your .go folder

    1              2     3                  4        5    6  7     8    9  10 11 12 13     14   15  16  17   18   19   20 21  22 23
    SPRGR_44, 0x10,%SHELL_HE%,PAK44,750,55,0.35,0.1,0, 1 , 1 , 0 ,25.6, 3.6  ,0.1,8 , 0.5 ,0.5, 0.1, 0 , 1 , 1 , 1
    24             25               26              27              28                29   30 31    32  33
    ,expl_gndm*,expl_techm*,expl_buildm*,expl_water*,expl_human*,fly1, 0 ,1500, 1 , txt_shell_sprgr_44,
    34               35         36           37    38  39  40  41  42               43  44  45  46                   47
    he_expl_pat, rico_pat, piece_pat,0x3 , 1  ,2 ,100 , 3 , 0x80000000 , 0 , 1 , 17, SHELL_SPRGR34, SHELLC_PZ4F2;


    1 Name, used in your tech.cfg file
    2 Flags
    3 Type of weapon, list can be found in weap_defs.engcfg
    4 Length of the barrel, measured in caliber
    5 Caliber, mm
    6 Coefficient. impact
    7 Undo, m
    8 Time rollback from
    9 Time overrun with
    10 Number of charges in the cassette/magazine
    11 Recharge time a projectile with
    12 Time change of the cassette with
    13 Depending on experience charging
    14 How much smoke when fired
    15 How much dust raise up when firing
    16 Sound of the shot
    17 Sound when loading
    18 Sound of cassette/magasine change
    19 Sound of gun breech when loading
    20 Number of shots in the queue for AI
    21 Name of the gun in your .text file
    22 shot pattern
    23 The geometry of the arms (for portable)
    24 Name of the gun that is used for the shells

    1        2  3                         4   5     6  7     8    9  10 11 12 13 14 15 16            17       18 19     20 21                 22                23 24
    PAK44,  ,%WEAP_RBARRET%,55, 128, 1, 0.5, 0.1, 1, 1 , 0 ,17 ,1 ,1 ,1 ,shot_flak44,reload1,   ,drop1,1 ,txt_gun_flak36,gun_shot_pat,   ,PAK44;


    1   Track name, must be same as the trackname in the tech.cfg file
    2   Texture material, found in: texture/tracks
    3   Razor/teeth height
    4   Width
    5   Track height (thickness)
    6   The beginning of the texture of the track on the texture along the horizontal axis, measured in pixels
    7   The end of the texture of the track on the texture along horizontal axis, measured in pixels
    8   The beginning of the sidewall texture of the tracks on the texture along horizontal axis, measured in pixels
    9   The end of the sidewall texture of the tracks on the texture along horizontal axis, measured in pixels
    10   The beginning of razors/tooth texture  along horizontal axis, measured in pixels
    11   The end of razors/tooth texture  along horizontal axis, measured in pixels
    12   The length of entire tracks texture in pixels on the vertical line
    13   The placement of tracks relative to axis of tank is left-right, in meters
    14   "clap" of the sidewall texture on the sides up or down from center of track along vertical. See details.
    15   The placement of razors/tooth relative to center of the tracks along horizontal, in meters, 0 (zero) is in the middle of the tracks, higher number is to the outside.
    16   The value of loosening the tracks. Higher number is looser tracks, gives the hang effect seen on the KV or Pz4 between the idler wheels.

    1          2            3     4     5        6       7     8     9     10    11   12      13      14    15  16
    kv1_l,   TRACKS1, 0.1,  0.7, 0.065, 142,   348, 358, 380, 376, 412, 4608, -0.08,  0.75, 0,  0.03;
    kv1_r,   TRACKS1, 0.1,  0.7, 0.065, 142,   348, 358, 380, 376, 412, 4608, 0.08,   0.75, 0,  0.03;

    sights ()

    1 Name of the sight, used in tech.cfg
    2 Fixed part
    3 Moving vertical part
    4 Moving horizontally part
    5 Rotating part
    6 cursor for pointing gun
    7 Type of outline, 0 for no outline, 1 for square, 2 for a circle)
    8 Angle of view, in degrees
    9 The the original magnification
    10 The final magnification, must be the same as parameter 9
    11 Scale of the field of vision in magnification, multiplikation of parameter 9.
    12 Step increase, aiming range (0.0 - smooth)
    13 The initial position of illumination, 0 is off and 1 is on
    14 The final position of illumination,  0 is off and 1 is on
    15 Discrete illumination, false for no illumination
    16 color off. illumination
    17 color on. illumination
    18 Color "quality" Optics
    19 The scale of the gunsight, lower number is smaller
    20 Pivot of the sight, if parented to gun = true, connected somewhere else false (common problem if the sight doesnt follow up/down when aiming)
    21 The accuracy of targeting by the AI
    22 Range scales in the range (min.)
    23 Range scales in the range (max.)
    24 The range of the scale of lateral amendments (min)
    25 The range of the scale of lateral amendments (max)
    26 Chunk of sight angle, degrees
    27 The quality of sight, range in km where ai starts to shoot
    28 The sight can be damaged
    29 The sight have a cap/visor
    30 The angle of rotation of the horizontal crosshair (min), deg
    31 The angle of rotation of the horizontal crosshair (max), deg
    32 The scale of the rotation angle

    1       2       3        4 5         6        7    8    9     10   11  12  13  14 15   16                17              18              19  20    21  22    23  24 25  26  27  28   29    30  31  32
    tzf5fn,tzf5fa,tzf5fb,  ,tzf5fnc,cross , 2 , 18 , 2.5 , 2.5 , 2  ,0  ,0  ,1  ,true, 0xc0202020, 0x60402020, 0x20e0d080, 3  ,true, 3  ,-0.12,0  ,0  ,0  ,0  ,1.5,true,false, 0  ,0  ,-38;

    Last edited by lockie on Tue May 23, 2017 1:53 pm; edited 1 time in total
    TSF Member
    TSF Member

    Posts : 3775
    Join date : 2014-07-24
    Age : 51
    Location : Ukraine, Kyiv

    Vehicles import tutorial

    Post by lockie on Fri Apr 10, 2015 10:05 am

    Vehicles import tutorial by Mikhayl (adjusted to STA mod by lockie)

    Part N1:

    1. Resource Editor (unpack files):
    ...Steel Fury - Kharkov 1942\0_arceditor.bat
    2. Object Editor (3D model viewer and simple editor)
    ...Steel Fury - Kharkov 1942\0_arceditor.bat\0_edit_object.bat
    3. 3D studio, i.e. 3D Max, Blender etc.
    4. Plugin, which compatible with 3D Max and supports ***.x format, i.e. kW X-port
    5. Notepad++
    6. JSGME
    7. ExamDiff Pro, Beyond Compare 3, etc. to compare the content of the files.

    Tips before getting started:
    1. Try to use a clean install with only the STA mod installed to avoid problems.
    2. Don't unpack unnecessary files, this can lead to some problems. Steel Fury allows multiple installs, I have a "modding" install in which all the ***.datapack files are unpacked, so I can have a look at everything quickly if needed, but I test my mods only on a "normal" install as explained above.
    3. Create in the root SF directory the folder "out". This folder contains all bug reports with errors description during: transformation, generation, loading mission, etc.
    ...Steel Fury - Kharkov 1942\out

    Part 1: Modelling

    That's the most important part, I'll not cover the actual modeling, only the Steel Fury specifics. There's some requirements for new models to be imported, you can't simply import any model. Note that I'm using 3dsmax 2009 only so things might be slightly different for other 3D studios.

    1.1 Polycount

    The recommended triangle count (not polys) for vehicles is around 10.000 for the main LOD, 5000 for the 2nd LOD and 2500 for the 3rd LOD (Level Of Details). The total triangles sum of the all LOD's must not be more then 60 000. For interiors it's around 15.000 triangles, interiors have only one LOD. It is the same requirements - limit is 60 000 triangles. You may see all necessary information in the Object Editor, point out the mouse to the appropriate tab. Here is for triangles:

    However the game models are more like 20.000/25.000 triangles for the main LOD so there's some freedom here. From my very tiny experience I'd advise to start your model with 10k triangles in mind, and then polish the details. For example the stock Panzer IV has 37.000 triangles (that includes the 2 other LODs), but the spare track links alone are probably around 10.000 triangles.
    Speaking of tracks, you don't need to model them. The game engine uses a code function to display a 2D track graphic that follows the movements of the wheels, this will be addressed in "Part 3 - Scripting".
    Basically you can use the stock models as example to decide how detailed a given part should be. For example most wheels have 16 sides, smaller wheels 12 sides, most surface detail (rivets, plates) isn't represented in 3D, etc.

    1.2 Scene settings

    In 3dsmax one default unit = 1 meter in Steel Fury.
    The world axis depends on the export settings as well and will probably be different depending on your 3D studio & exporter. Try to make a simple asymmetric model pointing forward and see where it points in the SF Object Editor. Up on loading a *.go or *.x file you should always see the left side of the model (at least for the meshes in the "techn" folder).
    Here's the scene settings I use and that works fine for me coupled with my export settings (check below in section 1.9):

    1.3 Interiors and sub-versions

    It's very important to think about these from the very beginning of your new model. Multiple sub-versions can be imported in the same file, and then the scripting of the unit will determine, which parts are hidden or shown for each version. For example, you can load the Panzer IV in the SF Object Editor, you will see that it has two gun masks and two main guns overlapping. (It is recommended don't use multiple sub-versions models with two guns, two masks etc.) At any rate it's fairly easy to separate different parts later on, but the earlier the better.
    For interiors it's more critical. I will try to write a specific guide for interiors later (that is if I manage to finish one properly), but keep in mind that some things like the hatches and guns are synchronized with their external counterpart, and that both exterior and interior are rendered together so you have to be careful not to have any part sticking in or out.
    One example is for my hetzer, I started modeling it with only the exterior in mind and I thought I could model the interior only later. I took some shortcuts to model the gun mount, forgetting that on this tank this part is visible from inside. The result is that I'd have to remodel part of the exterior, if I want to get the interior right. (Note: interior in Steel Fury almost doesn't has any any chance to be used. It is a candy. Mostly user look through the gunsight devices).
    So, I'd recommend to at least model the interior hull with the hatches opening and eventually the moving parts of the guns, basically all the visual connections between the exterior and the interior. If you don't plan to model an interior, then you don't have to worry about it at all.

    1.4 Model architecture

    Models are broken down in several parts, for different purposes such as collision model and moving parts, and must be named accordingly. By observing existing models in the SF Object Editor you can get a quite precise picture of the whole thing.

    There are basically 3 types of parts, we'll call them "fragments" (that's the name used by the game editor and scripts), which use different prefixes. I'll cover the first type here and the two other types in the 1.5 section.

    • d_**** fragments are for visual objects. For example "d_wheel_01", "d_light_02", "d_hatch_04" etc
    Some visual objects use the "db_" prefix, usually that's only for hull and turret ("db_hull" and "db_head" ), and sometimes for the gun and gun mantlet as well ("db_gun" & "db_gun_mask"). I don't know the reason behind that, it's just that way.

    1.5-Invisible fragments

    • p_**** fragments are for damage zones for systems and crew. For example "p_engine", "p_ammo", "p_driver" etc.
    p_driver, p_gunner, p_commander, p_loader, p_mgunner are responsible for the effect: burning tankman.
    They are made of primitive boxes of the approximate size of the object they're supposed to represent. They can have complex shapes like "L" shapes but it's recommended to keep them simple boxes.

    Description of the p_objects are:\k42\loc_rus\levels\levels\tech_cfg\misc\damages.engcfg\k42\loc_rus\levels\levels\tech_cfg\misc\\damages_light.engcfg
    //operator, chank, armor, inner content, flame probability, index, text, preferable shooting
    rothead, p_rothead, 0.007, 0.080, 0,  0, , 1;

    • s_**** fragments(dummies) are for several things such as camera viewports, crewmen positions, particle effect sources, markings, pivots etc. For example "s_camera_gunner_01", "s_trace_01" (source of a track mark on the ground), s_fire_01 (source for particle effect), "s_driver_out" (position of the driver when unbuttoned), "s_gun" (shell starting position + particle effect) etc.
    These fragments are not actual objects, they are "dummies". Their size doesn't matter much, but try to make them 10cm/0.1 units large. In 3dsmax there's no indication of the size of the dummies, so I just create a small box of the correct size and scale my dummy to match its size.
    Here's where you find dummies in 3dsmax:

    More detail on the different damage zones and dummies required will follow in "Part 2 - Import" and "Part 3 - Scripting", in the meantime you can take a look at a tank similar to the one you're modelling in the SF Object Editor to get and idea of the different elements needed.

    1.6 Object links

    Here I'm assuming that you have your model with most of its sub components and dummies.
    First, the "linking" of the different parts. This is very easy, even more if you take an existing model as example.
    In 3dsmax the "link" function is here:

    To use it simply click on an object and drag the cursor to the object you want as parent.
    Your "db_hull" object is the parent of all the other objects and dummies, which can have children themselves.
    For example, all the "d_wheel_**" objects are linked to the hull and they have no children objects.
    Another more telling example, the commander hatches and the main gun are linked to the turret, which is in turn linked to the hull. So when the turret turns all its children follow. If you had the main gun linked to the hull then it would stay centered while the turret turns.
    One simple test, when you think you're done with the linking, select your hull and move it. If everything is linked properly all the objects and dummy should move along with the hull. Same for the turret, select it and make it rotate, and see if everything follows.

    1.7 Pivot points

    This part is very important at least for all the moving parts, hatchs, guns, wheels, turrets etc and dummies as well.
    Here's where to change the pivot point of an object in 3dsmax:

    There you have to make sure that your pivot point axis are correctly oriented, otherwise you will have very funky things in game, like a gun shell going 90° from where you're aiming, wheels turning like flipping coins, turrets rolling over and so on.
    Here's the basic example with a wheel. Select one of your wheels, go to the "Pivot" menu, then select "affect pivot only", then click "center to object" if it's not already centered so that your wheel won't be wobbly, and then click on "align to world" so that your wheel will rotate on the proper axis.
    The game engine makes the wheels rotate on the "lateral" axis which is the "x" axis on our scene. Here's what not to do:

    Here is the pivot point "x" axis is corresponds to the "length" axis of our wheel. In game the wheel will flip like a coin, rotating around its own wrong "x" axis
    Here's how it should be, after clicking on "align to world":

    It's the same principle for other objects and dummies, except that for some objects like guns, turrets and hatchs, the pivot point isn't centered on the object, it's up to you to determine its position. Here's two examples of hatches, they are oriented differently but their pivot point is the same:

    Once the pivot point is set you can go back to normal object selection and move or rotate the object, the pivot point will remain the same. Make some tests and it becomes easy as pie.

    1.8 "Open edges"
    These "edges" cause a big problem to the modder and to the tank model itself. You have to be a very attentive to be sure that no db_hull neither db_turret has any splits - "open edges". In case, if u didn't remove all of them then be prepared that tank crew could killed accidentally by MG bullet, which goes through the armor. In SF thre is only shell has physical size, all other particles such as spalling, shell's fragments, bullets are just absolute points, which could penetrate through inappropriate adjusted armor of the model.

    1.9 UV-mapping, materials and textures

    There's one important thing to keep in mind from the start, your vehicle can NOT use more than one material. A model with several materials will show OK in the SF Object Editor but in game all the objects will use the material used by the main object (db_hull here).
    For example if your vehicle has a MG-34 mounted on it, its texture must be part of the main texture. If you assign it the existing "MG34" material with its separate texture it will only work in the Object Editor.

    UV-mapping is as usual, since the textures are bump-mapped be careful when superposing different faces on the same part of the texture to avoid weird surface effect in game.
    The textures are 2048*2048 with one "diffuse" texture and one bumpmap texture. For your "work in progress" textures you don't need the bumpmap, only the diffuse. The format doesn't matter, but the filename does. For example if you model a panther, just name your texture "PANTHER.tga" (in upper case) or whatever format you prefer for the moment. The name & upper case have to do with the scripting of the materials in game, I'll adress this in "Part 3 - Scripting".

    Before exporting, select all your parts excepted the "p_****" and "s_****" fragments, and assign them a material using your texture with its simple name. This is to ensure that you don't need some tedious renaming when importing the model in the SF Object Editor.

    1.10 Export settings
    Models must be exported in .x format. Before exportation, there should be two procedure:
    1. Model must be positioned in 3Dmax at "0,0,0" place.
    2. Execute "reset x-form", where "x-form" is "transformation". It does all coordinates of the polygons/vertexes receives new coordinates, which will be calculated by kwx-port as default values.
    If u didn't make properly "reset x-form" or made something wrong with polygon scaling, then in game you'll get enormous shadow of the tank. This does - model has errors with transformation. Though, I don't know how it effects the gameplay.
    If you use 3dsmax I recommend the kW X-port plugin: (you must register to download it). I tried the Panda Soft exporter but IMO kW X-port is much better.
    Here's a pic of the export settings I use, combined with my scene settings it exports my models just fine and ready to be imported in the SF Object Editor.


    When your model is complete and all the objects and dummies are properly linked, you can select only the "db_hull" object and click "export selected", it will export it along with all the linked objects.

    1.11 LODs

    The LODs are based on your main model, that is, they must have the same architecture (links). However you don't need the damage zones nor the dummies for the LODs, excepted in some rare cases (look at the main gun of the StuG for example). Some objects can also be removed, just make sure that they're not the parent of an important part.
    There is a simple rule how to define LOD's.
    Let's say the first LOD has 10000 triangles, then second should has 30% percents less: ~7000. And the third LOD should has another 30% less. It does 30+30=60, thus we've for the third LOD approximately 3000-4000 triangles.
    It is typically:
    1. first LOD=10000
    2. second LOD=7000
    3. third LOD=3000

    Last edited by lockie on Tue May 23, 2017 1:54 pm; edited 6 times in total
    TSF Member
    TSF Member

    Posts : 3775
    Join date : 2014-07-24
    Age : 51
    Location : Ukraine, Kyiv

    Re: Vehicles import tutorial

    Post by lockie on Fri Apr 10, 2015 10:50 pm

    Part 2: Model import

    Part N2:

    2.1 Preparation and preliminary scripting
    - pay attention to this topic "Vehicle config" by Donken:

    Now that we have a model ready to import, it's time to prepare things to allow us to test it in game.
    The first step is to create a new mod folder for our playable unit, where we will put our imported model + its new textures + the script file needed for the new material.

    Assuming that you're modeling a Panther, here's is the folder structure that you would need for now:

    Your "New Unit" folder can be placed directly in your Steel Fury/MODS/ folder if you wish. Let's name it "My_tank_mod_00". But I'd recommend to make a copy, i.e. in the desktop with name "My_tank_mod_01", and each time you want to test it in game, copy paste it in your Steel Fury/MODS/ folder, enable it, test it, when you're done testing disable it and resume work on the files on your desktop. If u fail with testing, you are always has ability to roll back to the original "My_tank_mod_00".
    If you're modeling something else, i.e. APC, AT gun, light tank, etc., just replace the "heavy" folder by "medium" or "light" for the textures, or even "spguns", "apcs" or "guns". Same in the "go" folder, you can change the "tank" folder for "apcs" or "spguns" or "trucks" etc. to fill your needs. Well, it doesn't matter for the game engine, which folder you'll place model/texture, it'll find it. It is only for the user's convenience.

    Now we need to furnish our folders:

    2.1a In game textures

    If you look in the game texture folders (assuming they are unpacked from the various datapack files, otherwise they are hidden), you will see that there's 2 textures for each unit, "tbump_****" and "techn_****".
    So, open your texture, and save a copy of it as "". I use Gimp, usually I export my .dds images in dxt3 or dxt5 format (dxt1 doesn't support transparency). Whichever you choose, make sure your .dds texture is saved with mipmaps. If you open a game texture with Gimp you will have the main texture and several hidden layers with a scaled down copy of this texture, that's the equivalent of the LODs (if a unit is 1km away from you it's not necessary to have the full 2048*2048 texture loaded, the mipmaps are used instead).
    If you don't have a bumpmap texture yet, just save a copy of your texture as "" for the moment.

    2.1b Materials scripting

    Now that we have the textures, we need to add the corresponding material so that the game knows it must use them. Go to:
    ...Steel Fury/data/k42/loc_rus/config/matlib.engcfg.
    Open it with Notepad++, there you have the list of all the materials used in the game. Hit ctrl+F and try to find a material used by a unit similar to your new one, copy it and paste it at the end of the file. For instance let's copy the PZ4 material (here's the upper case from the work in progress texture) and edit it for your new unit as follow:

      PANTHER()//tank's name
         shader = editor;
         textures = panther, panther_bump, mudnburn;//diffuse and bump texture. Diffuse does just ordinary image, bump does roughness of the texture.
         parent = TANK;//where to find

         diffuse = 1, 1, 1, 1;//image
         ambient = 0.301961, 0.301961, 0.301961, 1;//unused
         emissive = 0, 0, 0, 0;//unused
         specular = 0.996078, 0.996078, 0.996078, 1;//level of specular (shine). Normally, it is white-black texture, but for the game you may put it out and use only diffuse and bump.

         power = 32;//specular flare size
         detail_tscale = 0;
         detail_scale = 0;
         bump_scale = 0.5;//level of the texture roughness
         fresnel = 0;

      }// end of PANTHER texture

    You can save and exit, your new material is now ready. Later on you will need to add new materials for an eventual interior texture, it's the same process, find a material for an existing interior, copy-paste it and modify it.
    Something very important and very useful, the symbol "//" are called "comments" and does info for the user. The line written after a comment will not be read by the game. Game engine just ignore any entries, which covered with symbol "//". So you can use it to explain what you changed in a file so that another modder looking at it will easily understand. We will see a lot of these later in "Part 3 - Scripting".

    2.2 How to use the SF Object Editor

    The editor is fairly easy to use, most things have a small description when you mouse over.
    Here's a short description of the most useful functions to import a model:

    There is a tiny glitch, if you load a mesh and toggle on the "show frames" option, and then you load a different mesh, the frames are no longer shown. Simply toggle frames off and back on and it will fix it.

    The tab on the right pops up when you put the mouse against the border of the screen, the "fragment" tab shows all the fragments of the model even the hidden ones. You can't select fragments from this tab.
    The "select by name" button will pop up a list showing only the visible fragments of the model. Try to load the Panzer IV mesh, in the left tab near the bottom of the list you will see the different damage zones (p_****). If you look at the "select by name" list these fragments aren't here.

    2.3 Importing models/LOD's

    This is straightforward, assuming that you made sure that you model has the proper architecture and material set.
    First thing to do is to put a copy of your "New Unit" mod (at this point it's only textures + material) in your Steel Fury/MODS folder, and enable it through JSGME.
    There is a special procedure how to import three LODs into SF.
    Let's say you've created in 3DMax a three models with a different triangles quantity. Let's name them:
    1. my_tank_l01 (1 LOD=10000 triangles)
    2. my_tank_l02 (2 LOD=7000 triangles)
    3. my_tank_l03 (3 LOD=3000 triangles)
    Finaly, we've to export three files:
    - my_tank_l01
    - my_tank_l02
    - my_tank_l03

    Now in the Object Editor, press F9 (or click on "File -> Import -> load from X...") and select first file: my_tank_l01. Program automatically convert and calculates all 3dmax files LODs and make the new model with *.go format, which consist of the three LODs. The name of this model will be: my_tank_l
    Use Numpad "+" and "-" in the objects editor to cycle through LODs.
    You should now see your textured model. If it's all red, it's because the material wasn't set properly in the model, make sure you followed the step 1.9. If your 3D studio porks the name of the material, you can change it manually in the SF Object Editor. Click on the "Select all" button, then go the right panel, click on the "materials" tab, browse until you find your new "PANTHER" material, and click the button with the two arrows (top left of the panel) to assign the material to all the selected objects.

    Now toggle "show cage" on, then click on "select by name". Select all your "p_****" fragments (to select multiple objects just hold shift, then close the window), and click on the "hide" button.
    Now go to "File -> Save as...", and save your model in "New Unit/Data/k42/loc_rus/go/techn/tanks/" or one of the other folders depending on your type of unit (apcs, spguns, trucks...). Keep the name simple and lower case, like "panther.go", "is2.go" etc
    At this point your model will probably be missing a few things (or not) but nothing to worry about anyway, this will be covered in details in "Part 3 - scripting".
    If you need to correct or add things to your model, simply re-export it from your 3D studio and repeat this step. Import from X, hide "p_****" fragments, and overwrite the previous "panther.go" file in your "New Unit" folder.

    "PART N3 - scripting" see detailed explanation here.

    Last edited by lockie on Tue May 23, 2017 1:56 pm; edited 1 time in total
    TSF Member
    TSF Member

    Posts : 375
    Join date : 2014-07-24
    Age : 44
    Location : Україна мКиїв

    Re: Vehicles import tutorial

    Post by will73 on Tue Feb 23, 2016 9:52 am

    lockie wrote:In your common_res, found here:\k42\loc_rus\levels\LEVELS\common\common_res.engcfg


    1 Name, used in your tech.cfg file
    38 Time of detonation, ms
    39 The minimum delay time, ms
    40 The maximum delay time, ms
    41 Number of steps

    1              2     3                  4        5    6  7     8    9  10 11 12 13     14   15  16  17   18   19   20 21  22 23
    SPRGR_44, 0x10,%SHELL_HE%,PAK44,750,55,0.35,0.1,0, 1 , 1 , 0 ,25.6, 3.6  ,0.1,8 , 0.5 ,0.5, 0.1, 0 , 1 , 1 , 1
    24             25               26              27              28                29   30 31    32  33
    ,expl_gndm*,expl_techm*,expl_buildm*,expl_water*,expl_human*,fly1, 0 ,1500, 1 , txt_shell_sprgr_44,
    34               35         36           37    38  39  40  41  42               43  44  45  46                   47
    he_expl_pat, rico_pat, piece_pat,0x3 , 1  ,2 ,100 , 3 , 0x80000000 , 0 , 1 , 17, SHELL_SPRGR34, SHELLC_PZ4F2;

    Експериментально виявлено що:

    39 пункт- також коли в пункті 37 флаг стоїть 0x4(0x5), то при переключенні на ручний ввід дистанції - вираховуються не час детонації а дистанція в метрах для спрацювання таймеру дистанційного детонатора (комп'ютер вираховує сам час польоту снаряду).
    40 пункт- також коли в пункті 37 флаг стоїть 0x4(0x5), то при переключенні на ручний ввід дистанції - вираховується крок переключення таймера відносно пункту 39 (приклад якщо стоїть в пункті 39- 5000м а в пункті 40 -500 то маємо крок переключення однієї позиції дистанційного детонатора в метрах 5000/50=10м значить для враження цілі на дистанції 600м вводим на детонаторі 60, прицілюємся вище цілі і стріляєм- снаряд вибухне над ціллю ).
    TSF Member
    TSF Member

    Posts : 3775
    Join date : 2014-07-24
    Age : 51
    Location : Ukraine, Kyiv

    Re: Vehicles import tutorial

    Post by lockie on Sat Oct 01, 2016 7:07 pm

    Як вставити модель ВЖЕ ГОТОВОЇ техніки в SF.
    Відразу обмовлюся, що тутор поверхневий лише для загального уявлення. У користувача передбачається елементарне вміння роботи з редактором об'єктів (0_edit_object.bat).
    Як приклад, використовується файл Churchill Crocodile.


    Корисні лінки:
    1. Vehicles import tutorial
    2. Units code in the mission script

    1. Notepad++ (source code editor)
    2. ExamDiff Pro (visual file and directory comparison tool)

    Розглянемо на прикладі додавання моделі танка: Mk.IV Churchill Crocodile зі всіма необхідними конфігураційними файлами.
    У загальному випадку, перед установкою створити новий файл з назвою нової техніки. Наприклад:  ...\data\k42\loc_rus\text\crocodile.text. Або дописати необхідні рядки у файл:
    Назва файлу довільна, візьмемо для зручності txt_tn_church_cro, як задано в файлі:\k42\loc_rus\levels\levels\tech_cfg\churchillcro.engcfg
    строка: name =txt_tn_church_cro;.

    crocodile.text призначено для:
    - назви стрельні txt_shell_flame() {Fire;}
    - назви гармати txt_firethrower() {Fire-throwing;}
    - назви танку в грі/статистиці txt_tn_church_cro() {Mk.IV "CHURCHILL-CROCODILE";}
    - назви танку/підрозділів в редакторі:
    txt_med_htank03_gbr() {1x Mk.IV "CHURCHILL-CROCODILE";}
    txt_med_htank04_gbr() {1x Mk.IV random;}

    Порядок збірки:
    1. Тека ...\data\k42\loc_rus\armor_maps\churchill_armor.tga (карта броні)
    2. Тека ...\data\k42\loc_rus\config\matlib.engcfg (текстура, бамп, спек)


     shader = editor;
     textures = churchill, churchill_bump, mudnburn;
     parent = TANK;

     diffuse = 1, 1, 1, 1;
     ambient = 0.12549, 0.12549, 0.12549, 1;
     emissive = 0, 0, 0, 0;
     specular = 0, 0, 0, 1;

     power = 0;
     detail_tscale = 8;
     detail_scale = 1;
     bump_scale = 0;
     fresnel = 0;
     }// end of CHURCHILL
    3. Тека\k42\loc_rus\go\tech\tanks\churchill.go (3D модель танку)

      3.1. Тека ...\data\k42\loc_rus\go\tech\spguns\***.go (для бронеавтомобіля)

    4. Тека ...\data\k42\loc_rus\images\backs\****.tga (для заставки місії)
    5. Тека ...\data\k42\loc_rus\levels\LEVELS\camp\camp_list.engcfg (для опису кампанії, наприклад GMP)
    6. Тека ...\data\k42\loc_rus\levels\LEVELS\camp\main_camp.engcfg» (для опису місій в кампанії)
    *Примітка: пункти 4,5,6 не обов'язкові, бо танк можна вставити у місію за допомогою Редактора Місій (ME) та скористуватись дефолтною заставкою.
    7. Тека ...\data\k42\loc_rus\levels\LEVELS\tech_cfg\churchillcro.engcfg (конфігурація танку)
    8. Тека ...\data\k42\loc_rus\levels\LEVELS\cocpits\coc_churchill.engcfg (конфігурація башти)
    9. Тека ...\data\k42\loc_rus\levels\LEVELS\common\common_res.engcfg (сюди дописуються різноманітні конфіги, якто для гармати/стрельна/приціл і тд)
    *Примітка.: для нової техніки бажано додавати коментарі, наприклад для гармати:
    //QF6 Churchill gun
    //FTCROC Churchill Crocodile

    Файл common_res містить наступні блоки:
    - weapons() (характеристики гармати, ім'я QF6 та //FTCROC береться з файлу churchillcro.engcfg)
    Дописати строку:
    Параметри гармати. What are the parameters of the gun?.

    - shells() (характеристики стрельні, ім'я та кількість зазначено у файлі churchillcro.engcfg)
    Дописати строку для кулемету/вогнемету:
    Параметри стрельні. What are the parameters of the shell?.
    Як вже згадувалось у пункті N1 назва нової стрельні txt_shell_flame прописано у файлі crocodile.text або STA_units.text)

    - addins() (додаткові об'єкти: моделі стрельні/каски/підсумки/зброя тощо). Прописуються у файлі наприклад для німців:\k42\loc_rus\levels\LEVELS\hum_cfg\ger.engcfg

    - sights()
    Характеристики прицілу What does the parameters of the gunsight?.
    Дописати строку для прицілу гармати QF6:

    - tracks() (характеристики траків, задаються в churchillcro.engcfg)
    Дописати строку для траків:
    //CHURCHILL tracks
    churchill_l,TRACKS13,0.07,0.65,0.065,406,512,524,542,362,378,2868, 0,0.75,-0.14,0.005;
    churchill_r,TRACKS13,0.07,0.65,0.065,512,406,524,542,362,378,2868, 0,0.75,0.14,0.005;

    10. Тека ...\data\k42\loc_rus\levels\LEVELS\common\common_units.engcfg Дописати в конфіг файл юнітів наш танк "Крокодил".
    Дані  прописуються для наступних блоків:
    - units/юніти (назва конфігу танка)
    - groups/групи (різноманітні підрозділи)
    - randoms/випадковий вибір юніта
    - editor/редактор (назва підрозділив для редактора місій. Прописуються у файлі crocodile.text або STA_units.text)

    Дані блоку units()
    gbru_churchillcro – назва юніта для визначення головного конфігу танка
    i_techn - алгоритм для АІ
    tech_cfg\churchillcro.engcfg – шлях до головного конфігу танка (\k42\loc_rus\levels\levels\tech_cfg\churchillcro.engcfg)
    churchill_cro – робоче ім'я танку
    5 - кількість членів екіпажу
    0 - кількість пасажирів/десанту (прописується у файлі:\k42\loc_rus\levels\LEVELS\tech_cfg\misc\churchill_places.engcfg)

    Дані блоку groups()
    gbr_mk4cro - робоча назва юніта для блоку groups()
    800 - вартість юніта
    0.25 - вирогідність появлення юніта (0.5-2.5) для блоку random()
    gbru_churchillcro - назва танка з блоку units()
    gbr_crew_mk4 - склад екіпажу
    1 - кількість

    Дані блоку randoms()
    В цьому блоку задається які юніти будуть з'являться замість оригінального танку.
    //MkIV Churchill crocodile random
    В нашому випадку якщо в місії буде юніт gbr_htank04, то з вірогідністю "1" буде з'являтись Churchill Mk.IV (gbr_htank01). А з вірогідністю "0.25" буде з'являтись Churchill Mk.IV Сrocodile (gbr_mk4cro).

    Дані блоку editor()
    //MkIV Churchill editor
    //1х танк Черчиль
    //2х танк Черчиль
    ////3х танк Черчиль
    ////3х танк Черчиль + піхота
    //MkIV Churchill crocodile editor
    //1х танк Черчиль Крокодил
    //1х mix танк Черчиль або Крокодил. Рандомне з'явлення.

    gbr_htank03 - ім'я танка з блоку "groups", котре також використовується в блоці "random"
    Можна записати gbr_htank0, тоді в грі під цим іменем будуть з'являтись всі танки з індексами: 01, 02, 03, 04
    txt_med_htank60_rkka– текстовий ідентифікатор, котрий з'являється в редакторі місій. Задається у файлі STA_units.text або у файлі ...\data\k42\loc_rus\text\crocodile.text
    %SIDE_GERMAN% - сторона
    txt_med_gr_htanks_rkka – вкладка редактора "важкі танки"
    0 - можна ставити підрозділ з двох юнітів у різні контури, якщо "1", то буде сіра пляма і розташування підрозділу доведеться редагувати вручну у скрипті. Має бути завжди "0".
    1 - відповідає за insignia/емблему, якщо "0", то insignia не доступна
    АА, ААА – задає місце гравця у місії, де
    ААА - командир першої машини танкового взводу. Наприклад ВАА - командир 2-го танку, 1-го підрозділу
    0x1f- флаг юніт керується гравцем
    tankh –  іконка в редакторі для важких танків
    inf - іконка піхоти

    Допишемо нові підрозділи до файлу: ...\data\k42\loc_rus\text\is122.text
    //GBR side
    //flame-throwing tank Churchill "crocodile"
    txt_tn_church_cro() {Mk.IV "CHURCHILL-CROCODILE";}
    txt_med_htank03_gbr() {1x Mk.IV "CHURCHILL-CROCODILE";}
    txt_med_htank04_gbr() {1x Mk.IV random;}
    //gun firethrower
    txt_firethrower() {Fire-throwing;}
    txt_shell_flame() {Fire;}

    11. Тека ...\data\k42\loc_rus\levels\LEVELS\scripts\cm_***\***_scripts.engscr (скрипт для місії, не обов'язково)
    12. Тека ...\data\k42\loc_rus\levels\LEVELS\scripts\cm_***\***_zones.engscr (зони контурів для місії, не обов'язково)
    13. Тека ...\data\k42\loc_rus\levels\LEVELS\scripts\cm_***\***_loc_data.text (текст для місії, не обов'язково)
    14. Тека ...\data\k42\loc_rus\levels\LEVELS\tech_cfg\churchillcro.engcfg (конфігураційний файл для танка)
    15. Тека ...\data\k42\loc_rus\levels\LEVELS\tech_cfg\misc\churchill_places.engcfg (опис місць екіпажу всередині башти)
    16. Тека ...\data\k42\loc_rus\sounds\engines\***.wav (звук для двигуна та пострілу)
    Файл loc_kit.text містить назви техніки на двох язиках, котра прописується у грі. Використовується для глобальних модів. Вносити зміни не обов'язково, радше застосувати вже готовий файл: ...\data\k42\loc_rus\text\crocodile.text
    17. Тека ...\data\k42\loc_rus\textures\techn\ (вставляємо файли для текстур танка)
    18. Тека ...\data\k42\loc_rus\textures\tracks\ (вставляємо файли для текстур гусениці)
    Це все. Для перевірки запустити редактор місій та переконатись, що нові підрозділи знаходяться у відповідних вкладках.

    Sponsored content

    Re: Vehicles import tutorial

    Post by Sponsored content

      Current date/time is Thu Mar 22, 2018 10:48 pm