Factorio Prototype DocsVersion 1.1.107

AchievementPrototype - 'achievement' Example code

This prototype definition is used for the in-game achievements.

Inherits from PrototypeBase
Children

Properties

icons optional :: array[IconData]

Can't be an empty array.

Can't be an empty array.

icon optional :: FileName

Path to the icon file. [...]

Path to the icon file. [...]

icon_size optional :: SpriteSizeType

The size of the square icon, in pixels. [...]

The size of the square icon, in pixels. [...]

icon_mipmaps optional :: IconMipMapType

Icons of reduced size will be used at decreased scale.

Icons of reduced size will be used at decreased scale.

steam_stats_name optional :: string

Unusable by mods, as this refers to unlocking the achievement through Steam.

Unusable by mods, as this refers to unlocking the achievement through Steam.

allowed_without_fight optional :: bool

If this is set to false, it is not possible to complete the achievement on the peaceful difficulty setting or when the enemy base generation settings have been changed.

If this is set to false, it is not possible to complete the achievement on the peaceful difficulty setting or when the enemy base generation settings have been changed.

hidden optional :: bool

Inherited from PrototypeBase
type :: string

Specifies the kind of prototype this is. [...]

Specifies the kind of prototype this is. [...]

name :: string

Unique textual identification of the prototype. [...]

Unique textual identification of the prototype. [...]

order optional :: Order

Used to order prototypes in inventory, recipes and GUIs. [...]

Used to order prototypes in inventory, recipes and GUIs. [...]

localised_name optional :: LocalisedString

Overwrites the name set in the locale file. [...]

Overwrites the name set in the locale file. [...]

localised_description optional :: LocalisedString

Overwrites the description set in the locale file. [...]

Overwrites the description set in the locale file. [...]

Properties

icons :: array[IconData] optional

Can't be an empty array.

icon :: FileName optional

Path to the icon file.

Mandatory if icons is not defined.

icon_size :: SpriteSizeType optional

The size of the square icon, in pixels. E.g. 32 for a 32px by 32px icon.

Mandatory if icons is not defined, or if icon_size is not specified for all instances of icons.

icon_mipmaps :: IconMipMapType optional

Default: 0

Icons of reduced size will be used at decreased scale.

steam_stats_name :: string optional

Default: ""

Unusable by mods, as this refers to unlocking the achievement through Steam.

allowed_without_fight :: bool optional

Default: true

If this is set to false, it is not possible to complete the achievement on the peaceful difficulty setting or when the enemy base generation settings have been changed.

hidden :: bool optional

Default: false

Example

{
  type = "achievement",
  name = "so-long-and-thanks-for-all-the-fish",
  order = "g[secret]-a[so-long-and-thanks-for-all-the-fish]",
  icon = "__base__/graphics/achievement/so-long-and-thanks-for-all-the-fish.png",
  icon_size = 128
}

Prototypes

Types