American Road Replacement Set

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

Post Reply
User avatar
Nite Owl
Tycoon
Tycoon
Posts: 1889
Joined: 06 Mar 2007 19:32
Location: In The Dark

Re: American Road Replacement Set

Post by Nite Owl »

Railwaymodeler wrote: For what it is worth, there is a GRF that removes the roofs and walls from truck/bus stations and looks like a parking lot. That GRF plays nicely with this set.
I have been looking for this GRF for quite some time but have been unable to locate it. Any help would be appreciated. Apologies for the thread hijacking.
Humor is the second most subjective thing on the planet
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: American Road Replacement Set

Post by kamnet »

Nite Owl wrote:
Railwaymodeler wrote: For what it is worth, there is a GRF that removes the roofs and walls from truck/bus stations and looks like a parking lot. That GRF plays nicely with this set.
I have been looking for this GRF for quite some time but have been unable to locate it. Any help would be appreciated. Apologies for the thread hijacking.
Right here, sir. And here's a pic of what they look like with ARRS:
buslots-arrs.png
buslots-arrs.png (754.79 KiB) Viewed 6667 times
Personally, I don't like the outcome since it kinda spoils my idea. The solution would be to re-draw this set and provide my own base graphics that matches ARRS. One of these days if I get enough time and interest I'll learn how to code this with parameters so I can throw in support for multiple road sets.
User avatar
Nite Owl
Tycoon
Tycoon
Posts: 1889
Joined: 06 Mar 2007 19:32
Location: In The Dark

Re: American Road Replacement Set

Post by Nite Owl »

Thank you sir. Much appreciated.
Humor is the second most subjective thing on the planet
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

there were a few missing pixels (one to be precise) ... I updated it at the issue http://dev.openttdcoop.org/issues/5555
ImageImageImage
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: American Road Replacement Set

Post by Andrew350 »

Hm, on closer inspection it looks like you've used the wrong desert ground sprites for the no-grid version(s) of the tunnels. The desert sprites included in the main ground tile spritesheet of the OpenGFX+ Landscape source aren't correct, they have red pixels in them for some odd reason. There is a separate set of gridless desert tiles elsewhere in the repository that have the correct sprites. I think this is the file: http://dev.openttdcoop.org/projects/ogf ... desert.png Why in the world it was done that way I don't know.

Sorry to be such a pain :P
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

I was wondering about the red myself! Thanks, great discovery :D

fixed and updated to the issue again
ImageImageImage
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: American Road Replacement Set

Post by planetmaker »

Thanks for that observation and the quick fix of the sprites also from here. Fixed in OpenGFX+ Landscape as well.
User avatar
rbos86
Route Supervisor
Route Supervisor
Posts: 393
Joined: 09 Aug 2011 12:26
Location: Netherlands

Re: American Road Replacement Set

Post by rbos86 »

This set works great in my new game! Thanks for this. :D :D :D
rbos86' Screenshots thread is here
rbos86' Unrealistic Dutch games -thread, on the other hand,is this button
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

When can we expect a new release btw? :P
ImageImageImage
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: American Road Replacement Set

Post by Andrew350 »

V453000 :) wrote:When can we expect a new release btw? :P
How about now? ;)

New version featuring V453000's improved tunnel graphics now available via the online content or in the first post of this thread!

By the way V453000, I hope you don't mind that I went ahead and did a snowy version of the tunnels using the "ugly snow". It felt like a step backwards leaving them bare :P Also, I found two missing pixels in the ground sprites on one of the views that might be good to fix for other projects. I've highlighted them here in red:
missingpixels.png
missingpixels.png (12.96 KiB) Viewed 6378 times
All ground sprites in this view are missing these pixels, causing 1-pixel artifacts in-game. Very minor detail, but if you're anything like me it will drive you crazy :P
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

oh god not again ... will fix :s
ImageImageImage
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

I noticed ARRS does not detect ogfx-landscape is in alpine mode :s

and it somehow has grid even though ogfx-landscape is set to nogrid

https://dl.dropboxusercontent.com/u/204 ... UTS72a.sav
ImageImageImage
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: American Road Replacement Set

Post by planetmaker »

V453000 :) wrote:and it somehow has grid even though ogfx-landscape is set to nogrid
As a word of caution: I inverted the grid parameter's meaning in r175 for the sake of easier understanding: double negatives are bad :-)

All parameters and their values are described in the code here. Mind the parameter numbers given there explicitly. They're different from the visual order you see ingame.

You find an example on how to query another grf's parameters in the code of OpenGFX+ Airports where I check for av8 version and parameter.
EDIT: maybe to make it a bit clearer than there:
check for presence of newgrf: grf_future_status(GRFID_AV8)
check for its version being >= 2200: param[GRFID_AV8, 254] >= 2200
access its 5th parameter: param[GRFID_AV8, 5]
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: American Road Replacement Set

Post by Andrew350 »

Okay, the problem is that although I'm checking the right parameter number for the grid setting, it is actually multiple "sub"parameters tied to the same number, so when the Transmitter to Rock parameter gets turned on like in this case, everything breaks. And that's a major problem :) I'm surprised it hasn't been spotted before.

I don't see (or rather, understand) how you check for these sub-parameters explicitly. I imagine it has something to do with finding the 'bits' of the parameter, but that is something I can't find how to do in the documentation, and the code in OpenGFX+ Airports really doesn't shed much light on how that all works, at least to me anyway. I can play around and try to figure it out, but I get the feeling some basic programming knowledge would probably be useful here if that's the case. :wink:

Also, I notice in OpenGFX+ Airports that the check for another NewGRF uses grf_future_status, whereas I am using grf_current_status. What is the benefit to using one or the other, is the one I'm using correct?

And one more, about this bit of code,

Code: Select all

param[GRFID_AV8, 254] >= 2200
Is 254 a fixed parameter number for finding the specific version number of a GRF? I couldn't find anything anywhere about how to do that when I originally coded up the GRF, not that is was important then. It might be useful in the future though. :)

Sorry for all the questions.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: American Road Replacement Set

Post by planetmaker »

Andrew350 wrote: I don't see (or rather, understand) how you check for these sub-parameters explicitly.
You need to understand bit operations for this as you need to mask out the bits you're not interested in and check for that result:
(grfparam[GRF_OGFXL, 0] & 0x00000001) will set every bit to 0 except the least significant one (bit 0). So you can then test the variable for either 0 or 1.
(grfparam[GRF_OGFXL, 0] & 0x00000002) similarily can only have the values 0 or 2, checking bit 1
(grfparam[GRF_OGFXL, 0] & 0x00000004) similarily can only have the values 0 or 4, checking bit 2
(grfparam[GRF_OGFXL, 0] & 0x00000008) similarily can only have the values 0 or 8, checking bit 3

In the latter cases some shifting might then be interesting to end up again at 0 or 1:
((grfparam[GRF_OGFXL, 0] & 0x00000002) >> 1) will give values 0 or 1, checking bit 1
((grfparam[GRF_OGFXL, 0] & 0x00000004) >> 2) the same, checking bit 2
((grfparam[GRF_OGFXL, 0] & 0x00000008) >> 3) the same, checking bit 3
Also, I notice in OpenGFX+ Airports that the check for another NewGRF uses grf_future_status, whereas I am using grf_current_status. What is the benefit to using one or the other, is the one I'm using correct?
The difference is in the order in which NewGRFs are activated in the list of NewGRFs. grf_current_status only returns true if the grf you check for is above yourself in the user's list, grf_future_status will additionally also return true when it is below you and become active.
And one more, about this bit of code,

Code: Select all

param[GRFID_AV8, 254] >= 2200
Is 254 a fixed parameter number for finding the specific version number of a GRF? I couldn't find anything anywhere about how to do that when I originally coded up the GRF, not that is was important then. It might be useful in the future though. :)
Yes, parameter #254 is the version number, and yes it's not documented anywhere, waiting for a nicer, more user-friendly way to make this available :-)
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: American Road Replacement Set

Post by Andrew350 »

planetmaker wrote:(grfparam[GRF_OGFXL, 0] & 0x00000001) will set every bit to 0 except the least significant one (bit 0). So you can then test the variable for either 0 or 1.
Thank you very much planetmaker, that seems to have solved the issue :D

Now unfortunately I'm also going to have to add in some of those NewGRF version checks since the nightlies of OpenGFX+ Landscape use different parameters which mess everything up again :lol: I guess that information will come in handy sooner than I thought!

I'll try to get a new version with the fix(es) out soon :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: American Road Replacement Set

Post by planetmaker »

landscape_nogrid = (grf_future_status("OG+4") && (((param["OG+4", 254] < 175) && (param["OG+4",0] & 0x01)) || ((param["OG+4", 254] >= 175) && !(param["OG+4", 0] & 0x01))));

might do the trick.
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: American Road Replacement Set

Post by V453000 :) »

: DDDDD
ImageImageImage
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: American Road Replacement Set

Post by Andrew350 »

Alrighty, new version uploaded to Bananas and the first post of this thread! It fixes a mistake where the parameters weren't always read correctly from OpenGFX+ Landscape, causing landscape mismatches. I also took the time to add support for the upcoming release of OpenGFX+ Landscape, so this set should now work correctly even with the new parameters. Thanks planetmaker for helping me along with all of this :)

Please do let me know if any more problems occur :)
User avatar
Railwaymodeler
Tycoon
Tycoon
Posts: 2111
Joined: 23 Dec 2004 18:31
Location: Wisconsin, USA

Re: American Road Replacement Set

Post by Railwaymodeler »

If anyone is interested, I did find that ARRS and NARoads can play nicely with each other. This way, I got the ARRS road surfaces, including on bridges, and the NARoads streetcars and carbarn (Which I like better than the default carbarn), and the walls for bus terminals, and sidewalk "furniture" for drive through stops from NA Roads, but with ARRS surfaces.

The attached picture shows how it looks.
arrs and naroads play nice.png
ARRS and NARoads
(113.98 KiB) Downloaded 1 time
Without Trains America Stops

Image
Image
Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 9 guests