Users browsing this thread: 1 Guest(s)
Problem ripping some TID images
#1
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:

[Image: zNE8luu.png]

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~! Content
Reply
Thanked by:
#2
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.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: NonStop, Raccoon Sam
#3
(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  Heart Works perfectly fine! Thank you very much!!
Reply
Thanked by: Raccoon Sam, puggsoy
#4
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.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by:
#5
Sure!

WoFR BG
WoFR CG (events)
Reine des Fleurs BG (I guess? I don't know what is going on with this game. TID images are different from WoFR though.)
Reine des Fleurs CG (events)
Reine des Fleurs Event BG

Good luck  Wink
Reply
Thanked by:
#6
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.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by: NonStop, Meiberu


Forum Jump: