Page 1 of 1
Need some help with decoding grf
Posted: 05 Nov 2023 14:34
by Zimmlock
Hello community,
It has been a long long time for me to play Transport Tycoon and i wanted to fiddle around with some of my work.
So i DL the GRFWizard and the GRFCodec. It all looks fine, installed in the correct directory, selecting the grf i want to decode, it all works fine, however there appear no images (sprites) in my sprites map.
What do i wrong, i run latest Windows.
Best regards
Zimmlock
Re: Need some help with decoding grf
Posted: 05 Nov 2023 16:11
by PikkaBird
Welcome back!
Do you not have the original sources any more? Which GRF are you trying to decompile?
(BTW, discord is the place to be for real-time support and chat these days

).
Re: Need some help with decoding grf
Posted: 05 Nov 2023 16:49
by Zimmlock
Hello Pikkabird,
good to see you

i tryed the basic ECS 2 and TTRS, the win CMD window functions okay, its like all runs fine, no error message but no sprites either lol.
Discord? dont like that to much
Re: Need some help with decoding grf
Posted: 05 Nov 2023 20:16
by Eddi
Dunno how GRFWizard fares nowadays, with GRFCodec make sure it's a current version that can handle 32bpp sprites, as they become more and more prevalent. also the file format switched from BMP to PNG (although when decoding, this should be switchable)
Re: Need some help with decoding grf
Posted: 06 Nov 2023 09:27
by kamnet
I've never gotten GrfWizard to work right for me. But grfcodec -d should definitely be throwing out a spritesheet for you. Any error messages that you've encountered?
Re: Need some help with decoding grf
Posted: 08 Nov 2023 08:13
by Zimmlock
Thanks for reply,
It doesnt work and i simply forgot how it worked with the cmd, with Locomotion, you simply drag the grf on the decoder. dang time is catching up on me

Re: Need some help with decoding grf
Posted: 08 Nov 2023 22:21
by OzTrans
Zimmlock wrote: 08 Nov 2023 08:13
It doesn't work ...
Welcome back ...
Forget GRFWizard, it is too old to work anymore.
You need to use GRFCodec v6.0.6 or later; you can find it
here.
Use a BAT file to be able to specify all the required parameters, see Sample BAT.
The important parameters are :
-d : decode GRF.
-x : produce pure NFO code.
-t : produce output in NFO code (do not use, if text strings are to be in ASCII).
-o png : produce PNG-file sprite sheet.
-p 1 : use TTD DOS palette for output; (-p 2 for output in Windows palette).
-M 1 : if output is to be converted > Windows to DOS, use if GRF uses a different palette than desired palette specified with -p n; (-M 0 for DOS to Windows). -M is only required if your sprites turn out 'pinky'.
[dir] the sub-directory the output is to go into.
That should work, works for me without any problems.