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.
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
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
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
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