Graphic coders, look here! Just a "little" problem

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

User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Ok.. Then I'm gonna try it with the BM69, the BM73 is in the hands of Lakie :wink:
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

I just don't understand the numbers.. Not even a little :?

Well, in this line.. What is xrel, yrel, xsize and ysize: 66 8 01 18 8 -3 -10
It's a start though :lol:
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

fire87 wrote:Well, in this line.. What is xrel, yrel, xsize and ysize: 66 8 01 18 8 -3 -10
It's a start though :lol:
This line doesn't contain xrel, yrel, xsize and ysize, AFAIK.

Only lines with a refer (directory path, filename) contain these values.
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."
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Hmm.. This is my NFO-file:

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 4)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
0 * 4 0D 00 00 00
1 * 8 08 06 4A 48 10 08 00 00
2 * 4 01 00 01 08
3 C:\MPS\TTWin95\SPRITES\bm69.pcx 66 8 01 18 8 -3 -10
4 C:\MPS\TTWin95\SPRITES\bm69.pcx 82 8 09 16 20 -14 -7
5 C:\MPS\TTWin95\SPRITES\bm69.pcx 114 8 01 12 28 -14 -6
6 C:\MPS\TTWin95\SPRITES\bm69.pcx 162 8 09 16 20 -4 -8
7 C:\MPS\TTWin95\SPRITES\bm69.pcx 194 8 01 18 8 -3 -10
8 C:\MPS\TTWin95\SPRITES\bm69.pcx 210 8 09 16 20 -14 -7
9 C:\MPS\TTWin95\SPRITES\bm69.pcx 242 8 01 12 28 -14 -6
10 C:\MPS\TTWin95\SPRITES\bm69.pcx 290 8 09 16 20 -4 -8
11 * 9 02 00 00 01 01 00 00 00 00
12 * 7 03 00 01 0C 00 00 00
13 * 7 00 00 01 01 16 12 FD

And as far as I can see, the last numbers contain the x-things.. The other things is just pseudonyms (hope you understand :) )

I mean this numbers: 290 8 09 16 20 -4 -8

EDIT: I didn't actually see what you wrote, and I wrote the same as you did :lol:
Well, I'm gonna give it a try..
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

fire87 wrote: // Automatically generated by GRFCODEC. Do not modify!
// (Info version 4)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
...
3 C:\MPS\TTWin95\SPRITES\bm69.pcx 66 8 01 18 8 -3 -10
66 = xpos, 8 = ypos, coordinates of the sprite
01 = comprossion, I've no idea what this is
18 = ysize, 8 = xsize, sizes of the sprite (the blue area)
-3 = xrel, -10= yrel, this defines the 'centre' of the sprite, which defines where the sprites will be placed in-game. (I think this is trial and error).
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."
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Okey, now it'd just to get those damned sprites from the bm69.png to bm69.grf :lol:

I let you know if it works.. :wink:
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Hmm.. I did that, and now the train won't recognise itself.. I isn't in the list either :?
Now I'm very confused..
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

:? Maybe the NFO code is damaged :?

You might need help from a coder.
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."
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Let's hope Lakie know what's damaged..
We'll se later today, I hope.

I tried one more time on the BM73 and the result is exactly the same as before :?
User avatar
Oracle
Tycoon
Tycoon
Posts: 2138
Joined: 22 May 2003 09:59

Post by Oracle »

fire87 wrote:Hmm.. I did that, and now the train won't recognise itself.. I isn't in the list either :?
Now I'm very confused..
fire87 wrote:12 * 7 03 00 01 0C 00 00 00
13 * 7 00 00 01 01 16 12 FD
Well it won't be shown like that: you're changing the graphics of ID 0C but setting ID 16 to sprite FD? You need the same ID in the bold bytes, whichever ID you are trying to replace.
User avatar
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

Okey.. I'm trying that now :)

It didn't (as always) work.. :cry:
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Post by Lakie »

I got a code base done...

YOU can do the alignment.

:twisted:
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
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

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

Post by Lakie »

Solved

This should be ok for you.
Attachments
preview.png
preview.png (1.84 KiB) Viewed 1698 times
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
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

OFF COURSE!!

I'm just wondering.. Did you solve the random livery problem completely? :)
Or is it still some problem with it? Just wondering :)

So is it up to me to do the alignment thingy.. :)
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

fire87 wrote: So is it up to me to do the alignment thingy.. :)
it seems to me that the alignment, at least in / view, is already very good.
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."
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Post by Lakie »

Well, my random code failed. :cry:
So it uses the year code (if it's an odd year it's red, otherwise blue :lol: )

No, I did the alignment for you. :D
(and rewrote most of the code...)

Anyways, I shall talk to Purno about a release.
And you'll be in the credits somewhere...
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
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

IIRC, I already did the alignment before Lakie got the BM73 "Ghosttrain" and turned it into a BM73 :)

EDIT: So you did the alignment.. Okey.. Then the only thing I did with it was to convert the train from PNG to GRF :lol:
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Post by Lakie »

You made me look into finishing / rewriting code for the BM73.

I did this for the spritesheet...

I used the .png file from Purno's Overview...
Convertted it in to TTD palette.
Rearrange it...
Make a red version of it...
And compiled with my code
(then started to align it. ;))

Nothing much really. :roll:

(and a didn't have to touch you .grf file since you gave me the .nfo file(which has been re-written for the most part))

[edit]

Also the .pcx file I have cannot be from you .grf file since your sprite sheet only had the train engine views... and mine has all 4 parts, in 2 Sets (red and blue versions.)

Sorry for being so evil.

:cry:
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
fire87
Tycoon
Tycoon
Posts: 1381
Joined: 28 Jul 2004 14:58
Location: Skedsmokorset, Norway

Post by fire87 »

As I said, that doesn't matter :)

I'm just happy that you found out what the problem was, and fixing it, that you coded it I see as a bonus :wink:
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 19 guests