Uploaded image for project: 'Minecraft API'
  1. Minecraft API
  2. MCAPI-91

Achievement API - Add new achievements and modify existing ones



    • Type: New Feature
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Labels:


      Note that this is NOT a duplicate of MCAPI-58. I'm resubmitting this because my first attempt (MCAPI-72) was incorrectly closed as a duplicate of MCAPI-58, which is unrelated.

      Proposed Addition:

      Developers should be able to create new achievements and modify existing ones.

      Specific Features:

      • A way to uniquely identify achievements, including existing ones (e.g. with a unique name).
      • Create a new achievement.
      • Look up up an achievement by its unique identifier.
      • Specify the localized title and icon to use on the achievement map.
        • The current implementation limits the icons to game items, but that's too restrictive. Any icon should be allowed.
      • Specify the localized description which appears when you hover over the icon on the achievement map.
      • Specify the localized message to be displayed when the user gets the achievement.
      • Specify a parent achievement.
        • Multiple parents would be nice but would likely make the map more confusing and significantly harder to implement, so a single parent will suffice.
        • Optional: Change the parent of an existing achievement. This would allow developers to add an intermediate achievement between two existing ones.
      • Trigger an achievement.
      • Query the current status of an achievement (gotten/not gotten).
      • Register callbacks to be run when an achievement is about to be granted
        • The callback should be able to cancel the achievement, thereby allowing mods to change the requirements for existing achievements.
      • Register callbacks to be run whenever a new achievement is registered or deregistered.
        • This is to allow mods to handle dependencies on other mods.
      • Remove & restore existing achievements, with the option to recursively apply the remove/restore to its dependents.
        • If dependents are not removed then they should be automatically rewired to the removed achievement's parent.

      Justification and Use Case:

      For many players part of the fun of Minecraft is discovering how to build new items. The Achievement Map is essential to this process as it provides just enough guidance to keep the user from flailing about, but without the spoiler effect of the wiki. Developers could use an Achievement API both to make it easier for new users to discover Minecraft's existing crafting tree, as well as provide guidance for discovering any new items their own mods might add to the game.

      As an example use case, virtually no one discovers the recipe for powered rail for themselves, because using a soft metal like gold for track goes against our real-world experience. They either read about it in the wiki or get the recipe from someone else, which detracts from the joy of discovery. To make independent discovery of powered rail more likely, a mod could add an achievement for it with the icon and description supplying just enough hints to get the user pointed in the right direction.

      To make the discovery process even more intuitive, a second mod might introduce an intermediate rail made of gold which is unpowered but better in some way (e.g. less friction). They could then insert an achievement for gold rail in between the standard "On A Track" achievement, and the powered rail achievement supplied by the first mod.

      Challenges Faced:

      The achievement map will have to position the achievements dynamically. Currently each Achievement object provides explicit, hard-coded coordinates for the map, but that won't work for mods since two different mods might choose overlapping locations. That also means that the routing algorithm for the prerequisite lines will likely have to become more sophisticated, though if we stick with just one prerequisite per achievement, it shouldn't be too hairy.


          Issue Links



              • Assignee:
                mayaknife Dean Edmonds
              • Votes:
                10 Vote for this issue
                1 Start watching this issue


                • Created: