Home

SpriteParameters

Type

struct

Properties

priority

flags

shift

The shift in tiles. util.by_pixel() can be used to divide the shift by 32 which is the usual pixel height/width of 1 tile in normal resolution. Note that 32 pixel tile height/width is not enforced anywhere - any other tile height or width is also possible.

rotate_shift

Whether to rotate the shift alongside the sprite's rotation. This only applies to sprites which are procedurally rotated by the game engine (like projectiles, wires, inserter hands, etc).

apply_special_effect

scale

Values other than 1 specify the scale of the sprite on default zoom. A scale of 2 means that the picture will be two times bigger on screen (and thus more pixelated).

draw_as_shadow

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. This takes precedence over draw_as_glow and draw_as_light.

draw_as_glow

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. This takes precedence over draw_as_light.

Draws first as a normal sprite, then again as a light layer. See https://forums.factorio.com/91682.

draw_as_light

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true.

occludes_light

Loaded only if draw_as_shadow, draw_as_glow and draw_as_light are false, and only by sprites used by tile renderer (decals and underwater patches). The purpose of setting this to false is to preserve water mask from sprites that are supposed to be drawn under the water.

mipmap_count

Only loaded if this is an icon, that is it has the flag "group=icon" or "group=gui". Will be clamped to range [0, 5].

apply_runtime_tint

tint_as_overlay

invert_colors

tint

blend_mode

generate_sdf

This property is only used by sprites used in UtilitySprites that have the "icon" flag set.

If this is set to true, the game will generate an icon shadow (using signed distance fields) for the sprite.

surface

Provides hint to sprite atlas system, so it can try to put sprites that are intended to be used at the same locations to the same sprite atlas.

usage

Provides hint to sprite atlas system, so it can pack sprites that are related to each other to the same sprite atlas.