Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds documentation for Remember and Recall #16

Merged
merged 12 commits into from
Jun 4, 2024

Conversation

redwizard42
Copy link
Contributor

Adds documentation on these upcoming features.

Copy link
Member

@wescopeland wescopeland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Not sure if it's worth anyone else weighing in. Should this be published now or when the feature ships?

@redwizard42
Copy link
Contributor Author

LGTM. Not sure if it's worth anyone else weighing in. Should this be published now or when the feature ships?

I don't think there is harm in publishing now, as it includes a note about when they will be available. A benefit would be that if/when a beta is put out (unknown to me if/when this would happen), the documentation will exist for anyone wanting to use it.

@wescopeland
Copy link
Member

wescopeland commented Jun 3, 2024

Recommend adding a title and description for the new pages. This isn't in the contributing docs so I'll swoop around and get that added later today. eg:

---
title: Understanding and Using AddAddress
description: Learn how to effectively use the AddAddress flag to modify memory addresses for conditions, understand pointer types, calculate offsets, and chain pointers for advanced achievement creation.
---

I added a bunch of these to various pages last night (should be on all Flags pages now). This is what appears on Discord embeds and Google search results for the title & description. Description should shoot for <220 characters.

Copy link
Member

@Jamiras Jamiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted a few simple typos that should be corrected, but overall it looks great. I'm very happy that you put in detailed examples of how the logic interacts with PauseIf.

| -- | --------- | ----- | ------ | ------ | --- | ----- | ------ | ------- | ----- |
| 1 | Remember | Mem | 16-bit | 0x1234 | - | Delta | 16-Bit | 0x1224 | |

The Remember condition can optionally take two operand and process a value based on an operator such as multiplication, division, addition, subtraction, and others. In this example, we used the subtraction operator to store the equivalent value as in the first example, but we do it in a single line.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two operand s

| ID | Flag | Type | Size | Memory | Cmp | Type | Size | Mem/Val | Hits |
| -- | --------- | ------ | ------ | ------ | --- | ----- | ------ | ---------- | ----- |
| 1 | Remember | Mem | 16-bit | 0x1234 | - | Delta | 16-Bit | 0x1224 | |
| 2 | Pause If | Recall | | | >= | Value | | 0x8000000 | 1 (0) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing a 0 on 0x80000000

| 2 | AddAddress | Mem | 32-bit | 0x1234 | + | Recall | | | |
| 3 | | Mem | 16-bit | 0x08 | > | Value | | 0x00 | |

In this example, let's say you have an address that points to a table of data, but in order to know where in the table you want to go, you have to calculate the offset from another source. `0x1234` will be used as the pointer to the table of data. `0x0789` will be the index in the table. The size of data for table entries is `0x60` bytes. And finally, the data we care about is `0x08` bytes into the data's structure Perhaps this is "Player Health" and the index we are calculating is the index in the table where the "Player Data" exists and we need to check if this value is greater than 0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing period between "structure" and "Perhaps"

Examples of how it can be used:

- Recall a calculated value for multiple uses in logic.
- Continuous operation on remembered values to perform maore complicated math than `Add Source` and `Sub Source` can accomplish.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"more" is misspelled.

@redwizard42
Copy link
Contributor Author

Noted a few simple typos that should be corrected, but overall it looks great. I'm very happy that you put in detailed examples of how the logic interacts with PauseIf.

One of those things that I knew would trip people up sooner or later.

Corrected typos.

@redwizard42
Copy link
Contributor Author

Misunderstanding came up about the lifetime of a remembered value, so I added some additional clarification and also fixed more typos I found as I read through it another two times. I'd like to think this is the final draft.

Copy link
Contributor

@falsepopsky falsepopsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use the custom container WARNING, for recall and remember


# `Remember`

_This feature will be available at the RA_Integration version 1.4 milestone for developers, with support to be added for rcheevos version 11.4 milestone._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is available in a specific version, it's better to highlight it in a custom block.

reference: Custom Containers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatted with @redwizard42 , will be addressed in a follow-up PR.


# `Recall`

_This feature will be available at the RA_Integration version 1.4 milestone for developers, with support to be added for rcheevos version 11.4 milestone._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@wescopeland wescopeland merged commit 5fc372e into RetroAchievements:main Jun 4, 2024
1 check passed
@redwizard42 redwizard42 deleted the remember_recall branch June 7, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants