Pixel Dungeon

Pixel Dungeon

Not enough ratings
Shopaholic Achievement Workaround
By somethingSTRANGE
At this time, the Shopaholic achievement cannot be unlocked through normal gameplay due to a bug in the game. This guide provides information on how you can work around the issue to unlock the achievement in-game.
   
Award
Favorite
Favorited
Unfavorite
📜 Introduction
I believe I've identified the actual bug in the code and found a workaround to unlock the Shopaholic achievement in-game by editing a saved data file.

Skip to the next section if you don't care about the bug details.

I decompiled the game's source code to see how the Shopaholic badge unlocking worked, and it looks like the game calls the validateAllBagsBought function whenever any bag is collected (picked up from ground or purchased). That function first calls validateLocal to see if the collected bag is a "Seed Pouch", "Scroll Holder", or "Wand Holster". If so, it then calls validateAndDisplayAllGlobal to unlock the ALL_BAGS_BOUGHT badge if the internal/hidden "BAG_BOUGHT_SEED_POUCH", "BAG_BOUGHT_SCROLL_HOLDER", and "BAG_BOUGHT_WAND_HOLSTER" badges have been unlocked in the global badge list. That seems to be where the problem lies.

While I have confirmed that the internal "BAG_BOUGHT_SEED_POUCH", "BAG_BOUGHT_SCROLL_HOLDER", and "BAG_BOUGHT_WAND_HOLSTER" badges are awarded to the player when the associated items are collected, the badges are only stored in the current game session save file, not the global badge list stored in the badges.dat file. Since the test seems to ignore the local session badge list and only checks the global badge list, the ALL_BAGS_BOUGHT badge and associated Steam achievement will never be unlocked.
💡 The Workaround
After purchasing a Seed Pouch in a recent session, I dropped it on the ground and exited the game.

I then edited my global badges.dat file and added the three internal badge IDs mentioned above to the list of unlocked badges. The data file is encrypted, so I had to decrypt it before making changes and then encrypt it again afterward.

Once the changes were saved, I reloaded the game and simply picked up the Seed Pouch from the ground. The "Shopaholic" badge and Steam achievement successfully unlocked.



👣 Steps to Reproduce
  1. Locate your badge.dat file.

    The location is OS-specific.
    • Windows: "C:\Users\<username>\Saved Games\badges.dat"
    • Mac: "~/Library/Application Support/Pixel Dungeon/badges.dat"
    • Linux: "~/.watabou/pixel-dungeon/badges.dat"

  2. Open the file in a text editor, such as Notepad or Sublime Text.

  3. Copy its contents to a data decryptor (Fiddle[jsfiddle.net]).

  4. Edit the json "badges" array and add "BAG_BOUGHT_SEED_POUCH", "BAG_BOUGHT_SCROLL_HOLDER", and "BAG_BOUGHT_WAND_HOLSTER" to the end.

    The data file needs to be in a valid JSON format, otherwise the file will fail to load in the game, so make sure each array element ends with a COMMA except for the last element.

    For example, once decrypted, the original file might look like this (yours will likely be much longer if you've been playing for a while):
    {"badges":["DEATH_FROM_GAS","GAMES_PLAYED_3","GOLD_COLLECTED_1","MONSTERS_SLAIN_1"]}

    Add the following to the end of the list, before the ending "]}" ...
    ,"BAG_BOUGHT_SEED_POUCH","BAG_BOUGHT_SCROLL_HOLDER","BAG_BOUGHT_WAND_HOLSTER"

    ... and you'll end up with this:
    {"badges":["DEATH_FROM_GAS","GAMES_PLAYED_3","GOLD_COLLECTED_1","MONSTERS_SLAIN_1","BAG_BOUGHT_SEED_POUCH","BAG_BOUGHT_SCROLL_HOLDER","BAG_BOUGHT_WAND_HOLSTER"]}

  5. Copy the modified text and re-encrypt it using the same fiddle used to decrypt the data.

  6. Copy the encrypted data over the contents of your badges.dat file and save it.

  7. Play the game. If you already own one of those three bags, the achievement may immediately unlock. If not, drop and pickup (or purchase) one to trigger the event.
🐷 That's all folks!
I hope this helps. Enjoy!





3 Comments
Да поебать мне 2 Mar @ 3:43am 
Really worked. Got achievment after buying seed pouch.
BlackLight78 11 Feb, 2024 @ 10:13am 
Wow, just wow! This works! As a thanks for this workaround, have a few awards! :woodlehappy:
Sostin 10 Nov, 2023 @ 3:17pm 
Thanks for the guide!