Data:
Each tilepoint is defined by a block of 7 bytes.
The number of blocks is equal to Mx*My.
short: ground height
C000h: minimum height (-16384)
2000h: normal height (ground level 0)
3FFFh: maximum height (+16383)
short: water level + map edge boundary flag*(see notes)
4bit: flags*(see notes)
4bit: ground texture type (grass, dirt, rocks,...)
1byte: texture details (of the tile of which the tilepoint is the bottom left corner) (rocks, holes, bones,...). It appears that only a part of this byte is used for details. It needs more investigations
4bit: cliff texture type
4bit: layer height
*flags notes:
Flags values (shown as big endian):
0x4000 --> boundary flag 1 (shadow generated by the world editor on the edge of the map)
0x0010 --> ramp flag (used to set a ramp between two layers)
0x0020 --> blight flag (ground will look like Undead's ground)
0x0040 --> water flag (enable water)
0x0080 --> boundary flag 2 (used on "camera bounds" area. Usually set by the World Editor "boundary" tool.)
Water level:
Water level is stored just like ground height. The highest bit (bit 15) is used for the boundary flag 1.
Tilepoint data example:
51 21 00 62 56 84 13
51 21 --(little endian)--> 0x2151 --(hex-->dec)--> height = 8529
00 62 --(little endian)--> 0x6200
(extract boundary flag)--> (0x6200 & 0xC000) = 0x4000 boundary flag set
(extract water data)--> (0x6200 & 0x3FFF) = 0x2200 --(hex-->dec)--> water level = 8704
56 --> 5 sets both water flag and ramp flag, 6 means tilepoint is using ground type #6 in the tilesets table
84 --> means tilepoint is using detail texture #132 (=0x084)
13 --> 1 means cliff type #1 (cliff tilesets table), 3 means tilepoint on layer "3"
The tilepoint "final height" you see on the WE is given by:
(ground_height - 0x2000 + (layer - 2)*0x0200)/4
where "0x2000" is the "ground zero" level, 2 the "layer zero" level and "0x0200" the layer height
= (0x2151 - 0x2000 + 1*0x0200)/4
= (8529 - 8192 + 512)/4
= 212,25
The tilepoint "water level" you see on the WE is given by:
(water_level - 0x2000)/4 - 89.6
where "0x2000" is the "ground zero" level, -89.6 is the water zero level (given by the water.slk file height = -0,7 --> water_zero_level = -0,7*128):
= 8704/4 - 89,6
= 38,4
In this case, water flag is set and water level is below the ground level so we will not see the water. This is just an example and I don't think you can find such a tilepoint on a map. It was just here for demonstration purpose.
NilasAran_39, если кто предоставит доходчивую информацию о бинарном формате карты - я бы мог создать програмульку по генерации карт на WarCraft. У неё и возможности будут более широкими.
» Unity / Unity
» Unreal Engine / Unreal Engine 4 - теперь условно бесплатно!
» Несыть / Альфа версия 3.5а
» Несыть / Альфа версия 3.5а
» Несыть / Альфа версия 3.5а
Ред. alexprey
» Несыть / Альфа версия 3.5а
» Черная Чайка / Грибная помешанность
» Lo of the Dark / Lo of the Dark 0.8.1 - няшнофичи!
» Lo of the Dark / Lo of the Dark 0.8.1 - няшнофичи!
» Lo of the Dark / Lo of the Dark 0.8.1 - няшнофичи!
» JARG / JARG
» Несыть / Несыть
» XGM Конкурсы / Оценки судей & зрительское голосование
» Генератор случайных melee карт WarCraft III / Генератор случайных melee карт WarCraft III
Ред. alexprey
» WarCraft 3 / Устройство .w3m файлов
» Генератор случайных melee карт WarCraft III / Генератор случайных melee карт WarCraft III
» XGM Конкурсы / Оценки судей & зрительское голосование
» Game Dev / Геймдев / моделинг для дитенка годов 6-8
» Администрация XGM / Удаление файлов из сообщения
» Программирование / Реализация нескольких интерфейсов с общим родителем
» Программирование / Реализация нескольких интерфейсов с общим родителем
» Роглайк «Долго и трудно» / Роглайк «Долго и трудно»
» Генератор случайных melee карт WarCraft III / Генератор случайных melee карт WarCraft III
» Программирование / Реализация нескольких интерфейсов с общим родителем
это уже попахивает костылями
» Программирование / Реализация нескольких интерфейсов с общим родителем