I was ripping a visual novel (Wand of Fortune R) using
Scarlet. Everything was OK at first, no problem with sprites and bg, but then all CG events looks like this:
Something is wrong with the palette. Anyone knows how to solve the problem?
If someone wants to check the raw file, I've uploaded it
here.
Thank you~!
The colour format for this file uses RGBA, that is to say the alpha is at the end. Scarlet has read it in like ABGR, and it doesn't seem like you can change it.
I've written a
GFXtract script for it:
Code:
# Wand of Fortune R TID
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)
idstring TID
get DUMMY byte
get FSIZE long
get OFFSET long
goto 0x44
get WIDTH long
get HEIGHT long
setformat 32 RGBA
goto OFFSET
read IMG WIDTH HEIGHT
savepng IMG
It's a bit slower than Scarlet, but works fine if you have the patience.
(02-21-2017, 09:22 AM)puggsoy Wrote: [ -> ]The colour format for this file uses RGBA, that is to say the alpha is at the end. Scarlet has read it in like ABGR, and it doesn't seem like you can change it.
I've written a GFXtract script for it:
Code:
# Wand of Fortune R TID
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)
idstring TID
get DUMMY byte
get FSIZE long
get OFFSET long
goto 0x44
get WIDTH long
get HEIGHT long
setformat 32 RGBA
goto OFFSET
read IMG WIDTH HEIGHT
savepng IMG
It's a bit slower than Scarlet, but works fine if you have the patience.
Omg this is awesome
Works perfectly fine! Thank you very much!!
Would you actually be able to give me some more of these files, as well as ones that worked? For consistency's sake I'd like to know if it's possible to make my script work for all TID images, not just the ones Scarlet has issues with.
Thanks a lot! I've updated my script:
Code:
# Wand of Fortune R and Reine des Fleurs TID format
#
# Written by puggsoy
# GFXtract Script (https://github.com/puggsoy/GFXtract/releases)
idstring TID
get TYPE byte
if TYPE == 0x90
set ORDER RGBA
elif TYPE == 0x92
set ORDER ARGB
else
print "Unsupported type!"
exit
endif
get FSIZE long
get OFFSET long
goto 0x08 cur
get BPC long
goto 0x08 cur
getdstring NAME 0x20
get DUMMY long
get WIDTH long
get HEIGHT long
get BPP long
get DUMMY long
get PALLEN long
get DATSIZE long
get OFFSET long
set PALOFF OFFSET
math PALOFF -= PALLEN
if PALLEN == 0
setformat BPP ORDER
else
setformat BPP ORDER 1 BPC PALOFF
endif
goto OFFSET
read IMG WIDTH HEIGHT
savepng IMG
You might not need it, but it's here for anybody interested.
It works for the event CG of both games and the BGs from Reine des Fleurs. It doesn't work with the WoFR BGs or RdF Event BGs though; they use DXT encoding which GFXtract doesn't currently support.