Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to edit height map files (HTD files) for maps

Joined
Jun 5, 2009
Messages
959
Reaction score
235
I'm making this mostly for my own use so I can refer back to it in the future if I forget, but I might as well share it with the community.

HTD files, or height map files have been a mystery for a long time and some people had figured them out somewhat, but recently I've found a tool that lets you modify and view htd files to your liking.

So here is a guide on how to open and view or edit htd files. In this guide I will be using the Adealia htd file released here: http://forum.ragezone.com/f901/na-2011-file-fixes-912308/

1. Download L3DT Standard from here:

2. Copy the htd file you want to modify and change the extension to .r32

3. Open the map .ini file to be able to view the settings. We will take some of the values in this file and use it to import the .r32 file to L3DT. We will only really be looking at OneBlockWidth and OneBlockHeight and heightmap width and height.
4qGWAwP - How to edit height map files (HTD files) for maps - RaGEZONE Forums

4. Open L3DT and select import > heightfield.
hG4Dh1w - How to edit height map files (HTD files) for maps - RaGEZONE Forums

5. Click next. Set the horizontal scale to OneBlock value from the .ini file. In this case it's 50. If the block height is different you will need to specify a new vertical range, so tick the "specify new vertical range box". But this isn't usually the case.
88hJlUH - How to edit height map files (HTD files) for maps - RaGEZONE Forums

6. Now you will need to specify the map width and height and the header length. You can get the map width and height from the .ini file from step 3. The header should be 4. This is the amount of bytes to skip to exclude the header. Also untick the invert y axis tick box, because we don't want to invert the map.
SPR3tcY - How to edit height map files (HTD files) for maps - RaGEZONE Forums

7. You should now have an image of the height map, with various colours specifying how high the terrain is. It should look something like this:
q2vubHs - How to edit height map files (HTD files) for maps - RaGEZONE Forums

8. Now to open the 3d editor, go to operations > edit height field > edit height field in 3d. Which should bring you to this:
5QT8PZC - How to edit height map files (HTD files) for maps - RaGEZONE Forums

SO7u9m2 - How to edit height map files (HTD files) for maps - RaGEZONE Forums

9. Now figure out all of the tools and how to use them to edit the terrain because I won't be explaining those. I also won't be explaining how to save it, but simply you have to export it back to a r32 file and then add the original header back into the file using a binary editor like hxd and finally, change the extension back to htd.

EDIT:
  • ini: Loads the height map and its textures
  • shmd: Loads the sky, ground, sea, and supplementary nifs, called nif objects.
  • shbd: Collision map. You can edit with a .shbd editor. (server files has it too, necessary)
  • conf: Related to the "glowscreeneffect"
  • idm: UNKNOWN (server files has it too, IDK if is necessary)
  • sbi: Contains the doors of a map. Through HEX editing, you can view the door names and change it. The file has an .shbd inside, so you can extract with Hex knowledge and edit doors. (server files has it too, necessary)
  • htd: Contains data for the heights (mountains, cliff, etc).
  • htdg: just a copy of the .htd, unused
  • aid: Specified areas in maps to use in scripts. Need to figure out the structure to be able to edit them.
  • bdt: Isn't really needed. Not sure what this is for.

These are all of the files related to maps. With all of this information and the tools currently available you can make your own custom map from scratch.
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Apr 10, 2016
Messages
11
Reaction score
2
Re: [Tutorial] How to edit height map files (HTD files) for maps

My congratulation, now i am Not alone with HTD editing
you find your way too

and you are Not right.. cuz every HTD has an unique Header btw

if you want to make an 256x256 HTD, you Have to take the Header of an already existing 256x256 HTD.. Like RouVal02
or for an 512x512 u need an 512x512 HTD Header.. like RouVal01
You can try to use an HTD Header with another size but you will See what happens next

Oh and btw... the .bmp Images are causing alphablending, not Texturen painting
greets from 3D Designer and Fiesta DEV Daniel
 
Back
Top