Changing the texture in a MDL file (NPC, Enemy, Animated Object etc) info

#1
This is information on how to change the internal texture in an MDL file. MDL files are used for animated parts such as spells, enemies, NPCs, and some Objects.

Download Tim Viewer (TV) from here:
https://rveach.romhack.org/TIMViewer/TIMViewer104b.rar

Copy any MDL file into a separate working folder.

EXTRACTING THE TEXTURE:
In Tim Viewer go to 'File> Scan Raw file' and browse to the MDL file.

A number '1' should appear in TV's window; double click on the '1' (see black arrow below) and you'll see the texture.

Go to 'File> Save Multiple Files' and type '1' in the dialogue box that pops up (red arrow below). TV will then generate two files where the MDL is: 'timextracts.txt' and '1.tim'.

[Image: MDLTex.png]


CONVERTING THE TEXTRUE (TIM) TO A BITMAP:
In TV go to 'Convert> TIM to BMP' and browse to the where the MDL is and hit OK. TV will then convert '1.tim' to '1.bmp'.

Edit 1.bmp as you like but don't change its size and make sure the new texture bmp ends up usings 16 or 24 bit color.


COVERTING THE EDITED TEXTURE BACK INTO A TIM:
When you're finished editing, replace '1.bmp' with the new texture bmp and in TV go to 'Convert> BMP to TIM' and browse to the where the MDL is and hit OK.

CONVERTING THE 24BIT TIM TO 16BIT IF NEEDED:
If your new texture uses 24bit color go to 'File > Open TIM' and open '1.tim'. Then go to 'Convert' and select '24bpp>>16bpp'. Then go to 'File > Save TIM File' and save over 1.TIM

REINSERTING THE NEW TEXTURE INTO THE MDL:
In TV go to 'File>Insert TIM File(s)' and select 'timextracts.txt'.

Overwrite the original MDL file with your new MDL. You're done!




Reply

#2
Thank you john, someday I promise to get all your bits of wisdom incorporated into the tutorial so people dont hvae to fish around for them.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#3
WOW thank you so much after a little playing with this TIM I am having better results with my textures in actual game play , gee thanks:) will post some pics in a while:)
Reply

#4
someday we will find that secretly John worked for From Software on this project originally :P
- Todd DuFore (DMPDesign)
Site Founder
Reply

#5
I was up late last night playing with textures, and the TIM software and I had a lot of fun, got bored , and here is my result. Anyone remember that gnarly old tom cruise flick "legend"? you'll get the humor if you do:)


Attached Files
.jpg   Post Reply.JPG (Size: 30.6 KB / Downloads: 5,058)
Reply

#6
I love that movie...was one of my childhood favorites.

I am definitely glad to know we can adjust the texture to provide a real two sided face.

I will see if I can find a bootleg copy of poser...there is one npc I would love to modify!

Does anyone remember radd billheim from KF1 US? ‎  The guy who fashions crystal flasks from crystals? ‎  I put him in my game, and I wanted to give him the little gem-cutters monocle look.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#7
hmm, don't know try my txr. and also heres the bmp I used try that :) together we'll make some awesome characters I am working on my wife as an NPC and my daughter as well:)


Attached Files
.txr   0080prf B.txr (Size: 192.02 KB / Downloads: 306)
.bmp   0080prf B.bmp (Size: 192.05 KB / Downloads: 1,765)
Reply

#8
you as an enemy awesome I love it.....
Reply

#9
ok I hate to feel dumb but I have been playing with all these textures and toys and I still have one HUGE problem can anyone help me with this? I now can customise my npc's and enemies but how I say How do I make carbon copies of old mdl, and cp and PRF files that I can alter. Let me clarify, I have three little girls made that use 0096.prf as the mdl right ? Right. opening the 0096.prf in notepad reveals that it references 0096.mdl as the model. I already know that I can NOT use the NPC editor to create a new proof. it works in the editor but not the game, HOWEVER john's TIM conversion does the trick by embedding the new TXR on to the MDL itself:) great huh:) problem is that once you do that it IS PERMANENT, so if I make a little hair with pink hair and a purple dress, by the TIM method it would delete the old TXR of the little blue haired lass, get it:) I think that makes sence. so what I am trying to do is turn 0096.prf into 0105.prf and 0096.CP and 0096.MDL into 0105.MDL & 0105.CP so I will still have the blue haired girl AND my customs in the same game:) same for map pieces, Todd gave some awesome sand textures that WORK GREAT BY THE WAY, but they overwrote my snow and cliff set. I had to revert them back untill I can figure out how to make a new set with his textures and not overwritten snow. I want to create NEW pieces so I can ‎  have snow, black cliffs AND sand and brown cliffls:) I know I am a pain in the arse, but like Todd I am only doing one of these games and it WILL be great, but I want dudes to see this game and say WOW that came from the SoM engine? so please I have tried to figure it out and wasted one of my days off doing it (yesterday).. I tried to open the said files in notepad and then I changed the .PRF info (without adding characters) from child (2) to child (9) and the link 0096.mdl to 0105.mdl saved in ansi with the file name 0105.prf it saved as a .prf file, did the same with the other two files, and it looked like it should work. I now have a 0150.PRF and .CP and .MDL. but when I load my new 105 prf in the editor I get this. I should get a little blue haired chick that I can change with the TIM method to my hearts desire, so please fellow SoM ers Help me make dups:) you will thank me for it later:) PS should I be using a hex editor for this and not notepad, please tell me it's not that easy:)
Reply

#10
well I guess it is that easy, I just figured it out myself thank goodness for XVI32, did the the trick. for all who don't know the trick to create a newPRF out of an old one here goes. ‎  (I will use prf 0079 man 3 as the example)
(1) open XVI32 open your proof 0079.prf ‎  FIRST click save as then rename it to 0081.prf or anyother non used number. that will make 0081.prf with all the attributes of prf 79 got it? (2) open 0079.mdl in XVI32 save it as 0081.mdl (*IMPORTANT for all coversions you MUST type the name associated with the file *IE* 0081.mdl or it will save as a text file) ‎  (3) open your 0079.cp file in XVI32 and save it as 0081.cp (4) test in the NPC editor 0081.prf and make sure you don't crash and you see your dupe. (5) reopen your new 0081.prf in XVI32 and now change the name or number so it is different than man (3). change the MDL reference form 79 to 81 and resave.
(6) retest and make sure all went well with the MDL change and name. (7) reskin your new prf till your happy and lastly embed your new texture file to mdl 81 with John's TIM conversion and you cooking. Now I don't know how the C++ .CP files work with whole process but I took 0079 and saved to match 0081 and all is well. I only did that 'cause all mdl files have matching C++ instructions and as long as they match the origanal model it works great happy remodling:)
Reply





Users browsing this thread:
10 Guest(s)