Factorio Prototype DocsVersion 1.1.107

AnimationParameters :: struct - abstract

Inherits from SpriteParameters
Children

Properties

run_mode optional :: "forward" or "backward" or "forward-then-backward"
frame_count optional :: uint32

Can't be 0.

Can't be 0.

line_length optional :: uint32

Specifies how many pictures are on each horizontal line in the image file. [...]

Specifies how many pictures are on each horizontal line in the image file. [...]

animation_speed optional :: float

Modifier of the animation playing speed, the default of 1 means one animation frame per tick (60 fps). [...]

Modifier of the animation playing speed, the default of 1 means one animation frame per tick (60 fps). [...]

max_advance optional :: float

Maximum amount of frames the animation can move forward in one update. [...]

Maximum amount of frames the animation can move forward in one update. [...]

repeat_count optional :: uint8

How many times to repeat the animation to complete an animation cycle. [...]

How many times to repeat the animation to complete an animation cycle. [...]

dice optional :: uint8

Number of slices this is sliced into when using the "optimized atlas packing" option. [...]

Number of slices this is sliced into when using the "optimized atlas packing" option. [...]

dice_x optional :: uint8

Same as dice above, but this specifies only how many slices there are on the x axis.

Same as dice above, but this specifies only how many slices there are on the x axis.

dice_y optional :: uint8

Same as dice above, but this specifies only how many slices there are on the y axis.

Same as dice above, but this specifies only how many slices there are on the y axis.

frame_sequence optional :: AnimationFrameSequence

Inherited from SpriteParameters
filename :: FileName

The path to the sprite file to use.

The path to the sprite file to use.

priority optional :: SpritePriority
flags optional :: SpriteFlags
size[overridden] optional :: SpriteSizeType or {SpriteSizeType, SpriteSizeType}

The width and height of the sprite. [...]

The width and height of the sprite. [...]

width[overridden] optional :: SpriteSizeType

Mandatory if size is not defined. [...]

Mandatory if size is not defined. [...]

height[overridden] 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. [...]

shift optional :: Vector

The shift in tiles. [...]

The shift in tiles. [...]

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 :: bool

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 :: bool

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 :: bool

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.

mipmap_count[overridden] 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 :: bool
tint optional :: Color
blend_mode optional :: BlendMode
load_in_minimal_mode optional :: bool

Minimal mode is entered when mod loading fails. [...]

Minimal mode is entered when mod loading fails. [...]

premul_alpha optional :: bool

Whether alpha should be pre-multiplied.

Whether alpha should be pre-multiplied.

generate_sdf[overridden] optional :: bool

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

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

Properties

run_mode :: "forward" or "backward" or "forward-then-backward" optional

Default: "forward"

frame_count :: uint32 optional

Default: 1

Can't be 0.

line_length :: uint32 optional

Default: 0

Specifies how many pictures are on each horizontal line in the image file. 0 means that all the pictures are in one horizontal line. Once the specified number of pictures are loaded from a line, the pictures from the next line are loaded. This is to allow having longer animations loaded in to Factorio's graphics matrix than the game engine's width limit of 8192px per input file. The restriction on input files is to be compatible with most graphics cards.

animation_speed :: float optional

Default: 1

Modifier of the animation playing speed, the default of 1 means one animation frame per tick (60 fps). The speed of playing can often vary depending on the usage (output of steam engine for example). Has to be greater than 0.

max_advance :: float optional

Default: MAX_FLOAT

Maximum amount of frames the animation can move forward in one update. Useful to cap the animation speed on entities where it is variable, such as car animations.

repeat_count :: uint8 optional

Default: 1

How many times to repeat the animation to complete an animation cycle. E.g. if one layer is 10 frames, a second layer of 1 frame would need repeat_count = 10 to match the complete cycle.

dice :: uint8 optional

Number of slices this is sliced into when using the "optimized atlas packing" option. If you are a modder, you can just ignore this property. Example: If this is 4, the sprite will be sliced into a 4×4 grid.

dice_x :: uint8 optional

Same as dice above, but this specifies only how many slices there are on the x axis.

dice_y :: uint8 optional

Same as dice above, but this specifies only how many slices there are on the y axis.

frame_sequence :: AnimationFrameSequence optional

Overridden Properties

size :: SpriteSizeType or {SpriteSizeType, SpriteSizeType} optional

The width and height of one frame. If this is a tuple, the first member of the tuple is the width and the second is the height. Otherwise the size is both width and height. Width and height may only be in the range of 0-8192.

width :: SpriteSizeType optional

Mandatory if size is not defined.

Width of one frame in pixels, from 0-8192.

height :: SpriteSizeType optional

Mandatory if size is not defined.

Height of one frame in pixels, from 0-8192.

mipmap_count :: uint8 optional

Default: 0

Only loaded if this is an icon, that is it has the flag "group=icon" or "group=gui".

Note that mipmap_count doesn't make sense in an animation, as it is not possible to layout mipmaps in a way that would load both the animation and the mipmaps correctly (besides animations with just one frame). See here.

generate_sdf :: bool optional

Default: false

Unused.

Prototypes

Types