Terrain layering
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Terrain layering
After reading the wiki and a considerable amount of experimenting didn't yield any results...
Is it possible to have a partially transparent terrain tile, with another tile/image underneath it that can be seen through the transparent parts? I've tried it like this:
The aforementioned bit of code makes only the foreground visible, with the transparent parts of it drawn as black (the transparencies in my .png's are fine).
One of the reasons I'd very much like to do this with separate foreground and background tiles is that there will probably be need to change the background according to time of day etc. Also, the foregrounds are modified canyon tiles, so there would be a bit too many files to manually fix (for my taste, anyway).
Of course, if this is a fundamentally stupid thing to do or there's a more convenient way to achieve the effect, please feel free to tell about it.
Is it possible to have a partially transparent terrain tile, with another tile/image underneath it that can be seen through the transparent parts? I've tried it like this:
Code: Select all
[terrain_graphics]
[tile] # This is the foreground tile
x=0
y=0
type=x
[image]
name=edge
position=horizontal
layer=1000
[/image]
[/tile]
[tile] # This should be seen where the above tile has "holes" in it
x=0
y=0
type=x
[image]
name=background
position=horizontal
layer=-1000
[/image]
[/tile]
[/terrain_graphics]
One of the reasons I'd very much like to do this with separate foreground and background tiles is that there will probably be need to change the background according to time of day etc. Also, the foregrounds are modified canyon tiles, so there would be a bit too many files to manually fix (for my taste, anyway).
Of course, if this is a fundamentally stupid thing to do or there's a more convenient way to achieve the effect, please feel free to tell about it.
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
Re: Terrain layering
This is possible, at least in a backhand sort of way. The sunken ruin graphics depend upon this kind of effect. You could emulate this by copying that, but there probably is an easier way: placing items. See the bay of perls:zookeeper wrote:After reading the wiki and a considerable amount of experimenting didn't yield any results...
Is it possible to have a partially transparent terrain tile, with another tile/image underneath it that can be seen through the transparent parts? I've tried it like this:
<snip>
The aforementioned bit of code makes only the foreground visible, with the transparent parts of it drawn as black (the transparencies in my .png's are fine).
One of the reasons I'd very much like to do this with separate foreground and background tiles is that there will probably be need to change the background according to time of day etc. Also, the foregrounds are modified canyon tiles, so there would be a bit too many files to manually fix (for my taste, anyway).
Of course, if this is a fundamentally stupid thing to do or there's a more convenient way to achieve the effect, please feel free to tell about it.
Code: Select all
{PLACE_IMAGE misc/cage.png 4 38}
edit: Oh, and you could use events with the turn properly defined to make it change with the time of day...