GRF Codec won't run

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

GRF Codec won't run

Post by Chris »

Hi, I'm quite new here, although not new to TTD. I recently downloaded GRF Codec, but when I run it, the command screen opens, and then instantly closes. I don't know why this is happening, as I followed the instructions on how to download/install it. I would be gratefull for any help, and thank you in advance.

Oh yeah, I'm sorry but don't know what forum to post this in ?(
Screenshots

Formerly Class 165
User avatar
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

Re: GRF Codec won't run

Post by FHS »

You need to run Grfcodec from commandline, thus you are supposed to have a dos window open in that directory, enter Grfcodec and see what happens.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: GRF Codec won't run

Post by DaleStan »

Please also follow the directions on how to *run* it, which -- unless someone has played a nasty trick on me -- can be found in grfcodec.txt.
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
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: GRF Codec won't run

Post by Chris »

Yeah I did follow the instructions on how to run it, which is why I was so confused :cry:. Thanks for the help, I'll try it know.
Screenshots

Formerly Class 165
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: GRF Codec won't run

Post by Chris »

Thanks for your help FHS, I thought it was something to do with the CMD, but couldn't get it to work

But now I have another problem, I tried to decode a grf, but the cmd says that grfcodec isn't an operable program etc. I'm pretty sure the command I put in is right, as I checked to make sure I had typed it right, and tried several times. Sorry to bother everybody again.
Screenshots

Formerly Class 165
User avatar
SamMacca
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 10 Jun 2009 13:27
Location: Sheffield, SY.. Ing-er-land.

Re: GRF Codec won't run

Post by SamMacca »

Right, I'm sorry to dig this up, but it saved making a new thread.

A few things before I begin, yes I used the search function which is how I found this. I read the readme that came with the download and thats about it.. just to save time..

Problem is.. I, like Class165, can't get grfcodec to work. I've downloaded the latest version, extracted it. Tried double clicking, running it from the 'Run' thing on the Start Menu and tried using Command Prompt but I cant work that out. The readme doesn't really explain how to get GRFCodec up and running, if it does then I'm stupid, please forgive me :)

But could someone help a brother out.. I really wanna learn to draw and I want to decode some grfs so I can learn the different dimensions/scales etc, out so I can draw myself..
ImageImageImage

James Hetfield.. God..
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: GRF Codec won't run

Post by Lakie »

Double clicking grfcodec would yield nothing, grfcodec and nforenum are command line based applications.

You'll need to open up a command prompt first, (start+r, 'cmd').
Using the command prompt, passing the argument '-h' to either should give a listing of how to use them.

Generally you'll be doing this,

Code: Select all

grfcodec -e mygrf.grf sprites
(Encoding grfs from sources in folder)

grfcodec -d mygrf.grf sprites
(Decoding a grf to sources in specified folder)
[Edit] One also needs to have the command prompt in the correct directory, usually you do this through use of the 'cd' command, alternatively you could copy grfocdec and nforenum into a directory in the PATH environment variable..

~ 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."
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: GRF Codec won't run

Post by Chris »

I think, if I remember correctly, that right clicking on cmd and selecting run as administrator fixed this for me (windows 7/vista), and then entering the command to start grfcodec.
Screenshots

Formerly Class 165
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: GRF Codec won't run

Post by Lakie »

That would imply you were trying to encode or decode a grf in a system folder, (windows, program files, etc), which requires administrator privileges to do. Neither grfcodec or nforenum actually need those privileges to operate in normal folders.

~ 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."
User avatar
SamMacca
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 10 Jun 2009 13:27
Location: Sheffield, SY.. Ing-er-land.

Re: GRF Codec won't run

Post by SamMacca »

Lakie wrote:Double clicking grfcodec would yield nothing, grfcodec and nforenum are command line based applications.

You'll need to open up a command prompt first, (start+r, 'cmd').
Using the command prompt, passing the argument '-h' to either should give a listing of how to use them.

Generally you'll be doing this,

Code: Select all

grfcodec -e mygrf.grf sprites
(Encoding grfs from sources in folder)

grfcodec -d mygrf.grf sprites
(Decoding a grf to sources in specified folder)
~ Lakie
Riiight.. so am I supposed to be typing that into Command Prompt? My GRFcodec is in a MyDocuments/GRFCodec.
ImageImageImage

James Hetfield.. God..
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: GRF Codec won't run

Post by Lakie »

Those commands should be typed into command prompt and executed (using return).

Code: Select all

cd "My Documents\Grfcodec"
grfcodec -d "<grf file>" "<folder for source>"
~ 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."
User avatar
SamMacca
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 10 Jun 2009 13:27
Location: Sheffield, SY.. Ing-er-land.

Re: GRF Codec won't run

Post by SamMacca »

Lakie wrote:Those commands should be typed into command prompt and executed (using return).

~ Lakie
Ok, I'm guessing I replace mygrf.grf with the grf I want to decode.. I get;

'grfcodec is not recognized as an internal or external command, operable program or batch file.
ImageImageImage

James Hetfield.. God..
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3427
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: GRF Codec won't run

Post by Emperor Jake »

SamMacca wrote:
Lakie wrote:Those commands should be typed into command prompt and executed (using return).

~ Lakie
Ok, I'm guessing I replace mygrf.grf with the grf I want to decode.. I get;

'grfcodec is not recognized as an internal or external command, operable program or batch file.
Try replacing grfcodec with grfcodec.exe
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: GRF Codec won't run

Post by DaleStan »

Emperor Jake wrote:
SamMacca wrote:'grfcodec is not recognized as an internal or external command, operable program or batch file.
Try replacing grfcodec with grfcodec.exe
That's not going to help.
There are several options:
1) Make the path listed (before the '>' character) be the path to grfcodec. So, if grfcodec is C:\MPS\TTWin95\Tools\grfcodec.exe, you need to see

Code: Select all

C:\MPS\TTWin95\Tools> _
Use cd until this happens.
2) Specify the full path to grfcodec. Using the example above, use

Code: Select all

{anything}> C:\MPS\TTWin95\Tools\grfcodec ...
3) Put grfcodec in the path. Type "set path" and put grfcodec in any directory listed. I default to c:\Windows when I do this.
4) Make the path point to grfcodec. The procedure here depends on the version of Windows you're using, which, as far as I can tell, you didn't specify.
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 “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 7 guests