Difference between revisions of "Custom units creation"

From War Thunder Wiki
Jump to: navigation, search
m
(Edits)
Line 1: Line 1:
{{DISPLAYTITLE:Custom units creation}}
 
 
 
This page will explain step by step how to create custom units that can be used in singleplayer missions using existing assets which can be accessed through the CDK.
 
This page will explain step by step how to create custom units that can be used in singleplayer missions using existing assets which can be accessed through the CDK.
 
__TOC__
 
  
 
= Creating objectGroups =
 
= Creating objectGroups =
 
+
In order to make a custom unit you have to find interesting assets in the Asset Viewer, then use their names to create a custom BLK file.
In order to make an custom units you have to find interesting your assets in the Asset Viewer, then use their names to create a custom BLK file.
 
 
It's possible to put multiple objects and textures into a single BLK file and make for example an airfield.
 
It's possible to put multiple objects and textures into a single BLK file and make for example an airfield.
 
In most cases objectGroups can't be destroyed and when it's possible they have a very simple damage model and their HP amount can't be adjusted.
 
In most cases objectGroups can't be destroyed and when it's possible they have a very simple damage model and their HP amount can't be adjusted.
  
 
== Finding objects using CDK tools ==
 
== Finding objects using CDK tools ==
 
+
# Open the Asset Viewer which can be found in '''WarThunder\WarThunderCDK\assetviewer.cmd'''
:1. Open the Asset Viewer which can be found in WarThunder\WarThunderCDK\assetviewer.cmd
+
# Find the '''Filter''' tab which should be located in the left bottom corner, it can be used to find objects
:2. Find a '''Filter''' tab which should be placed in the left bottom corner, it can be used to find objects
+
# As an example type '''det_trench_half_c''' there and wait until the Asset Viewer finds this objectGroup
:3. As an example type '''det_trench_half_c''' there and wait until the Asset Viewer find this objectGroups
+
#: ''Note: You don't have to type the whole name of object if you want to find it, you can just type '''trench''' and it will show lots of objects that contain this name''
:''Note: You don't have to type whole name of object if you want to find it, you can just type '''trench''' and it will show lots of objects that contain this name''
+
# You should see a couple of objects, the ones that you need are with a tree icon next to their name
:4. You should see a couple of objects, the ones that you need are with a tree icon next to their name
+
# Write down its full name somewhere and the model's '''type''' which can be found in the right top corner in the Properties window
:5. Write down somewhere it's full name and the model's '''type''' which can be found in the right top cornet in Properties window
 
  
 
Note: Almost all object types can be used to create objectGroups, but ships and tanks (high quality models) might have some issues with textures.
 
Note: Almost all object types can be used to create objectGroups, but ships and tanks (high quality models) might have some issues with textures.
  
 
== Creating a BLK file ==
 
== Creating a BLK file ==
 
 
:1. Create a new file with '''*.blk''' extension
 
:1. Create a new file with '''*.blk''' extension
 
:2. Copy all this code below to the BLK file and use it as a template:
 
:2. Copy all this code below to the BLK file and use it as a template:
 
 
  className:t="composit"
 
  className:t="composit"
 
  node{
 
  node{
  type:t=""
+
  type:t=""
  name:t=""
+
  name:t=""
  tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
+
  tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
 
  }
 
  }
+
 
 
::* className: Object type
 
::* className: Object type
 
::* name: Name of the object
 
::* name: Name of the object
::* tm: Position and rotation, three last number control it's position (west/east | up/down | north/south - all of them in meters)
+
::* tm: Position and rotation, three last numbers control its position (west/east | up/down | north/south - all of them in meters)
 
+
<br>
<br/ >
 
 
::* If you add "$%" before the name it will make it possible to move the object vertically
 
::* If you add "$%" before the name it will make it possible to move the object vertically
 
::Example:
 
::Example:
  
  name:t="$%det_trench_half_c"
+
name:t="$%det_trench_half_c"
  
 
:3. Add the name of object from the Asset Viewer
 
:3. Add the name of object from the Asset Viewer
::* To do that you have to know what kind of object is that, you could check model's type in the Properties window, then add a proper type of this object (dynObject or rendInst or some other)
+
::* To do that you have to know what kind of object it is, you could check model's type in the Properties window, then add a proper type of this object (dynObject or rendInst or some other)
:4. Move your file to a proper folder to make the game and Mission Editor be able to use it
+
:4. Move your file to a proper folder to make the game and Mission Editor able to use it
 
::* Go to your game location
 
::* Go to your game location
 
::* Find '''content''' folder and open it
 
::* Find '''content''' folder and open it
 
::* Check if there's a '''pkg_local''' folder, if not then create it
 
::* Check if there's a '''pkg_local''' folder, if not then create it
::* Create other folders so it looks like that when you are done WarThunder\content\pkg_local\gamedata\objectGroups\
+
::* Inside, create a '''gamedata''' folder and then an '''objectGroups''' folder, so that your final filepath should be '''WarThunder\content\pkg_local\gamedata\objectGroups\'''
 
::* Move your custom object to the objectGroups folder
 
::* Move your custom object to the objectGroups folder
:5. Find your custom object in the Mission Editor<br/ >
+
:5. Find your custom object in the Mission Editor
By default it's not possible to see objectGroups in the mission but it can be fixed
+
:By default it's not possible to see objectGroups in the mission but it can be fixed
 
 
::# Open your folder where you installed War Thunder
 
::# Go to this location: '''WarThunder\WarThunderCDK\'''
 
::# Open '''application.blk''' file in notepad or any similar software
 
::# Find this line: '''base:t="../content/pkg_local/gameData/units/structures"'''
 
::# Paste the line under that line mentioned above: '''base:t="../content/pkg_local/gameData/objectGroups"'''
 
 
 
::# Go to this location: '''WarThunder\WarThunderCDK\dagor3_cdk\bin64\plugins\de3x\missions\'''
 
::# Open config.blk file in notepad or any similar software
 
::# At the bottom, below all lines add this line: '''"@override:units" { "@override:objectGroups" { "@override:classes" { path:t="../content/pkg_local/gameData/objectGroups"; } } } '''
 
  
::# Open the Mission Editor
+
:# Open the War Thunder game folder
::# Create a new unit
+
:# Go to '''WarThunder\WarThunderCDK\'''
::# Change it's type to '''objectGroups'''
+
:# Open '''application.blk''' file in notepad or any similar software
::# Find your object on the list of available objects in '''class''' tab, it should use the name of BLK file that contains it
+
:# Find this line: '''base:t="../content/pkg_local/gameData/units/structures"'''
 +
:# Paste under the line above: '''base:t="../content/pkg_local/gameData/objectGroups"'''
 +
:# Go to this location: '''WarThunder\WarThunderCDK\dagor3_cdk\bin64\plugins\de3x\missions\'''
 +
:# Open config.blk file in notepad or any similar software
 +
:# At the bottom, below all lines, add: '''"@override:units" { "@override:objectGroups" { "@override:classes" { path:t="../content/pkg_local/gameData/objectGroups"; } } } '''
 +
:# Open the Mission Editor
 +
:# Create a new unit
 +
:# Change its type to '''objectGroups'''
 +
:# Find your object on the list of available objects in '''class''' tab, it should use the name of BLK file that contains it
  
 
== Creating more advanced objectgroups ==
 
== Creating more advanced objectgroups ==
 
 
=== Airfields ===
 
=== Airfields ===
 
+
{|
::*Code for adding airfields
+
! !! Example
 
+
|-
 +
|
 +
* Code for adding airfields
 +
|
 
  airfield{
 
  airfield{
 
   start:p3=0.0, 0.0, 0.0
 
   start:p3=0.0, 0.0, 0.0
 
   end:p3=0.0, 0.0, 0.0
 
   end:p3=0.0, 0.0, 0.0
 
   width:r=0.0
 
   width:r=0.0
   spawn:p3=0.0, 0.0, 0.0
+
   spawn:p3=0.0, 0.0, 0.0<br>
 
 
 
   repairTags{
 
   repairTags{
    type_attack_helicopter:b=no
+
  type_attack_helicopter:b=no
    type_utility_helicopter:b=no
+
  type_utility_helicopter:b=no
  }  
+
}
 
+
|-
::* start: Starting position of the runaway
+
|
Example:<br/ >
+
:* start: Starting position of the runway
 +
|
 
  start:p3=835.0, 0.0, 40.0
 
  start:p3=835.0, 0.0, 40.0
::* end: Ending position of the runaway
+
|-
Example:<br/ >
+
|
 +
:* end: Ending position of the runway
 +
|
 
  end:p3=-835.0, 0.0, 40.0
 
  end:p3=-835.0, 0.0, 40.0
::* width: Total width of the airfield
+
|-
Example:<br/ >
+
|
 +
:* width: Total width of the airfield
 +
|
 
  width:r=140.0
 
  width:r=140.0
::* spawn: Spawn position (in meters)
+
|-
Example:<br/ >
+
|
 +
:* spawn: Spawn position(s) (in metres)
 +
|
 
  spawn:p3=720.0, 0.0, 30.5
 
  spawn:p3=720.0, 0.0, 30.5
 
  spawn:p3=720.0, 0.0, 50.5
 
  spawn:p3=720.0, 0.0, 50.5
Line 116: Line 113:
 
  spawn:p3=700.0, 0.0, -9.5
 
  spawn:p3=700.0, 0.0, -9.5
 
  spawn:p3=680.0, 0.0, -9.5
 
  spawn:p3=680.0, 0.0, -9.5
 +
|-
 +
|
 +
* Meaning of numbers in start, end and spawn lines:
 +
** First number - The north/south position
 +
** Second number - Height (shouldn't be used)
 +
** Third number - The east/west position
  
::* Meaning of numbers in start, end and spawn lines:
+
* repairTags: Used to disable repairing of certain vehicle types
:::* First number - The northernmost or southernmost position (North/South)
+
*: Available types:
:::* Second number - Height (shouldn't be used)
+
** type_fighter
:::* Third number - Width (East/South)
+
** type_assault
+
** type_bomber
::* repairTags: Used to disable repairing of certain vehicle types
+
** type_attack_helicopter
:::Available types:
+
** type_utility_helicopter
:::*type_fighter
+
|}
:::*type_assault
 
:::*type_bomber
 
:::*type_attack_helicopter
 
:::*type_utility_helicopter
 
  
 
= Creating structures =
 
= Creating structures =
 
+
Structures are similar objects to objectGroups, but unlike them they can be destroyed, you can give them a real damage model and adjust it. Structures also support effects, for example objects can start to smoke after being hit, or they will explode after being destroyed.
Structures are similar objects to objectGroups, but unlike them they can be destroyed, you can give them a real damage model and adjust it, structures also support effects, for example objects can start to smoke after being hit, or they will explode after being destroyed.
 
  
 
== Finding objects using CDK tools ==
 
== Finding objects using CDK tools ==
 +
# Open the Asset Viewer which can be found in '''WarThunder\WarThunderCDK\assetviewer.cmd'''
 +
# Find the '''Filter''' tab which should be located in the left bottom corner, it can be used to find objects
 +
# As an example type '''berlin_bridge_01_a''' there and wait until the Asset Viewer find the objectGroup
 +
#: Note: you don't have to type the whole name of object if you want to find it, you can just type '''bridge''' and it will show lots of objects that contain this name
 +
# You should see a couple of objects, the ones that you need have a teapot icon next to their name
 +
# Write down its full name and the model's '''type''' which can be found in the right top cornet in Properties window
  
:1. Open the Asset Viewer which can be found in WarThunder\WarThunderCDK\assetviewer.cmd
+
Note: Only '''dynModel''' objects can be used to create objectGroups because of one requirement - it needs to have '''collision''' and '''skeleton''' models to which the damage model can be assigned
:2. Find a '''Filter''' tab which should be placed in the left bottom corner, it can be used to find objects
 
:3. As an example type '''berlin_bridge_01_a''' there and wait until the Asset Viewer find this objectGroups
 
:''Note: You don't have to type whole name of object if you want to find it, you can just type '''bridge''' and it will show lots of objects that contain this name''
 
:4. You should see a couple of objects, the ones that you need are with a teapot icon next to their name
 
:5. Write down somewhere it's full name and the model's '''type''' which can be found in the right top cornet in Properties window
 
 
 
Note: Only '''dynModel''' objects can be used to create objectGroups because of one requirement - it needs to have a '''collision''' and '''skeleton''' models to which the damage model can be assigned<br/ >
 
  
 
== Creating a BLK file ==
 
== Creating a BLK file ==
  
:1. Create a new file with '''*.blk''' extension
+
:1. Create a new file with '''.blk''' extension
 
:2. Copy all this code below to the BLK file and use it as a template:
 
:2. Copy all this code below to the BLK file and use it as a template:
  
Line 160: Line 157:
 
  expClass:t=""
 
  expClass:t=""
 
  renderInWaterReflection:b=yes
 
  renderInWaterReflection:b=yes
  toGround:b=no
+
  toGround:b=no<br>
 
 
 
  DamageParts{
 
  DamageParts{
 
 
   armor45{
 
   armor45{
 
 
     body_dm{
 
     body_dm{
 
       hp:r=100.0
 
       hp:r=100.0
 
     }
 
     }
 
   }
 
   }
  }
+
  }<br>
 
 
 
  DamageEffects{
 
  DamageEffects{
 
 
   part{
 
   part{
 
     name:t="body_dm"
 
     name:t="body_dm"
 
 
     onKill{
 
     onKill{
 
       expl:r=1.0
 
       expl:r=1.0
Line 182: Line 173:
 
   }
 
   }
 
  }
 
  }
+
 
::* model: Name of the object
+
:* model: Name of the object
::* subclass: Sets the object's subclass
+
:* subclass: Sets the object's subclass
::"List of available subclass:
+
:: List of available subclasses:
:::*radar
+
::* radar
:::*fortification
+
::* fortification
::* dynCollisionGeom: Used to disable or enable it's physical collision model, so it won't be possible to fly or drive through it
+
:* dynCollisionGeom: Used to disable or enable its physical collision model, so it won't be possible to fly or drive through it
::* hasExpl: If set to ''yes'' it will show explosion effect after it's destruction  
+
:* hasExpl: If set to ''yes'' it will show explosion effect after its destruction
::* hasDmg2: Enables the damage model
+
:* hasDmg2: Enables the damage model
::* hasDmg2Collision: Makes it possible to reduce it's HP amount by just crashing your plane into it
+
:* hasDmg2Collision: Makes it possible to reduce its HP amount by just crashing your plane into it
::* damageableByGun: If set to ''yes'' it will be possible to damage the object using guns, machine guns, cannons etc.
+
:* damageableByGun: If set to ''yes'' it will be possible to damage the object using guns, machine guns, cannons etc.
::* expClass: Assigns a specific unit type to the object
+
:* expClass: Assigns a specific unit type to the object
:::List of available expClasses:
+
:: List of available expClasses:
:::*exp_zero
+
::* exp_zero
:::*exp_bridge
+
::* exp_bridge
:::*exp_tank
+
::* exp_tank
:::*exp_radar
+
::* exp_radar
:::*exp_ai_tank
+
::* exp_ai_tank
::* toGround: Enables or disables the ability to move the object vertically
+
:* toGround: Enables or disables the ability to move the object vertically
::* DamageParts: Used to give the object armor and set it's HP value
+
:* DamageParts: Used to give the object armour and set its HP value
::''Note: Part names can be found in the ''collision'' model in the Asset Viewer''
+
:: ''Note: Part names can be found in the ''collision'' model in the Asset Viewer''
::* DamageEffects: Used to give the object various graphical effects when it's damaged or destroyed
+
:* DamageEffects: Used to give the object various graphical effects when it's damaged or destroyed
  
 
:3. Add the name of object from the Asset Viewer
 
:3. Add the name of object from the Asset Viewer
Line 210: Line 201:
 
::* Find '''content''' folder and open it
 
::* Find '''content''' folder and open it
 
::* Check if there's a '''pkg_local''' folder, if not then create it
 
::* Check if there's a '''pkg_local''' folder, if not then create it
::* Create other folders so it looks like that when you are done WarThunder\content\pkg_local\gamedata\units\structures\
+
::* Create more folders so that looks like this when you are done '''WarThunder\content\pkg_local\gamedata\units\structures\'''
 
::* Move your custom object to the structures folder
 
::* Move your custom object to the structures folder
:5. Find your custom object in the Mission Editor<br/ >
+
:5. Find your custom object in the Mission Editor<br>
  
 
= Other ways of creating units and modifying them =
 
= Other ways of creating units and modifying them =
 
 
It's possible to make a custom unit based on any other unit in game and modify it a bit.
 
It's possible to make a custom unit based on any other unit in game and modify it a bit.
 
To do that you have to:
 
To do that you have to:
  
::1. Create a new BLK file and give it unique name
+
# Create a new BLK file and give it unique name
::2. Place the BLK in the correct folder depending what kind of you want to edit
+
# Place the BLK in the correct folder depending what kind of you want to edit
::* WarThunder\content\pkg_local\gamedata\flightModels - planes
+
#* WarThunder\content\pkg_local\gamedata\flightModels - '''planes'''
::* WarThunder\content\pkg_local\gamedata\objectGroups - static objects
+
#* WarThunder\content\pkg_local\gamedata\objectGroups - '''static objects'''
::* WarThunder\content\pkg_local\gamedata\units\air_defence - stationary AAA units
+
#* WarThunder\content\pkg_local\gamedata\units\air_defence - '''stationary AAA units'''
::* WarThunder\content\pkg_local\gamedata\units\structures - bridges, artillery units and other stationary objects that can be destroyed
+
#* WarThunder\content\pkg_local\gamedata\units\structures - '''bridges, artillery units and other stationary objects that can be destroyed'''
::* WarThunder\content\pkg_local\gamedata\units\tankmodels - tanks
+
#* WarThunder\content\pkg_local\gamedata\units\tankmodels - '''tanks'''
::* WarThunder\content\pkg_local\gamedata\units\tracked_vehicles - AI low quality tracked vehicles
+
#* WarThunder\content\pkg_local\gamedata\units\tracked_vehicles - '''AI low quality tracked vehicles'''
::* WarThunder\content\pkg_local\gamedata\units\wheeled_vehicles - AI low quality wheeled vehicles
+
#* WarThunder\content\pkg_local\gamedata\units\wheeled_vehicles - '''AI low quality wheeled vehicles'''
::* WarThunder\content\pkg_local\gamedata\units\ships - boats and ships
+
#* WarThunder\content\pkg_local\gamedata\units\ships - '''boats and ships'''
::* WarThunder\content\pkg_local\gamedata\weapons - weapons
+
#* WarThunder\content\pkg_local\gamedata\weapons - '''weapons'''
::3. Open the BLK file
+
# Open the BLK file
::4. Paste the code below and use it as a template
+
# Paste the code below and use it as a template
  
 
  include "#/develop/gameBase/gameData/Weapons/gunBrowning50_turret_late.blk"
 
  include "#/develop/gameBase/gameData/Weapons/gunBrowning50_turret_late.blk"
 
  "@override:aimMaxDist":r = 100000
 
  "@override:aimMaxDist":r = 100000
+
 
::* include: Imports all the code from one of existing units in game
+
* include: Imports all the code from an existing unit in-game
:::How to use:
+
: '''include "[path and .blk name of the weapon or unit as it's written in your weapon preset]"'''
:::include "[path and .blk name of the weapon or unit as it's written in you weapon preset right now]"
+
* override: Overwrites existing values, you need to know how that line is called in order to edit it
::* override: Overwrites existing values, you need to know how that line is called in order to edit it
+
: '''"@override:[the line which you want to edit]":[correct datatype] = [new value]'''
:::How to use:
 
:::"Override:[that line which you want to edit]":[correct type of data] = [new value]
 
  
 
[[Category:War Thunder CDK]]
 
[[Category:War Thunder CDK]]

Revision as of 23:57, 27 March 2020

This page will explain step by step how to create custom units that can be used in singleplayer missions using existing assets which can be accessed through the CDK.

Creating objectGroups

In order to make a custom unit you have to find interesting assets in the Asset Viewer, then use their names to create a custom BLK file. It's possible to put multiple objects and textures into a single BLK file and make for example an airfield. In most cases objectGroups can't be destroyed and when it's possible they have a very simple damage model and their HP amount can't be adjusted.

Finding objects using CDK tools

  1. Open the Asset Viewer which can be found in WarThunder\WarThunderCDK\assetviewer.cmd
  2. Find the Filter tab which should be located in the left bottom corner, it can be used to find objects
  3. As an example type det_trench_half_c there and wait until the Asset Viewer finds this objectGroup
    Note: You don't have to type the whole name of object if you want to find it, you can just type trench and it will show lots of objects that contain this name
  4. You should see a couple of objects, the ones that you need are with a tree icon next to their name
  5. Write down its full name somewhere and the model's type which can be found in the right top corner in the Properties window

Note: Almost all object types can be used to create objectGroups, but ships and tanks (high quality models) might have some issues with textures.

Creating a BLK file

1. Create a new file with *.blk extension
2. Copy all this code below to the BLK file and use it as a template:
className:t="composit"
node{
 type:t=""
 name:t=""
 tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
}
  • className: Object type
  • name: Name of the object
  • tm: Position and rotation, three last numbers control its position (west/east | up/down | north/south - all of them in meters)


  • If you add "$%" before the name it will make it possible to move the object vertically
Example:
name:t="$%det_trench_half_c"
3. Add the name of object from the Asset Viewer
  • To do that you have to know what kind of object it is, you could check model's type in the Properties window, then add a proper type of this object (dynObject or rendInst or some other)
4. Move your file to a proper folder to make the game and Mission Editor able to use it
  • Go to your game location
  • Find content folder and open it
  • Check if there's a pkg_local folder, if not then create it
  • Inside, create a gamedata folder and then an objectGroups folder, so that your final filepath should be WarThunder\content\pkg_local\gamedata\objectGroups\
  • Move your custom object to the objectGroups folder
5. Find your custom object in the Mission Editor
By default it's not possible to see objectGroups in the mission but it can be fixed
  1. Open the War Thunder game folder
  2. Go to WarThunder\WarThunderCDK\
  3. Open application.blk file in notepad or any similar software
  4. Find this line: base:t="../content/pkg_local/gameData/units/structures"
  5. Paste under the line above: base:t="../content/pkg_local/gameData/objectGroups"
  6. Go to this location: WarThunder\WarThunderCDK\dagor3_cdk\bin64\plugins\de3x\missions\
  7. Open config.blk file in notepad or any similar software
  8. At the bottom, below all lines, add: "@override:units" { "@override:objectGroups" { "@override:classes" { path:t="../content/pkg_local/gameData/objectGroups"; } } }
  9. Open the Mission Editor
  10. Create a new unit
  11. Change its type to objectGroups
  12. Find your object on the list of available objects in class tab, it should use the name of BLK file that contains it

Creating more advanced objectgroups

Airfields

Example
  • Code for adding airfields
airfield{
 start:p3=0.0, 0.0, 0.0
 end:p3=0.0, 0.0, 0.0
 width:r=0.0
 spawn:p3=0.0, 0.0, 0.0
repairTags{ type_attack_helicopter:b=no type_utility_helicopter:b=no }
  • start: Starting position of the runway
start:p3=835.0, 0.0, 40.0
  • end: Ending position of the runway
end:p3=-835.0, 0.0, 40.0
  • width: Total width of the airfield
width:r=140.0
  • spawn: Spawn position(s) (in metres)
spawn:p3=720.0, 0.0, 30.5
spawn:p3=720.0, 0.0, 50.5
spawn:p3=720.0, 0.0, 10.5
spawn:p3=700.0, 0.0, 30.5
spawn:p3=700.0, 0.0, 50.5
spawn:p3=700.0, 0.0, 10.5
spawn:p3=680.0, 0.0, 30.5
spawn:p3=680.0, 0.0, 50.5
spawn:p3=680.0, 0.0, 10.5
spawn:p3=660.0, 0.0, 30.5
spawn:p3=660.0, 0.0, 50.5
spawn:p3=660.0, 0.0, 10.5
spawn:p3=720.0, 0.0, 70.5
spawn:p3=700.0, 0.0, 70.5
spawn:p3=680.0, 0.0, 70.5
spawn:p3=720.0, 0.0, -9.5
spawn:p3=700.0, 0.0, -9.5
spawn:p3=680.0, 0.0, -9.5
  • Meaning of numbers in start, end and spawn lines:
    • First number - The north/south position
    • Second number - Height (shouldn't be used)
    • Third number - The east/west position
  • repairTags: Used to disable repairing of certain vehicle types
    Available types:
    • type_fighter
    • type_assault
    • type_bomber
    • type_attack_helicopter
    • type_utility_helicopter

Creating structures

Structures are similar objects to objectGroups, but unlike them they can be destroyed, you can give them a real damage model and adjust it. Structures also support effects, for example objects can start to smoke after being hit, or they will explode after being destroyed.

Finding objects using CDK tools

  1. Open the Asset Viewer which can be found in WarThunder\WarThunderCDK\assetviewer.cmd
  2. Find the Filter tab which should be located in the left bottom corner, it can be used to find objects
  3. As an example type berlin_bridge_01_a there and wait until the Asset Viewer find the objectGroup
    Note: you don't have to type the whole name of object if you want to find it, you can just type bridge and it will show lots of objects that contain this name
  4. You should see a couple of objects, the ones that you need have a teapot icon next to their name
  5. Write down its full name and the model's type which can be found in the right top cornet in Properties window

Note: Only dynModel objects can be used to create objectGroups because of one requirement - it needs to have collision and skeleton models to which the damage model can be assigned

Creating a BLK file

1. Create a new file with .blk extension
2. Copy all this code below to the BLK file and use it as a template:
model:t=""
subclass:t="fortification"
dynCollisionGeom:b=yes
hasExpl:b=yes
hasDmg2:b=yes
hasDmg2Collision:b=yes
hasDmg:b=no
damageableByGun:b=no
expClass:t=""
renderInWaterReflection:b=yes
toGround:b=no
DamageParts{ armor45{ body_dm{ hp:r=100.0 } } }
DamageEffects{ part{ name:t="body_dm" onKill{ expl:r=1.0 } } }
  • model: Name of the object
  • subclass: Sets the object's subclass
List of available subclasses:
  • radar
  • fortification
  • dynCollisionGeom: Used to disable or enable its physical collision model, so it won't be possible to fly or drive through it
  • hasExpl: If set to yes it will show explosion effect after its destruction
  • hasDmg2: Enables the damage model
  • hasDmg2Collision: Makes it possible to reduce its HP amount by just crashing your plane into it
  • damageableByGun: If set to yes it will be possible to damage the object using guns, machine guns, cannons etc.
  • expClass: Assigns a specific unit type to the object
List of available expClasses:
  • exp_zero
  • exp_bridge
  • exp_tank
  • exp_radar
  • exp_ai_tank
  • toGround: Enables or disables the ability to move the object vertically
  • DamageParts: Used to give the object armour and set its HP value
Note: Part names can be found in the collision model in the Asset Viewer
  • DamageEffects: Used to give the object various graphical effects when it's damaged or destroyed
3. Add the name of object from the Asset Viewer
4. Move your file to a proper folder to make the game and Mission Editor be able to use it
  • Go to your game location
  • Find content folder and open it
  • Check if there's a pkg_local folder, if not then create it
  • Create more folders so that looks like this when you are done WarThunder\content\pkg_local\gamedata\units\structures\
  • Move your custom object to the structures folder
5. Find your custom object in the Mission Editor

Other ways of creating units and modifying them

It's possible to make a custom unit based on any other unit in game and modify it a bit. To do that you have to:

  1. Create a new BLK file and give it unique name
  2. Place the BLK in the correct folder depending what kind of you want to edit
    • WarThunder\content\pkg_local\gamedata\flightModels - planes
    • WarThunder\content\pkg_local\gamedata\objectGroups - static objects
    • WarThunder\content\pkg_local\gamedata\units\air_defence - stationary AAA units
    • WarThunder\content\pkg_local\gamedata\units\structures - bridges, artillery units and other stationary objects that can be destroyed
    • WarThunder\content\pkg_local\gamedata\units\tankmodels - tanks
    • WarThunder\content\pkg_local\gamedata\units\tracked_vehicles - AI low quality tracked vehicles
    • WarThunder\content\pkg_local\gamedata\units\wheeled_vehicles - AI low quality wheeled vehicles
    • WarThunder\content\pkg_local\gamedata\units\ships - boats and ships
    • WarThunder\content\pkg_local\gamedata\weapons - weapons
  3. Open the BLK file
  4. Paste the code below and use it as a template
include "#/develop/gameBase/gameData/Weapons/gunBrowning50_turret_late.blk"
"@override:aimMaxDist":r = 100000
  • include: Imports all the code from an existing unit in-game
include "[path and .blk name of the weapon or unit as it's written in your weapon preset]"
  • override: Overwrites existing values, you need to know how that line is called in order to edit it
"@override:[the line which you want to edit]":[correct datatype] = [new value]