Prototype/Achievement: Difference between revisions
mNo edit summary |
m (Protected "Prototype/Achievement": Migrated prototype doc to separate website ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= | '''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/AchievementPrototype.html https://lua-api.factorio.com/latest/prototypes/AchievementPrototype.html] | ||
This | |||
==Extensions== | This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums]. | ||
{{Prototype parent|PrototypeBase}} | |||
This prototype definition is used for the in-game achievements. | |||
{{Prototype TOC|achievement}} | |||
== Extensions == | |||
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement''' | *[[Prototype/BuildEntityAchievement]] '''build-entity-achievement''' | ||
*[[Prototype/ | *[[Prototype/CombatRobotCountAchievement]] '''combat-robot-count''' | ||
*[[Prototype/ConstructWithRobotsAchievement]] '''construct-with-robots-achievement''' | *[[Prototype/ConstructWithRobotsAchievement]] '''construct-with-robots-achievement''' | ||
*[[Prototype/DeconstructWithRobotsAchievement]] '''deconstruct-with-robots-achievement''' | *[[Prototype/DeconstructWithRobotsAchievement]] '''deconstruct-with-robots-achievement''' | ||
Line 18: | Line 27: | ||
*[[Prototype/ResearchAchievement]] '''research-achievement''' | *[[Prototype/ResearchAchievement]] '''research-achievement''' | ||
*[[Prototype/TrainPathAchievement]] '''train-path-achievement''' | *[[Prototype/TrainPathAchievement]] '''train-path-achievement''' | ||
==Mandatory | == Mandatory properties == | ||
Inherits all properties from [[ | Inherits all properties from [[PrototypeBase]]. | ||
{{Prototype property|icons, icon, icon_size (IconSpecification) |[[Types/IconSpecification|IconSpecification]]}} | |||
== Optional properties == | |||
{{Prototype property|steam_stats_name|[[Types/string|string]]|""|optional=true}} | |||
Unusable by mods, as this refers to unlocking the achievement through Steam. | |||
If this is false, the | {{Prototype property|allowed_without_fight |[[Types/bool|bool]]|true|optional=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. | |||
{{Prototype property|hidden |[[Types/bool|bool]]|false|optional=true}} | |||
==Example== | == Example == | ||
{ | <syntaxhighlight lang="lua">{ | ||
type = " | type = "achievement", | ||
name = " | name = "so-long-and-thanks-for-all-the-fish", | ||
order = " | 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 | |||
}</syntaxhighlight> | |||
icon = "__base__/graphics/achievement/ | |||
} |
Latest revision as of 09:27, 16 August 2023
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/AchievementPrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Prototype definitions » PrototypeBase » Prototype/Achievement
This prototype definition is used for the in-game achievements.
Prototype/Achievement — achievement | ||
icons, icon, icon_size (IconSpecification) | :: | IconSpecification |
allowed_without_fight | :: | bool (optional) |
hidden | :: | bool (optional) |
steam_stats_name | :: | string (optional) |
Inherited from PrototypeBase | ||
name | :: | string |
type | :: | string |
localised_description | :: | LocalisedString (optional) |
localised_name | :: | LocalisedString (optional) |
order | :: | Order (optional) |
Extensions
- Prototype/BuildEntityAchievement build-entity-achievement
- Prototype/CombatRobotCountAchievement combat-robot-count
- Prototype/ConstructWithRobotsAchievement construct-with-robots-achievement
- Prototype/DeconstructWithRobotsAchievement deconstruct-with-robots-achievement
- Prototype/DeliverByRobotsAchievement deliver-by-robots-achievement
- Prototype/DontBuildEntityAchievement dont-build-entity-achievement
- Prototype/DontCraftManuallyAchievement dont-craft-manually-achievement
- Prototype/DontUseEntityInEnergyProductionAchievement dont-use-entity-in-energy-production-achievement
- Prototype/FinishTheGameAchievement finish-the-game-achievement
- Prototype/GroupAttackAchievement group-attack-achievement
- Prototype/KillAchievement kill-achievement
- Prototype/PlayerDamagedAchievement player-damaged-achievement
- Prototype/ProduceAchievement produce-achievement
- Prototype/ProducePerHourAchievement produce-per-hour-achievement
- Prototype/ResearchAchievement research-achievement
- Prototype/TrainPathAchievement train-path-achievement
Mandatory properties
Inherits all properties from PrototypeBase.
icons, icon, icon_size (IconSpecification)
Type: IconSpecification
Optional properties
steam_stats_name
Type: string
Default: ""
Unusable by mods, as this refers to unlocking the achievement through Steam.
allowed_without_fight
Type: 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.
Type: bool
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
}