Prototype/Achievement: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(overhaul to include Prototype)
Line 1: Line 1:
==Basics==
==Basics==
This Prototype Definition is used for the in-game achievements.  
This Prototype Definition is used for the in-game achievements. Inherits all properties from [[Prototype]].
==Extensions==
==Extensions==
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
Line 19: Line 19:
*[[Prototype/TrainPathAchievement]] '''train-path-achievement'''
*[[Prototype/TrainPathAchievement]] '''train-path-achievement'''
==Mandatory Properties==
==Mandatory Properties==
=== type ===
'''Type''': [[Types/string]]
Specification of the [[Prototypes/EntityPrototypeTypes|type]] of the prototype.
Built-in Achievement types:
  "build-entity-achievement",
  "research-achievement",
  "finish-the-game-achievement",
  "group-attack-achievement",
  "construct-with-robots-achievement",
  "deconstruct-with-robots-achievement",
  "deliver-by-robots-achievement",
  "train-path-achievement",
  "player-damaged-achievement",
  "produce-achievement",
  "produce-per-hour-achievement",
  "dont-use-entity-in-energy-production-achievement",
  "kill-achievement",
  "combat-robot-count",
  "dont-craft-manually-achievement",
  "dont-build-entity-achievement",
  "achievement",
=== name ===
'''Type''': [[Types/string]]
Unique identification of the prototype.
=== icon ===
=== icon ===
'''Type''': [[Types/FileName]]
'''Type''': [[Types/FileName]]

Revision as of 12:47, 23 January 2018

Basics

This Prototype Definition is used for the in-game achievements. Inherits all properties from Prototype.

Extensions

Mandatory Properties

icon

Type: Types/FileName

steam_stats_name

Type: Types/string

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

General Optional Properties

Note: more achievement-specific types will be in their respective Prototype page.

until_second

Type: Types/unsigned

This lets the game know how long into a game, before you can no longer complete the achievement.

 until_second = 60 * 60 * 8, --8 hours. 60 being seconds, 60 being hours, and 8 being the amount of hours.

allowed_in_peaceful_mode

Type: Types/bool

If this is set to false, you cannot complete the achievement on the peaceful difficulty setting.

 allowed_in_peaceful_mode = true,

limited_to_one_game

Type: Types/bool

If this is false, the player carries over their statistics from this achievement, through all their saves.

 limited_to_one_game = false,

Example

 {
   type = "kill-achievement", --This is for the achievement "steamrolled".
   name = "steamrolled",
   order = "e[kill]-a[steamrolled]",
   type_to_kill = "unit-spawner",
   damage_type = "impact",
   in_vehicle = true,
   personally = true,
   amount = 10,
   steam_stats_name = "spawners-killed-by-impact",
   icon = "__base__/graphics/achievement/steamrolled.png"
 },