GRFcodec compile command

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
lawton27
Tycoon
Tycoon
Posts: 1418
Joined: 03 Aug 2009 14:29
Location: Manchester

GRFcodec compile command

Post by lawton27 »

Hi just a quick question, If I where to decompile a grf using -d name.grf -p2

I need to know after I make modifications how to re-compile it with grf codec, I presume I need to specify the nfo path but what's the command?

Thanks,

Lawton27
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: GRFcodec compile command

Post by Zuu »

I have never used the grf (de)coding program, but have you tried with "--help", "-h", "-help", "/?" to see if the program have any inbuilt help function for the command line arguments?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
lawton27
Tycoon
Tycoon
Posts: 1418
Joined: 03 Aug 2009 14:29
Location: Manchester

Re: GRFcodec compile command

Post by lawton27 »

Just tried, nothing.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: GRFcodec compile command

Post by Zuu »

A quick google on "grfcodec command line arguments" got me to this page:
http://www.ttdpatch.net/grfcodec/

If you then search on that page for "command" you get to a section that describes (at the end of the section) different command line arguments to the program.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: GRFcodec compile command

Post by DJ Nekkid »

Code: Select all

grfcodec -e -p2 mytrainset
Member of the
ImageImage
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: GRFcodec compile command

Post by PikkaBird »

Just run grfcodec with no arguments for usage information ("-p2", particularly, won't do anything when encoding).
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: GRFcodec compile command

Post by DJ Nekkid »

PikkaBird wrote:"-p2", particularly, won't do anything when encoding.
Really? According to the software itself it sets the palette to windows palette... I've always used it, and its always worked for me...

Image
Attachments
grfcodec.PNG
grfcodec.PNG (45.93 KiB) Viewed 592 times
Member of the
ImageImage
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: GRFcodec compile command

Post by Lakie »

I believe there is meant to be a space between the "-p" and the "2".

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: GRFcodec compile command

Post by DaleStan »

Zuu wrote:I have never used the grf (de)coding program, but have you tried with "--help", "-h", "-help", "/?" to see if the program have any inbuilt help function for the command line arguments?
lawton27 wrote:Just tried, nothing.
I call the LIE!

GRFCodec produces output with all four of those command line options. If you don't understand the output, then you didn't get "nothing"; you got something you don't understand.
DJ Nekkid wrote:
PikkaBird wrote:"-p2", particularly, won't do anything when encoding.
Really? According to the software itself ...
Consider, please, the possible meaning of the line that says something to the general effect of "options for decoding".
Lakie wrote:I believe there is meant to be a space between the "-p" and the "2".
I believe that not only does it work both ways, it is supposed to work both ways, and the POSIX specification actually requires that it work both ways.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 15 guests