risingstar64 Posted August 29, 2015 Share Posted August 29, 2015 (edited) Hey Guys, While working on a level file converter for my rock raiders remake, I ran into what appears to be a discrepancy between the wiki page and the game itself with regards to at least one of the Terrain Map tiles. The wiki states that the value 05 00 in the Terrain Map represents a Dirt tile, just as the value 04 00 does. However, when looking at the Terrain Map for Driller Night (or any other Terrain Map, such as one generated by the Map Creator) the value 05 00 actually appears to represent a floor tile. Is the wiki incorrect with regards to the value 05 00 for the Terrain Map, and is there another listing somewhere with the correct values? Also, The wiki does not appear to mention anything about how the map's dimensions are stored, however by messing around with the Map Creator I came to the conclusion that the map width is stored in the 9th byte of the map file, and the map height is stored in the 13th byte of the file (and both are 1 larger than they are in the Map Creator, with that extra row and column of tiles appearing to be a padding of solid rock) and the 17th byte of the file is the first byte describing the map contents, rather than name/size (This is not a topic that I know much about, but if each pair [ex. 05 00] is considered to be a single byte then the width is stored in the 5th byte, the height in the 7th, and the first tile in the 9th). Could anyone verify these few things for me, so that the wiki can be corrected, and expanded to include information about the map file's 16 (or 8)-byte "header'? Thanks in advance http://www.rockraidersunited.com/mediawiki-1.23.5/index.php?title=Surf.map - Terrain Map Wiki Page http://www.rockraidersunited.com/topic/630-map-creator-0910/ - Map Creator Edited August 29, 2015 by risingstar64 Link to comment Share on other sites More sharing options...
sheepandshepherd Posted August 30, 2015 Share Posted August 30, 2015 Floor isn't really determined by the Surf map, although floor tiles in LRR can have either 0x0 or 0x5* values in Surf.map. It's the Dugg map that determines empty floor tiles, with either 0x1 for visible caverns or 0x2 for hidden caverns. The split-up map component format is annoying. * For the record, 0x5 almost certainly used to be Soil before it was removed. No idea why those few LRR maps use it for ground tiles, maybe the developers got confused after removing Soil A few other things I can explain (I ran into these same issues when I made my map editor): The solid rock padding is purposely added in by Map Creator. Basically, telling it to create a 5x5 map actually creates a 6x6 map. The reason is that the last row and column are not visible in LRR -- they're ignored except for their High.map values, since High.map defines height at the top left (northwest) corner of a tile. The map sizes are indeed stored in the 9th and 13th bytes, but it's unknown how long they are. My map editor treats them as single bytes, since making maps larger than 255x255 is a bit overboard. But Xiron has mentioned having a 256x256 map, which would suggest they're at least 2 bytes long. AFAIK, nobody's ever tried using the third or fourth bytes, since that would require a map with a dimension of 16777216 (it'd crash LRR even if it's technically possible.) The map data does indeed start at the 17th byte. Although the map data uses 2 bytes for each of the tiles, none of the map types has any value above 255, so the second byte is always 0. You can ignore it. risingstar64 1 Link to comment Share on other sites More sharing options...
risingstar64 Posted August 30, 2015 Author Share Posted August 30, 2015 Thank you very much for your responses, SheepandShepherd! Your explanations are pretty much spot on with my own reasoning Also, the fact that the tile padding is used by High.map to provide the final row and column of tiles with height information at their edges is very interesting, and really clears up the confusion that I had. I appreciate your help, and I have a feeling I'll be counting on your knowledge at least one more time when I have to tackle scripting the events tied to tuto.map Link to comment Share on other sites More sharing options...
sheepandshepherd Posted August 31, 2015 Share Posted August 31, 2015 Glad to help! I'm looking forward to an LRR remake But I must admit, I have no idea about NPL scripting. I just know that Tuto.map gives blocks ID numbers (or 0 for none). Link to comment Share on other sites More sharing options...
Recommended Posts