Empty Tile GRF
Moderator: Graphics Moderators
Empty Tile GRF
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).
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 (83.24 KiB) Viewed 16822 times
-
- EmptyGRF.grf
- (395 Bytes) Downloaded 475 times
Re: Empty Tile GRF
Good idea, i like it.
Cold you make different fence tiles?
After testing it:
Maybe it could be more cheaper than now. Maybe.
Cold you make different fence tiles?
After testing it:
Maybe it could be more cheaper than now. Maybe.
Hungarian City Set
Coming soon!
Miau miau :3
Coming soon!
Miau miau :3
Re: Empty Tile GRF
Thx for testing
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 ^^
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 318 times
Re: Empty Tile GRF
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
In fact the NML tutorial has an example on how to code that: http://www.tt-wiki.net/wiki/NMLTutorial/Object_slopes
Re: Empty Tile GRF
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. ^^
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. ^^
Re: Empty Tile GRF
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!
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!
Re: Empty Tile GRF
I love this idea. simple, but very useful.
The cost is the issue, but that comes with building on a slope.
The cost is the issue, but that comes with building on a slope.
Re: Empty Tile GRF
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.
...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 355 times
-
- EmptyGRF_2.grf
- (1.67 KiB) Downloaded 355 times
-
- EmptyGRF_3.grf
- (1.62 KiB) Downloaded 338 times
- Bob_Mackenzie
- Chairman
- Posts: 823
- Joined: 25 Mar 2010 13:36
Re: Empty Tile GRF
I can find a use for them
Re: Empty Tile GRF
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: Also tried to find a sensible use for that fake water tile. Elevated city pools perhaps? ^^; Either way, new version attached
€: deleted. Didn't work as hoped ^^
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: Also tried to find a sensible use for that fake water tile. Elevated city pools perhaps? ^^; Either way, new version attached
€: deleted. Didn't work as hoped ^^
Last edited by Pyoro on 29 Aug 2012 12:14, edited 1 time in total.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Empty Tile GRF
Why don't you combine it all into one NewGRF?
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
Re: Empty Tile GRF
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 ^^;
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 386 times
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Empty Tile GRF
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.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 ^^;
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.
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
Re: Empty Tile GRF
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 ^^;
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 ^^;
Re: Empty Tile GRF
One last(?) version to clean up this mess; everything neatly packed into one GRF and 9 objects -
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
- 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 (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 339 times
- Bob_Mackenzie
- Chairman
- Posts: 823
- Joined: 25 Mar 2010 13:36
Re: Empty Tile GRF
I for one will be using this...
A version with the GFX trees would be nice...
A version with the GFX trees would be nice...
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Empty Tile GRF
If you do it right [TM] you use whatever trees the user uses (by just referencing the base set trees)Bob_Mackenzie wrote:I for one will be using this...
A version with the GFX trees would be nice...
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
Re: Empty Tile GRF
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.
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.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Empty Tile GRF
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):
And you don't have to worry about the actual slope.
Code: Select all
spritelayout company_land_layout(base_sprite_no) {
ground {
sprite: base_sprite_no + slope_to_sprite_offset(nearby_tile_slope(0, 0));
}
}
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
Re: Empty Tile GRF
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 ...
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 ...
Who is online
Users browsing this forum: No registered users and 76 guests