For those of you who use programmers notepad or another Hex editor to edit model files instead of using "ReplaceTexture", it can be annoying to have to keep the same number of characters in your new texture name as the original. This is especially annoying for files where "ReplaceTexture" does not work. I was messing around with some .prt files, and thankfully there is a way around this problem.
What you will need:
1). Programmers Notepad (or any other Hex editor)
2). This chart:http://www.asciitable.com/
For this tutorial, we will be editing thesfx a generic smoke small.prt file. I have only tested this method with single material .prt files, but it may work with .brg files as well.
1. Opensfx a generic smoke small.prt with Programmers notepad and use the Hex editor to view the name of the texture as you normally would. You should see the name is S.F.X. .E. .I.n.f.e.r.n.o. .C.l.o.u.d...t.g.a.
2. You now have to count the number of characters in the name (including the spaces and .tga, but not including the extra dot after each character). This is what you are counting:
"SFX E Inferno Cloud.tga"
and you should get23.
3. With that number in mind, open up the ASCII table link.
Find "23" in theDec column. Find the equivalent in the Hx column, which is 17. Forget 23, 17 is the actual number of characters according to the PRT file.
4. Go back to the file in Programmers Notepad. Position your cursor about 5 lines above the name of the texture. Search for "17". You should see the number17 highlighted, followed by 00, and represented by a dot. It should a few characters before the texture name. This is the area that defines the number of characters in the texture file name.
5. We want to name the new texture "MySFX E Inferno Cloud.tga" so we want to add 2 characters, bringing the nubmer to 25. After looking at that chart, the number used to represent 25 in the Hex is 19. Change the 17 to 19.
6. In order to add more characters, we will have to paste the new name over the old, extra dots and all. Paste "M.Y.S.F.X. .E. .I.n.f.e.r.n.o. .C.l.o.u.d" over "S.F.X. .E. .I.n.f.e.r.n.o. .C.l.o.u.d".
7. There is one last thing to do. You will notice that the periods you pasted are represented as "2E" in the Hex rather than "00". This needs to be fixed. Replace all "2E" with "00", remembering only to replace those in the area that you pasted, NOT the entire file.
So basically, this is what you did:
Count the number of characters in the texture name, convert that number from Dec to Hx, search for that number in your model file, replace it with the equivalent Hx code representing the desired number of characters, paste your new texture name over the old one, and make sure all pasted periods are represented as "00".
And there you have it! It seems complicated at first, but it's easy once you get the hang of it. Just keep in mind that Hex codes can sometimes have letters instead of numbers, so make sure to reference the ASCII table.
Happy Modding!
Check out all of the mods I made here
1). Programmers Notepad (or any other Hex editor)
2). This chart:
For this tutorial, we will be editing the
1. Open
2. You now have to count the number of characters in the name (including the spaces and .tga, but not including the extra dot after each character). This is what you are counting:
"SFX E Inferno Cloud.tga"
and you should get
3. With that number in mind, open up the ASCII table link.
Find "23" in the
4. Go back to the file in Programmers Notepad. Position your cursor about 5 lines above the name of the texture. Search for "17". You should see the number
5. We want to name the new texture "
6. In order to add more characters, we will have to paste the new name over the old, extra dots and all. Paste "M.Y.S.F.X. .E. .I.n.f.e.r.n.o. .C.l.o.u.d" over "S.F.X. .E. .I.n.f.e.r.n.o. .C.l.o.u.d".
7. There is one last thing to do. You will notice that the periods you pasted are represented as "
So basically, this is what you did:
Count the number of characters in the texture name, convert that number from Dec to Hx, search for that number in your model file, replace it with the equivalent Hx code representing the desired number of characters, paste your new texture name over the old one, and make sure all pasted periods are represented as "00".
And there you have it! It seems complicated at first, but it's easy once you get the hang of it. Just keep in mind that Hex codes can sometimes have letters instead of numbers, so make sure to reference the ASCII table.
Happy Modding!
Check out all of the mods I made here