Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# SpriteNWaySheet - Prototype Docs

## SpriteNWaySheet :: struct Example code

Inherits from SpriteParameters « SpriteSource

## Properties

- default
- sorted

frames optional | :: uint32 | Specifies how many of the directions of the SpriteNWay are filled up with this sheet.
Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

Inherited from SpriteParameters

priority optional | :: SpritePriority |
flags optional | :: SpriteFlags |
shift optional | :: Vector | The shift in tiles. [...]
The shift in tiles. [...]
rotate_shift optional | :: boolean | Whether to rotate the `shift` alongside the sprite's rotation. [...]
Whether to rotate the `shift` alongside the sprite's rotation. [...]
apply_special_effect optional | :: boolean |
scale optional | :: double | Values other than `1` specify the scale of the sprite on default zoom. [...]
Values other than `1` specify the scale of the sprite on default zoom. [...]
draw_as_shadow optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
draw_as_glow optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
draw_as_light optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true.
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true.
occludes_light optional | :: boolean | 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). [...]
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). [...]
mipmap_count optional | :: uint8 | Only loaded if this is an icon, that is it has the flag `"group=icon"` or `"group=gui"`. [...]
Only loaded if this is an icon, that is it has the flag `"group=icon"` or `"group=gui"`. [...]
apply_runtime_tint optional | :: boolean |
tint_as_overlay optional | :: boolean |
invert_colors optional | :: boolean |
tint optional | :: Color |
blend_mode optional | :: BlendMode |
generate_sdf[overridden] optional | :: boolean | Unused.
Unused.
surface optional | :: SpriteUsageSurfaceHint | 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.
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 optional | :: SpriteUsageHint | Provides hint to sprite atlas system, so it can pack sprites that are related to each other to the same sprite atlas.
Provides hint to sprite atlas system, so it can pack sprites that are related to each other to the same sprite atlas.

Inherited from SpriteSource

filename | :: FileName | The path to the sprite file to use.
The path to the sprite file to use.
size optional | :: SpriteSizeType or {SpriteSizeType, SpriteSizeType} | The width and height of the sprite. [...]
The width and height of the sprite. [...]
width optional | :: SpriteSizeType | Mandatory if `size` is not defined. [...]
Mandatory if `size` is not defined. [...]
height optional | :: SpriteSizeType | Mandatory if `size` is not defined. [...]
Mandatory if `size` is not defined. [...]
x optional | :: SpriteSizeType | Horizontal position of the sprite in the source file in pixels.
Horizontal position of the sprite in the source file in pixels.
y optional | :: SpriteSizeType | Vertical position of the sprite in the source file in pixels.
Vertical position of the sprite in the source file in pixels.
position optional | :: {SpriteSizeType, SpriteSizeType} | Loaded only when `x` and `y` are both `0`. [...]
Loaded only when `x` and `y` are both `0`. [...]
load_in_minimal_mode optional | :: boolean | Minimal mode is entered when mod loading fails. [...]
Minimal mode is entered when mod loading fails. [...]
premul_alpha optional | :: boolean | Whether alpha should be pre-multiplied.
Whether alpha should be pre-multiplied.
allow_forced_downscale optional | :: boolean | If `true`, the sprite may be downsampled to half its size on load even when 'Sprite quality' graphics setting is set to 'High'. [...]
If `true`, the sprite may be downsampled to half its size on load even when 'Sprite quality' graphics setting is set to 'High'. [...]

frames optional | :: uint32 | Specifies how many of the directions of the SpriteNWay are filled up with this sheet.
Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

Inherited from SpriteParameters

apply_runtime_tint optional | :: boolean |
apply_special_effect optional | :: boolean |
blend_mode optional | :: BlendMode |
draw_as_glow optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
draw_as_light optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true.
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true.
draw_as_shadow optional | :: boolean | Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
Only one of `draw_as_shadow`, `draw_as_glow` and `draw_as_light` can be true. [...]
flags optional | :: SpriteFlags |
generate_sdf[overridden] optional | :: boolean | Unused.
Unused.
invert_colors optional | :: boolean |
mipmap_count optional | :: uint8 | Only loaded if this is an icon, that is it has the flag `"group=icon"` or `"group=gui"`. [...]
Only loaded if this is an icon, that is it has the flag `"group=icon"` or `"group=gui"`. [...]
occludes_light optional | :: boolean | 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). [...]
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). [...]
priority optional | :: SpritePriority |
rotate_shift optional | :: boolean | Whether to rotate the `shift` alongside the sprite's rotation. [...]
Whether to rotate the `shift` alongside the sprite's rotation. [...]
scale optional | :: double | Values other than `1` specify the scale of the sprite on default zoom. [...]
Values other than `1` specify the scale of the sprite on default zoom. [...]
shift optional | :: Vector | The shift in tiles. [...]
The shift in tiles. [...]
surface optional | :: SpriteUsageSurfaceHint | 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.
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.
tint optional | :: Color |
tint_as_overlay optional | :: boolean |
usage optional | :: SpriteUsageHint | Provides hint to sprite atlas system, so it can pack sprites that are related to each other to the same sprite atlas.
Provides hint to sprite atlas system, so it can pack sprites that are related to each other to the same sprite atlas.

Inherited from SpriteSource

filename | :: FileName | The path to the sprite file to use.
The path to the sprite file to use.
allow_forced_downscale optional | :: boolean | If `true`, the sprite may be downsampled to half its size on load even when 'Sprite quality' graphics setting is set to 'High'. [...]
If `true`, the sprite may be downsampled to half its size on load even when 'Sprite quality' graphics setting is set to 'High'. [...]
height optional | :: SpriteSizeType | Mandatory if `size` is not defined. [...]
Mandatory if `size` is not defined. [...]
load_in_minimal_mode optional | :: boolean | Minimal mode is entered when mod loading fails. [...]
Minimal mode is entered when mod loading fails. [...]
position optional | :: {SpriteSizeType, SpriteSizeType} | Loaded only when `x` and `y` are both `0`. [...]
Loaded only when `x` and `y` are both `0`. [...]
premul_alpha optional | :: boolean | Whether alpha should be pre-multiplied.
Whether alpha should be pre-multiplied.
size optional | :: SpriteSizeType or {SpriteSizeType, SpriteSizeType} | The width and height of the sprite. [...]
The width and height of the sprite. [...]
width optional | :: SpriteSizeType | Mandatory if `size` is not defined. [...]
Mandatory if `size` is not defined. [...]
x optional | :: SpriteSizeType | Horizontal position of the sprite in the source file in pixels.
Horizontal position of the sprite in the source file in pixels.
y optional | :: SpriteSizeType | Vertical position of the sprite in the source file in pixels.
Vertical position of the sprite in the source file in pixels.

## Properties

### frames :: uint32 optional

Default: 4 if used in Sprite4Way, 8 if used in Sprite8Way

Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

## Overridden Properties

### generate_sdf :: boolean optional

Default: `false`

Unused.

## Example

    sheet =
    {
      filename = "__base__/graphics/entity/burner-inserter/burner-inserter-platform.png",
      priority = "extra-high",
      width = 105,
      height = 79,
      shift = util.by_pixel(1.5, 7.5-1),
      scale = 0.5
    }

Type used in

- Sprite16Way::sheets
- Sprite16Way::sheet
- Sprite4Way::sheets
- Sprite4Way::sheet