Problem with grf wizard and grfcodec

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
Zwaantje
Engineer
Engineer
Posts: 6
Joined: 21 Aug 2007 17:10
Location: Hoorn, The Netherlands

Problem with grf wizard and grfcodec

Post by Zwaantje »

Hi, i have a problem when using the grf wizard, if I select the place where the grfcodec.exe is i get an error that the path may contain spaces, i tried every place on my computer, but it didn't work.

So then i wanted to decode / encode the grfs with grfcodec, but when i start the program it opens and closes almost instantly so i can't enter any command.
ImageImage
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: Problem with grf wizard and grfcodec

Post by Lakie »

Grfcodec doesn't take input whilst running, it takes the input in the form of parameters.
Thus, you can consider it like a batch process, you feed it the information you want with the grf file coming out the other side (or an error message).

You best open the command prompt and run it from that, run it with -h as a parameter to get a list of how it can work.

If my memory is right, don't you just put paths with spaces in them in quotation marks, eg "C:\Documents and Settings\Lakie\Editing\Grfs\grfcodec.exe"?

Hope that helps,
~ 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
Zwaantje
Engineer
Engineer
Posts: 6
Joined: 21 Aug 2007 17:10
Location: Hoorn, The Netherlands

Re: Problem with grf wizard and grfcodec

Post by Zwaantje »

Lakie wrote:You best open the command prompt and run it from that, run it with -h as a parameter to get a list of how it can work.

If my memory is right, don't you just put paths with spaces in them in quotation marks, eg "C:\Documents and Settings\Lakie\Editing\Grfs\grfcodec.exe"?
Umm, for the 1st part, do you mean start -> command(uitvoeren) -> and then "C:\Documents and Settings\Jos\Mijn documenten\ttd\grfcodec.exe" ? It runs but same as first, it goes away,I don't know how to start it with -h.

For the second part (if that's meant for grf wizard) i can't write the path myself, i can only click on the map, but then it doesn't put it in quotation marks
ImageImage
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Re: Problem with grf wizard and grfcodec

Post by Ameecher »

Run: "C:\Documents and Settings\Jos\Mijn documenten\ttd\" then type in "grfcodec.exe -h"

then it should give you a list of all the commands.
Image
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: Problem with grf wizard and grfcodec

Post by Lakie »

I only use Grfcodec manually.

Parameters are extra arguments on the program run line, generally I run through cmd.exe so the window stays.

Code: Select all

Default:
"C:\Documents and Settings\Jos\Mijn documenten\ttd\grfcodec.exe"

Help parameter
"C:\Documents and Settings\Jos\Mijn documenten\ttd\grfcodec.exe" -h
obviously you can use;
cd "\Documents and Settings\Jos\Mijn documenten\ttd"
to change the directory to it, and just refer to it as grfcodec, principle is the same for parameters;
<program> <parameters>

[Edit] note that paths may be relative from there...

~ 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
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Re: Problem with grf wizard and grfcodec

Post by GoneWacko »

Zwaantje wrote:Umm, for the 1st part, do you mean start -> command(uitvoeren) -> and then "C:\Documents and Settings\Jos\Mijn documenten\ttd\grfcodec.exe" ?

No. A command prompt is a window which emulates a DOS prompt within Windows.
You can open it by going to Start -> Uitvoeren, and then typing:

Code: Select all

cmd
And pressing OK. You then get the prompt. After that, follow Lakie's steps above.
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
Zwaantje
Engineer
Engineer
Posts: 6
Joined: 21 Aug 2007 17:10
Location: Hoorn, The Netherlands

Re: Problem with grf wizard and grfcodec

Post by Zwaantje »

so i made it , i got to see all the commands with that -h at the end, but i get exactly the same without the -h a the end. but i still don't know what to do then...

I tried to decode the tempset, just to see if it works, I putted it in the ttd map, just where my grfcodec.exe is, so it's not working because it's in an other map or something.
Image
ImageImage
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Re: Problem with grf wizard and grfcodec

Post by GoneWacko »

As the text pretty clearly states (don't feel intimidated by all the options and scary brackets, just read from the start and it all becomes clear!), you use

Code: Select all

grfcodec.exe -d blablabla.grf
to decode a grf file (you may need to add -p 2 to the command line if the colors look messed up).
To encode a grf file you use the same line but instead of -d you use -e:

Code: Select all

grfcodec.exe -e blablabla.grf
It's not that hard ;)

This only works if you're in the directory with grfcodec.exe in it, you can change to a directory with the cd command:

cd "C:\Documents and Settings\Jos\Mijn Documenten\ttd"
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
Zwaantje
Engineer
Engineer
Posts: 6
Joined: 21 Aug 2007 17:10
Location: Hoorn, The Netherlands

Re: Problem with grf wizard and grfcodec

Post by Zwaantje »

GoneWacko wrote:This only works if you're in the directory with grfcodec.exe in it, you can change to a directory with the cd command:

cd "C:\Documents and Settings\Jos\Mijn Documenten\ttd"
"

thank you, that worked, i did it :D
ImageImage
5245jah
Engineer
Engineer
Posts: 46
Joined: 21 Aug 2007 11:00
Location: Estonia

Re: Problem with grf wizard and grfcodec

Post by 5245jah »

Damm! I did the same way, but still the same problem. X(
Youtube.com-Broadcast yourself
5245jah
Engineer
Engineer
Posts: 46
Joined: 21 Aug 2007 11:00
Location: Estonia

Re: Problem with grf wizard and grfcodec

Post by 5245jah »

and my address to the file is: C:\Documents and Settings\Lembitu\My Documents\ttd\ X( X( X(
Youtube.com-Broadcast yourself
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4765
Joined: 09 Sep 2007 05:03
Location: home

Re: Problem with grf wizard and grfcodec

Post by Alberth »

Did you type the double quotes around the path?
(otherwise, what is "but still the same problem" for you?)
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 19 guests