Difference between revisions of "User:Selaya/Sandbox"

From HIVE
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This is the tileset file. It contains all the data about the tilesets of the map. Let’s say the map is divided into squares called “tiles”. Each tile has 4 corners. In 3D, we define surfaces using points and in this case tiles are defined by their corners. I call one tile corner a “tilepoint”. So if you want a 256x256 map, you’ll have 257x257 tilepoints. That’s also why a tile texture is defined by each of its four tilepoints. A tile can be half dirt, one quarter grass and one quarter rock for example. The first tilepoint defined in the file stands for the lower left corner of the map when looking from the top, then it goes row by row. Tilesets are the group of textures used for the ground.
+
nothin'
 
 
= Format =
 
 
 
Here is the file format:
 
 
 
<pre>char[4]    magic_number
 
int32      format_version
 
char        main_tileset
 
int32      uses_custom_tileset
 
int32      ground_tilesets
 
char[4][a]  ground_tileset_ids
 
int32      cliff_tilesets
 
char[4][b]  cliff_tilesets_ids
 
int32      width
 
int32      height
 
float      horizontal_offset
 
float      vertical_offset</pre>
 
Then width * height tilepoints, each 7 bytes long:
 
 
 
<pre>int16      ground_height
 
int16      water_height + boundary_flag
 
4bits      flags
 
4bits      ground_texture
 
5bits      ground_variation
 
3bits      cliff_variation
 
4bits      cliff_texture
 
4bits      layer_height</pre>
 
= Explanation =
 
 
 
<pre>char[4]    magic_number</pre>
 
The constant string “W3E!” at the start of the war3map.w3e file used to identify it.
 
 
 
<pre>int32      format_version</pre>
 
The version. Seems to always be 11? Needs more investigation
 
 
 
<pre>char        main_tileset</pre>
 
This is the main tileset for the map. Each tileset has an .mpq in the game mpqs which contains some specific textures for this tileset like water or cliff textures. It can be one of the following:
 
 
 
* A Ashenvale<br />
 
 
 
* B Barrens<br />
 
 
 
* C Felwood<br />
 
 
 
* D Dungeon<br />
 
 
 
* F Lordaeron Fall<br />
 
 
 
* G Underground<br />
 
 
 
* L Lordaeron Summer<br />
 
 
 
* N Northrend<br />
 
 
 
* Q Village Fall<br />
 
 
 
* V Village<br />
 
 
 
* W Lordaeron Winter<br />
 
 
 
* X Dalaran<br />
 
 
 
* Y Cityscape<br />
 
 
 
* Z Sunken Ruins<br />
 
 
 
* I Icecrown<br />
 
 
 
* J Dalaran Ruins<br />
 
 
 
* O Outland<br />
 
 
 
* K Black Citadel
 
 
 
 
 
-----
 
 
 
<pre>int32      uses_custom_tileset</pre>
 
Indicates whether this map uses a combination of textures from different tilesets or a predefined one from the list above.<br />
 
(1 = custom tileset, 0 = no custom tileset)
 
 
 
<pre>int32      ground_tilesets</pre>
 
Indicates how many ground textures there are. There is no maximum except that a tilepoint only allocates 4 bits and thus can save only 16 different values and so only the first 16 tilesets are usable.
 
 
 
<pre>char[a][4]  ground_tileset_ids</pre>
 
A list of strings of size 4. Example: “Ldrt” stands for “Lordaeron Summer Dirt”<br />
 
Refer to “TerrainArt.slk” located in War3.mpq or War3x.mpq for more details.
 
 
 
<pre>int32      cliff_tilesets</pre>
 
Indicates how many cliff textures there are. There is no maximum except that a tilepoint only allocates 4 bits and thus can save only 16 different values and so only the first 16 cliffs are usable.
 
 
 
Note that while the tilepoints allocate 4 bits for which cliff_tilesets_ids to use, the value 15 is reserved for an unknown. This means that while y
 

Latest revision as of 22:10, 19 June 2018

nothin'