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

# Factorio Prototype Docs Version 2.0.77

# AchievementPrototype - Prototype Docs

## AchievementPrototype 'achievement' Example code

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

Inherits from Prototype « PrototypeBase
Children AchievementPrototypeWithCondition - abstract CompleteObjectiveAchievementPrototype - 'complete-objective-achievement' DontBuildEntityAchievementPrototype - 'dont-build-entity-achievement' DontCraftManuallyAchievementPrototype - 'dont-craft-manually-achievement' DontKillManuallyAchievementPrototype - 'dont-kill-manually-achievement' DontResearchBeforeResearchingAchievementPrototype - 'dont-research-before-researching-achievement' DontUseEntityInEnergyProductionAchievementPrototype - 'dont-use-entity-in-energy-production-achievement' BuildEntityAchievementPrototype - 'build-entity-achievement' ChangedSurfaceAchievementPrototype - 'change-surface-achievement' CombatRobotCountAchievementPrototype - 'combat-robot-count-achievement' ConstructWithRobotsAchievementPrototype - 'construct-with-robots-achievement' CreatePlatformAchievementPrototype - 'create-platform-achievement' DeconstructWithRobotsAchievementPrototype - 'deconstruct-with-robots-achievement' DeliverByRobotsAchievementPrototype - 'deliver-by-robots-achievement' DepleteResourceAchievementPrototype - 'deplete-resource-achievement' DestroyCliffAchievementPrototype - 'destroy-cliff-achievement' EquipArmorAchievementPrototype - 'equip-armor-achievement' GroupAttackAchievementPrototype - 'group-attack-achievement' KillAchievementPrototype - 'kill-achievement' ModuleTransferAchievementPrototype - 'module-transfer-achievement' PlaceEquipmentAchievementPrototype - 'place-equipment-achievement' PlayerDamagedAchievementPrototype - 'player-damaged-achievement' ProduceAchievementPrototype - 'produce-achievement' ProducePerHourAchievementPrototype - 'produce-per-hour-achievement' ResearchAchievementPrototype - 'research-achievement' ResearchWithSciencePackAchievementPrototype - 'research-with-science-pack-achievement' ShootAchievementPrototype - 'shoot-achievement' SpaceConnectionDistanceTraveledAchievementPrototype - 'space-connection-distance-traveled-achievement' TrainPathAchievementPrototype - 'train-path-achievement' UseEntityInEnergyProductionAchievementPrototype - 'use-entity-in-energy-production-achievement' UseItemAchievementPrototype - 'use-item-achievement'

## Properties

- default
- sorted

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. [...]
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 | :: boolean | 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.

Inherited from Prototype

factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...]
The ID type corresponding to the prototype that inherits from this. [...]
custom_tooltip_fields optional | :: array[CustomTooltipField] | Allows to add extra description items to the tooltip and Factoriopedia.
Allows to add extra description items to the tooltip and Factoriopedia.

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. [...]
factoriopedia_description optional | :: LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup.
The name of an ItemSubGroup.
hidden optional | :: boolean |
hidden_in_factoriopedia optional | :: boolean |
parameter optional | :: boolean | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
factoriopedia_simulation optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI.
The simulation shown when looking at this prototype in the Factoriopedia GUI.

allowed_without_fight optional | :: boolean | 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.
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. [...]
icons optional | :: array[IconData] | Can't be an empty array.
Can't be an empty array.
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.

Inherited from Prototype

custom_tooltip_fields optional | :: array[CustomTooltipField] | Allows to add extra description items to the tooltip and Factoriopedia.
Allows to add extra description items to the tooltip and Factoriopedia.
factoriopedia_alternative optional | :: string | The ID type corresponding to the prototype that inherits from this. [...]
The ID type corresponding to the prototype that inherits from this. [...]

Inherited from PrototypeBase

name | :: string | Unique textual identification of the prototype. [...]
Unique textual identification of the prototype. [...]
type | :: string | Specifies the kind of prototype this is. [...]
Specifies the kind of prototype this is. [...]
factoriopedia_description optional | :: LocalisedString | Provides additional description used in factoriopedia.
Provides additional description used in factoriopedia.
factoriopedia_simulation optional | :: SimulationDefinition | The simulation shown when looking at this prototype in the Factoriopedia GUI.
The simulation shown when looking at this prototype in the Factoriopedia GUI.
hidden optional | :: boolean |
hidden_in_factoriopedia optional | :: boolean |
localised_description optional | :: LocalisedString | Overwrites the description set in the locale file. [...]
Overwrites the description set in the locale file. [...]
localised_name optional | :: LocalisedString | Overwrites the name set in the locale file. [...]
Overwrites the name set in the locale file. [...]
order optional | :: Order | Used to order prototypes in inventory, recipes and GUIs. [...]
Used to order prototypes in inventory, recipes and GUIs. [...]
parameter optional | :: boolean | Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.
subgroup optional | :: ItemSubGroupID | The name of an ItemSubGroup.
The name of an ItemSubGroup.

## Properties

### icons :: array[IconData] optional

Can't be an empty array.

### icon :: FileName optional

Path to the icon file.

Only loaded, and mandatory if `icons` is not defined.

### icon_size :: SpriteSizeType optional

Default: `64`

The size of the square icon, in pixels. E.g. `32` for a 32px by 32px icon. Must be larger than `0`.

The base game uses 128px icons for achievements.

Only loaded if `icons` is not defined.

### steam_stats_name :: string optional

Default: `""`

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

### allowed_without_fight :: boolean 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.

## 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
    }