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.
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 the highlighted values.
4. Open L3DT and select import > heightfield.
5. Click next. Set the horizontal scale to OneBlockWidth 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 and most maps use 50, 50.
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.
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:
8. Now to open the 3d editor, go to operations > edit height field > edit height field in 3d. Which should bring you to this:
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.
That's how to edit a htd file. Also I do not think the files rely on HTDG files so you will not need to edit this in order to make your own custom map, but you will need to be able to edit the shbd and shmd. One of which can be opened with a text editor and the other can be converted using csharps sbhd editor. Though it does not work 100% and has not been fully figured out, it is still usable.
If someone does fully figure out how the shbd file works let me know. Thanks.
EDIT:
- shmd: The file that contains the settings for the lighting and nif locations.
- shbd: Contains the area you can walk in. This can be edited with the editor made by csharp.
- htd: Explained in this post.
- ini: Self explanatory.
- conf: Also quite self explanatory.
- htdg: I don't think it is needed to make your own map. For collision, makes no difference if you remove.
- idm: I don't think that is needed either.
- sbi: Doors and their names and coords. Need to figure out the structure to be able to edit them.
- aid: For making areas accessible or not. Need to figure out the structure to be able to edit them.
- bdt: Isn't really needed. Not sure what this is for.






