Difference between revisions of "Creation of object groups from in-game objects that already exist"

From War Thunder Wiki
Jump to: navigation, search
(Created page with "It is possible to make an object group from ‘rendInst’ that already exists in the game. This means that you will be able to place them directly from the mission editor (it...")
 
m
 
Line 1: Line 1:
It is possible to make an object group from ‘rendInst’ that already exists in the game. This means that you will be able to place them directly from the mission editor (it will remain destructible if the original object was destructible). This is very simple to do - an additional folder named ‘objectGroups’ needs to be added to the existing folder: <code>WarThunder\content\pkg_local\gameData\</code> so <code>WarThunder\content\pkg_local\gameData\objectGroups</code>
+
It is possible to make an object group from ‘rendInst’ that already exists in the game. This means that you will be able to place them directly from the mission editor (it will remain destructible if the original object was destructible). This is very simple to do - an additional folder named '''"objectGroups"''' needs to be added to the existing folder: <code>WarThunder\content\pkg_local\gameData\</code> so <code>WarThunder\content\pkg_local\gameData\objectGroups</code>
  
A new file should be added to this new folder with a convenient name and the extension .blk (for example - <code>patton_01.blk</code>).  
+
A new file should be added to this new folder with a convenient name and the extension '''.blk''' (for example - <code>patton_01.blk</code>).  
  
 
The new ‘.blk’ file should have the following lines written into it:
 
The new ‘.blk’ file should have the following lines written into it:
Line 13: Line 13:
 
   }
 
   }
  
The “className” will tell us that it is an object of the composite type which has one node of the ‘rendInst’ type called “studebaker_us6_bm_13h” (can be changed to any object you want to). Next will be the object matrix and placeOnCollision parameter which allows you to always put the object in a ‘collision’ state (able to interact with other objects).  
+
The '''"className"''' will tell us that it is an object of the composite type which has one node of the ‘rendInst’ type called “studebaker_us6_bm_13h” (can be changed to any object you want to). Next will be the object matrix and placeOnCollision parameter which allows you to always put the object in a ‘collision’ state (able to interact with other objects).  
  
 
After these steps it is enough to put the corresponding unit in the mission and it will be visible in the game.
 
After these steps it is enough to put the corresponding unit in the mission and it will be visible in the game.
  
 
[[Category:Custom missions]]
 
[[Category:Custom missions]]

Latest revision as of 13:26, 21 April 2020

It is possible to make an object group from ‘rendInst’ that already exists in the game. This means that you will be able to place them directly from the mission editor (it will remain destructible if the original object was destructible). This is very simple to do - an additional folder named "objectGroups" needs to be added to the existing folder: WarThunder\content\pkg_local\gameData\ so WarThunder\content\pkg_local\gameData\objectGroups

A new file should be added to this new folder with a convenient name and the extension .blk (for example - patton_01.blk).

The new ‘.blk’ file should have the following lines written into it:

className:t="composit"
 node{
   type:t="rendInst"
   name:t="#studebaker_us6_bm_13h"
   tm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [0, 0, 0]]
   placeOnCollision:b=yes
 }

The "className" will tell us that it is an object of the composite type which has one node of the ‘rendInst’ type called “studebaker_us6_bm_13h” (can be changed to any object you want to). Next will be the object matrix and placeOnCollision parameter which allows you to always put the object in a ‘collision’ state (able to interact with other objects).

After these steps it is enough to put the corresponding unit in the mission and it will be visible in the game.