Adding Custom Achievements (1.33.0 and newer) - JordanSantiagoYT/FNF-JS-Engine GitHub Wiki
To add custom achievements to JS Engine, Copy this text and paste it in YourModFolder/data/achievements.json
You can drop your achievement images in YourModFolder/images/achievements/, but be sure to read the readme file inside it if you extracted the Mod Template zip.
Here are all the LUA callbacks related to Achievements:
getAchievementScore(name:String)
Get the current score of an achievement.
name
- The save name of the achievement.
setAchievementScore(name:String, value:Float = 1, saveIfNotUnlocked:Bool = true)
Set the specified achievement's score.
value
- The achievement's new score.saveIfNotUnlocked
- Whether or not the game should save that score if the achievement isn't unlocked.
addAchievementScore(name:String, value:Float = 1, saveIfNotUnlocked:Bool = true)
Adds value
to the specified achievement's score.
unlockAchievement(name:String)
Unlocks the specified achievement.
isAchievementUnlocked(name:String)
Returns whether or not the specified achievement is unlocked.
achievementExists(name:String)
Returns whether or not the specified achievement exists.