Types/Sprite: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "== Basics == Specifies one picture that can be used in the game. When there are more sprites with the same source file and dimensions/position in the game, they all share the...")
 
No edit summary
Line 29: Line 29:
=== y ===
=== y ===
'''Type''': [[Types/unsigned]
'''Type''': [[Types/unsigned]
'''Default''': 0
'''Default''': 0


Line 34: Line 35:
=== shift ===
=== shift ===
'''Type''': [[Types/Vector]]
'''Type''': [[Types/Vector]]
'''Default''': 0
'''Default''': 0
=== scale ===
=== scale ===
'''Type''': [[Types/double]]
'''Type''': [[Types/double]]
'''Default''': 1
'''Default''': 1



Revision as of 14:43, 30 October 2013

Basics

Specifies one picture that can be used in the game.

When there are more sprites with the same source file and dimensions/position in the game, they all share the same memory.

Properties

filename

Type:Types/FileName

priority

Type:Types/string

Possible values:

  • extra-high
  • high
  • medium
  • low
  • very low

width

Type: Types/unsigned

Width of the picture in pixels.

height

Type: Types/unsigned

Height of the picture in pixels

x

Type: Types/unsigned Default: 0 Horizontal position of the picture in the source file in pixels.

y

Type: [[Types/unsigned]

Default: 0

Horizontal position of the picture in the source file in pixels.

shift

Type: Types/Vector

Default: 0

scale

Type: Types/double

Default: 1

Values different than 1 specify the scale of the picture on default zoom. Scale 2 means that the picture will be 2 times bigger on screen (and more pixelated).

Example

   picture =
   {
     filename = "__base__/graphics/entity/basic-accumulator/basic-accumulator.png",
     priority = "extra-high",
     width = 124,
     height = 103,
     shift = {0.7, -0.2}
   }