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

Load inventory from game memory data for auto tracking - resolves #111 #113

Conversation

DorkmasterFlek
Copy link
Contributor

This changes the inventory population to read from the game memory as part of the current game state instead of populating based on visited locations and their contents. This makes it so e.g. Archipelago multiworld seeds will work properly where the location contents are items for other people most of the time.

In addition, I also changed the fallback item for such locations (including in race seeds) to be the "NoEnergy" item instead of spring ball as this doesn't mess with the actual inventory, and also doesn't disappear immediately upon viewing like the "Nothing" item does.

I attempted to do this on the current master branch, but the tracker page is crashing there so it's not usable for testing. I did it on the current production branch instead.

}

currentState = dumpData["currentState"]
self.locDelta = 0

for dataType, offset in dumpData["stateDataOffsets"].items():
Copy link
Owner

Choose a reason for hiding this comment

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

why are you doing a manual sort ?
we use python >= 3.6 which keep the order of insertion of keys in dictionaries.

@theonlydude
Copy link
Owner

hello,
thanks for your PR.
I don't understand this sentence: "and also doesn't disappear immediately upon viewing like the "Nothing" item does", where does the item disappear ?
The auto tracker is disabled in race mode, so there's no need to change how race mode is handled.
I've updated the readme to use the new tracker in master branch more easily.
could you rebase your PR on the master branch instead ?

@DorkmasterFlek
Copy link
Contributor Author

"and also doesn't disappear immediately upon viewing like the "Nothing" item does"

Sorry, I may have worded that unclearly. I meant if I used "Nothing" instead of "NoEnergy", the location is marked as visited as soon as it is viewed at all, even if e.g. it's out of reach and the player hasn't actually gotten the item yet.

To clarify, this situation was happening because in a MW seed, the item at most locations is a MW item for another player statistically. This item is not recognized by the tracker of course, so it was falling back to putting "SpringBall" at every location which doesn't make sense. Initially I tried the "Nothing" item, but it behaved differently as mentioned. That's why I changed it to "NoEnergy" instead, so it wouldn't affect inventory.

could you rebase your PR on the master branch instead ?

Definitely! I tried to build off of that first, however running it locally the tracker page was crashing (saying it created a ticket ID on the back end but I couldn't find where this is). I presumed the master branch was just unstable and WIP, so I built off the production branch instead. I'll give the master branch another go.

@DorkmasterFlek
Copy link
Contributor Author

DorkmasterFlek commented Apr 8, 2023

@theonlydude I'm trying to get the master branch running locally and it builds and runs under Docker, however when I visit the tracker page on my localhost, there are a number of static JS/CSS/image files that appear to be missing, including seemingly crucial ones like jquery.js, web2py.js, Bootstrap, calendar stuff. All I'm doing is running those docker build scripts with the -l argument as in the readme. Am I missing something here?

EDIT: I did figured out I was missing the yarn building part for the images, but still missing all these common JS/CSS files compared to the current beta site...

@theonlydude
Copy link
Owner

I removed the web2py stuff recently, it looked non used (on my computer and beta).
you don't have to do the yarn part, check the readme to use a release of the tracker client instead of building it.

@DorkmasterFlek DorkmasterFlek deleted the read-inventory-memory branch April 8, 2023 16:45
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.

2 participants