Discussion - recommended standards for newgrf (OTTD)
Moderator: Graphics Moderators
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Discussion - recommended standards for newgrf (OTTD)
Without wanting to enforce anything on authors, it would be useful if there were common standards (or conventions) for certain aspects of newgrfs.
I put some up for discussion on the ottd wiki: http://wiki.openttd.org/NewGRF_Recommended_Standards
The intention is to make life easier and better for players, especially the thousands of bananas users who (as far as I can see) are not forum visitors or participants in the relatively smaller newgrf community. Newgrf spec is very flexible in many areas, and the experience with newgrf is far from seamless. Much of that depends on decisions by newgrf authors, and can't be 'fixed' by openttd.
That page is not linked anywhere but here yet; it would be useful to get feedback / suggestions.
cheers,
Andy
I put some up for discussion on the ottd wiki: http://wiki.openttd.org/NewGRF_Recommended_Standards
The intention is to make life easier and better for players, especially the thousands of bananas users who (as far as I can see) are not forum visitors or participants in the relatively smaller newgrf community. Newgrf spec is very flexible in many areas, and the experience with newgrf is far from seamless. Much of that depends on decisions by newgrf authors, and can't be 'fixed' by openttd.
That page is not linked anywhere but here yet; it would be useful to get feedback / suggestions.
cheers,
Andy
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
- Bob_Mackenzie
- Chairman
- Posts: 823
- Joined: 25 Mar 2010 13:36
Re: Discussion - recommended standards for newgrf (OTTD)
Having read it that's quite an intimidating list for a noob who is just starting out
Re: Discussion - recommended standards for newgrf (OTTD)
Is this some kind of 'accepted truth' or your own idea?Light in TTD graphics comes from the bottom right of the screen.
Airplanes are lighted by a light coming from about 1 o'clock (at least the ground shadow is), tiles have the sun at 2-3 o'clock (see which slope is the brightest), the statue has it at 4-5 (that's your 'bottom right'). trees at 3, Houses are more difficult to see, could be anywhere between 2 to 5, I think.
So why use the one extreme (5) when you can be in the middle with 3? As in 'Light comes from the right, high up in the air'. That will minimize the 'error' in the different shadows.
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Discussion - recommended standards for newgrf (OTTD)
@Andersl - I was looking at buildings + vehicles. Good point about the plane shadow.
As there is no single light, the advice needs rewording, to be specific about which things are lit from which direction.
As there is no single light, the advice needs rewording, to be specific about which things are lit from which direction.
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: Discussion - recommended standards for newgrf (OTTD)
I always thought that the grfid should be bumped if savegame-compatibility is broken. Has that changed since action14? If not, please elaborate why this is...If a newer version of your grf is not savegame-compatible with an older version of your grf, use action 14 to provide a check. Do not change the grfid to handle savegame compatibility
I agree with the rest of the text, but didn't light come from the right (i.e. the middle of the right side of the screen)?
EDIT: looking at the terrain, this is indeed correct.
EDIT2: here's airplanes (bottom right). It's easier to program this way; if you wanted the same angle as the terrain, the shadow accelerate and decelerate faster/slower than the airplane on takeoff and landing. I'd say the image linked above is correct.
- Attachments
-
- Untitled-1.png (9.84 KiB) Viewed 4554 times
Re: Discussion - recommended standards for newgrf (OTTD)
This would seem to assume that all NewGRFs are for OTTD. Keep in mind that TTDPatch is still very much in use by many players who favour it's simpler implementation and other than your very valid Action14 comments, the balance of your suggestions could easily be applicable to TTDPatch as well. Rather than limit this to the OpenTTD wiki, it could be included in the new TTWiki.
To a certain extent, I had suggested something similar where the 'core' items would fit the limited TTDPatch ID range. Perhaps this could be considered thus giving us a greater selection of [UNIV] material.If your set is large and provides many vehicles or objects, consider identifying 'core' and 'extra' items, with parameters to turn them on or off. Consider defaulting to 'off' for the extra items - this is useful to admins of multiplayer servers.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Discussion - recommended standards for newgrf (OTTD)
After seeing your explanation of the plane (and studying it closer when passing a hill) I'm with you on that one, but...
I have difficulties buying that, as the surface 1 is darker than 2, and 2 and 3 have the same brightness. This gives me the following image which is also supported by the trees (actually, the tiles indicate a light coming more from the top than the bottom):FooBar wrote:looking at the terrain, this is indeed correct.
- Attachments
-
- Ex29.png (6.48 KiB) Viewed 4531 times
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Discussion - recommended standards for newgrf (OTTD)
So the documentation needs to be clear that there are multiple prevailing angles, depending on what you're drawing.
It would be helpful to make a nice clear explanation of this for authors

Last edited by andythenorth on 14 Jun 2011 13:27, edited 1 time in total.
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: Discussion - recommended standards for newgrf (OTTD)
The 'opposing' tile of 1 (the northernmost tile of the hill) is dark. If light would come exactly from the right as you draw it, this tile would have to be exactly the same colour as tile 1. As that isn't the case it leads me to believe that light comes from a little lower than the exact right. Somewhere between your image and my image with the airplane.AndersI wrote:I have difficulties buying that, as the surface 1 is darker than 2, and 2 and 3 have the same brightness. This gives me the following image which is also supported by the trees (actually, the tiles indicate a light coming more from the top than the bottom):
At least that's what I see in it.
Re: Discussion - recommended standards for newgrf (OTTD)
Described in that way, I can only agree with you. 4:30 pm, it is, thenFooBar wrote:The 'opposing' tile of 1 (the northernmost tile of the hill) is dark. If light would come exactly from the right as you draw it, this tile would have to be exactly the same colour as tile 1. As that isn't the case it leads me to believe that light comes from a little lower than the exact right. Somewhere between your image and my image with the airplane.

- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Discussion - recommended standards for newgrf (OTTD)
+1AndersI wrote:Described in that way, I can only agree with you. 4:30 pm, it is, then

FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Who is online
Users browsing this forum: No registered users and 13 guests