Prototype/Achievement: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Set prototype parent)
(Converted to SMW format)
Line 1: Line 1:
{{Prototype parent|PrototypeBase}}
{{Prototype parent|PrototypeBase}}
This prototype definition is used for the in-game achievements.


== Basics ==
{{Prototype TOC|achievement}}
Prototype type: '''achievement'''


This Prototype definition is used for the in-game achievements.
== Extensions ==
== Extensions ==
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
Line 25: Line 24:
Inherits all properties from [[PrototypeBase]].
Inherits all properties from [[PrototypeBase]].


=== icons, icon, icon_size (IconSpecification) ===
{{Prototype property|icons, icon, icon_size (IconSpecification) |[[Types/IconSpecification|IconSpecification]]}}
'''Type''': [[Types/IconSpecification]]
 
== Optional properties ==
== Optional properties ==


===steam_stats_name===
{{Prototype property|steam_stats_name|[[Types/string|string]]|""|optional=true}}
'''Type''': [[Types/string]]
 
'''Default''': ""
 
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 ===
{{Prototype property|allowed_without_fight |[[Types/bool|bool]]|true|optional=true}}
'''Type''': [[Types/bool]]
 
'''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.
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 ===
{{Prototype property|hidden |[[Types/bool|bool]]|false|optional=true}}
'''Type''': [[Types/bool]]
 
'''Default''': false


==Example==
== Example ==


   <syntaxhighlight lang="lua">{
   <syntaxhighlight lang="lua">{

Revision as of 16:17, 26 July 2019

Template:Prototype parent This prototype definition is used for the in-game achievements.

Template:Prototype TOC

Extensions

Mandatory properties

Inherits all properties from PrototypeBase.

Template:Prototype property

Optional properties

Template:Prototype property Unusable by mods, as this refers to unlocking the achievement through Steam.

Template:Prototype property 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.

Template:Prototype property

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
  }