What is Tamriel Rebuilt?
gro-Dhal is the new Head of Literature (9. Sep 13 19:07)
Sacred East version 1.5 released! (8. Aug 13 09:40)
Stryker named new Head of Interiors (5. May 13 18:34)
Stryker named Assistant Head of Characters (3. Feb 13 13:54)
2012 in Review (31. Dec 12 13:51)
Our New Head of Characters is Not! Also Int Reviewing Empty! (13. Dec 12 17:56)
Sacred East updated to Version 1.2 (11. Oct 12 10:30)
New Core Shuffle! (7. Oct 12 23:20)
Sacred East (6. Jun 12 00:36)
New Head of Interiors (19. Mar 12 11:12)
Hex editing NIF files
Greetings, and welcome to my Hex editing tutorial. This will explain the workings of a hex editor and how you can use one to change the textures on your morrowind models,and look at how you can use a shorter or longer filename without messing up the NIF file.
Before you start messing with the models i recommend taking a backup of them.. just in case.
Most hex editors are split into two parts, a hex side and an ascii side:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | . . . . . . . . . . . . . . . .
I wont go very deep into the inner workings of hex, but if you see the line above, there are 16 double digits and 16 dots.. those double zeroes are the hex value of the dot behind the line.. so for instance if we type a 1 to replace the third dot.. the third hex value will change to the hex value of that 1, the same thing works the other way.. if you insert the hex value, the appropriate character will appear on the line behind:
00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 | . . 1 . . . . . . . . . . . . .
hex doesnt stop at 9, it goes all the way to F before adding another digit so:
01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12and so on.
okay now.. how can we use this to our advantage... Well as you allready should know, you can change the textures used in morrowinds .nif files by hex editing the files and searching for the texture name... Most hex editors have a 'string search' button, set this to ascii and search for TX, and the program should take you to the proper location..
NOTE: look at the ascii values, most of it is gibberish but some places you can see the occational letter, other places you can see words.. the only thing we can really edit are those words..
you should see somthing like this:
if the filename is long it might be spread across more than one line, dont worry about that tho.. now just replace that with the texture file you want to change it to. Before you do tho.. read on.
Explaining the use of hex
The model file has a registry at the top, explaining to the program where it should look for stuff.. for instance the texture info starts at a certain string, and the model info starts at another. We can't actually change theese values, so be sure not to remove or add any strings yet, seeming it will mess up your nif file. This means you need to use the EXACT number of letters in the new texture files as the old one.
There is a workaround to this tho - have a look at what i did when i made my spidersilk armor:
As you can see our name has two characters less than the old one, if we were to just remove those and load up the model we would get an error. what we do instead is change those last two characters with null values.. look at the hex display side of your editor, if you select the space after the name you should see a  thats the one that indicates end of filename, if you have to edit the lenght of the filename, do it before this hex entry.. so, we replace the _ and C with null values .
now for the other way, longer filenames. if you for instance need two extra characters in your filename, find the  value after the name again and check the next two values, if theese are  they are safe to change.. so REMOVE the hex entry for those two completely (not sure on all hex editors but on mine its simply backspace) now INSERT two hex values IN FRONT of the  this is VERY important.
So remember, delete behind  insert in front.
using this technique, replace all the texture files in the models with your own.. and you should be good to go. Hope that made at least a little sense.. if you're still confused, feel free to send mail to Tordstorlien@hotmail.com.
|The content of this site is © by the Tamriel Rebuilt community. Morrowind, Oblivion, their expansions, and their content is © Bethesda Softworks.|