TilesBrush.xml

This file contains lists of the paintbrushes objects representing connected among themselves tiles of a relief.
Layout: by default settles down in the folder of the client, but in case of desire it can be manually moved to the profile folder.

General structure of the file

1<?xml version="1.0" ?>
2<TilesBrush>
3    <Brush Id="" Name="" />
4    <Brush Id="" Name="" />
5    <Brush Id="" Name="" />
6</TilesBrush>

Apparently the File consists from 1st root "section" in which there is an object list of paintbrushes of "Brush", with unique (in this file) an indifikatory Id from 1 to 9999 and the optional Name attribute which is setting a name description of object that will be is deduced in the tile list.

Admissible elements of a tag of Brush

1        <Land ID="0x219C" Chance="0,4" />
2        <Tile ID="0x219C" Chance="1,5" />
3        <Edge To="0202" />

These tags describe any specific tile with the specified ID in the attribute with the same name (both in a hexadecimal look and in decimal). The Land tag describes land tiles and their textures, the Tile tag can describe both that and another at the same time, thanks to the general ID. Generally for tiles TileID relief = LandID. These elements are located in the tags described in the previous point, for the description of continuous textures of a surface. The Chance attribute sets the modifier of probability of placement tile, and is by default equal 1.0. The increase in value will affect that that tile will come across more often among similar, and its reduction will lead to a reverse situation. For the description of textures of transitions the Edge tag is used, its single mandatory To attribute contains a mandatory indifikator of a secondary paintbrush.

Admissible elements of a tag of Edge

 1  <land type="UU" id="0x1318" chance="1,0"></land>
2  <tile type="UU" id="0x1318"></tile>
 

p <>. These tags describe any specific tile with the specified ID in the attribute with the same name (both in a hexadecimal look and in decimal). The Land tag describes land tiles and their textures, the Tile tag can describe both that and another at the same time, thanks to the general ID. Generally for tile TileID relief = LandID. These elements are located in the tags described in the previous point, for the description of continuous textures of a surface. The Chance attribute sets the modifier of probability of tile placement, and is by default equal 1.0. The increase in value will affect that that tile will come across more often among similar, and its reduction will lead to a reverse situation. The mandatory Type attribute can accept one of the following values: "LL", "UU", "DL", "UR", "DR", "UL" - these values set a mask of a texture of transition.

Structure of storage of a paintbrush

зоны перехода тайла

Each paintbrush is characterized by a set continuous tiles, that is tiles without transitions, tiles water, sand, the earth, a grass and so on can be such. and a set tiles that some transitions set, such tiles are located in the nested Edge tag having attribute with an indifikator of a secondary paintbrush. Tayla of transition characterize a transition state between primary paintbrush and secondary: for example transition of a grass to the earth or herbs to sand. To understand what paintbrush is primary and what secondary it is necessary to pay attention to the Type attribute, it describes a mask of a texture or its turn. Better to understand as it it turns out we will take tile and we will turn it on 45 degrees to the left, as a result we will receive a texture (it is possible to take directly a texture tile if it is available). Now it is conditionally separable turned tile on 4 parts and we will enumerate them as is shown in a figure on the right. In each quarter will be there is a piece of primary or secondary texture. In this case on an example in 1 quarter an earth texture, and in remaining sand. That it was more clear we will give a table of correspondences for a case when primary paintbrush at us the rock, and secondary sand.

Texture

сплошной тайл для первичной кисти - скала

тайл перехода для первичной кисти - скала, вторичной кисти - песок

тайл перехода для первичной кисти - скала, вторичной кисти - песок

тайл перехода для первичной кисти - скала, вторичной кисти - песок

тайл перехода для первичной кисти - скала, вторичной кисти - песок

тайл перехода для первичной кисти - скала, вторичной кисти - песок

тайл перехода для первичной кисти - скала, вторичной кисти - песок

Mask and Type

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

-

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

DR

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

DL

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

UL

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

UR

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

LL

маска тайла перехода (черный цвет - первичная кисть, белый цвет - вторичная кисть)

UU

тайлы перехода для первичной кисти - песок, вторичной кисти - скала

Apparently we considered cases when the primary paintbrush occupies the following quarters: 2-3-4, 1-3-4, 1-2-4, 1-2-3, 1-4, 1-2. In addition to the considered cases there are transition options when the primary paintbrush occupies quarters 1, 2, 3, 4, 2-3, 3-4 (cm a figure with an example of these tiles at the left). If to look narrowly that it becomes obvious that it there will be similar tiles transition, but already for a case when primary paintbrush a sand, and the secondary rock. Also it is not necessary to forget that at any status of transition or continuous tile can be much tiles that will be selected in a random way in case of placement, but same tile it is not authorized to be used in several paintbrushes at the same time.

Example of file content

 1<?xml version="1.0" ?>
 2<TilesBrush>
 3  <Brush Id="0002" Name="Dirty">
 4      <Land ID="0x0071" Chance="0,20" />
 5      <Land ID="0x0072" Chance="0,20" />
 6      <Land ID="0x0073" Chance="0,20" />
 7      <Land ID="0x0074" Chance="0,20" />     
 8      <Land ID="0x0075" />
 9      <Land ID="0x0076" />
10      <Land ID="0x0077" />
11      <Land ID="0x0078" />    
12      <Edge To="0202" >    <!-- Waste -->
13        <Land Type="LL" ID="0x1317" />    
14        <Land Type="UU" ID="0x1318" />    
15        <Land Type="DL" ID="0x1319" />
16        <Land Type="UR" ID="0x131A" />    
17        <Land Type="DR" ID="0x131B" />     
18        <Land Type="UL" ID="0x131C" />
19      </Edge>
20      <Edge To="0203" >    <!-- Grass -->  
21        <Land Type="UL" ID="0x0079" />
22        <Land Type="DR" ID="0x007A" />
23        <Land Type="UR" ID="0x007B" />    
24        <Land Type="DL" ID="0x007C" />
25        <Land Type="UU" ID="0x0085" />     
26        <Land Type="UU" ID="0x0086" />
27        <Land Type="LL" ID="0x0087" />
28        <Land Type="LL" ID="0x0088" />
29      </Edge>
30  </Brush>
31  <Brush Id="0202" Name="Waste">
32      <Land ID="0x127B" />
33      <Land ID="0x127C" />
34      <Land ID="0x127D" />
35      <Land ID="0x127E" />
36      <Edge To="0002" >    <!-- Dirty -->  
37        <Land Type="UU" ID="0x1315" />    
38        <Land Type="LL" ID="0x1316" />    
39        <Land Type="DR" ID="0x131D" />
40        <Land Type="UL" ID="0x131E" />    
41        <Land Type="DL" ID="0x131F" />      
42        <Land Type="UR" ID="0x1320" />
43      </Edge>
44      <Edge To="0203" >    <!-- Grass -->    
45        <Land Type="LL" ID="0x129C" />     
46        <Land Type="UU" ID="0x129E" />     
47        <Land Type="DL" ID="0x129F" />     
48        <Land Type="UR" ID="0x12A0" />      
49        <Land Type="UL" ID="0x12A1" />      
50        <Land Type="DR" ID="0x12A2" />
51      </Edge>
52  </Brush>
53  <Brush Id="0203" Name="Grass">
54      <Land ID="0x0003" />
55      <Land ID="0x0004" />
56      <Land ID="0x0005" />
57      <Land ID="0x0006" />      
58      <Edge To="0202" >    <!-- Waste -->
59        <Land Type="UL" ID="0x1297" />    
60        <Land Type="UR" ID="0x1298" />    
61        <Land Type="DR" ID="0x1299" />
62        <Land Type="DL" ID="0x129A" />     
63        <Land Type="LL" ID="0x129B" />     
64        <Land Type="UU" ID="0x129D" />
65      </Edge>
66      <Edge To="0002" >    <!-- Dirty -->    
67        <Land Type="UL" ID="0x007D" />
68        <Land Type="DR" ID="0x007E" />
69        <Land Type="UR" ID="0x0082" />
70        <Land Type="DL" ID="0x0083" />
71        <Land Type="LL" ID="0x0089" />
72        <Land Type="LL" ID="0x008A" />
73        <Land Type="UU" ID="0x008B" />
74        <Land Type="UU" ID="0x008C" />
75      </Edge>
76  </Brush>
77</TilesBrush>