This article is a manual that explains the main ideas of creating locations in the Location Editor.
Beginning
Firstly, download the War Thunder CDK in order to start working.
The Location Editor (further referred to as LE) itself looks like WT’s typical icon, named “LocationEd”. You can also open the LE within the WarThunderCDK folder using the program named “dagored”. After opening LE, a dialog box will appear offering to choose a location. Choose the location named “location_sample
” since it will be the only option available.
After selecting a location, there may be a relatively long location downloading process. However, subsequently, the same location will download faster than the first time within the next hour. The chosen location is Iwo Jima.
Basics
Movement
To fly around the location, firstly, ensure that the window displaying the location has a yellow border. Press the Spacebar to move the camera in any direction. Movement around the location is similar to movement in games: W — forward, S — backwards, A — left, D — right.
Additionally, there are two more pairs of keys for movement: E and C, Q and Z.
E and C move the editor-person (you, in this case) perpendicularly relative to the ground. E — moves you up, C — moves you down.
Q and Z move the editor-person (you, in this case) perpendicularly relative to your angle of view. Q — moves you conditionally “up,” Z — moves you conditionally “down.”
The speed of movement is, by default, not very high, so it is recommended to use “Turbo” to move faster. To activate it, press Left Shift and any of the aforementioned movement keys.
Furthermore, you can manually change the speed of movement. Find the “Settings” tab on the highest panel of LE, locate the subtab “Cameras…,” and go to the “Free camera” tab. Edit the “Speed, ms” column as desired.
Panel of Instruments
The screenshot above shows the panel of instruments in the Location Editor. The instruments marked with a red cross above will not be discussed as their properties are poorly known or unknown. The table below describes each instrument (excluding those marked with a red cross). Instrument descriptions will begin from the lower row, from the leftmost to the rightmost, and then continue with the upper row in the same order.
Instrument | Description | Comment | Shortcut |
---|---|---|---|
Show properties panel | Opens location properties panel | Shortcut conflicts with “Show/hide object props panel” instrument’s shortcut | P |
Hill up mode | Activates brush elevating landscape | Using RMB allows to reverse effect — to deepen landscape | 1 |
Hill down mode | Activates brush deepening landscape | Using RMB allows to reverse effect — to elevate landscape | 2 |
Align mode | Activates brush aligning landscape that aligns landscape to the point which was chosen first | For example, if a point on the landscape located at 5m height is chosen, all points affected by the brush will align to that height of 5m | 3 |
Smooth mode | Activates brush smoothing landscape | 4 | |
Select | Allows to select an object | It is preferable to use this instrument as default because it does not affect environment | Q |
Move | Allows to move an object | W | |
Move over surface | Allows to move an object relative to the ground, keeping the same distance between the object and the ground | Ctrl+Alt+W | |
Rotate | Allows to rotate an object | E | |
Scale | Allows to change object’s size | R | |
Drop object | Drops an object on the ground | Ctrl+Alt+D | |
Outliner | Opens dialogue box which shows all entities/splines/polygons on the location | H | |
Show/hide object props panel | Shows/Hides object properties panel | Shortcut conflicts with “Show properties panel” instrument’s shortcut | P |
Hide splines | Hides splines | Ctrl+0 | |
Select only points/splines/entities/snow sources | Allows to select only points/splines/entities/snow sources | Ctrl+1/2/3/7/5 | |
Create entity | Allows to create an entity | In order to stop creating the same object over and over, press RMB | — |
Create spline/polygon/snowsource | Allows to create spline/polygon/snow source | In order to stop creating spline/polygon, press RMB | — |
Refine spline | Allows to insert into a spline new point | Works also on polygons | — |
Split spline | Allows to split spline into two | — | |
Split poly | Allows to split polygon into two | — | |
Reverse spline(s) | Allows to change start and end points of the spline with their positions | — | |
Close selected spline(s) | Allows to close selected spline | — | |
Un-close spline at selected point | Allows to un-close selected spline | Any effect of this instrument is not observed | — |
Move/Rotate/Scale snap | Allows to move, rotate or scale in the space an object only by designated value (Move snap — 1000m; Rotate snap — 2.5 degrees; Scale snap — 10%) | By default, with toggled on instruments: * “Move snap” allows to move an object only at the corners of 1km×1km grids; * “Rotate snap” allows to rotate only by 2.5 degrees; * “Scale snap” allows to rescale by 10% | S/A/Shift+5 |
Zoom and center | Allows to zoom and centre selected object | Z | |
Navigate | Opens dialogue box with instructions on movement | — | |
Fly mode | Allows to enter fly mode | Spacebar | |
FPS mode | Allows to enter FPS mode | Ctrl+Spacebar | |
TPS mode | Allows to enter TPS mode | Ctrl+Shift+Spacebar | |
Show level statistics | Opens dialogue box with statistics of the project (not of the location) | — | |
Viewport layout 1/4 | Allows to switch on 4 cameras mode and back to 1 camera | Alt+W | |
Change FOV | Allows to change FOV (field of view) | Cannot be set lower than 2 or higher than 178 | — |
Create screenshot/cube screenshot | Screenshots | Ctrl+P/Ctrl+Shift+P | |
Environment settings | Opens dialogue box in which you can change environment settings for preview | Technically, is not in any kind related to “normal” environment settings. Those settings are just preview of how location could look | — |
Show/hide console | Shows/Hides console | — | |
Discard textures | Removes textures from every object and the ground of the location | Rebooting the editor eliminates those removed textures | — |
Show compass | Shows/Hides compass and cross | — |
Location Properties
We will review only 5 of all these categories: Mesh (1), Brush (2), Script Parameters (3), Heightmap Parameters (4) and Textures (5).
Mesh
The mesh itself represents a plane made of triangles. Meanwhile, triangles form the landscape of the location.
Technically, only one option is currently needed in this category — Vertices, as it represents the number of triangles used in creating the landscape. The larger the number, the more precise the landscape will be. But be aware that very large numbers (billions of vertices or greater) can cause lags while editing the location.
The “Rebuild mesh” option helps to download all the changes we have made by importing a heightmap, altering the landscape with brushes, etc.
Brush
Brushes help to change the landscape manually, but in most cases, they are not necessary when using heightmaps. They primarily assist in creating new masks. We will only look at “Power (height)” and “Brush radius”. We won’t discuss the rest for now.
Power (height).
The bigger number is, the higher will terrain elevate.
Brush radius.
The bigger number is, the bigger brush radius is.
Script Parameters
This category is responsible for creating location layers. Layers represent any kind of ground type in War Thunder. They can be sand, dirt, rocks, grass, or anything else. Additionally, certain types of layers can also generate structures linked to those layers, for example, city layers (berlin_city_b
) or forest layers (air_smolensk_forest_a
). However, this category will be discussed in detail later, in the chapters ”Location’s Ground” and ”Masks”.
Heightmap Parameters
The “Heightmap Parameters” category sets the location’s size, its offset vertically from sea level (0 meters), height scale (distance from the lowest point of the location to the highest point), and the size of the detailed heightmap (this function generates many smaller triangles within larger ones (vertices) to make the heightmap more detailed).
Cell size.
This option is responsible for location’s physical size.
A cell, generally, is a part of the location’s mesh with a square shape. By default, all cells have a size of 1,024m x 1,024m. You can adjust the size of a cell by creating a new heightmap, but not an existing one.
Theory of cells and location.
Iwo Jima location has a size equal to 32,768m x 32,768m with its center at coordinates (0; 0), and in Heightmap Properties, Cell Size is set to 16.
The cell in the center of the whole location has its center at coordinates (0; 0) like the location itself. Consequently, the central cell and the entire location share the same center coordinates. From this statement, we can also conclude that the location expands from the center (or coordinates (0; 0)) in all directions. If the location expands from its center, then the number of cells multiplied by the length of a single cell cannot equal the location’s size (16×1,024 = 16,384, but not 32,768). This is because the location also expands in negative coordinates. There will always be half the length of the location in negative coordinates and another half in positive coordinates.
Height scale.
This option represents the distance from the lowest point of the location to the highest point.
In reality, the lowest point of the location can be considered as a whole negative integer (-10 meters, -100 meters) since it is not necessarily important what lies under the water. However, if you want to create a waterless location, you must know the lowest point. The highest point always must be known.
To set the height scale, you need basic mathematical knowledge. Subtract the highest point from the lowest point (or (highest point integer)-(lowest point integer)) and this will give you the location’s height scale.
Height offset.
This option makes the location go higher or lower relative to the water surface.
Detailed Heightmap area.
This option creates cells of a detailed heightmap (vertices begin to have smaller triangles within them). The size of the detailed heightmap and its placement on the location can be modified in the corresponding section.
Textures
The Textures category allows you to recover the base layer ground texture after deleting and creating a new heightmap, create vertical textures (hill, mountain slopes, etc.), and other features, but the latter won’t be discussed in this tutorial due to their poorly known properties and functions.
Plugins and F3
Plugins
Plugins are already integrated into the editor and ready to use. To summon the dialog box with all plugins, press button F11 (make sure you are not moving around the location, otherwise, the box won’t appear).
Notice: Due to plugin (filter) Water surface geom, which makes water to disappear, some people 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).
F3 Button
The F3 button, when pressed, shows the location’s mesh. The first variation of the mesh displays landscape deformation without layers, while the second displays it with layers.
Location’s Ground
Location’s ground is understood as the landscape and layers as one whole thing.
Precise interpretation depends on the amount of vertices and the presence of a detailed heightmap.
Layers make the location look better, for instance, by adding a layer for river banks, a forest layer, a city layer, etc.
Layers, as mentioned earlier, are located in the “Script Parameters” category within “Location Properties”. In the “Script Parameters” category, layers can be created, deleted, and used, obviously. Information on how to create an area of the second layer on top of the first one is written in the chapter ”Masks.”
Splines, Polygons and Objects
Splines
Splines are essentially curves that help create roads, borders, lampposts, fences, Czech hedgehogs, and more.
- Click the button that makes splines;
- Put some points to form whole spline;
- Click Right Mouse Button to end spline creating;
- Select spline, click button P and we’re in spline’s settings;
- Choose whatever you need in Spline asset class.
Polygons
Their name speaks for itself. They act on their borders and the area within a polygon’s borders. Polygons cannot be used to lay the texture of a second layer onto the first layer, but you can create an artificial pond or town with them. The “Border class asset” option behaves like splines: it makes roads, borders, and more, but along a polygon’s perimeter.
- Click the button that makes polygons;
- Put some points to form whole polygon;
- Connect the last point with the first in order to form polygon;
- Confirm that you want to close it;
- Move to its settings (button P) and choose whatever you need in Land asset class or Border asset class (both can be left empty if you need to change location’s elevation on certain area).
Objects
In LE, objects are almost all things you can encounter in War Thunder: tanks, planes, ships, buildings, trees, bushes, stones, and anything left after Halloween, Christmas, or another event. Objects are useful for placing something as a unique entity rather than placing a massive amount of individual items.
Note: Objects in the Location Editor and units in the Mission Editor are different things! Objects are like “decorations” like M60 and T-62 tanks in Fulda, while units can move, attack, etc.
- Click the button that makes objects;
- Choose what you want it would be;
- Place the object where you need to.
Notice: If you need a single object, after placing it click Right Mouse Button to stop placing the same object over and over.
Masks
We’ll start by saying that a mask is something that can be placed onto something else, in this case, a layer onto another layer. All masks are located in the “Script Parameters” section within each layer’s settings. I strongly discourage using existing masks since they are already in use. In this case, you can create new masks, naming them as desired. The new mask will appear in every layer’s settings, so there’s no need to create tons of them.
After creating a new mask, choose the layer you need, select the new mask, click the “Props…” button. You must activate two options: “Write weight to DetTex” and “Write weight to Land #1.” (*)
Choose any of the four brushes (Hill up mode, Hill down mode, Align mode, Smooth mode). Activate the option “Show blue-white mask” in “Script Parameters” to see all changes you’ve made with the mask. Next, click the “Edit” button in the layer’s settings and start “painting.”
To revert changes accidentally made in the wrong place, “paint” over that unnecessary area with the Right Mouse Button.
When finished, click the “Done” button in the layer’s settings and then the “Generate color map” button in the same category.
(*) If you only activate the parameter “Write weight to DetTex,” only the ground texture will change; if you only activate “Write weight to Land #1,” only structures generated by that layer (if it even generates any) will appear.
Solution to “I’ve created new heightmap but the ground is black”
Say, you deleted a heightmap and created a new one. But there’s a giant completely black plateau. The blackness occurs because the ground texture (not the layer) is missing. The console says “HeightMap tile texture is missing!”
Move to category Textures, subcategory Tile detail texture and put into tex
texture detail_ground
. It’s better to write it into search filter since you will search it for ages without the filter.
Go to the “Textures” category, subcategory “Tile detail texture,” and put “detail_ground
” into tex
texture. It’s better to use the search filter since you will search for it forever without it.
If the first layer in “Script Parameters” exists and has a texture, close the editor, save all changes, and open LE again.
Voila, you now have an absolutely flat location.
Location Export into the Game and Test Drive
You have created location and you wish to play on it.
The first step is to find the “Project” button in the upper left corner, click “Export to game (PC format),” then click OK everywhere.
Next, you need to save the .bin file in the folder WarThunder/content/pkg_local/
levels. Go into the folder after saving the .bin file.
You’ll see that every .bin file has a corresponding .blk file with the exact same name. The .blk file is important because it tells the game how big the location is, what properties it has, etc. Without it, you cannot play on the location; otherwise, the game simply won’t let you enter.
Copy one of the existing .blk files, rename it exactly after your location’s name. Open the .blk file with Notepad or any other text editor. We are interested only in coordinates. Change the coordinates in rows “mapCoord0
” and “mapCoord1
” (also “tankMapCoord0
” and “tankMapCoord1
” if you want to drive tanks on the location) to the coordinates of the most (negative; negative) point and the most (positive; positive) point of your location.
Coordinates represent two points in a two-dimensional space that form a kind of rectangle, or in this case, square, whose borders are considered the location’s borders. The first point must always be in (negative; negative) coordinates, and the second in (positive; positive) coordinates.
Back to editing .blk file, mapCoord0
and tankMapCoord0
require negative coordinates, whilst mapCoord1
and tankMapCoord1
are positive.
We are done here. Next, open Mission Editor. Open your location located in content/pkg_local/levels
. Create a unit, choose a tank/plane, add it to team A. The most important part is you have to open the subcategory “mission” in the category “Mission Settings” and change the option “level
” to your location, or else you will spawn in the middle of the Pacific Ocean since Mission Editor always defaults it to levels/water.bin
.
Save your mission, put it into the “UserMissions” folder. Launch War Thunder, find the “Battles” category in the upper left corner, click “User Missions,” locate your mission and start it. If everything is done correctly, you will spawn on your location.