Prototype/Achievement: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(overhaul to include Prototype)
(Removed old prototype docs)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Basics==
<div class="stub"><p>'''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 Prototype Definition is used for the in-game achievements. Inherits all properties from [[Prototype]].
==Extensions==
*[[Prototype/BuildEntityAchievement]] '''build-entity-achievement'''
*[[Prototype/CombatRobotCount]] '''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==
=== icon ===
'''Type''': [[Types/FileName]]


===steam_stats_name===
</p><p>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].</p></div>
'''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 "[[achievements|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"
  },

Latest revision as of 14:32, 25 October 2024

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.