Need some help with decoding grf

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Need some help with decoding grf

Post 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
Hodie Mihi Cras Tibi
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Need some help with decoding grf

Post 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 ;)).
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Re: Need some help with decoding grf

Post by Zimmlock »

Hello Pikkabird,

good to see you :wink: 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
Hodie Mihi Cras Tibi
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Need some help with decoding grf

Post 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)
User avatar
kamnet
Moderator
Moderator
Posts: 8592
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Need some help with decoding grf

Post 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?
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Re: Need some help with decoding grf

Post 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 :cry:
Hodie Mihi Cras Tibi
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Need some help with decoding grf

Post 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.
Attachments
Sample.BAT
(1.08 KiB) Downloaded 37 times
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 20 guests