The VG Resource
TMX File Issue - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Spriters Resource (https://www.vg-resource.com/forum-110.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-114.html)
+---- Thread: TMX File Issue (/thread-28615.html)

Pages: 1 2 3


RE: TMX File Issue - puggsoy - 01-29-2016

Super curious how Noesis did that, but I can't find the source code anywhere Dope Oh well, glad it's possible anyway!


RE: TMX File Issue - Struggleton! - 01-29-2016

(01-29-2016, 06:09 PM)puggsoy Wrote: Super curious how Noesis did that, but I can't find the source code anywhere Dope Oh well, glad it's possible anyway!

Really hate that Noesis' source isn't released anywhere; would help out with a lot of projects I have. ;/


RE: TMX File Issue - puggsoy - 01-30-2016

(01-30-2016, 08:13 AM)Skyla Doragono Wrote: And... that's it for P4DAN? I mean, a lot of the UI is missing, particularly for the dance screen and all, but I think those .TGA files have movement data built into them as well. Every time I try to open them with... anything, I get error messages. This was particularly prevalent in the transitions images.

But I'm done. If anyone wants to figure those out, they're welcome to it.

Could you chuck a couple of these up? Could be that they just have some stuff tacked onto the top of them.


RE: TMX File Issue - Skyla Doragono - 01-30-2016

Here's the entire folder of transitions, because it's been a long day and I can't remember the specific files. I left them in their .bins, but the BMS script extracts them no problem.


RE: TMX File Issue - puggsoy - 01-31-2016

The ones that aren't working seem to be in 4bpp instead of 8bpp. The only difference other than that is that they have a weird footer at the end. I don't know why either of these would affect the ability of files opening them, maybe 4bpp just isn't a standard .tga format?

I made a GFXtract script that almost works, but there are some weirdo ones like spot.tga that seem to have some other issues. I'll try and figure those out.

EDIT: Turns out it was just 24-bit instead of 32, which also cleared up what one of the values in the header was.

Code:
# Persona 4: Dancing All Night .tga
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)

goto 0x5
get PALLEN short
get BPC short
getdstring DUMMY 3

get WIDTH short
get HEIGHT short
get BPP short
savepos PAL

if BPC == 32
    math PALLEN *= 4
    setformat BPP BGRA 1 BPC PAL
elif BPC == 24
    math PALLEN *= 3
    setformat BPP BGR 1 BPC PAL
else
    print 'unknown BPC!'
    exit
endif

goto PALLEN cur
read IMG WIDTH HEIGHT
flip IMG 1
savepng IMG

Managed to convert all the .tgas you sent, but somehow it also manages to convert Yukiko correctly as well?? I don't even know how my own program works Blank

EDIT2: Derp, I know why I couldn't figure it out before. I assumed that the value before the palette (which I now know to be the bpp) was a byte, instead of a short, so I thought the palette started one byte earlier than it actually did. I guess that's what I get for trying to figure it out at 3am.

Glad that mystery's solved Smile


RE: TMX File Issue - Skyla Doragono - 01-31-2016

Wow, cool.

I'll be able to update with the missing files then.

...when I wake up lmao.