docs icon indicating copy to clipboard operation
docs copied to clipboard

Talk Page: Achievement Templates

Open Tsearo opened this issue 6 years ago • 3 comments

I see a few of Achievement Templates that I feel can either use more examples or can be updated to include some new features that have been added since they were made.

  • [ ] Collected 100% of Something -
  • Add new template for when items are stored in different addresses or bits and you are checking for all of them to be obtained (Ex. get all SubTanks in Mega Man)

Example to check if the last item of X items is collected and the items are stored in bits.

ID Flag Type Size Memory Cmp Type Mem/Val Hits
1 Mem BitX1 0xItemX1 = Value 1
2 Mem BitX2 0xItemX2 = Value 1
3 Mem BitX3 0xItemX3 = Value 1
4 AddSource Delta BitX1 0xItemX1
5 AddSource Delta BitX2 0xItemX2
6 Delta BitX3 0xItemX3 = Value XItemsTotal - 1
7 Mem Size 0xPlayerState = Value Valid player state for collecting items

Requirements *Assuming that 0xItemX bits are 1 when obtained and 0 when not and that multiple items can nob be obtained in the same frame.

  • 1-3: Each of the items are currently obtained
  • 4-7: Any one of the items were not collected on the previous frame (Adding all Delta values adds up to number of items - 1)

Using this method the achievement will trigger when all ItemX's are currently obtained and the previous frame any one of them was not collected.

Real Example CollectAllX

Condition 1 - Difficulty is Normal or higher Conditions 2-6 - All 5 shoes are currently collected Conditions 7-11 - Previous frame any of 4 shoes were collected

*Conditions 2-6 Alternative - Alternatively you can write these conditions with AddSource the way it is used in conditions 7-11 but using value = 5 instead of 4. However you won't be able to debug which specific conditions are currently true/false and if you check a large number of conditions this can be problematic (Ex. out of all the 100+ treasure chests in a game which one is not getting triggered properly)

  • [ ] Conditional Resets -

  • Remove ALT2 from example (not needed)

  • Add an example using AndNext for a conditional reset.


Alternative ALT1 (Using AndNext)

ID Special? Type Memory Cmp Type Mem/Val
1 AndNext Mem 0xLEVEL = Value LEVELID
2 AndNext Mem 0xX-COORDS > Value RESET-X-ZONE
3 AndNext Mem 0xX-COORDS < Value RESET-X-ZONE
4 AndNext Mem 0xY-COORDS > Value RESET-Y-ZONE
5 ResetIf Mem 0xY-COORDS < Value RESET-Y-ZONE
  • The reset will only happen if all 5 of the conditions are true

Also I was suggested to use the issue tracker for suggestions but also told that any edits to pages are reviewed beforehand so I'm not sure was the best way to go about making suggestions would be since I plan to do more. Can I just make these sort of edits myself or is it better to post suggestions here to discuss further before making changes?

Tsearo avatar Dec 30 '19 18:12 Tsearo