FHS`s NFO problems thread

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
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

FHS`s NFO problems thread

Post by FHS »

Hello, I have a little problem.

It seems that I can get the code to work, however, nothing appears. All eight directions are blank in the game.
I just followed the tutorial at: "http://wiki.ttdpatch.net/tiki-index.php ... rstVehicle". It just draws white blanks in all views in the game.
I wrote:// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
0 * 4 0D 00 00 00
1 * 8 08 06 "FS" 01 01 00 00
2 * 4 01 00 01 08
3 sprites/first.pcx 1 8 01 18 8 -3 -10
4 sprites/first.pcx 2 8 09 15 20 -14 -6
5 sprites/first.pcx 3 8 01 12 28 -14 -6
6 sprites/first.pcx 4 8 09 16 20 -4 -8
7 sprites/first.pcx 5 8 01 18 8 -3 -10
8 sprites/first.pcx 6 8 09 16 20 -14 -7
9 sprites/first.pcx 7 8 01 12 28 -14 -6
10 sprites/first.pcx 10 8 09 15 20 -4 -7
11 * 9 02 00 00 01 01 00 00 00 00
12 * 7 03 00 01 16 00 00 00
13 * 7 00 00 01 01 16 12 FD
I will send a PM on request with the sprites I used. I cannot post them openly because of copyright, however, I am not completely sure about that.
Last edited by FHS on 21 Feb 2010 12:54, edited 1 time in total.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Why does only white appear with this NFO-Code?

Post by planetmaker »

FHS wrote:
I wrote: 3 sprites/first.pcx 1 8 01 18 8 -3 -10
4 sprites/first.pcx 2 8 09 15 20 -14 -6
5 sprites/first.pcx 3 8 01 12 28 -14 -6
6 sprites/first.pcx 4 8 09 16 20 -4 -8
7 sprites/first.pcx 5 8 01 18 8 -3 -10
8 sprites/first.pcx 6 8 09 16 20 -14 -7
9 sprites/first.pcx 7 8 01 12 28 -14 -6
10 sprites/first.pcx 10 8 09 15 20 -4 -7
11 * 9 02 00 00 01 01 00 00 00 00
12 * 7 03 00 01 16 00 00 00
13 * 7 00 00 01 01 16 12 FD
Look at your coordinates of those sprites. Sprite #3 has its upper left pixel at x=1, y=8 and extends to x=9 and y=26 (width=8, height=18) in first.pcx. Given the size in width and height of those sprites, all your x/y coordinates of the upper left pixel of the sprites seem to be wrong.
User avatar
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

Re: Why does only white appear with this NFO-Code?

Post by FHS »

How can I solve the problem?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Why does only white appear with this NFO-Code?

Post by planetmaker »

Uhm... specify the proper positions where your sprites are found in your PCX? I don't really know how to explain it differently :-) than in my previous posting.
E.g. your 2nd sprite is just ONE pixel to the right of the upper left pixel of the 1st one: upper left pixel (x/y) = (2/8) to lower right pixel (x/y) = (22/27). They overlap ~90% and probably it's all white in your PCX. The bad part of non-free licenses is that we cannot really help in place ;-) Kick your artists to supply proper licensed drawings.
User avatar
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

Re: Why does only white appear with this NFO-Code?

Post by FHS »

Thank you, just got it to work.
planetmaker wrote:Kick your artists to supply proper licensed drawings.
I cannot kick Simon Foster, can I. Because I followed the tutorial I decoded trg1r.grf and used a sprite from there.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Why does only white appear with this NFO-Code?

Post by Yexo »

FHS wrote:Thank you, just got it to work.
planetmaker wrote:Kick your artists to supply proper licensed drawings.
I cannot kick Simon Foster, can I. Because I followed the tutorial I decoded trg1r.grf and used a sprite from there.
Instead of decoding trg1r.grf and working from there you could also decode one of the opengfx base grfs. Then you would be able to post the pcx and nfo here to ask for help (provided you don't mind your nfo is also released under gpl, but I assume that for some testing that is no problem at all).
User avatar
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

Re: FHS`s NFO problems thread

Post by FHS »

I plan to use nfo only to encode a couple of private grfs.
I am afraid I will not release them for the general public unless I consider them finished.
They are too small to be interesting anyways.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Why does only white appear with this NFO-Code?

Post by PikkaBird »

Yexo wrote:provided you don't mind your nfo is also released under gpl
I'm not sure if I've pointed this out before, but GPL licencing is not automatic; FHS can modify OpenGFX and post it without what he posts being licenced under the GPL, although in doing so he will of course be breaching the OpenGFX licence (so please don't :) ).

A couple more things,

Firstly, while the OTTD moderators are incredibly fussy about people posting even one copyrighted pixel, I personally consider the original TTD sprites to be fair game, so don't worry about posting a few here if it will help.

Secondly, if you want to draw your own train sprites, I recommend my sprite templates. It will save you a lot of headaches with working out sprite offsets.
User avatar
FHS
Director
Director
Posts: 577
Joined: 18 Apr 2009 17:17
Location: Basel, CH

Re: FHS`s NFO problems thread

Post by FHS »

Thx Pikka. But I already have my sprites since a rather long time.
And at the moment I am rather focusing on successfully coding two engines in one grf.
But still, Thx.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], willsym22 and 31 guests