ID:2029161
 
(See the best response by D4RK3 54B3R.)
Just came to check up on updates and noticed byond recently had updates woot!

So these new plane/settings how would I go on about to say, making my entire map black and using these new features to have simple lighting. Not really any demos of it either so I don't really have much to go on about. Thanks for the time!
Best response
appearance_flags var (atom)

See also:
  • vars (atom)
  • alpha var (atom)
  • color var (atom)
  • override var (atom)
  • transform var (atom)
  • color var (client)
  • Gliding

Default value:

0

Possible values:

Any combination of:

LONG_GLIDE - Diagonal glides take as long as cardinal ones RESET_COLOR - On overlays/images/etc., ignore the parent's color
RESET_ALPHA - On overlays/images/etc., ignore the parent's alpha value
RESET_TRANSFORM - On overlays/images/etc., ignore the parent's transform
NO_CLIENT_COLOR - Ignore client.color KEEP_TOGETHER - Draw this icon along with its overlays and underlays, as one unit
KEEP_APART - Detach from a parent icon that uses KEEP_TOGETHER
PLANE_MASTER - Groups all other icons in the same plane


The appearance_flags value controls miscellaneous behavior of an atom or appearance that doesn't make sense to handle in any other var.

These values are bitflags, and can be combined with the + or | operator.

The NO_CLIENT_COLOR flag is inherited by overlays and images automatically unless they have the RESET_COLOR flag. Images with the override var set also will not inherit any flags, colors, etc. and will use their own instead.

KEEP_TOGETHER

This flag is used to force the overlays and underlays of this icon (its "children") to be drawn with it all at once, not each icon individually. One reason you might want to do this is if your player's icon uses overlays for hair and equipment, and you want to change the alpha value to make them fade out. With regular drawing, changing the parent icon's alpha means that each individual icon becomes translucent; with KEEP_TOGETHER, the whole combination fades as one unit. Because this incurs some small overhead, it should be avoided for atoms that do not need it.

Any child appearances underneath KEEP_TOGETHER use NO_CLIENT_COLOR automatically, and RESET_COLOR, RESET_ALPHA, and RESET_TRANSFORM become meaningless. Use KEEP_APART with them if you want to use those flags.

Icons that are in a different plane from the parent icon will automatically have KEEP_APART set and therefore won't be included.

KEEP_APART

If this appearance is a child of something that uses KEEP_TOGETHER, it will be separated out from the main icon and drawn separately. This may be useful for things such as health meters, for instance.

PLANE_MASTER

Use this flag to group all icons in the same plane and draw them on a temporary surface the size of the whole screen, and then that image is drawn over the existing scene. This is useful for post-processing effects, like lighting. The plane master's icon is not drawn, but its color, transform, and blend_mode are all taken into account when drawing.
Example
obj/lighting_plane
screen_loc = "1,1"
plane = 2
blend_mode = BLEND_MULTIPLY
appearance_flags = PLANE_MASTER | NO_CLIENT_COLOR
// use 20% ambient lighting; be sure to add full alpha
color = list(null,null,null,null,"#333f")
mouse_opacity = 0 // nothing on this plane is mouse-visible

image/spotlight
plane = 2
blend_mode = BLEND_ADD
icon = 'spotlight.dmi' // a 96x96 white circle
pixel_x = -32
pixel_y = -32

mob/Login()
..()
client.screen += new/obj/lighting_plane
overlays += /image/spotlight


In the example, all objects in plane 2 are lights. They're added together, and then the whole image is put through the color matrix, then multiplied over the rest of the scene below. This will darken everything that doesn't have a spotlight overlay, but anywhere a spotlight exists will have a circle of light.

The example also makes a point of adding full alpha to the plane, because a PLANE_MASTER is fully transparent by default.

The mouse_opacity set by the plane master will determine how the mouse interacts with objects on the plane. See mouse_opacity for more info.
Nadrew also uploaded a demo that shows a basic setup:
http://www.byond.com/hub/Nadrew/LightingTest

(see here)
Alright thanks guys!