Adding new vehicle graphics

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

ttd player
Engineer
Engineer
Posts: 8
Joined: 11 Aug 2003 05:07
Location: Portland, OR USA

trying to decode .grf

Post by ttd player »

Is there a reason why GRF Wizard won't decode the db set or any of the other custom .grf files available out there? Are they protected from decoding?

The reason I want to decode them is to have a working example of how to code my own sprites & pseudo sprites (maybe someone could give me a working set?).

Also, was wondering why the .nfo files for the default ttd .grf files don't show any vehicle pseudo-sprites?

Finally, I tried to encode my own .nfo file and .pcx file but there was no way to enter them into the GRF Wizard. What's up with that? Do I have to put my own vehicles & code into the trg1r.nfo and trg1r.pcx?

I'm mystified :!:
Cheers!
Matt K.
Portland, OR
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

problem understanding cargosetw

Post by nilsi »

@ttd player: i never use graph wizard, so i can not help you with that :-(
in game grf files do not have pseudo sprites, the properties of the vehicles are hardcoded in the exe file
with grfcodec decoding of any grf is no problem, sometimes you only have to give an additional -p parameter
edit: you can of course build your own vehicles in own grf files, but i am still learning how :-/


@ others

now my question: in cargosetw there are
action zero entries with no data at all... they are not documented in sprites.txt as far as i know. What do they do? The code snippet should define a 4 sprite set and i would understand dummy 1x1 pixel regular sprites.
are they just NOPs to save space ?

8 * 4 01 00 01 04
9 * 1 00
10 D:\ttgrfnm\SPRITES\cargosetw.pcx 178 8 01 1 52 -14 -7
11 * 1 00
12 * 1 00

Thank you for answering,
Nils
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: problem understanding cargosetw

Post by George »

nilsi wrote:@ttd player: i never use graph wizard, so i can not help you with that :-(
in game grf files do not have pseudo sprites, the properties of the vehicles are hardcoded in the exe file
with grfcodec decoding of any grf is no problem, sometimes you only have to give an additional -p parameter
edit: you can of course build your own vehicles in own grf files, but i am still learning how :-/


@ others

now my question: in cargosetw there are
action zero entries with no data at all... they are not documented in sprites.txt as far as i know. What do they do? The code snippet should define a 4 sprite set and i would understand dummy 1x1 pixel regular sprites.
are they just NOPs to save space ?

8 * 4 01 00 01 04
9 * 1 00
10 D:\ttgrfnm\SPRITES\cargosetw.pcx 178 8 01 1 52 -14 -7
11 * 1 00
12 * 1 00

Thank you for answering,
Nils
They are empty sprites which would be never shown. Empty sprites, that are shown, has to be 1x1 transperent sprites
User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges »

yep, easy to use things, they are especialy handy when experimenting arround with a file and you need to (temporary) disable a psuedo-sprite...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

Post by nilsi »

I see... good to know :-)

so sprites.txt is not completely correct here

"The following num-sprites times num-dirs sprites will be actual sprites,
not pseudo-sprites."

Thank you all for being patient with me ;-)
User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges »

well, this isn't a normal sprite:

Code: Select all

77 * 1 00
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

Post by nilsi »

@ dinges: i understand,
but according to sprites.txt there must be a normal one
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

It doesn't have to be. It's just that the patch assumes it to be a regular sprite.

However, this sprite is never used, so it doesn't matter what it is. A pseudo-sprite is the smallest amount of bytes, so using a pseudo-sprite for this means that you save some bytes.

This set of four sprites is used to display a vehicle in the purchase list, where only one orientation will ever be needed. The first and the last two will never be shown, so it doesn't matter what they contain.

[Note: I renamed this thread, because the old thread is still in the old forum and so far down the list that no-one could be confused now.]
New Graphics
Engineer
Engineer
Posts: 112
Joined: 10 Apr 2004 09:48
Location: Norway

Post by New Graphics »

Hi,
This my first train graphic, it's not finish yet,
and I don't think it will.
Anyway......
Take a look.
Attachments
New Graphics.PNG
New Graphics.PNG (449 Bytes) Viewed 4664 times
Image Joint Operations Is a king game! Probely the best game ever =) Only 34.99$

----www.jointopsthegame.com----
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

New Graphics wrote:Hi,
This my first train graphic, it's not finish yet,
and I don't think it will.
Anyway......
Take a look.
Doesn't look bad. But what is it?
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
New Graphics
Engineer
Engineer
Posts: 112
Joined: 10 Apr 2004 09:48
Location: Norway

Post by New Graphics »

Well,
It's an ugly train, fantacy train.
I was realy just training, but it was mutch better then i thougth.
Image Joint Operations Is a king game! Probely the best game ever =) Only 34.99$

----www.jointopsthegame.com----
bjarnek
Engineer
Engineer
Posts: 24
Joined: 10 Sep 2004 18:54
Location: Denmark
Contact:

help wantet

Post by bjarnek »

after i make line 2*x ind my dsbtestw.nfo my game break down...

i have olmost giving up...// Automatically generated by GRFCODEC. Do not modify!
// (Info version 4)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
0 * 4 15 00 00 00
1 * 8 08 04 50 50 50 50 00 00
2 * 21 00 00 00 07 01 37 00 56 40 03 14 04 32 00 08 AF 09 32 11 51 00
3 * 9 00 00 01 01 1B 12 FD FF 68
4 * 9 00 00 01 01 1C 12 FD FF 68
5 * 4 01 00 01 08
6 d:\mps\transport tycoon\sprites\dsbtestw.pcx 114 8 01 23 8 -3 -9
7 d:\mps\transport tycoon\sprites\dsbtestw.pcx 130 8 09 22 22 -14 -12
8 d:\mps\transport tycoon\sprites\dsbtestw.pcx 162 8 01 15 32 -14 -11
9 d:\mps\transport tycoon\sprites\dsbtestw.pcx 210 8 09 22 22 -5 -11
10 d:\mps\transport tycoon\sprites\dsbtestw.pcx 242 8 01 25 8 -3 -9
11 d:\mps\transport tycoon\sprites\dsbtestw.pcx 258 8 09 22 22 -14 -12
12 d:\mps\transport tycoon\sprites\dsbtestw.pcx 290 8 01 15 32 -14 -11
13 d:\mps\transport tycoon\sprites\dsbtestw.pcx 338 8 09 22 22 -5 -11
14 * 9 02 00 00 01 01 00 00 00 00
15 * 4 01 00 02 04
16 * 9 02 00 01 01 01 00 00 00 00
17 * 9 02 00 02 01 01 01 00 01 00
18 * 7 03 00 01 00 00 00 00
19 * 7 03 00 81 1B 00 01 00
20 * 7 03 00 81 1C 00 02 00
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Why do you have another action 1 in line 15? It doesn't have any real sprites following it, so it must be a mistake. You probably forgot to add the eight lines of sprites there that you'll be using for the passenger and mail wagons.
bjarnek
Engineer
Engineer
Posts: 24
Joined: 10 Sep 2004 18:54
Location: Denmark
Contact:

help wantet

Post by bjarnek »

No i have not orgot the sprite entry.. I have forget to delete some lines after modifikstions.
bjarnek
Engineer
Engineer
Posts: 24
Joined: 10 Sep 2004 18:54
Location: Denmark
Contact:

question

Post by bjarnek »

how did i make a train to only go on el-traks.
Actions # ?
User avatar
ttdx_artist
Banned Troll
Posts: 226
Joined: 21 Oct 2004 02:10
Location: Sunshine Coast, Australia

Post by ttdx_artist »

i'm having problems with my NFO editor, it keeps saying that my version of MSFlexGrid is outdated, I know that Andres said that it isn't completely compatible with WIN98SE, but he didn't say that it definatly wouldn't work, does anyone else here use WIN98SE and the NFO Editor? If you do, can you please tell me how to fix this problem....ARRGHHHHHHH!!!! :evil:
Birdey
Engineer
Engineer
Posts: 90
Joined: 12 Oct 2004 04:59
Location: Sydney, Australia
Contact:

Post by Birdey »

I am new to this so hopefully u wont delete my post but...

I have followed the "How to get started on NFO editing " on the http://wiki.ttdpatch.net/tiki-index.php ... oundations site and i get up to "4. Encode and decode again your own file" it always came up with:

"C:\TransportTycoon>grfcodc -e mytrain.grf -p2
GRFCodc version 0.9.5 - Copyright <C> 1999-2003 by josef Drexler
Creating C:\TransportTycoon SPRITES: File exists"

Plz help

Birdey
For every addition of knowledge u aquire, you forget something that you knew before
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

That's not a problem as such, you just have to follow the next step in the instruction:

Code: Select all

ren mytrain.new mytrain.grf (this is necessary only the first time)
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Birdey
Engineer
Engineer
Posts: 90
Joined: 12 Oct 2004 04:59
Location: Sydney, Australia
Contact:

Post by Birdey »

ok that works and it creates a "mytrain.grf" in my ttd directory but when i type in "grfcodec -d mytrain.grf -p 2" it comes up in window that says:

"grfcodec.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

and if i do it with grf wizzard it comes up with:

"grfwizzard.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

thankz for the help
For every addition of knowledge u aquire, you forget something that you knew before
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

For some reason it seems to make a corrupt .grf file, though I have no idea why...
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 21 guests