War Thunder CDK: Location Editor. #2 Explanation to important and useful stuff while creating location

I salute you, tankers, pilots, admirals, helicopterers!

This theme will be dedicated to explanation to and demonstrating of various useful stuff which can be used in creating a location in our Location Editor (further LE).


Short introduction by the author

Introduction

You might not be acquainted with me, but I am the one who can guide you through Location Editor and its tricky using. I’ve come from Russian WT Forum where also exist these themes about Location Editor, explanation how to use it, and where I used to help to interested people. I’ve fled from there because it became impossible to log in due to ‘separating the world’ into 2 pieces: people of CIS (Commonwealth of Independent States) and people of the rest of the world. And since I’m russian-speaking person but living in Baltic states, whereas Baltic states are not considered as CIS, I had to move to English WT Forum. Besides, I wanted to create themes about Location Editor on English WT Forum too to spread knowledge. So, that’s sort of short story how I am here. Now, let’s begin with the Location Editor itself!


Disclaimer

Disclaimer

Making an even medium playable location takes a lot of time and energy so I can only point to sloths to door in this case.


Beginning

Beginning

If you don’t know at all what’s in LE, I suggest you to consult with my first theme. However, there is not everything what I wanted to share with you, so, I’ll write some things that I find useful in this article.

Spoiler

(That’s just translation of my second topic from Russian WT Forum, but, of course, I could just take something from this article and put into the first, but I don’t care and those articles are mine, so I do whatever I want with them.)


Common stuff

Plugins and F3

We’ll begin with plugins of the editor. They are already integrated into the editor and ready to use. In order to summon dialogue box with all plugins you have to press button F11. But be sure that you don’t move around location, or else box won’t appear. The box itself looks like this:

Dialogue box, plugins

I, for example, turn on everything so I could see all and thus some things wouldn’t create questions.

P.S. Due to plugin ‘(filter) Water surface geom’, which makes water to disappear, some people, including me back in 2023, don’t know what to do and how to change it back. This also relates to plugins that are responsible for the ground (‘(filter) LandMesh’, ‘(filter) HeightMap’, Landscape).

Now we move to button F3. It’s simple: if you push it, it will show you net of millions of triangles that show how the landscape of location is changed. So we wouldn’t just sit for 10 minutes trying to find a small hill among vast desert of monotonous yellow sand. One net shows landscape deformation without the ground, another - with the ground.

Photos of how those nets look


Location's ground

We have already seen category ‘Mesh’ where we took an option ‘Vertices’ in previous guide. So we need to get there back and put another number, much greater. Here you can see that I put 1,000,000 but in case of my small location that doesn’t really matter. It’s better to put 200,000 or 250,000. But if you put much larger number, such as: 10 millions, 1 billion; then editor can start to lag, can appear bugs, but I’m not sure of the latter.

Image of category Mesh

P.S. Don’t forget to click ‘Rebuild mesh’ or else changes won’t occur.

So, let’s move to category ‘Script Parameters’ now, we will take a look at Layers. Layers help us to make various types of lands on location, like, oasis’ grass in desert. The very first layer is always responsible for whole location’s ground texture, further editorer can use more layers if he wants to, starting with second layer.

In the picture you can see that my location has only 3 layers. The first (1) makes, what I have said earlier, whole location’s ground, other two (2 and 3) make location look more beautiful. Explanation how to make such lands of different textures you can find in chapter ‘Masks’.


Splines, polygons and objects

Splines.
Splines are actually curvatives that help us make roads, borders, lampposts, fences, Czech hedgehogs, and more.

Instruction how to make a spline
  1. Click the button that makes a spline;
  2. Put some points that make whole spline;
  3. Click Right Mouse Button to end spline creating;
  4. Select spline, click button P and we’re in spline’s settings;
  5. Choose whatever you need in ‘Spline asset class’.

Polygons.
Their name says it all. They action on certain area but not only on certain curvative like splines. Polygons cannot be used to lay texture of second layer on first layer but you can make an artificial pond or river, or town with it. Option ‘Border class asset’ behaves like splines: makes roads, borders, etc. but on polygon’s perimeter this time.

Instruction how to make a polygon
  1. Click the button that makes a polygon;
  2. Put some points that make whole spline;
  3. Connect the last point with the first in order to form polygon;
  4. Confirm that we want to close it;
  5. Move to its settings and choose whatever we want in ‘Land asset class’ or ‘Border asset class’.

Objects.
In LE objects are almost all things that you can encounter in the game: tanks, planes, ships, buildings, trees, bushes, stones, and other nonsense that has left after Halloween or Christmas, or another event. Object are useful to place something piece by piece rather than placing huge amount of something.

P.S. Objects in Location Editor and units in Mission Editor are different things! Objects are like ‘decorations’ like M60 and T-62 tanks in Fulda while units can move, attack, etc.

Instruction how to make an object
  1. Click the button that makes an object;
  2. Choose what we want it would be;
  3. Place the object there where we need to. If you need a single object, after placing it click Right Mouse Button to stop placing the same unit over and over.

Image of an object

Warning. I do not recommend to place effects from ‘fx’ tab. Mine LE crashes every time when I try to place something from there.
P.S. Some objects don’t render pretty fast so you have to wait a bit until it renders.


Masks

We have arrived to that what is really important, and what is discussed almost by no one. That’s kind of strange but anyway.
I’ll start with that mask, in other words, is something that we can place onto something, in this case a layer onto layer. All masks already exist and they locate in Script Parameters in every layer’s settings. The only thing you need is to choose one. I strongly don’t recommend to use existing masks since they were used already. In this case, we create a new mask which we can name as we want.

New mask will present in every layer’s settings so there is no need to create tons of them.
Now we move to editing. Choose the layer we need, new mask, click button ‘Props…’. You need to activate two options in there: ‘Write weight to DetTex’ and ‘Write weight to Land #1’. Exit the dialogue box. (*)

Dialogue box, masks, props.

After this, choose any of 4 brushes (Hill up mode, Hill down mode, Align mode, Smooth mode).

Masks. Brushes.

Activate option ‘Show blue-white mask’ in ‘Script Parameters’ in order to see all the changes you have done with the new mask. Next, click button ‘Edit’ in layer’s settings, what you want to build town, forest, anything else, and start to create!

After that you have done, click button ‘Done’ in the layer’s settings, and click another button ‘Generate color map’. As a result, you will see your creation!

In the end of the chapter I want to take a moment to say that I have marked the sentence about mask settings with asterisk (asterisk is this —> *).

  1. If you leave activated only parameter ‘Write weight to DetTex’, there will change only textures of the ground;
  2. If you leave activated only parameter ‘Write weight to Land #1’, there will appear only structures that the layer generates (if that layer even generates any structure).

Other stuff

Solution to 'I've created new heightmap but textures disappeared'

Say, you have erased heightmap of Iwo Jima or any other. Then you have created a new one.

Landscape. Creating and erasing heightmap

And before your eyes giant absolutely black plateau.

Console says that ‘HeightMap tile texture is missing!’. We need to move to category ‘Textures’, option ‘Tile detail texture’, and put ‘detail_ground’ into ‘tex’. It’s better to write it into search filter since you will search for it by yourself for ages.

Textures.

If there is existing first layer in ‘Script Parameters’ and it has texture, close the editor, saving all the changes, and open LE again. Voila, now you have absolutely flat location!


Location export into the game and test drive

You have created a location and inside you exists huge wish to play on it. Find in the left upper corner ‘Project’, click ‘Export to game (PC format)’, click everywhere ‘OK’.

Project. Export.

Then you need to save .bin file in folder WarThunder/content/pkg_local/levels.

After this go into this folder. You can see that every .bin file has its neighbour .blk file with the exact name. .blk file is important to exist so the game could know how big the location is, what’s properties of the location, etc. Without it, you can’t play on location. So, copy one of present .blk files, rename it exactly after location’s name.

List of my locations

Afterward, open the .blk file with Notepad or whatever text editor. We can see a lot of information but we are interested in coordinates.

Notepad. .blk file editing

There is need to change coordinates in rows ‘mapCoord0’ and ‘mapCoord1’ (also ‘tankMapCoord0’ and ‘tankMapCoord1’, if you want to ride tanks on location too). You can just look at the number of ‘Cell size’ in ‘Heightmap Parameters’ of your location, multiply by 1024, and then write the given number into rows. ‘mapCoord0’ and ‘tankMapCoord0’ require negative coordinates, while ‘mapCoord1’ and ‘tankMapCoord1’ – positive.

Now we are done here. Next, open Mission Editor. Open your location that locates in content/pkg_local/levels.

Mission Editor.

So, classic begins: create unit, choose tank/plane, send it into team A. But you have to open ‘mission’ and change ‘level’ to your location, or else you will just spawn in the middle of Pacific ocean, or whereever else.

Save your mission, send it into ‘UserMissions’ folder. Launch War Thunder, find in the left upper corner ‘Battles’, click ‘User Missions’, seek your mission and start it. If everything is done correctly, you have to spawn on your amazing location.


Summary

Summary

Well done, soldier. You have gone through many severities, you have gained more knowledge on location creation, but that’s only a half of the entire journey. I hope, you won’t give up that easily like fish in 1 meter from water.


Appendix
At the end of the article, I give you a wise and useful advice: always click ‘Rebuild mesh’ and ‘Generate color map’ if you change landscape, layers or whatever else. Changes don’t always render properly.


That’s all, people! Thank you for your attention, see you next time!

2 Likes

Wow. Single most informative guide i have ever seen on this site, thank you for this, as it will help me with learning the CDK editor in depth.

1 Like

And it’s only the beginning, my man!

1 Like

I want to take a moment to share information with, I guess, air… that I’m going to create 3rd theme about Location Editor in the near future, and, afterwards, create tutorial videos that are based on my articles. I may also write pretty detail guides on Mission Editor after all this as well

Hey, buddy. Since this ive try to use meshes instead, but there is limitation for collision size in 75mb. Ho wwe can avoid that?

To be honest, I didn’t really understand the question in general.
In the screenshot is being told about heightmap’s resolution and conclusions what resolution of .tiff file is more preferable to use. But I don’t find connection between the above-mentioned and what you were trying to ask :v

https://cdn.discordapp.com/attachments/1119136019166539796/1275164804549709845/War_Thunder_2024.08.19_-_20.48.07.16.mp4?ex=66c58e04&is=66c43c84&hm=7fa755f6ad0d963ab471cad8784d9e52583cc1fd1c72936f2047f4c4e8f5471e&
https://community.gaijin.net/issues/p/warthunder/i/Va2OTXtuSUBl

Well, uh… I cannot tell what that error is. Personally, I haven’t faced such problem playing my locations. But I would like to have a look at your location files, maybe I can find something suspicious?

Yes, you find that scene collisions have size > 75mb, if i don’t use road collisions ground collisions works well.

Ah, I got it now. The problem is found and it’s known what causes the problem:

  • If location size is more than 75Mb, and road collisions are used on location, ground collision behaves weird and forces your game to crash if you get too close to the ground.

  • If location size is more than 75Mb, but there is no road collision, ground collision works normally.

I guess I understood correctly the idea, and the point is to rather warn us.

Not location size, but colision size of scene
image
This is such a dynamic limit that crashes the game upon collision. If the size of the collisions is less than 75mb, then the collisions work ± well.

1 Like