Open
Conversation
Contributor
Author
|
I noticed an issue: only the case when we compare integers works and not other types. I need to fix this Note: the CI issue is due to the error that was fixed in e997120 |
Contributor
Author
Fixed + rebased to fix CI issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds ability to perform RAM search from lua scripts.
Finding variables in memory can be an especially tedious process in libTAS as, unlike emulators, addresses change across different runs of the same process, or even inside a single execution of the process. This commits provides another way to make finding variable easier, along with the existing pointer search function.
To do this, I reused the
MemScannerfromRamSearchModel.I included a basic example in the documentation to showcase how to use it to automatically retrieve the player x;y position in a game, provided we know the value at some specific frames.
I reordered the parameters in the API compared to
memscanner.scan()to put values that users have more chance to be willing to change in first positions, as lua does not provide a way to use named parameters.One thing that can be discussed is whether it would be a good idea to tie this search to the Ram search window (which I originally tried using
newWatches()andsearchWatches(), but I reverted to callingmemscanner.scan()as it wasn't sufficient) or make them completely independent search. The latter would open the way to make several ram search in parallel, to look for different variables on the same frames.Edit: One thing I forgot to mention is that there may be conflicts when using this new lua function and the window ramsearch in parallel (not sure, I haven't tested this)