#wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

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

LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

DaleStan wrote:
lordazamath wrote:

Code: Select all

//  <Sprite-number> * <Length>        04 <feature> <language-id> <num-ent> <offset> <text>
    4               * ??              04 48        01            ??        5801     "Toll Booth"
// What should I put in those ??s ? I think that 48 is the feature, because it can't be train or house..
// offset is supposed to be 5801 - transmitter. Do I have to change anything else?
<length> is exactly what it says: the length of the sprite, in bytes. Same for <num-ent>: the number of entries (in this case, strings) in the sprite.

As for <offset>, I think you need to read GRFActionsDetailed a little more closely.
So the num-ent should be 07? the lenght + action + feature + language-id + num-ent + offset + text = 7
how can I calculate the lenght of a sprite in bytes? is it again something lenght(ff) + action(ff) + feature(ff) + language-id(ff) + num-ent(ff) + offset(ff) + text(ff ff ff ff ff ff ff ff) ?


I read the ttdpatch wiki and came to this opinion.. Those ff's just need to be added and then I'll get x*ff and the lenght is x?
And the text should be then 54 6f 6c 6c 20 42 6f 6f 74 68
That makes total lenght of 16 ? (in hex then 10)

Am I correct, or in going to very wrong direction?
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by PikkaBird »

Nument is 01, you're only changing one string.

Offset is two bytes, little-endian, so you need to put 01 58 or \wx5801.

Length is in decimal, not hex. But get nforenum from Dalestan's signature, it can work out the length and sprite numbers for you.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by GeekToo »

I'm no expert on grf's either but I'm trying to follow this, so I can learn to code grf too.

When you read the spec of the action 4:

http://wiki.ttdpatch.net/tiki-index.php?page=Action4

It says:
For generic text IDs (language-id bit 7 is set), this is a word value in little endian notation, e.g. 8134 becomes 34 81.

So I guess your offset must be 01 58

Further more it says : <num-ent> B Number of consecutive strings to change

So for changing one string this would be 01

And at last: strings are: zero-terminated strings, so for the length you probably have to count the zero too.

As said before, I'm no expert either, just trying to help by reading the specs closely. Any real expert is invited to correct me on this.

<edit> : saw that pikkabird typed something similar while i was typing, he's more of an expert, so he was quicker :D </edit>
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

Ok, I'm now so far with naming

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 04 00 00 00
    1 * 32	 08 06 "LA" 30 31 "Toll Booth" 00 "By LordAzamath" 00
    2 * 5	 0A 01 01 29 0A
    3 sprites/customs_housew.pcx 65 8 09 46 47 -22 -33
//!!Error (44): Invalid feature byte.
    4 * 18	 04 48 01 01  01 01 58  "Toll Booth" 00
//  <Sprite-number> * <Length>        04 <feature> <language-id> <num-ent> <offset> <text>
NFO renum says invalid feature byte. It is 48 I believe, what the renum doesn't like. But this is from ttdpatch wiki GRFSpecs
feature
This sets the type of feature that you wish to change. Set it to:

00 for trains
01 for road vehicles
02 for ships
03 for planes
04 for stations
05 for canals
06 for bridges
07 for houses
0A for industries
0B for cargos
48 for generic strings (language-id bit 7 set), unless they should only be changed in conjunction with new vehicles/stations/etc., in which case you use the regular feature number above
I think the transmitter isn't then generic string... is it now? But what it is then?

So much fuss about just renaming something, that somebody else would do in seconds. But I wantad to learn it, so it's completely my fault ...Oh god :(

Lord -> getting very confuzed

Could somebody with skills show me what have I done wrong here. (And therby providing me a nice sprite 4 nfo code :P)

Lord
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by dihedral »

wow - i go out for a few hours, come back and see you guys have been an amazingly busy bunch...

really love all i have seen so far :-)

keep it coming :-D

AntB: perhaps the acceptance / produceing of passangers, etc could be controlled by grf paramters?
that would make it more interesting... i.e. some might just want eyecandy, others might want produce/accept passangers, yet others again might like the idea of people on the market needing food/goods :)
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by PikkaBird »

lordazamath wrote: NFO renum says invalid feature byte. It is 48 I believe, what the renum doesn't like. But this is from ttdpatch wiki GRFSpecs
I think the problem is you need to also set bit 7 of the language byte (that error message is one that could be improved, Dalestan?).
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by GeekToo »

And maybe you don't need to add the 00's to the strings: if nfo resembles the C-programming language a little, they get appended automatically when you use the double qoutes, you just need to count them in the length(which would be resolved, I assume by NFOrenum). But of course C is not nfo, so I'm not sure about this behaviour in nfo, just giving a hint.
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

PikkaBird wrote:
lordazamath wrote: NFO renum says invalid feature byte. It is 48 I believe, what the renum doesn't like. But this is from ttdpatch wiki GRFSpecs
I think the problem is you need to also set bit 7 of the language byte (that error message is one that could be improved, Dalestan?).

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 04 00 00 00
    1 * 32	 08 06 "LA" 30 31 "Toll Booth" 00 "By LordAzamath" 00
    2 * 5	 0A 01 01 29 0A
    3 sprites/customs_housew.pcx 65 8 09 46 47 -22 -33
    4 * 17	 04 48 80 01  01 58  "Toll Booth" 00
//  <Sprite-number> * <Length>        04 <feature> <language-id> <num-ent> <offset> <text>
// What should I put in those ??s ? I think that 48 is the feature, because it can't be train or house..
// offset is supposed to be 5801 - transmitter. Do I have to change anything else?
I changed the language ID to 80 -> value of bit 7 and nforenum said that there is nothing wrong. The wrong thing is that ingame nothing changed. So until I get strucked buy lightning and all of a sudden I know how to soleve it, you have to make good use of the name "retransmitter". It isn't such an awful thing though that would make it unplayable. The grf itself was ready a long timeago and is in previous page
And maybe you don't need to add the 00's to the strings: if nfo resembles the C-programming language a little, they get appended automatically when you use the double qoutes, you just need to count them in the length(which would be resolved, I assume by NFOrenum). But of course C is not nfo, so I'm not sure about this behaviour in nfo, just giving a hint.
The nforenum itself puts those double-zeros after the string...

Anyway I'm going to sleep now
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by PikkaBird »

lordazamath wrote: I changed the language ID to 80 -> value of bit 7 and nforenum said that there is nothing wrong. The wrong thing is that ingame nothing changed.
You still need to set the language ID as well as setting bit 7. :roll: Try 81. :)
User avatar
AntBUK
Transport Coordinator
Transport Coordinator
Posts: 319
Joined: 02 May 2007 12:29
Location: Sheffield, England
Contact:

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by AntBUK »

I was thinking along industry lines, needs pax, produces pax on 1:1 over half a month. I don't know how do-able it is as really I don't want it set as an industry though. I can't really see that happening unless we have "newer industries" so it's going to have to be treated as a house.
dihedral wrote:AntB: perhaps the acceptance / produceing of passangers, etc could be controlled by grf paramters?
that would make it more interesting... i.e. some might just want eyecandy, others might want produce/accept passangers, yet others again might like the idea of people on the market needing food/goods :)
If somebody can tell me what I'm doing with NFO (can I just point to my signature and poke Pikkabird in the hope of him working on his a bit more) and how to handle parameters then I can have eye-candy, accepts/produces pax, accepts pax/food and produces pax or treat as a house.

Edit: By the way, I have used colours generally used for water as the light strips to add effect. I think I might have used the dynamite colour for the punch... I've added 3 more guys anyway and can't fit any more in with out going dodgy, so I'm now ready for the coding part.
Rasing Awareness: Aspergers Syndrome 1 (NAS UK)2 (BBC)3 (YaleDDC)


Something is driving you insane... It is me.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by skidd13 »

I thought a while over nice solutions for the grf.

Here are a my thoughts so far:
- replace the street lamps with some kind of flying tinsel or paper pieces (animation clircles)
- replace the road works with a party crowd (needs 6 sprites 2x ground + 4x crowd and adapted language strings)
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

skidd13 wrote:I thought a while over nice solutions for the grf.

Here are a my thoughts so far:
- replace the street lamps with some kind of flying tinsel or paper pieces (animation clircles)
- replace the road works with a party crowd (needs 6 sprites 2x ground + 4x crowd and adapted language strings)
'

Road works?? I thought no one used them in multiplayer anymore...
I try to draw something more too. In example the some of the interface elements should be changed too, I think. I'll let you all know, when I have drawn something

Anyway I didn't get the names working correctly so I would appreciate help as a copy-paste of sprite four or anything like that. If anyone think's that I have other problems in my code too, please let me know. If someone wants to make the grf by him(her)self with the string addition, the working grf w/o strings is in previous page. I just got tired of this mystery for now.

My code without any renaming is following:

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 03 00 00 00
    1 * 32	 08 06 "LA01Toll Booth" 00 "By LordAzamath" 00
    2 * 5	 0A 01 01 29 0A
    3 sprites/customs_housew.pcx 66 8 09 46 47 -22 -33
The needed one should be sprite 4, action 04 I think. Renamed to Toll Booth or Customs House, whichever suits more
wikipedia wrote: A Custom House or Customs House was a building housing the offices for the government officials who processed the paperwork for the import and export of goods into and out of a country. Customs officials also collected customs duty on imported goods.
wikipedia wrote: Toll road
From Wikipedia, the free encyclopedia
(Redirected from Toll booth):
A toll road, also known as a tollway, turnpike, pike or tollpike, is a road for which a driver pays a toll (that is, a fee) for use. Similarly there are toll bridges and toll tunnels. Non-toll roads are financed using other sources of revenue, most typically gasoline tax or general tax funds. Tolls have been placed on roads at various times in history, often to generate funds for repayment of toll revenue bonds used to finance constructions and/or operation. The building or facility where a toll is collected may be called a toll booth, toll plaza, toll station, or toll gate.
EDIT: I now downloaded the GRFMaker source and am downloading TurboDelphi. I will try the last time. If GRFMaker makes wonders, I will make that grf with correct naming.
EDIT: Didn't get the compiler work, so If anyone has GRFMaker compiled, one could be nice and send it to me. I haven't found any pre-compiled binaries for GRFMaker yet, so a link would be useful too

Lord
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by dihedral »

we just realized, please bear in mind that the grf's need to work with ttrs :-)
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

and fortunatly my work does :)

I will draw some replacement for lighthouses next, because it's just a waste of time waiting for the code and doing nothing . I 'll better wait for the code and draw :)
Attachments
isthisgoodenough.png
isthisgoodenough.png (255.26 KiB) Viewed 3087 times
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
User avatar
AntBUK
Transport Coordinator
Transport Coordinator
Posts: 319
Joined: 02 May 2007 12:29
Location: Sheffield, England
Contact:

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by AntBUK »

Well mine can be used to replace anything at the moment because nobody will help me code the nfo :(

Heres the final PCX anyway, unless somebody has suggestions for improvement.
Attachments
newfountain.pcx
(3.85 KiB) Downloaded 141 times
Rasing Awareness: Aspergers Syndrome 1 (NAS UK)2 (BBC)3 (YaleDDC)


Something is driving you insane... It is me.
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

AntBUK wrote:Well mine can be used to replace anything at the moment because nobody will help me code the nfo :(

Heres the final PCX anyway, unless somebody has suggestions for improvement.
You haven't asked "Could somebody point out exactly what do I have to do...". you have asked, but not straight. Anyway, I try to make a grf out of this, with skills, that I don't have :)
Then I will learn more than you of grffing :twisted:

I will help you.
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by AndersI »

lordazamath wrote:Didn't get the compiler [TurboDelphi] work,
In what way didn't the compiler work? For me, the procedure was: download, install, register (registration mandatory even for the free product) and start using it. Admittedly, I've used Delphi since D1, so I might have done something I don't remember, out of sheer habit.

It does need .NET 1.1, do you have that installed? It doesn't work with 2.0 only.

As a side note, GrfMaker isn't a 'magical silver bullet' - you still must know how things go together in NFO, but it does help with the tedious details.
User avatar
AntBUK
Transport Coordinator
Transport Coordinator
Posts: 319
Joined: 02 May 2007 12:29
Location: Sheffield, England
Contact:

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by AntBUK »

AntBUK wrote:how would I code a fountain replacement GRF?
Thats not straight? fair enough.


*ahem*
Would somebody please help me learn enough NFO coding to make that PCX file replace fountains and add parameters to change between Eyecandy, Accepting/producing pax, accepting pax and food and producing pax?
Rasing Awareness: Aspergers Syndrome 1 (NAS UK)2 (BBC)3 (YaleDDC)


Something is driving you insane... It is me.
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

AntBUK wrote:
AntBUK wrote:how would I code a fountain replacement GRF?
Thats not straight? fair enough.


*ahem*
Would somebody please help me learn enough NFO coding to make that PCX file replace fountains and add parameters to change between Eyecandy, Accepting/producing pax, accepting pax and food and producing pax?
oh, I saw this post now... I have the grf that acts just like the fountain, without any extra opportunities, ready. Though I haven't changed the name..I can't do it by my own...
Anyway, I changed the picture a bit and had to remove the pavement, because It already has pavement as a separate sprite.
The nfo code is this

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 04 00 00 00
    1 * 33	 08 02 4c 41 00 02 46 6f 75 6e 74 61 69 6e 20 74 6f 20 4d 65 65 74 69 6e 67 20 50 6c 61 63 65 00
    2 * 5	 0A 01 01 AF 05
    3 sprites/meetingplace.pcx 0 0 01 40 64 -31 -15
The modified pcx (and indexed)
meetingplace.pcx
(1.72 KiB) Downloaded 111 times
And finally the very basic grf, where somebody can start adding the parameters etc. (I hope AntBUK will get a chance this time :D)
meetingplace.grf
(744 Bytes) Downloaded 113 times

And with that I think I answered the question "How would I code a fountain replacement", although I didn't explain you anything...
:P
EDIT: It's necessary to download the grf to see tha animation, because I'm not in a mood of making gifs right now.

Lord, sorry for making this grf and not letting you to do it :oops: :D



EDIT: I found an issue with my toll building. It replaces the transmitters in airports too. I think it could be solved by using it as a lighthouse not transmitter, but is this necessary, or it's just fine in airports
Attachments
problem.png
problem.png (414.7 KiB) Viewed 661 times
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: #wwottdgd calles grf authors / gfx'ers for help - (UPDATE)

Post by LordAzamath »

Ok. I found out that the customs house had wrong lightning. Now the sun direction is fixed. Download the toll booth here
Attachments
fix.png
fix.png (11.62 KiB) Viewed 2964 times
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot] and 32 guests