Types/AnimationVariations: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "Is specified by list of Types/Animation definitions. It is typically used for different variations of the same object. Example: pictures = { {...")
 
(0.18.22: sheets)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
Is specified by list of [[Types/Animation]] definitions.
Either specified by list (array) of [[Types/Animation]] definitions, using [[#sheet]] or [[#sheets]], or this is loaded as a [[Types/Animation]].


It is typically used for different variations of the same object.
== Properties ==


Example:
=== sheet ===
    pictures =
'''Type''': [[Types/Animation]]
      {
 
        {
An animation. Does not use the <code>layers</code> property. The <code>filename</code> is mandatory. Has the following extra properties:
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-01.png",
* variation_count - [[Types/uint32]] - Mandatory.
          width = 105,
* frame_count - [[Types/uint32]] - Default is 1.
          height = 73
* line_length - [[Types/uint32]] - Default is the value of <code>variation_count</code>.
        },
 
        {
The variations are arranged vertically in the file, one row for each variation.
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-02.png",
 
          width = 185,
=== sheets ===
          height = 164
'''Type''': [[Types/table]] of [[#sheet]]
        },
 
        {
Array of [[Types/Animation]]. The contained animations do not use the <code>layers</code> property. The <code>filename</code> is mandatory. They have the following extra properties:
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-03.png",
* variation_count - [[Types/uint32]] - Mandatory.
          width = 173,
* frame_count - [[Types/uint32]] - Default is 1.
          height = 171
* line_length - [[Types/uint32]] - Default is the value of <code>variation_count</code>.
        },
 
        {
{{Prototype property type usage|{{FULLPAGENAME}}}}
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-04.png",
          width = 106,
          height = 172
        },
        {
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-05.png",
          width = 204,
          height = 186
        },
        {
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-06.png",
          width = 149,
          height = 138
        },
        {
          filename = "__base__/graphics/entity/decorative/green-carpet-grass/green-carpet-grass-07.png",
          width = 173,
          height = 160
        }
      }

Latest revision as of 12:53, 30 April 2020

Either specified by list (array) of Types/Animation definitions, using #sheet or #sheets, or this is loaded as a Types/Animation.

Properties

sheet

Type: Types/Animation

An animation. Does not use the layers property. The filename is mandatory. Has the following extra properties:

The variations are arranged vertically in the file, one row for each variation.

sheets

Type: Types/table of #sheet

Array of Types/Animation. The contained animations do not use the layers property. The filename is mandatory. They have the following extra properties:

Prototype properties that use this type