Need a little help to generate .exe file

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

Need a little help to generate .exe file

Post by Zimmlock »

At last i had the courage to start some grafix work. Its something i would like to do more often, but need practice first.
Here i present my first modification work, I removed the black 'i dont know what' on the fountain.
Now i want to create a selve extracting EXE file, i use the GRF Wizzard, something happen but can't find the generated .EXE file. Have read all manuals and tryed it many times without succes.
Have tryed in DOS

Code: Select all

grfdiff -x trg1.bak trg1.grf -o Fountain_DOS.exe
without any result :cry:
Need some help.
Attachments
Fountain.png
Fountain.png (796 Bytes) Viewed 2443 times
Hodie Mihi Cras Tibi
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13235
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Try running Grfwizard without the option 'Answer yes to all questions'. What does the DOS-window in which Grfwizard runs tells you?
User avatar
Rob
Tycoon
Tycoon
Posts: 4355
Joined: 31 Dec 2002 16:52
Location: Ven-Zelderheide, The Netherlands

Post by Rob »

You need to come up with a DOS name with 8 or less letters.

Also it is "required" do provide the spritenumber involved.
I know that the example in grftut.txt doesn't provide that aswell, but if you don't tell the program what
sprites it should include, it will include all the changed sprites in trg1.grf, including those that you did install from other excecute files.

Code: Select all

grfdiff -l 1455 -x -y trg1.bak trg1.grf -o fnt_dos.exe
Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)
Image
Still the best OS around
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

Hyronymus wrote:Try running Grfwizard without the option 'Answer yes to all questions'. What does the DOS-window in which Grfwizard runs tells you?
I did what you recommended, but it made no diffrence. What the DOS-win screen tells me? I cant read it, it flashes no and of the screen.
Rob wrote:You need to come up with a DOS name with 8 or less letters.
Also it is "required" do provide the spritenumber involved.
I know that the example in grftut.txt doesn't provide that aswell, but if you don't tell the program what
sprites it should include, it will include all the changed sprites in trg1.grf, including those that you did install from other excecute files.

Code: Select all

grfdiff -l 1455 -x -y trg1.bak trg1.grf -o fnt_dos.exe
I forgot this with a maximum of 8 letters, didnt use DOS for a loooong time. And i tryed it in real DOS-mode, but the program is not a pure DOS prorgam but a MS-DOS program.
I geuss it worked, i enterd you code line but i cant find the .exe or GRD file it should have produced?!?
I must be making some mistake. The final screen was the one shown below.
So fare thx for help
Attachments
grfdiff.png
grfdiff.png (101.46 KiB) Viewed 2158 times
Hodie Mihi Cras Tibi
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Zimmlock wrote:but the program is not a pure DOS prorgam but a MS-DOS program.
Er, say what?
User avatar
Oracle
Tycoon
Tycoon
Posts: 2138
Joined: 22 May 2003 09:59

Post by Oracle »

ChrisCF wrote:
Zimmlock wrote:but the program is not a pure DOS prorgam but a MS-DOS program.
Er, say what?
He means it's a Windows console program, not a DOS program :wink:.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Zimmlock, your screenshot is showing the help display of grfmerge, which means that it doesn't understand the commands you're giving it.

This either means that you have a very old version of grfmerge (get the latest grfcodec suite to be sure), or you're mistyping it, or something else. I ran it with those parameters you gave it, and it worked fine here, so I'm guessing that you must have an old version.

[PS, grfmerge is not limited to 8.3 DOS names, it deals very well with long filenames too.]
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

Patchman wrote:Zimmlock, your screenshot is showing the help display of grfmerge, which means that it doesn't understand the commands you're giving it.

This either means that you have a very old version of grfmerge (get the latest grfcodec suite to be sure), or you're mistyping it, or something else. I ran it with those parameters you gave it, and it worked fine here, so I'm guessing that you must have an old version.

[PS, grfmerge is not limited to 8.3 DOS names, it deals very well with long filenames too.]
BINGO, where would i be without you nice people :D
The programs worked after i downloaded and installed the latest version of GRFcodec, my old one was a version of 2001!!
Thank you all verry much for the help.

And here i present my verry first modification of a sprite.
Zimmlock
Attachments
Fountain_DOS.ZIP
.exe file and undo file
(12.7 KiB) Downloaded 72 times
Fountain.png
Fountain.png (796 Bytes) Viewed 2347 times
Hodie Mihi Cras Tibi
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

Don't know, there must be a buck somewhere.

The GRF-Wizard works, it created twice a .exe and an undo.exe file. But now it refuses to create an undo.exe file. It creats the .exe file well.
The message below keeps popping up. I have installed the latest run time library and re installed the wizard. No chance......

What's going on?
Attachments
Run-time.png
Run-time.png (119.69 KiB) Viewed 2310 times
Hodie Mihi Cras Tibi
User avatar
Szappy
Chief Executive
Chief Executive
Posts: 689
Joined: 29 Mar 2004 14:35
Location: Budapest, Hungary
Contact:

Post by Szappy »

The problem is that "grfwizard" creates a too long command line that dos cannot process. I tried to tell this to Andrex, but he seems to be preoccupied with various ttdx configurators and such...

moderator: ttdpatch starters aren't made by Andrex
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

So what does it mean? GRF-Wizard isn't fully developed?
Is there a command line i can put what creats a undo.exe file with the sprits i desire?
Hodie Mihi Cras Tibi
User avatar
Szappy
Chief Executive
Chief Executive
Posts: 689
Joined: 29 Mar 2004 14:35
Location: Budapest, Hungary
Contact:

Post by Szappy »

There should be one, but I'm not into it _that_ much.
But: there is a workaround to that: shorten the command line that's necessary.
To do that put the grfcodec, grfwizard, and the sprites to a dir very close to the root dir, and don't use long file/dir names, then try again.

-edit- http://www.tt-forums.net/viewtopic.php?p=160468#160468
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Szappy wrote:The problem is that "grfwizard" creates a too long command line that dos cannot process. I tried to tell this to Andrex, but he seems to be preoccupied with various ttdx configurators and such...
That doesn't really make sense... grfcodec is not a DOS program, it's a Windows console program, and the command line can be thousands of characters long.
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

To be exact:

cmd.exe: 2047 (Win2000) 8191 (XP)
CreateProcess API: 32768

Reference:
http://support.microsoft.com/default.as ... -us;830473
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

I don't know how VB starts new processes, but it'd be stupid if it used cmd.exe... but then, that'd be right on par with the rest of VB...
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

Bhuu :shock: thanks for the help, but this goes way beyond my knowledg. I am just an end user.
Ill just generate .exe files without undo files
Hodie Mihi Cras Tibi
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Here's a better idea. Don't generate .exe files at all.

Some of us don't use Windows as a primary OS, and it sucks to reboot just to apply these changes - I'm not entirely confident of whether they'll work properly under wine. Generate only the diff, and use grd2grf to make something vaguely sensible out of it.

This is all in addition to the fact that the .exe graphics are sooooooooo last century ;)
User avatar
Szappy
Chief Executive
Chief Executive
Posts: 689
Joined: 29 Mar 2004 14:35
Location: Budapest, Hungary
Contact:

Post by Szappy »

Patchman wrote:
Szappy wrote:The problem is that "grfwizard" creates a too long command line that dos cannot process. I tried to tell this to Andrex, but he seems to be preoccupied with various ttdx configurators and such...
That doesn't really make sense... grfcodec is not a DOS program, it's a Windows console program, and the command line can be thousands of characters long.
It may be that way, but try what I wrote (shorten dir names/path) and it _will_ work.
Just have a look at the Details button (it shows the command line given) after completing a de/encode, and you'll see:

command.com /K d:\grfcodec\grfcodec.exe -d -p 2 "d:\tt95\trg1r.grf" "d:\tt95\sprites"
Image please use email instead of PM
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Post by Zimmlock »

Oké, after halve a day trying the GRF-wizard outputted the undo files to.
Still not able the generate WIN files.

I stumbled on something else, the NFO editor, but i run win98se and this program isnt 100 % yet.

But i opend my NFO file and found some editable information. I am not planing to do cars and trains and so on, this is way to complex. But i am in to buildings and would like to make some of them highter or spann two squares.
In the NFO file i found this:

Code: Select all

 1478 d:\mps\ttdos\sprites\trg1.pcx 82 4632 09 63 62 -27 -41
This means:
spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
Whitch number do i have to change and in what way to increase the hight of this building.
Hodie Mihi Cras Tibi
User avatar
Oracle
Tycoon
Tycoon
Posts: 2138
Joined: 22 May 2003 09:59

Post by Oracle »

63 is the height of the sprite in pixels so 65 for example would make it 2 higher.
62 is the width in pixels.

You might also find that it doesn't fit properly if you make it taller so you will have to shift it up (likely) or down.
Changing -41 to -42 shifts it up one pixel.
Changing -41 to -40 shifts it down one pixel.
You can obviously change the number multiple times to move it several pixels.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 19 guests