BigBang1112 / nations-converter

Map conversion tool from TMS/TMNESWC/TMUF/TM² Stadium to TM®. Powered by GBX.NET. We are coming back soon.
GNU General Public License v3.0
37 stars 1 forks source link

Converted maps are in the ground. #6

Closed renefreund closed 3 years ago

renefreund commented 3 years ago

Hi,

very nice tool. But somehow version 1.0.0 convertes all maps with a negative Z-index (height), so ground-layered items are 1-3 heights under the grass if i open them in tm2020.

tried about 40 maps from tmnf and tm2 stadium.

i added a (source-files)

greetings.

renefreund commented 3 years ago

Added a tm2020-editor screenshot from a converted map as example.

marsattacks_converted_example_for_wrong base-height

btw. no openplanet present in my client.

BigBang1112 commented 3 years ago

This sounds like a map built in either an unusual version or the newest TMNF. Weird

renefreund commented 3 years ago

to be clear. all my mapfiles BEFORE

if its edgecases.. pls close. but i think mars attack map should be okay to debug.

zai-tm commented 3 years ago

Try re-saving the maps (with a different name, of course), then converting it

BigBang1112 commented 3 years ago

Converter should recognize every Stadium map correctly, so I don't count resaving as the definite solution. I will look at this issue once I get through the priorities.

BigBang1112 commented 3 years ago

Hello, after a long time, I figured out the issue. Maps can get sunk to the ground because they were made at the game release date. Back then, it likely used to happen that the chunk 0x03043052 (decoration height chunk) didn't appear in maps most of the time. This chunk gives a property DecoBaseHeightOffset likely determining that the blocks are shifted up by 8 units by default. This wasn't included back then, and the block Y started at 0.

This bug has been fixed in two commits: 32a03534aff2dd5b53d0c53b4d7117a5bec1a219 85bd24cfb50fd8281c0c26b1dc13b7599e82eb1e