Using Add Source and Deltas for Collectables and Similar Achievements
In these examples are a couple simple ways one can utilize the Add Source flag in their achievement logic.
0x1b8244: bit0-bit4 are treasures in Soniere, bit5 is a treasure at the Northern Checkpoint, and bit6-bit7 are treasures at the Dragon Den.
0x1b8245: bit0 is a treasure at the Dragon Den, bit1-bit5 are treasures at Seek Valley, and bit6-7 are treasures in Kalekka.
0x1b824b: bit0-bit1 are treasures at the Village of the Hidden Rune, bit2 is unused, bit3-4 are treasures at the Dragon Knights' Fortress, bit5-6 are treasures in Teien, and bit7 is a treasure at Luiken's House.
This particular achievement only requires treasures from Dragon Knights' Fortress, Dragon Den, and Seek Valley; therefore, we only need bit6-7 from
0x1b8244, bit0-bit5 from
0x1b8245, and bit3-bit4 from
- There are two groups of ten conditions with the main differences being the Delta type and the total. This is to ensure that the player goes from nine of these treasures obtained to having all ten of these treasures obtained. Note: Remember to use hexadecimal for Add Source totals!
- Since we're using bitflags here, the totals for individual conditions will only ever be 0x00 or 0x01. Obviously, we want them all to be 0x01 for the trigger, but we don't want someone to get the achievement simply by loading a save with all ten treasures already found.
- The trigger is the first frame that the player goes from nine to ten treasures obtained. This is to help prevent the achievement from triggering when it's not supposed to.
- The Measured flag is on the last condition so the player can check how far they are from their goal. If they have eight out of ten treasures, the achievement will show that it is 80% complete in the overlay (RAEmus) or achievement menu (RetroArch).
This method is mostly handy for when the totals between the Delta-type and Mem-type only have a difference of 0x01, but it can be used in various types of achievements: collectables that are only obtainable one-at-a-time, map completion (such as dungeon-crawlers with viewable maps that get revealed as you enter new areas), learnable skills, completing a certain number of side missions, and many others.
Last 10 changes on this page:
[2021-01-19 15:05] meleu:markdown fix
[2021-01-19 14:19] meleu:leftover
[2021-01-10 08:38] televandalist:Wording changes
[2021-01-10 08:31] televandalist:Updated Using Add Source and Deltas for Collectables or Similar Achievements (markdown)
[2020-12-25 02:13] televandalist:Started an Add Source page for Real Examples. Going to finish it later.