[Guide] Entity Modding (Entites.BLK)

In this post i attempt to guide You, how to make more advanced mods by modding the entites in the game. This guide will get expanded as time goes on, please read the comments for updates and new chapters. Also always assume that latest info is always the correct one. (and the best)

With modded entites you can potentially do the following:

  • Modify existing weapon’s properties like: rate of fire, reload speed, damage, replace sound of a weapon with another (no custom sound mod for online yet)

  • Modify vehicle properties; Tank’s speed, reload time, gun’s caliber, penetration power, explosive size etc.

  • Modify FPS and TPS cameras

  • Make entirely custom vehicles ( In functionality not model!)

  • And much more

What you cannot do:

  • Add custom content not present in the game (3D models, sounds, animations, etc)*¹

First of all, to mod entites, you should have the original ones, and modify those to achieve what you want.

Entities are scattered along several files in the game folder. You will need to find the right file in the right place. Use Enlisted Datamine. I will also provide files during this guide. Use Notepad++ or similar text editor, as it will save you a lot of time!


Chapter I

Gun Modifications

Probably what most players would want to do is modify a gun’s properties.

This time i will modify the Boys ATR gun:

  • Increase RoF
  • Decrease Recoil
  • Decrease Reload Speed
  • Enable running (It’s a heavy weapon, you cannot run with it by default)
  • Add Full Auto fire

To find the codes for this weapon, the easiest way is to search in the entire datamine with notepad++:

kép

As the result, we got the paths for the files containing the data we seek.
(anything thats NOT in templates, weapons folder is irrelevant.)

Most weapon codes are inside ww2_guns.txt (1.0 MB) file.

Some weapons are not. Boys ATR is a good example as it is inside tunisia_guns.blkx. (Why? ask the devs)

tunisia_guns.txt (118.6 KB)

We have atr_boys and atr_boys_gun.

atr_boys{
  _use:t="main_weap_slots"
  _use:t="ironsights_open_rifle"
  animchar__res:t="atr_boys_char"
  gun__blk:t="content/enlisted/gamedata/weapons/atr_boys.blk"
  item__template:t="atr_boys_gun_item"
  item__proto:t="content/enlisted/gamedata/weapons/atr_boys.blk"
  item__locDetails:t="7.92x107mm;"
  item__weapTemplate:t="atr_boys_gun"
  item__name:t="items/atr_boys"
  item__weapType:t="rifle"
  item__weight:r=16.3
  gun__locName:t="atr_boys"
  gun__statName:t="rifle"
  gun__shotFreq:r=0.55
  gun__automaticReload:b=no
  gun_spread__maxDeltaAngle:r=0.05
  gun_deviation__omegaRange:p2=10.0, 30.0
  gun_deviation__omegaDevInc:p2=0.1, 0.5
  gun_deviation__movementRange:p2=2.1, 4.0
  gun_deviation__movementDevInc:p2=5.0, 10.0
  gun_deviation__onShotDeviationChange:r=0.0
  gun_deviation__shotTau:r=0.1
  gun_deviation__extraDeviationTau:r=0.4
  gun_deviation__maxDeviation:r=15.0
  gun__reloadTime:r=4.4
  gun__altReloadTime:r=3.8

  "item__id:i"{
    value:i=0
    _hide:b=yes
  }

  "gun_shell_ejection__onShootRelease:tag"{
  }

  "gun__ammoHolders:array"{
    ammoHolders:t="atr_boys_magazine"
  }

  "gun__shells:array"{
    shells:t="content/enlisted/gamedata/weapons/bullets/13.9x99_boys.blk"
  }

  "gun__firingModes:array"{

    "mode:object"{
      modeType:t="manual"
    }
  }

  "gun__firingModeNames:array"{
    mode:t="bolt_action"
  }
}
atr_boys_gun{
  _use:t="equipable_gun"
  _use:t="ptr_ww2_preset"
  _use:t="atr_boys"
  _use:t="high_caliber_muzzle_brake_3_preset"
  _use:t="hit_effect_group_14_20mm"
  _use:t="rifle_gun_aim_sound"
  gun_shell_ejection__timeMult:r=0.35
  gun__standOffset:p3=0.2, 0.05, 0.15
  gun__crouchOffset:p3=0.2, -0.07, 0.25
  gun__length:r=0.4
  gun__recoilAmount:r=0.35
  gun__recoilDirAmount:r=0.8
  gun__recoilDir:r=0.0
  gun__visualRecoilMult:r=0.6
  gun__recoilControlMult:r=0.4
  gun__recoilOffsMult:r=1.0
  gun_attach__slot:t="weapon"
  gun__adsSpeedMult:r=0.45
  gun__bipodOffset:p3=0.325, 0.07, 0.1
  meleeSoundType:t="rifle"
  weap__sprintLerpFactor:r=0.0
  gun__saveAmmoInChamberOnReload:b=yes

  "xrayActivator:tag"{
  }

  "gun_sound__shotPath:shared:object"{
    _tags:t="sound"
    path:t="/weapon/antivehicle/ptrs41"
  }

  "sound_irqs:shared:object"{
    _tags:t="sound"

    "reload_mag_in:object"{
      path:t="/weapon/antivehicle/atr_boys/reload_mag_in"
    }

    "reload_mag_out:object"{
      path:t="/weapon/antivehicle/atr_boys/reload_mag_out"
    }

    "reload_shutter_in:object"{
      path:t="/weapon/antivehicle/atr_boys/reload_shutter_in"
    }

    "reload_shutter_out:object"{
      path:t="/weapon/antivehicle/atr_boys/reload_shutter_out"
    }

    "boltAction:object"{
      path:t="/weapon/antivehicle/atr_boys/bolt_action"
    }
  }

  "gun__mountPoints:shared:array"{

    "point:object"{
      type:t="bipod"
      recoil:r=0.25
      offset:p3=0.495, 0.045, 0.0
      forceOffset:b=yes
      angle:r=28.0
      length:r=0.27
    }

    "point:object"{
      type:t="rest"
      recoil:r=0.65
      offset:p3=0.515, -0.035, 0.0
    }
  }
}

Both have _use:t=“xyz” part.
_use means that this entity will literally use an other entity. It’s good, because you don’t have to copy the same code (like equippable_gun) to every gun, decreases redundancy and file size.

You can also notice that atr_boys_gun uses atr_boys. Everything defined in atr_boys can be modified in atr_boys_gun entity, in other words, atr_boys_gun retains all properties of atr_boys. It doesn’t matter that atr_boys have rate of fire defined and atr_boys_gun doesn’t , you can modify it inside atr_boys_gun because its based on that.

Let’s modify rate of fire first. Create your scene:

Create an empty entities.blk file next to the scene.blk file

kép

Open it, and lets get started:

When modifying existing entities, you must use _override:b=yes tag. Tags and properties can have the following variables types:

  • b = boolean (Yes or No)
  • t = text
  • r = real number
  • object - can contain other tags or properties, can also contain path to a file
  • array - well its an array

kép

And add the line that controls rate of fire. It’s gun__shotFreq

atr_boys_gun{
	_override:b=yes
	gun__shotFreq:r=10.0
}

Rate of fire is in SECONDS. 10 Shots PER second in this case.

Because it’s a manual weapon we need to add full auto fire mode to it, to achieve full auto fire (amazing right?) Let’s also add semi-auto mode . To do that we need to add:

atr_boys_gun{
	_override:b=yes
	gun__shotFreq:r=10.0
	
  "gun__firingModes:array"{

    "mode:object"{
      modeType:t="automatic"
    }

    "mode:object"{
      modeType:t="burst" //all semi autos are basically 1 shot burst guns
      burstSize:i=1
    }
  }

  "gun__firingModeNames:array"{
    mode:t="full_auto"  //you can also add plain text here
    mode:t="semi_auto" //and here as well
  }
}

Please note that adding full auto modes to manual weapons usually breaks sounds. Also should not be done, only did it for the sake for this guide.

To change reload you need to add these lines:

  gun__reloadTime:r=4.4 //IN SECONDS
  gun__altReloadTime:r=3.8 //IN SECONDS

Bolt Action rifles also have these lines:

  reload__singleReloadMaxAmmo:i=4 //how much ammo to reload each bullet individually, if you have more than that number needed for reload, a whole clip will be inserted.
  single_reload__prepareTime:r=1.0 //last bullet "unload" time,
  single_reload__loopTime:r=0.63 //how much time does it take to reload 1 bullet
  single_reload__postTime:r=1.1 //reload finish time, bolt closing time.

To be able to run with heavy weapons you need to add this line:

weap__sprintLerpFactor:r=1.0 // 1.0 is 100%, normal running speed. Set to 0.0 to disable running while holding this weapon

To change recoil characteristics you need to play around with the lines containing gun__recoil, and gun_deviation

To edit the damage the gun does, you will need to edit the bullet BLK defined in the gun_shells property’s path, and make a custom BLK with the modified properties.

kép

And override the path, so it loads your custom bullet BLK:

"gun__shells:array"{
    shells:t="%ugm/bullets/custombullet.blk"
  }

custombullet.txt (909 Bytes)

Save the file and reload the scene in the editor for the changes to apply.

The result:

atr_boys_gun{
	_override:b=yes
	gun__shotFreq:r=10.0
	
  "gun__firingModes:array"{

    "mode:object"{
      modeType:t="automatic"
    }

    "mode:object"{
      modeType:t="burst"
      burstSize:i=1
    }
  }

  "gun__firingModeNames:array"{
    mode:t="full_auto"
    mode:t="semi_auto"
  }
  gun__reloadTime:r=1.4 //IN SECONDS
  gun__altReloadTime:r=2.8 //IN SECONDS
  weap__sprintLerpFactor:r=1.0
  
  "gun__shells:array"{
    shells:t="%ugm/bullets/custombullet.blk"
  }
}

You can add textures, and icons, more on this later


More soon ᵗᵐ

10 Likes

If you have a topic, or a question about modding a specific game functionality, ask away!

1 Like

Make topic about attach decor and vehicle entities to make things like this:

Лошадка

1 Like

hah,

Never touched that before. You made that cavalry thing?

Yes

eh…

i don’t blain you.

it can be both painful or relatively easy, yet time consuming.

the attachment decorators allows you to stich things together, on many things.

such as weapons: ( though, in first person, things will be buggy )


clothing:



and stuff to vehicle;


problem is, all of this is very time consuming because of axes.

out of all, the easier to understand are vehicle ones, but weapons or clothing ones, are completely different, and you’ll be sunking hours trying to understand it.

( i… still didn’t understood them despite having made many creations with it )

i can however say a few things.

and if you guys want, i’ll leave some codes.
( mainly about the things shown above )

4 Likes

Yes, knowledge to everyone!

3 Likes

Jakob Nacken POV:

sure thing.

but, i’m not resposnable for the headache ahead.

anyway, first thing first,

the very first thing you need, is an empty map.

somewhere accessible near the coordinates [0,0,0][0,0,0][0,0,0] so, for sake of examples and personal recommendations, Gavutu and Selow are perfect for what we are about to do.

second of all, go to the coordinate 0 ( which you can recognize as it has it’s own " cross " which can be seen everywhere since you cannot turn it off )


second of all, set up spawns and camera next to the 0.

so you won’t have to lose too much time each time you restart.
because trust me, you’ll be doing that more than anyone would like to.

in my case here, i made a plaftform for my self.

which you can place in your scene.blk ( works for selow, not so sure for others )

entity{
  _template:t="game_rendinst_decor"
  transform:m=[[-3.78552e-08, 1, 2.18557e-08] [-6.75263, -3.40829e-07, 3.89863] [1.55222, 0, 2.68853] [3.49009, -0.00194888, -2.63698]]
  ri_extra__name:t="gantry_crane_a_shield_a"
}

this platform is useful to allow you from preventing vehicles ending up in water, and allows you to place objects on the edges.

so with the preparations in place, is what you will need to do individually for each situation,
Keep in mind, the method is roughly the same, but the attachment nodes will be different. and for how much obvious that might sound, each node has different axes, and might completely work differently from the other methods.

with that said, let’s start with the easier ones:

Vehicles Attachments

vehicles for the most part, are simple. depending what you want to do, but most of the decorations will be placed on the node: Root

attaching to vehicles means, not only decorations, but functional tools too such as adding repair kits, or medkits as i did, or even custom rendinsts objects.

https://i-enlisted.cdn.gaijin.net/original/3X/b/c/bc9f34cac45526a34c5f846b73988ebb51022e95.jpeg
https://i-enlisted.cdn.gaijin.net/original/3X/7/d/7dfcd7dd0b95506bbe7c88a1cf4948b71bc5698c.jpeg

here is the code:

full code
germ_sdkfz_251_1_transport{
  _use:t="base_sdkfz_251_1"
  _use:t="tank_light_vehicle_tracks_sound"
  _use:t="forestall"
  _use:t="car_vehicle_horn_sound"
  _use:t="vehicle_horn_note_D5"
  _use:t="halftrack_seats"
  commanderFpsCamMaxAngle:p2=40.0, 40.0
  item__iconOffset:p2=0.0, 0.3
  item__iconScale:r=1.6
  cockpit__zoomOutFov:r=1.5
  cockpit__zoomInFov:r=2.0
  commanderCockpitFpsCamMaxAngle:p2=40.0, 5.0
  gunner_cam_limit__useCockpitDir:b=yes
  vehicle_commander_cam__attachToVehicle:b=yes

  "vehicle__isExplosionFatal:b"{
    _tags:t="server"
    value:b=yes
  }

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[-6.31983e-08, -0.909492, 0.415721] [1, -6.31983e-08, 1.37591e-08] [1.37591e-08, 0.415721, 0.909492] [-0.19, 1.48, 0.81]]
      template:t="ger_ammunition_wwii"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[4.37114e-08, -7.10543e-15, -1] [-0.913897, -0.405946, -3.99477e-08] [-0.405946, 0.913897, -1.77445e-08] [-1.76, 1.16, 0.79]]
      template:t="german_backpack_tan_decor"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[-1, 8.74228e-08, -3.55271e-15] [-7.12946e-08, -0.815515, 0.578735] [5.05947e-08, 0.578735, 0.815516] [-2.10, 1.58, 0.97]]
      template:t="tank_decor_box_01_decor"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[-1, 8.74228e-08, -3.55271e-15] [-7.12946e-08, -0.815515, 0.578735] [5.05947e-08, 0.578735, 0.815516] [-1.17, 1.52, 0.88]]
      template:t="ger_repair_kit_item+item_in_world"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.258819, -0.965926, -5.96046e-08] [0.965926, 0.258819, -4.9738e-14] [1.54269e-08, -5.75736e-08, 1] [-1.70, 1.38, -0.75]]
      template:t="guitar"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[9.27258e-08, -0.70058, -0.713573] [-1, -2.99867e-08, -1.00505e-07] [4.90141e-08, 0.713573, -0.70058] [-1.17, 1.57, -0.87]]
      template:t="grenades"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.7982, -0.0501598, -3.59263e-07] [-3.58111e-07, 2.95967e-08, -0.799774] [0.0501597, 0.798198, 7.0786e-09] [1.38, -0.36, 0.05]]
      template:t="german_balkenkreuz_flag_turret_decor"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[-1, 8.74228e-08, -3.55271e-15] [-7.12946e-08, -0.815515, 0.578735] [5.05947e-08, 0.578735, 0.815516] [-1.16, 1.46, -0.99]]
      template:t="decor_panzerfaust_60+panzerfaust_100_gun_vehicle_item"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[-0.0091281, -0.600274, 0.799742] [0.00778826, 0.799708, 0.600338] [-0.999928, 0.0117086, -0.00262473] [-0.03, 1.55, -0.89]]
      template:t="jap_advanced_medkit_item+item_in_world"
      nodeName:t="root"
    }
  } 

  "vehicle_seats__effectors:array"{
  }

  "dm_parts_repair_names:list<t>"{
    part:t="part:t="
    part:t="drive_turret_h"
    part:t="drive_turret_v"
    part:t="cannon_breech"
    part:t="engine"
    part:t="transmission"
    part:t="gun_barrel"
    part:t="gun_barrel_01"
    part:t="gun_barrel_02"
    part:t="gun_barrel_03"
    part:t="gun_barrel_04"
    part:t="gun_barrel_05"
    part:t="track_r"
    part:t="track_l"
    part:t="track_r_01"
    part:t="track_l_01"
    part:t="wheel_l_back"
    part:t="wheel_l_front"
    part:t="wheel_l_drive"
    part:t="wheel_r_back"
    part:t="wheel_r_front"
    part:t="wheel_r_drive"
    part:t="wheel_r_01"
    part:t="wheel_l_01"
  }

  "disableDMParts:list<t>"{
    part:t="ex_decor_r_06"
    part:t="ex_decor_r_05"
  }

  _group{
    _tags:t="render"
    animchar_camera_target__node_name:t="gun_barrel_01"
    animchar_camera_target__node_offset:p3=0.0, 1.0, 0.0
    animchar_camera_target__nodeIndex:i=-1
  }

  "vehicle_seats__seatsProvideOrder:tag"{
  }

  "vehicle_seats__seats:shared:array"{

    "seats:object"{
      name:t="main_gunner"
      locName:t="vehicle_seats/gunner"
      attachNode:t="gunner"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[0.998634, -0.0522494, 3.22645e-15] [0.0522494, 0.998634, 5.83176e-09] [-3.04709e-10, -5.82379e-09, 1.0] [0.0, -0.21, -0.0]]
      seatComponent:t="isGunner"
      nextSeat:t="driver"
      shouldHideOwner:b=no
      receiveDamageFromDMPart:t="gunner"
      cameraNodeName:t="gun_barrel_01"
      directTurretControl:b=yes
      canPlaceManually:b=yes
      cameraOffset:p3=-0.2, 0.2, 0.0
      isHoldGunModeAllowed:b=no

      "turretNames:array"{
        turretNames:t="turret_01"
      }

      "loaderTurretNames:array"{
        turret:t="turret_01"
      }

      "effectors:object"{
        r.hand:t="righthand_2"
        l.hand:t="lefthand_2"
        r.foot:t="pedal_rfoot_2"
        l.foot:t="pedal_lfoot_2"
      }
    }

    "seats:object"{
      name:t="driver"
      locName:t="vehicle_seats/driver"
      seatOwnsEntityControl:b=yes
      attachNode:t="driver"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[0.992464, 0.121849, 8.6818e-14] [-0.121849, 0.992464, -3.38511e-08] [-4.12471e-09, 3.35951e-08, 0.999806] [-0.11, -0.36, 0.02]]
      seatComponent:t="isDriver"
      nextSeat:t="main_gunner"
      shouldHideOwner:b=no
      receiveDamageFromDMPart:t="driver"
      cameraNodeName:t="bone_camera_driver"
      seatAnimUpper:t="drive_passenger"
      seatAnimLower:t="drive_passenger"
      cameraType:t="commander"
      cameraOffset:p3=-0.4, 0.0, 0.0
      isHoldGunModeAllowed:b=no
      canPlaceManually:b=yes
      cockpitTemplate:t="germ_sdkfz_251_1_driver_cockpit"

      "effectors:object"{
        r.hand:t="righthand_4"
        l.hand:t="lefthand_4"
        r.foot:t="pedal_rfoot_4"
        l.foot:t="pedal_lfoot_4"
      }
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66093e-08, 0.0, 0.949747] [-0.0, 0.949492, 0.0] [-0.949743, -0.0, -5.66091e-08] [-1.0, 1.15, -0.58]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66213e-08, 0.0, -0.949948] [0.0, 0.949743, 0.0] [0.949899, 0.0, -5.66184e-08] [-1.05, 1.15, 0.56]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66093e-08, 0.0, 0.949747] [-0.0, 0.949492, 0.0] [-0.949743, -0.0, -5.66091e-08] [-1.5, 1.15, -0.58]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66213e-08, 0.0, -0.949948] [0.0, 0.949743, 0.0] [0.949899, 0.0, -5.66184e-08] [-1.55, 1.15, 0.56]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66093e-08, 0.0, 0.949747] [-0.0, 0.949492, 0.0] [-0.949743, -0.0, -5.66091e-08] [-2.0, 1.15, -0.58]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      locName:t="vehicle_seats/shooter"
      attachNode:t="commander"
      shouldHideOwner:b=no
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[0.9756, -0.207853, 0.0681933] [0.217301, 0.956563, -0.193191] [-0.0250834, 0.203356, 0.978681] [1.31, -0.5, -0.02]]
      seatComponent:t="isPassenger"
      receiveDamageFromDMPart:t="commander"
      seatAnimUpper:t="drive_passenger"
      seatAnimLower:t="drive_passenger"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      locName:t="vehicle_seats/shooter"
      attachNode:t="machine_gunner"
      shouldHideOwner:b=no
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[0.981638, 0.190809, 0.0] [-0.190809, 0.981638, 0.0] [0.0, 0.0, 1.00012] [-0.09, -0.36, 0.02]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      receiveDamageFromDMPart:t="commander"
      seatAnimUpper:t="drive_passenger"
      seatAnimLower:t="drive_passenger"
      canPlaceManually:b=yes
      cockpitTemplate:t="germ_sdkfz_251_1_passenger_cockpit"

      "effectors:object"{
        r.hand:t="righthand_5"
        l.hand:t="lefthand_5"
        r.foot:t="pedal_rfoot_5"
        l.foot:t="pedal_lfoot_5"
      }
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66213e-08, 0.0, -0.949948] [0.0, 0.949743, 0.0] [0.949899, 0.0, -5.66184e-08] [-2.05, 1.15, 0.56]]
      seatComponent:t="isPassenger"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      canPlaceManually:b=yes
      seatEnum:t="stool_seat"
      holdingGunPassengerVertLookLimit:p2=0.0, 85.0
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[1.90355e-06, -0.258413, 0.964424] [-1.43542e-06, 0.962215, 0.257821] [-0.998741, -1.87868e-06, 1.46732e-06] [-1.0, 1.1, -0.62]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[7.94122e-07, -0.104399, -0.993303] [2.42817e-06, 0.991231, -0.104181] [0.998935, -2.32787e-06, 1.04379e-06] [-1.0, 11.0, 0.54]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[1.90355e-06, -0.258413, 0.964424] [-1.43542e-06, 0.962215, 0.257821] [-0.998741, -1.87868e-06, 1.46732e-06] [-1.5, 1.1, -0.62]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[7.94122e-07, -0.104399, -0.993303] [2.42817e-06, 0.991231, -0.104181] [0.998935, -2.32787e-06, 1.04379e-06] [-1.5, 1.1, 0.54]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[-5.66093e-08, 0.0, 0.949747] [-0.0, 0.949492, 0.0] [-0.949743, -0.0, -5.66091e-08] [-2.0, 1.1, -0.62]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }

    "seats:object"{
      name:t="passenger"
      attachNode:t="root"
      locName:t="vehicle_seats/shooter"
      ignoreAttachNodeRotation:b=yes
      attachTm:m=[[7.94122e-07, -0.104399, -0.993303] [2.42817e-06, 0.991231, -0.104181] [0.998935, -2.32787e-06, 1.04379e-06] [-2.0, 1.1, 0.54]]
      seatComponent:t="isPassenger"
      isHoldGunModeAllowed:b=no
      cameraNodeName:t="bone_camera_driver"
      shouldHideOwner:b=yes
    }
  }

    "animcharDecals:AnimcharDecals"{
    }
    "animcharDecalsData:array"{
    "animcharDecalsData:object"{
      textureName:t="simple_09"
      slot:i=0
      scale:r=2.0
      rotation:r=90.0
      twoSided:b=true
      oppositeMirrored:b=true
      mirrored:b=true
      dProj0:p4=0.0, 1.0, 1.5, -1.
      dProj1:p4=0, 0, 0, 0
      uProj0:p4=-0.968, 0.251, 0.002, 2.037
      uProj1:p4=0, 0, 0, 0
      vProj0:p4=-0.241, -0.935, 0.259, 1.048
      vProj1:p4=0, 0, 0, 0
      locNorm0:p3=0.067, 0.25, 0.966
      locNorm1:p3=0, 0, 0
      locPos0:p3=1.659, 273, 0.415
      locPos1:p3=0, 0, 0
    }
  }
}

// custom decoration 

german_backpack_tan_decor{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="mbs_backpack_a"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}


of interest, more precisely, what allows things to get attached in the first place, it’s the entity which
every code will need::

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[...]]
      template:t=""
      nodeName:t=""
    }
  } 

which, by defining the template, and giving it a nome, the game will take what you feed the info, and apply them phisically on the vehicle. which moves when that one moves too.

additionally, as previously hinted, if we analyze the different kind that i have used:

we can see a medkit, placed on the side, which you can pick up:

same for the tool kit and what not.

so, for the sake of examples ( and… i needed to do one )

we’ll try to recreate a sherman m4a2 with m1a1 blade dozer kit together!

additionally, perhaps, we’ll stich some decorations, and a toolbox kit.

to start, we’ll need the vehicle in entities.blk.

you can either create a new type of vehicle which you will be able to place on the map, or replace the existing one.

it depends what you are trying to do, but rule of thumb is,

  • if you want players to use it, or make the vehicle somewhat unique, you create a new type. additionally, can also be used in custom profiles

  • if you want players to spawn with it already, and just modify the vehicle it self, you “replace it”

so, it will look something like:

// If you want a new entity

m4a2_w_m1_blades{
  _use:t="us_m4a2_sherman_1944"

}

// If you want to replace an existing one

us_m4a2_sherman_1944{
  _override:b=yes

}

so, first things first,

  • place the vehicle, and save it:

  • open the scene.blk, find your vehicle, and change the following line transform with these coordinates:

( or simply open the vehicles properties and type 0,0,0 )

transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [0, 0, 0]]

so we’ll have out vehicles on the platform:

  • place all decorations that you need and want.

in my case, a medkit, an ammo tank box, the m1a1 dozer ( which it’s a rendinst ) and additionally, a bag ( another rendinst )

  • if you you are planning on making rendinsts into actual decorations, you’ll need to transform them into a template for each over entities.blk .

in my case:

m1a1_dozer_decor{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="ussr_tractor_c_65_bucket"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

large_decor_bag{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="canvas_roll"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

you’ll see after why.

  • move around and position where you would like said decorations to go:
    ideally, in my case, this is where i would like them to go:


:warning: i would not recommend resizing in this first phase :warning:

  • open both the entities.blk, and the scene.blk ( which should be already open by this point ) copy the templates and coordinates from the scene, and insert them over the entities:

in my case,
i’ll have to transform this:

entity{
  _template:t="game_rendinst_decor"
  transform:m=[[1, 0, 0] [0, -4.37114e-08, -1] [-0, 1, -4.37114e-08] [-0.416098, 1.28392, -1.19847]]
  ri_extra__name:t="canvas_roll"
  ri_extra__hasCollision:b=no
}

entity{
  _template:t="game_rendinst_decor"
  transform:m=[[1, 0, 0] [0, -1, -8.74228e-08] [-0, 8.74228e-08, -1] [1.63073, 1.21432, -0.00114463]]
  ri_extra__name:t="ussr_tractor_c_65_bucket"
  ri_extra__hasCollision:b=no
}

entity{
  _template:t="jap_advanced_medkit_item+item_in_world+node_attached_itm"
  transform:m=[[0.985727, -0.16835, 0] [0.16835, 0.985727, 0] [-0, 0, 1] [-3.06715, 1.25624, 0.390646]]
}

entity{
  _template:t="usa_repair_kit_item+item_in_world"
  transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-3.0757, 1.31182, -0.31937]]
}

entity{
  _template:t="tank_decor_box_01_decor+item_in_world"
  transform:m=[[1, 0, 0] [-0, -4.37114e-08, 1] [0, -1, -4.37114e-08] [-0.180569, 1.48062, 1.38751]]
}

from scene .blk into entities.blk

and the result should look like:

m4a2_w_m1_blades{
  _use:t="us_m4a2_sherman_1944"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, -4.37114e-08, -1] [-0, 1, -4.37114e-08] [-0.416098, 1.28392, -1.19847]]
      template:t="large_decor_bag"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, -1, -8.74228e-08] [-0, 8.74228e-08, -1] [1.63073, 1.21432, -0.00114463]]
      template:t="m1a1_dozer_decor"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.985727, -0.16835, 0] [0.16835, 0.985727, 0] [-0, 0, 1] [-3.06715, 1.25624, 0.390646]]
      template:t="jap_advanced_medkit_item+item_in_world"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-3.0757, 1.31182, -0.31937]]
      template:t="usa_repair_kit_item+item_in_world"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [-0, -4.37114e-08, 1] [0, -1, -4.37114e-08] [-0.180569, 1.48062, 1.38751]]
      template:t="tank_decor_box_01_decor"
      nodeName:t="root"
    }
  } 
}

unfortunately. as you’ll soon find out. it’s not over.

but, save the conversion, and restart:

and you’ll be greated with horror:

miss placed objects not like you originally planned.

to fix this, there are two cases but… each objects have different axes and works differently from the editor, and the relatives. can’t say much beside play around.

BUT, the most cases, it’s the missplaced object:

such as, for example, my medkit and toolbox. the rotation is correct, but the placement, is not.

in order to fix it, you can select the " generated " item ( because that one is the one we are interested ) and remove the originally placed item:

and change around the numbers in this parameter inside your generated decoration:

( if it doesn’t work, try to drag it normally. because sometimes it allows you to drag it around, other times it doesn’t let you, and therefore you’ll have to tweak those parameters manually. just as a side note, if you are able to drag it, double click on the localTm to refresh numbers. otherwise you save it’s original position ( the incorrect one and i learned that the hard way ) to then paste the refreshed numbers onto entities .blk )

  • save these numbers, and replace them in entities.blk.

  • and do pretty much the same for those who the rotation remained the same, but were just misslocated.

on the other hand, for those who rotation changed, and other parameters,

keep the original item that you placed, and try to change of 90° one of the rotation axes.

very hard to tell, since as previously said, each object works in a different way.

but, in my case, i noticed that the item is inverted of 180°

which, for experience, as previously hinted, to understand how it works, try to rotate of only 90°. which it will be easier to understand and fix later.

because things aren’t precisely like how they look.

for example, in my case; i know that the object is inverted of 180°, logically, one would use the " red " axe, but if i do:

upon saving and restarting ( and changing the numbers from the scene to .blk to entities .blk ):

it… actually worked. uh. didn’t expected that to be honest. because it’s very rare, and something you’ll have to take in consideration.


because sometimes it doesn’t.

it mostly depend from the object. but yeah, you gotta play around and lots of trial and error.

anyway, since the position is okey, gotta fix it’s current location and remove the first placed decor since i don’t need it anymore.

and the same happens with the scale.
you’ll have to play around. but i know for certain there that axes are not correlated to the editor.
for example, the height of an object might change the lenght instead.
or the lenght might change the wideness instead. truly messy.

but despite the difficulties we managed to make a sherman dozer with different type of decorations ( some workings, others just visual ) by using rendinsts too!

code:

m4a2_w_m1_blades{
  _use:t="us_m4a2_sherman_1944"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, -4.37114e-08, -1] [-0, 1, -4.37114e-08] [-0.37, -1.53, 1.36]]
      template:t="large_decor_bag"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, -1, -8.74228e-08] [-0, 8.74228e-08, -1] [1.65, -0.03, 1.13]]
      template:t="m1a1_dozer_decor"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.985727, -0.16835, 0] [0.16835, 0.985727, 0] [-0, 0, 1] [-3.10, 0.36, 1.30]]
      template:t="jap_advanced_medkit_item+item_in_world"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-3.10, -0.30, 1.30]]
      template:t="usa_repair_kit_item+item_in_world"
      nodeName:t="root"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, -0] [-0, 1.31134e-07, -1] [0, 1, 1.31134e-07] [-0.180569, 1.48062, 1.38751]]
      template:t="tank_decor_box_01_decor"
      nodeName:t="root"
    }
  } 
}

( i have to continue over the messages because i have reached txt limit )

coming next, are clothing and guns attachments

5 Likes

Excessive amount of “manual labour”
Yikes.

Some kind of tool is really needed for this thats for sure. But well done to this guide!

2 Likes

then we proceed to the intermediate ones such as:

Clothing Attachment

clothing attachment allows you to attach rendinsts, decorations, and many more onto cosmetics.
but generally, make unique things that wouldn’t be normally possible to do.

few examples that i previously shown, was to put an US rigger as a police badge on a uniform.
https://i-enlisted.cdn.gaijin.net/original/3X/c/2/c2e6fcac29bf0a83dcad23053088675ad1cce6c6.jpeg

the cool thing, is that you can attach functional things like we previously did on vehicles, but on soldier.
the player won’t be able to grab them and use them unfortunately.
but you can make other players interact with other players. in the case like i did where i attached m4s magazines onto backpacks for teammates to grab. and that member acting as ammo carrier of a squad everytime he respawns:


quite neat!

although, compared to vehicles, they are quite complex because they have lots of weird and different axes. ( special thanks to @Euthymia07 for directing me to the exact location of every node of humans )

so, the differences, is that unlike vehicles, we will not use " root ", but “Bips”. Bips are parts of bodies.
which you can find here:
humans.blkx.txt (45.4 KB)

and generally, the most you’ll probably want to use,
are generally
Bip01 Head ( self explanatory )
Bip01 Spine1 ( upper torso )
Bip01 Spine ( lower torso )
Bip01 Pelvis ( lower the weist area )
Bip01 Belts
and the rest you’ll find them inside said blkx that i sent above.

Animchar Method / Decor

anyway, for sake of time and semplicity, we’ll make a new one from scratch in few methods.
and to be simple, yet precise, we are gonna attempt to recreate this:

attach a grenade over the american uniform. ( an animchar )

i can show you the decorative way ( meaning that, the grenade is just a cosmetic ), and the “functional” way ( the grenade can be picked up by other soldiers if in proximity )

first and foremost,
you can either create them, or replace current outfits to accomodate new decorations.

for the sake of examples, and … since i’m doing something that i’ll need for my profiles, i’ll create an entire new entity.

therefore,

  • place the clothing that you need / want to add something or modify:

  • create or replace the entity you’ll work on ( make sure to give different names otherwise it won’t appear if you are creating a new entity )

as i said, in my case, since i’m creating a new one, it has to be:

airborne_jacket_with_grenade{
  _use:t="attachable_wear_airborne_jacket_item"


}

if you just want to replace it instead, you’ll have to:

attachable_wear_airborne_jacket_item{
  _override:b=yes


}

but the process is similar.

  • save, open the editor, and restart

  • place the jacket at the coordinates 0,0,0 by editing transform parameter inside.


    ( or through the scene .blk )

  • make sure to reset all rotation axes:


    ( click 3 times the highlighted button, or it will screw over all of your coordinates and future work )

  • place the decor that you need and want and covert them, in this case, an us grenade:

as first method, because this is a grenade, and has animchars, we’ll have to create a decorator ( but if you want to make it functional, you can just leave it as it is )

X{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__hasCollision:b=no
  collres__res:t="Y"
  animchar_render__enabled:b=yes
  animchar__res:t="Y"
}

X= custom name
Y Properties of the animchar you’re trying to make into a decorator.

therefore, in our case, it will be:

pineapple_grenade_decor{
  _use:t="base_vehicle_decor"
  collres__res:t="grenade_mk2_collision"
  animchar__res:t="mk2_with_fingers_grenade_char"
}

which each info of char and collres you can find inside the grenade or object properties you’re looking at.

and this code, will go over entities.blk outside from the tunic or the object you’re trying to create.

  • use the grenade that you spawned, and position it where you’d want the grenade to be.

  • Save

  • paste the following inside the entites.blk underneath the item you’re trying to add / modify things

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[...]]
      template:t=""
      nodeName:t=""
    }
  }

to look like:


airborne_jacket_with_grenade{
  _use:t="attachable_wear_airborne_jacket_item"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[...]]
      template:t=""
      nodeName:t=""
    }
  }
}
  • open scene.blk, find the grenade or the item that you want to be as decorator ( should be the last object ), copy the transform coordinates and place them inside the " relativeTM " inside entities.blk.
    and insert the name of the entity that you previously created

so, from the scene, we’ll find:

entity{
  _template:t="mk2_grenade_item+item_in_world"
  transform:m=[[-0.18564, 0, 0.982618] [0, 1, 0] [-0.982618, 0, -0.18564] [0.174635, 1.3382, 0.053727]]
}

and in the entities must become, this:

airborne_jacket_with_grenade{
  _use:t="attachable_wear_airborne_jacket_item"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[-0.18564, 0, 0.982618] [0, 1, 0] [-0.982618, 0, -0.18564] [0.174635, 1.3382, 0.053727]]
      template:t="pineapple_grenade_decor"
      nodeName:t="Bip01 Spine1"
    }
  }
}

it’s own relatives, and then the templates given from the decorator that we placed.
the Nodename is essentially where we want the item to appear. for the sake of time and experience, Bip01 Spine1 is where it will follow the upper chest part so that the grenade doesn’t look odd.

  • save and restart

as you can see, the item will be generated, but incorrectly placed:

so we’ll have to make ( some time consuming ) adjusments.

first, let’s correct the rotation of the grenade. which it’s the most difficult part.

you’ll need to adjust and tweak rotations. but keep in mind that it’s not gonna be like you might expect or thing. each object has it’s own axes and what not. which may be different from the editor ones. same goes for resizing the object.

so, ( as i’m testing with you guys ) i’m gonna try to position it as we originally planned.

therefore, i’ll try to tweak the red axe using the original / wanted position. since we cannot touch or modify the entity through the generated rendinst on the editor. you still need the first one you positioned.

since i’m slighlty experienced with these, i’m gonna try to twist of 90° the blue axe in hoping that it changes horizontally. i know it sounds and looks illogical, but trust me, axes are all different, so you have to figure out for your own

if i save, copy and paste the numbers ( from the object from scene, to entities relativesTM ), my result is:

which partially corrected the route.

let’s try one more time, this time though with the green axe

and, it did mostly what i wanted to do. i just need to twist it more towards the outside, just like in the photo reference:

and lasty, after a few attempts, i just changed the blue axe of 180 and it seemed to do the trick:

entity{
  _template:t="mk2_grenade_item+item_in_world"
  transform:m=[[4.37114e-08, -1, 4.37114e-08] [-6.83673e-15, -4.37114e-08, -1] [1, 4.37114e-08, -8.74742e-15] [0.148507, 1.32978, -0.116707]]
}

now, we are mostly done ,but as everyone notices, the grenade is still miles away from it’s original position, luckely it’s the easiest part.

all you will have to do, is to grab the grenade:

and move it in place:

after that;
open the properties of the generated grenade, and look for this parameter:

make sure to click a bunch of time in the text field so that the numbers refresh to the newer position, copy them, and replace the last 3 digits from the entities.blk to these that we got:

so from:

      relativeTm:m=[[4.37114e-08, -1, 4.37114e-08] [-6.83673e-15, -4.37114e-08, -1] [1, 4.37114e-08, -8.74742e-15] [0.148507, 1.32978, -0.116707]]

will become:

      relativeTm:m=[[4.37114e-08, -1, 4.37114e-08] [-6.83673e-15, -4.37114e-08, -1] [1, 4.37114e-08, -8.74742e-15] [0.14, 0.14, 0.16]]

save the entities, and restart your game.

result:



the grenades will remain attached!

Rendinst Method

another example, but this time, it’s more around rendinsts decorations on clothings.

as an example, we’ll make custom backpacks:

the only differences from the previous methods, are the node inside entities it self:

so, IF your decoration is a rendinst;

you will have to create it’s own entities code:

X{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="Y"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

X= name of the decoration
Y= name of the rendinst that you are using.

to make an example, i’ll use this rendist of a german backpack onto a sumpftarn tunic

and then you will have to move it, twist around and what not.

but the entity will be:

german_backpack_tan_decor{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="mbs_backpack_a"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

and to spare both of our time, here is a result:

sumpftarn_a_green_zeltbahn{
  _use:t="attachable_wear_zeltbahn_03_ger_summer_item"

  item__template:t="attachable_wear_zeltbahn_03_ger_summer_item"

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1.74845e-07, -1, 1.74846e-07] [7.0517e-14, -1.74846e-07, -1] [1, 1.74845e-07, 3.99461e-14] [-0.21, -0.21, 0.00]]
      template:t="german_backpack_tan_decor"
      nodeName:t="Bip01 Spine1"
    }
  }
  "animchar__objTexReplace:object"{
    "zeltbahn_tex_d*":t="ger_knochensack_m40_sumpftarn_tex_d*"
    "ger_tunic_3_tex_d*":t="ger_tunic_dgr_tex_d*"
  }
}

german_backpack_tan_decor{
  _use:t="game_rendinst_decor"
  _use:t="base_vehicle_decor"
  ri_extra__name:t="mbs_backpack_a"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

and to conclude, the much more difficult

Guns Attachments

guns attachments works pretty much like the previous methods combined. except, you’ll have to give the attach decorators both the _gun & gun_item of a weapon.

other exception, is the node.

which i highly suggest you to use " weaponRoot "

anyway, the reason why it’s much more difficult in my opinion, it’s because axes are entirely different and depend from both the gun, and the object you’re trying to attach.

so, in my case, i wasted around 7 hours to make one single gun. with only 3 decors :skull:

which, to my surprise ( not really ) when i tried to carry over the same customization onto another gun, everything was even more messed up.

so i can’t really show or say much.
which for sake of time i’m gonna leave two codes:


Glock_22_gun{
  _use:t="dreyse_m1907_gun"

  item__weapTemplate:t="Glock_22_gun"
  item__template:t="Glock_22_gun_item"
  gun__shotFreq:r=4.5
  gun__reloadTime:r=3
  item__name:t="Glock 22"
  gun__locName:t="Glock 22"
  gun__blk:t="%ugm/glock.blk"
  item__proto:t="%ugm/glock.blk"

  gun__maxAmmo:i=15
  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.0467371, 0, 0] [0, -5.5053e-09, 0.125947] [0, -0.462524, -2.02175e-08] [0, -0.00326478, 0.00133297]]
      template:t="myRendinst"
      nodeName:t="gunFx_main"
    }
  }
}


Glock_22_gun_item{
  _use:t="dreyse_m1907_gun_item"

  item__weapTemplate:t="Glock_22_gun"
  item__template:t="Glock_22_gun_item"

  item__name:t="Glock 22"
  gun__locName:t="Glock 22"

}

and i’ll explain what i did,

so, essentially, i took the dreyse pistol, and turned it into a glock by modifying various parameters. while adding a " cover " since the dreyse pistol looks nothing like a glock. and quite possible, even my own version does not look like a glock, but you get the point.

in this other example, i took a different approach and wanted to do a long scoped scar:


scar_body_decor{
  _use:t="base_vehicle_decor"
  animchar__res:t="fn_scar_char"
  collres__res:t="rgd_33_pack_collision"
  "disableDMParts:list<t>"{
    part:t="ammo"
    part:t="fn_scar_holster"
    part:t="fn_scar_magazine"  
  }
}

scar_magazine_decor{
  _use:t="base_vehicle_decor"
  animchar__res:t="steyr_aug_a1_ammo_char"
  collres__res:t="rgd_33_pack_collision"

}

sniper_scar_magazine{
  _use:t="barrett_m82a1_magazine"
  ammo_holder__ammoCount:i=20
}

sniper_scar_gun{
  gun__blk:t="%ugm/Scar_Sv_Sniper.blk"
  item__proto:t="%ugm/Scar_Sv_Sniper.blk"
  _use:t="barrett_m82a1_gun"
  gun__maxAmmo:i=20
  item__weapTemplate:t="sniper_scar_gun"
  item__template:t="sniper_scar_gun_item"
  item__weight:r=4.5
  gun__locName:t="SCAR-L-STD"
  gun__sightsDistance:r=0.3
  gun__shotFreq:r=3.416
  gun_spread__maxDeltaAngle:r=0.15
  gun_deviation__omegaRange:p2=30.0, 90.0
  gun_deviation__omegaDevInc:p2=0.07, 0.5
  gun_deviation__movementRange:p2=2.1, 4.0
  gun_deviation__movementDevInc:p2=0.0, 15.0
  gun_deviation__onShotDeviationChange:r=0.0
  gun_deviation__shotTau:r=0.1
  gun_deviation__extraDeviationTau:r=0.2
  gun_deviation__maxDeviation:r=20.0
  gun__reloadTime:r=3.7
  gun__standOffset:p3=0.2, 0.05, 0.15
  gun__crouchOffset:p3=0.2, -0.07, 0.25
  gun__length:r=0.4
  gun__recoilAmount:r=0.026
  gun__recoilDirAmount:r=0.7
  gun__recoilDir:r=0.0
  gun__visualRecoilMult:r=1.0
  gun__locName:t="Fn Scar Sh"
  item__name:t="Fn Scar Sh ( 20 Rounds )"
  
  "disableDMParts:list<t>"{
    part:t="weaponMesh"
    part:t="magazine_mesh"
    part:t="ammo_mesh"
    part:t="bolt_mesh"
  }

 _group{
    _tags:t="sound"       
    gun_sound__forceOneshot:b=yes   
  }

  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1,0,0][0,1,0][0,0,1][0.01305, 0.105,0.065]]
      template:t="scar_body_decor+item_in_world"
      nodeName:t="weaponRoot"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.001, -0.13539, -0.070557]]
      template:t="scar_magazine_decor"
      nodeName:t="weaponRoot"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.633562, 0, 8.50388e-08] [0, 1, -0] [-1.80502e-07, 0, 0.792511] [0.0165, 0.3, 0.095]]
      template:t="bipod_decor"
      nodeName:t="weaponRoot"
    }
  }

  "gun_sound__shotPath:shared:object"{   
    _tags:t="sound"
    path:t="/weapon/mgun/krieghoff_fg"
  }

  "sound_irqs:shared:object"{
    _tags:t="sound"

    "reload1:object"{
      path:t="/weapon/mgun/fn_scar/reload1/change_ammo"
    }

    "reload2:object"{
      path:t="/weapon/mgun/fn_scar/reload2/change_ammo"
    }

    "reload3:object"{
      path:t="/weapon/mgun/fn_scar/reload3/change_ammo"
    }
  }
}

sniper_scar_gun_item{
  _use:t="barrett_m82a1_gun_item"
  selWeaponVar:t="Scar Sh ( Sniper )"
  item__weapTemplate:t="sniper_scar_gun"
  item__template:t="sniper_scar_gun_item"
  gun__locName:t="Fn Scar Sh"
  item__name:t="Fn Scar Sh ( 20 Rounds )"
  "attach_decorators__entities:list<eid>"{ 
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1,0,0][0,1,0][0,0,1][0.01305, 0.105,0.065]]
      template:t="scar_body_decor+item_in_world"
      nodeName:t="weaponRoot"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.001, -0.13539, -0.070557]]
      template:t="scar_magazine_decor"
      nodeName:t="weaponRoot"
    }
    "attach_decorators__templates:object"{
      relativeTm:m=[[0.633562, 0, 8.50388e-08] [0, 1, -0] [-1.80502e-07, 0, 0.792511] [0.0165, 0.3, 0.095]]
      template:t="bipod_decor"
      nodeName:t="weaponRoot"
    }
  }

  "disableDMParts:list<t>"{
    part:t="weaponMesh"
    part:t="magazine_mesh"
    part:t="ammo_mesh"
    part:t="bolt_mesh"
  }
}

so, i replaced the barret, hide it, and use decorations to make it visually looking like a different weapon.


Considerations & various issues

but, in the end, there are many issues with these methods. because sometimes they can ghost in first person, or look something entirely cursed:


even though, in third, they look “fine”:

additionally, there will always be some problems with clothings as nodes aren’t… entirely stiched.

some failed experiment of trying to make a webbing and a scarf together for a much longer us coat opposed to what we have, but it didn’t properly followed the body part:

and, not to mention, this is really, really time consuming.

we it would be at about time if we could get something similar:

Fixes & quality of life Needed regarding editor, custom matches & Replay

more precisely;

Some sort of 3d asset composer / wardrobe / decals template generator program [For The Editor]

because believe it or not, placing decals is even worse than placing decorators.

and prolly a death sentence waiting to happening.

but, glad to help.

since i doubt we’ll get something in a forseable future, i’m afraid these methods are the only thing we have currently.

5 Likes

how’d you make that cavalry thing?

game_rendinst_decor{

_override:b=yes

  ri_extra__name:t="german_sculpture_horse_a"
  ri_extra__hasCollision:b=no
}
wbm_r75{

_override:b=yes

animchar_render__enabled:b=no
_use:t="game_rendinst_decor"
"vehicle_seats__seats:shared:array"{

    "seats:object"{
      name:t="driver"
      locName:t="vehicle_seats/driver"
      seatOwnsEntityControl:b=yes
      attachNode:t="char_driver_pivot"
      ignoreAttachNodeRotation:b=yes
      entranceNode:t="char_driver_landing"
      attachTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0, 1.5, -0.9]]
      seatComponent:t="isPassenger"
      nextSeat:t="commander"
      shouldHideOwner:b=no
      cameraNodeName:t="bone_camera_driver"
      seatEnum:t="left_seat"
      seatAnimUpper:t="moto_drive_driver"
      seatAnimLower:t="moto_drive_driver"
      isHoldGunModeAllowed:b=yes
      smokeScreen:b=no
	  
    }
}
}
3 Likes

Thanks!

2 Likes

Vehicles having med kit, ammobox, nades which infantry could use would be a nice feature in game officially.

I would like to edit recoil values for guns but the stats dont seem to line up with code i found using datamine for example lets take a look at stg 44
stats that seem to be fine are:
recoil mult
visual recoil
recoildir
recoil offs

But then the recoil ammount is diferent, 39 and 10 is described as 0.049 and 0.8

So my question is how it works?

my reference sources below
stg recoli
stg_44_gun{
_extends:t=“equipable_gun”
_extends:t=“stg_ww2_preset”
_extends:t=“stg_44”
_extends:t=“assault_rifle_rapid_muzzle_preset”
_extends:t=“hit_effect_group_12_14mm”
_extends:t=“gun_switch_firing_mode_sound”
_extends:t=“rifle_gun_aim_sound”
gun__standOffset:p3=0.2, 0.05, 0.15
gun__crouchOffset:p3=0.2, -0.07, 0.25
gun__length:r=0.4
gun__recoilAmount:r=0.049
gun__recoilDirAmount:r=0.8
gun__recoilDir:r=0.3
gun__visualRecoilMult:r=1.3
meleeSoundType:t=“mgun”
gun__recoilControlMult:r=0.3
gun__recoilOffsMult:r=0.3
gun__rotationSpringMult:p3=0.75, 0.9, 0.9
gun_anim_var__fpsGunOffsetAlong:r=0.13
gun_anim_var__fpsGunOffsetAcross:r=0.025
gun_anim_var__fpsGunOffsetUp:r=0.025

It works based on a simple formula, here it is:

itemData.recoilAmountVert <- 1000 * recoilAmount * recoilDirAmount 
itemData.recoilAmountHor <- 1000 * recoilAmount * (1.0 - recoilDirAmount)
2 Likes

so i made a system of equasions for ver5 and hor1 with recoil multiplayer of 0.3 (like for stg_44 for example)
a=recoilAmount
d=recoilDirAmount
stg recoli

is that correct?

so, when is the guide for making entirely custom vehicles ( In functionality not model)?, and when is the guide for modifying vehicle properties; Tank’s speed, reload time, gun’s caliber, penetration power, explosive size etc?
also speakibg about the vehicle properties modifcation, will it be in entities.blk file or only the ingame editor?

all things you can find in the editor are things you can modify with entities.blk. Thats how powerful entities.blk is.

There is no when, discover on your own and enjoy the process of discovery. Hint: The properties can be found on the turret entity but not the tank itself (e.g. us_m24_chaffee’s turret is m24_turret_01_75mm_m6, by modifying the turrets, you can do the tank gun penetration power and explosive power (caliber is just a display text, and has no effect on penetration numbers))
Tank movement speed is on the tank itself (e.g. us_m24_chaffee), but turret turn are “turret__yawSpeed:r=10.0” and “turret__pitchSpeed:r=10.0” on turret entity (m24_turret_01_75mm_m6)