dakkhuza-AchievementLoader icon

AchievementLoader

A loader of sorts of the achievement variety

Last updated 3 weeks ago
Total downloads 3328
Total rating 6 
Dependency string dakkhuza-AchievementLoader-2.1.1
Dependants 1 other mod depends on this mod

This mod requires the following mods to function

bbepis-BepInExPack-3.2.0 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 3.2.0
README

Riks of Rain 2 Achievement Loader

A loader of sorts of the achievement variety

IMPORTANT

To the EXTENT OF MY KNOWLEDGE this don't corrupt save files when uninstalled.

HOWEVER

You should ALWAYS be safe and BACK UP YOUR SAVES!!

It's better to be safe than sorry!

Installing

Download then drag and drop the "plugins" folder into your bepinex folder

You'll know it's working if you see this in the output console
Image of it working correctly

How to make a Custom Achievement

To make a custom achievement just follow these simple steps.

  1. Add "AchievementLoader" as a dependency to your project
  2. Add a class to your plugin that inherits from BaseAchievement
  3. Decorate your class with the [RegisterAchievement] attribute
  4. Override OnInstall and OnUninstall with whatever you need to check for your challenge
  5. Call Grant() when the criteria is met
  6. (Optionable) If you don't do these, the challenge will still work but text related to it will be broken and it won't unlock anything when completed
  7. Decorate your achievement class with a [CustomUnlockable] attribute
  8. Add tokens to the language file for your challenge in the format ACHIEVEMENT_NAMEINCAPS_NAME and ACHIEVEMENT_NAMEINCAPS_DESCRIPTION
    * The AssetPlus api makes this easy

Here's an example of what a valid achievement class looks like

  [CustomUnlockable("Example.Example", "ACHIEVEMENT_EXAMPLEACHIEVEMENT_DESCRIPTION")]
  [RegisterAchievement("ExampleAchievement", "Example.Example", null, null)]
  public class ExampleAchievement : BaseAchievement
  {
      public override void OnInstall()
      {
          base.OnInstall();
          RoR2Application.onUpdate += AutoGrant;
      }

      public override void OnUninstall()
      {
          base.OnUninstall();
          RoR2Application.onUpdate -= AutoGrant;
      }

      public void AutoGrant()
      {
          Grant();
      }
  }

For more details check out the (WIP) wiki

Contact

Any comments, question or concerns please send my way @ Dak#0001 on the modding discord.

Changelog

View it here

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Thanks

  • I'd like to thank the Harmony devs for writing good docs that don't make me want to commit unalive

Available versions

Please note that the install buttons only work if you have compatible client software installed. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2020-6-10 2.1.1 2435 dakkhuza-AchievementLoader-2.1.1.zip Install
2020-5-7 2.1.0 647 dakkhuza-AchievementLoader-2.1.0.zip Install
2020-4-11 2.0.0 179 dakkhuza-AchievementLoader-2.0.0.zip Install
2020-4-10 1.0.0 67 dakkhuza-AchievementLoader-1.0.0.zip Install