ID:159819
 
If you have multi tiled trees using overlays it creates 'issues' if you should be able to see a higher level on the tree but you can't see the base.

I have my 6 tile (2x,3y) trees made up of two base X objects then overlays on top of them for the y. I do this to avoid having a bajillion objs (i has lots of trees) but still allowing you to see half of the tree if you are moving left to right.

As far as seeing them when you are walking from the top down I don't really care, because you can mentally justify that as you can't see the trunk yet so you couldn't see what should technically be a strait line up from it. However, when you have an opaque wall nearby and your sight is blocked in a diagonal manner then it causes a very stupid look to it, because you have tree branches appearing and disappearing.

So written in a very long way my question is this, is there any way to create multi-tiled trees that are visible from any direction at the spot they're supposed to be visible from without using a large number of objs?
Yes, just use turfs as the trees (unless you have a specific reason they must be objs, which we may be able to work around). It creates a more efficient result all-around.
In response to Kaioken
It interferes with some of my NPC pathing, random tree generation (I'm lazy so rather than placing trees myself I generate them at runtime), and I hate turfs. :/

Just so I understand... If you have a part of a tree that is mob layer + 1, then you add it to a turf that is mob layer not plus 1, will it make the lower layer appear over the player as well or only the tree part?
In response to AJX
You need not complicate it; there is only ever a single turf in a spot ('tile'), it isn't technically possible to have multiple turfs or parts of them on the same tile. When you lay down turfs through the Map Editor, it can give the illusion of previous turfs remaining when you lay one on top, by adding their icons to the top-turf's underlays. Only one turf actually exists however, and it is the last one you've lay down, and only its vars (such as layer) matter.
In response to Kaioken
So does that mean that someone will disappear under the grass below a tree or the grass will be below and tree will be above?
In response to AJX
The grass below a tree wouldn't actually exist; it'd only be a visual icon in the tree's underlays. Like any underlay, it appears under the turf (and its contents). =P
In response to Kaioken
This all makes my head hurt. I hate turfs -.-

Anything special I should do if I was to create turfs at runtime?
In response to Kaioken
Doing this is actually a lot more trickier than it sounds actually.
If a tree overlaps another tree, you have to add that tree turf and it's underlays to the new turfs underlays. But I could not for the life of me figure out a way of making this work.
I'd try to simple add the underlays to the new turfs underlays, did not work, I tried looping through them (simply adding them to the new turfs underlays, or trying to make a copy of them), did not work. I can't remember what other methods I tried to use, but none of them worked :[

Also, if you use something like this in large numbers, you will rapidly run into one of BYONDs limits.
My advice to you is to use big icons and BYONDS map editor. It will take longer to make maps, but you'll find yourself not running into all these annoying limits as quickly.
In response to AJX
Yes. As we've established, you can only have 1 turf in 1 tile. The Map Editor however has a feature where it automatically adds previously-laid turfs onto the actual turf's underlays.
And this won't be automatically be done for you when you create a turf in runtime by using the new() proc - it's a Map Editor thing. So you'd need to simulate it on your own (which is simple enough) or on the parts of the icon that the tree's icon doesn't cover the area's icon will show through (or blackness if the area doesn't have an icon).
Easy example:
turf
grass/icon_state = "grass"
tree/icon_state = "tree"
proc/create_tree(loc)
var/turf/tree/T = new(loc)
T.underlays += /turf/grass
//adds the grass turfs icon as an underlay to the tree \
turf, so it appears below it

As with most things, there are multiple ways to go about doing it. You may want to try something like this instead, to automate the process:
turf
grass
tree/New(loc,background = /turf/grass)
if(!src.underlays.len)
//if the turf doesn't already have underlays, \
from the Map Editor

src.underlays += background
..()
In response to The Magic Man
I don't think it'd be too difficult. I don't know what you've specifically tried, though. Why it could have failed depends on how you've tried to do it, but I don't think you'd really have to do much more than adding both tree parts to the "shared turf"'s underlays.