SMODS.Achievement#
Required parameters:
key,loc_txtor localization entry (reference)Rather than a
texttable,loc_txtshould contain adescriptiontable. When using localization files, the name should be placed inmisc.achievement_names[key], the description should be placed inmisc.achievement_descriptions[key].
Optional parameters (defaults):
prefix_config, dependencies(reference)atlas = 'Joker', pos = { x = 1, y = 0 }, hidden_pos = { x = 0, y = 0 }(reference)posis used when the achievement has been earned,hidden_posif it has not been earned.
earned: Achievement is considered “earned”. Achievement will stay earned on loaded profiles unlessreset_on_startupis truereset_on_startup: Unearns the achievement if already earned when the profile is loadedbypass_all_unlocked = false: Sets if the achievement can be earned on profiles that pressed the “Unlock All” buttonhidden_name = true: Hides the name of the achievement if not earnedhidden_text: Hides the description of the achievement if not earned
API methods#
unlock_condition(self, args) -> boolRuns every time
check_for_unlockis called. Returns true if the achievement should be earned.