Methods & Functions

Overview

The different methods and functions available within the system

Achievements

  1. GetAchievement (int id)

    • Retrieves an achievement by its ID. Returns null if not found.

  2. GetAchievement (string nameOfAchievement)

    • Retrieves an achievement by its name. Returns null if not found.

  3. AddValueToAchievement (int id, int amount)

    • Increments the progress value of a numerical achievement by a specified amount.

  4. AddValueToAchievement (string achievementName, int amount)

    • Increments the progress value of a numerical achievement by a specified amount using achievement's name.

  5. UnlockSecretAchievement (string nameOfAchievement)

    • Unlocks a secret achievement by its name.

  6. UnlockSecretAchievement (int id)

    • Unlocks a secret achievement by its ID.

  7. CheckForCompletion (Achievement achievement)

    • Checks if an achievement's progress meets its completion criteria.

  8. GiveAchievement (Achievement achievement)

    • Marks an achievement as completed and triggers related events.

  9. GiveAchievement (int id)

    • Marks an achievement as completed by its ID.

  10. GiveAchievement (string nameOfAchievement)

    • Marks an achievement as completed by its name.

  11. RemoveAchievement (Achievement achievement, bool resetTotalValue)

    • Resets an achievement's completion status and optionally its progress value.

  12. LoadAchievementFile (bool demo)

    • Loads achievements from a JSON file. If no file exists, loads demo data.

  13. SaveAchievementFile (List<Achievement> achievementList)

    • Saves the current state of achievements to a JSON file.

Stats

  1. ActivateAllStatTimeSpanRoutines

    • Starts tracking time for all stats marked as TimeSpan and set to be tracked.

  2. EnableSingleStatTimeSpanRoutine (string NameOfStat)

    • Activates time tracking for a single stat identified by its name.

  3. EnableSingleStatTimeSpanRoutine (int id)

    • Activates time tracking for a single stat identified by its ID.

  4. StopAllStatTimeSpanRoutines

    • Stops time tracking for all stats and clears the coroutine references.

  5. StopSingleStatTimeSpanRoutine (int id)

    • Stops time tracking for a single stat identified by its ID.

  6. StopSingleStatTimeSpanRoutine (string NameOfStat)

    • Stops time tracking for a single stat identified by its name.

  7. TrackStatTimespan

    • Coroutine that tracks time for a stat and handles autosave if enabled.

  8. GetStat (int id)

    • Retrieves a stat by its ID. Returns null if not found.

  9. GetStat (string nameOfStat)

    • Retrieves a stat by its name. Returns null if not found.

  10. ReturnStatCurrentValue (string statName)

    • Returns the current value of a stat identified by its name.

  11. ReturnStatCurrentValue (int statId)

    • Returns the current value of a stat identified by its ID.

  12. IncrementStat (string statName, float amount)

    • Increments the value of a numerical stat by a specified amount using its name.

  13. IncrementStat (int statId, float amount)

    • Increments the value of a numerical stat by a specified amount using its ID.

  14. DecreaseStat (string statName, float amount)

    • Decreases the value of a numerical stat by a specified amount using its name.

  15. DecreaseStat (int statId, float amount)

    • Decreases the value of a numerical stat by a specified amount using its ID.

  16. SetStatToValue (string statName, float amount)

    • Sets the value of a numerical stat to a specified amount using its name.

  17. SetStatToValue (int statId, float amount)

    • Sets the value of a numerical stat to a specified amount using its ID.

  18. ResetAllStats

    • Resets the value of all stats to zero.

  19. LoadStats

    • Loads stat data from a JSON file.

  20. SaveStats

    • Saves the current state of stats to a JSON file.

Last updated