Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Talk Page: Achievement Templates #36

Open
2 tasks
Tsearo opened this issue Dec 30, 2019 · 3 comments
Open
2 tasks

Talk Page: Achievement Templates #36

Tsearo opened this issue Dec 30, 2019 · 3 comments

Comments

@Tsearo
Copy link

Tsearo commented Dec 30, 2019

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?

@meleu
Copy link
Contributor

meleu commented Dec 31, 2019

Collected 100% of Something

  • I think using bits brings an unnecessary complexity for the template. Could you find a way to use the new features without such a specific mem-size?
  • For the Real Example using bit-sized addresses looks good 👍

Conditional Resets

  • A template using AndNext would be cool. However, it just occurred to me that those names in the right column should be more accurate. Something Like this:
ID Special? Type Memory Cmp Type Mem/Val
1 AndNext Mem 0xLEVEL = Value LEVELID
2 AndNext Mem 0xX-COORDS > Value X-UPPER-LIMIT
3 AndNext Mem 0xX-COORDS < Value X-LOWER-LIMIT
4 AndNext Mem 0xY-COORDS > Value Y-UPPER-LIMIT
5 ResetIf Mem 0xY-COORDS < Value Y-LOWER-LIMIT

How to edit the wiki/docs

Can I just make these sort of edits myself or is it better to post suggestions here to discuss further before making changes?

Simple changes can be made with no discussion. But for "educational" contents (like the ones we're talking about here), it's better to discuss with others first (specially with the code-reviewer team).

@Tsearo
Copy link
Author

Tsearo commented Dec 31, 2019

Thanks meleu that makes sense I'll keep posting any suggestions here in the issue tracker then to make sure that we provide the best content for learning.

I agree that the more accurate Mem/Val descriptions for the conditional reset example would be much better there.

For the 100% template I'm not sure how to make a generic one for any mem size so this template is just specific for using individual bits in a way that prevent you from needing to use potentially many Alt Groups.

Since games handle items differently I figured adding this type couldn't hurt since currently we only have the template for when you are checking one value. I'm not sure if there is a generic template that could be made but I'll keep it in mind and see if I can come up with a better one.

@meleu
Copy link
Contributor

meleu commented Dec 31, 2019

I'm starting to realize that maybe it's better to split each template on their own page. I'll try it over the next week and see how it looks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants