#1
|
||||
|
||||
Extracting TGA Files
I've started messing around with the in-game texture files. To clarify, here is how to get all of the game's built-in TGA files.
Code:
ModEMFightersWeaponFighter1-1 overrides WeaponFighter3-1 { ... TextureName Textures/ModEMFighters_emfighterbay.tga ... } I'm working on model skins. Right now I've had no luck getting a new skin to render. Here's the code from the monster type object: Code:
ModelName Models/Projectiles/interceptor.mdl SkinName Models/ModEMFighters_emfighter_skin01.skn // Models/Projectiles/interceptor/interceptor_skin01.skn Code:
dir Models surface 0 ModEMFighters_emfighter_skin01.tga |
#2
|
||||
|
||||
I'm not a modder, but it looks like the database file is calling for the tga file from /Textures/, and the skn is calling for it from /Models/
But I'm not totally sure what you're doing, so I'm probably way off base.
__________________
Stephen A. Hornback |
#3
|
||||
|
||||
Quote:
I tried to reference back to the default texture from my new .skn file, and this actually works. That is, the game reads my .skn file correctly and will apply the texture it says. This makes me think the problem is my .tga file. PixelLord, you may know better than most what I'm doing wrong. I extracted the .tga file that the game uses, modified some colors in Photoshop, and saved it as a 24-bit TGA (with no RLE or whatever the compression is). Is there something else I need to do so that the game will parse it correctly? |
#4
|
||||
|
||||
Quote:
__________________
Stephen A. Hornback |
#5
|
||||
|
||||
If it created a .ctx file (in the same directory that the tga is in), the tga should be fine. If it didn't, then you might need a different plug-in for Photoshop found -> Plug-Ins/File Formats/Targa.8BI; but my Photoshop version is really, really old and it might not work with your version. To see if you need it, try creating an alpha channel and save the targa as 32 bit. Then reload it into Photoshop and make sure that the alpha channel is still there (under channels). If it's not there, you'll need the plug-in I just mentioned.
If it created the .ctx, and if reloadTextures tells you it can't find the file; then it's probably just a path problem.
__________________
Stephen A. Hornback |
#6
|
||||
|
||||
Workaround to Create CTX Files
I did a few more tests to see how it was working, and the game wasn't reading my new texture no matter what. I did find this thread on the Din's Curse forum with a good solution:
http://www.soldak.com/forums/showpos...0&postcount=10 I tried creating a standalone uncompressed Textures folder and dropping my .tga files inside them (per the above post). The game created .ctx versions exactly like it should have. Then I dumped those .ctx files into the exact same places my .tga files were, and now the texture loads correctly with no problems. I'm not sure why this works, but as a workaround it's not too complex. |
#7
|
||||
|
||||
Cool. Glad you found a solution.
__________________
Stephen A. Hornback |
#8
|
||||
|
||||
unable to convert my tga files despite this thread, ive tried saving them as 24 and 32 bit uncompressed in paint.net but get
Failed to compress/save texture C:/ProgramData/DroxOperative/Assets/Textures/doge.ctx error tried running drox as adminstrator as well; putting the file into din's legacy gave no better results |
#9
|
||||
|
||||
It looks like you should only get that if it can't write to the location or dimensions of the texture aren't a power of 2.
__________________
Steven Peeler Designer/programmer Depths of Peril, Kivi's Underworld, Din's Curse, Drox Operative, Zombasite, Din's Legacy, Drox Operative 2, & Din's Champion Wishlist Din's Champion |
#10
|
||||
|
||||
my file was absolutely not a power of two, that was the problem, thank you
|
Thread Tools | |
Display Modes | |
|
|