Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Mar 29, 2017 7:22 am

All times are UTC




Post new topic  Reply to topic  [ 48 posts ]  Go to page 1 2 3 Next
Author Message
 Post subject: Empty Tile GRF
PostPosted: Tue Dec 27, 2011 4:07 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Sorry for no tag, but I have no idea if this little thing works in TTDP or not. In fact, I basically have no idea what I was doing at all, but it seems to "work" and I haven't found any other GRF that does this (doesn't mean much, I'll admit ^^), so might as well post it here. Just in case ;)

Point was to get a "empty" NewObjects tile to build on slopes. Picture is probably self explaining what for. Should work regardless of climate, but it's not "tile-sensitive" (always a desert-grass tile even when build on sand, no snow, always the green toyland tile etc).


Attachments:
Unbenannt.png
Unbenannt.png [ 83.24 KiB | Viewed 7504 times ]
EmptyGRF.grf [395 Bytes]
Downloaded 229 times
Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Tue Dec 27, 2011 4:16 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Aug 31, 2011 8:28 am
Posts: 28
Location: At Home
Good idea, i like it. :D
Cold you make different fence tiles?
After testing it:
Maybe it could be more cheaper than now. Maybe. :D

_________________
Hungarian City Set

Coming soon!

Miau miau :3


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Dec 28, 2011 3:32 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Thx for testing :D

Cheaper? I'm not even sure that's possible. Tile itself costs next to nothing, it only gets "expensive" when build on slopes because of the foundations. No idea though if that prize can be influenced for just one grf.

And on fences - I can't draw and I can't code, so ...probably no ;)

...I did however manage to make a second "version" that actually includes two tile types depending on climate (normal: grass/snow, arctic: grass/snow, tropical: grass/desert, toyland: normal/snow).
Guess that's about it then ^^


Attachments:
EmptyGRF.grf [511 Bytes]
Downloaded 119 times
Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Dec 28, 2011 4:18 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
There's no need to have two separate objects for that. You can also have the game determine automatically what terrain to use.
In fact the NML tutorial has an example on how to code that: http://www.tt-wiki.net/wiki/NMLTutorial/Object_slopes

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Dec 28, 2011 4:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
That's actually where I c&p the code from, pretty much ;)
Didn't quite get that part to work, I'll admit *cough* - I assume the game would've decided what tile to place? Since it's only deco anyway I'd say leaving the decision to the player is fine as well. ^^


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Dec 28, 2011 5:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
It's your grf, so it's up to you what you want to do with it :)

Anyways, feel free to comment in the NML Tutorial topic on what you in particular don't understand from that part of the tutorial. That way we may be able to improve it in a way that you do understand!

_________________
FooBar's Tram Tracks | TransRapid Track Set | Metro Track Set | OpenGFX base graphics set | FIRS Industry Replacement Set
Dutch Tram Set | Dutch Trainset 2 | Dutch Road Furniture


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Dec 30, 2011 10:16 pm 
Offline
Engineer
Engineer

Joined: Sat Jun 25, 2011 1:32 pm
Posts: 31
I love this idea. simple, but very useful.
The cost is the issue, but that comes with building on a slope.


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Tue Aug 28, 2012 3:18 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Currently playing a game that disallows towns from building roads I found this GRF rather useful to invisibly prevent cities from growing along roads they're not supposed to, but obviously it doesn't look too good on sloped terrain to have foundations everywhere ...
...which is why I quickly made a new batch of these simple GRFs, all containing one object with 4 views (thx to the great NML tutorial ;) ).
First is pretty much the same as the old one: normal, snow, desert and water on foundations.
Second is a sloped normal ground and a sloped terrain sensitive tile (unfortunately no transitions though), plus SE and SW coastal tiles as it's rather beyond me how to detect and draw coastal tiles properly and I needed some of those for my current game ^^.
Third are simply some field tiles on foundations as I got annoyed with cities destroying all farm land. ;)


Attachments:
EmptyGRF.grf [1.63 KiB]
Downloaded 107 times
EmptyGRF_2.grf [1.67 KiB]
Downloaded 103 times
EmptyGRF_3.grf [1.62 KiB]
Downloaded 108 times
Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Tue Aug 28, 2012 6:39 pm 
Offline
Chairman
Chairman
User avatar

Joined: Thu Mar 25, 2010 1:36 pm
Posts: 786
I can find a use for them :)


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Aug 29, 2012 11:50 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Good to hear :)

Bit of playing with them actually quickly found me annoyed by #3 being rather limited, so I made another version with more farming related sprites, including references to some FIRS animals (obviously those will only load properly when playing with FIRS).
Example of a rather dirty sheep farm:
Attachment:
farm.png
farm.png [ 27.63 KiB | Viewed 6695 times ]

Also tried to find a sensible use for that fake water tile. Elevated city pools perhaps? ^^;
Attachment:
pool.png
pool.png [ 45.94 KiB | Viewed 6695 times ]


Either way, new version attached ;)
€: deleted. Didn't work as hoped ^^


Last edited by Pyoro on Wed Aug 29, 2012 12:14 pm, edited 1 time in total.

Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Aug 29, 2012 11:54 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9006
Location: Sol d
Why don't you combine it all into one NewGRF?

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Aug 29, 2012 12:26 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Mh, no particular reasons, except that I personally slightly prefer to only have in-game what I actually use - as it's just a bit of c&p here's an all-in-one version.

Also, completely misunderstood how referencing to sprites works, so no more FIRS sprites in this. Wouldn't have worked in almost all cases anyways ^^;


Attachments:
EmptyGRF_full.grf [6.99 KiB]
Downloaded 130 times
Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Aug 29, 2012 12:33 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9006
Location: Sol d
Pyoro wrote:
Mh, no particular reasons, except that I personally slightly prefer to only have in-game what I actually use - as it's just a bit of c&p here's an all-in-one version.

Also, completely misunderstood how referencing to sprites works, so no more FIRS sprites in this. Wouldn't have worked in almost all cases anyways ^^;


Well, there's a limit of 63 NewGRFs per game. Having one for each object or vehicle would quickly exhaust that. If you want to restrict availability of not-to-be-used objects, use a NewGRF parameter to offer a choice of which objects become available.

As with respect to referencing: in this particular case it's not easy. On the other hand, FIRS is licensed under the GPL. Thus should you adopt that and adhere to that licensing scheme as well, you'd be free to just grab and copy the related code and sprites and incorporate them here. That'd even supply those independent of the presence of FIRS within a game.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Wed Aug 29, 2012 1:15 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Mh, makes sense. I had that limit somewhat higher in memory as I personally never came across it, but with only 63 it definitely makes more sense as one grf.

And yes, I briefly considered that, but I'd say it's beyond the scope of this grf - actually, I should've done that as something separate from the beginning probably ^^;


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 12:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
One last(?) version to clean up this mess; everything neatly packed into one GRF and 9 objects -
Attachment:
objects.png
objects.png [ 59.27 KiB | Viewed 6387 times ]

- and while I said "clean up", this (as can be seen) comes with some glitches. Coastal tiles are especially unfriendly to flat terrain. Water, that pile of coal and concrete are flat tiles, but don't have foundations (WAD: allows to neatly cut off hills as seen in the picture. Either way, they're just in to not waste these views ;) ).
Also, some trees aren't drawn correctly in the purchase menu and they'll stay the same for all climates, so they really only make sense for temperate climates (and maybe arctic). And, one last glitch, building bridges over the trees is allowed, but will of course glitch with bridges only 1-2 tiles high ... can look pretty good with higher bridges though ;)

Could maybe have a bit more variation for the trees, or maybe sloped farm tiles, but altogether I consider this done :)


Attachments:
EmptyGRF.grf [10.02 KiB]
Downloaded 126 times
Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 4:37 pm 
Offline
Chairman
Chairman
User avatar

Joined: Thu Mar 25, 2010 1:36 pm
Posts: 786
I for one will be using this...

A version with the GFX trees would be nice...


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 4:47 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9006
Location: Sol d
Bob_Mackenzie wrote:
I for one will be using this...

A version with the GFX trees would be nice...

If you do it right [TM] you use whatever trees the user uses (by just referencing the base set trees)

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 5:15 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
I'd never claim to do anything right, but that for one should work, yes. Probably. Hopefully. At least it does for me. ^^;

Currently trying to figure out steep slopes, and coast tiles apparently might not work the way they're supposed to though I haven't really been able to reproduce this.


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 5:35 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9006
Location: Sol d
If you're writing in NML, base_sprite_no is the flat ground tile of the tile type you're looking for (for many cases, not all, might fail for coasts):

Code:
spritelayout company_land_layout(base_sprite_no) {
   ground {
      sprite: base_sprite_no + slope_to_sprite_offset(nearby_tile_slope(0, 0));
   }
}


And you don't have to worry about the actual slope.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Empty Tile GRF
PostPosted: Fri Sep 14, 2012 6:38 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 1965
Location: Virgo Supercluster
Alright, thanks, I'll take a look at that. :)

Also, I've again been too naive with coastal tiles - they don't work as hoped, at least not for any nightly at least from 24448 onwards. Only works for some revs around 24110 - 24309. I guess the sprite numbers changed somewhere in-between ...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 48 posts ]  Go to page 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.