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

The Witness: Add info about which door items exist in the pool to slot data #3583

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Jun 23, 2024

Right now, slot data contains this info:

  1. Every possible door item -> Doors it unlocks
  2. Unlockable doors for which some item exists that unlocks them in this slot's itempool

This is not enough to identify, client-side, which door items exist in the itempool, because there are multiple door items that can unlock any given door, depending on options.

So, this replaces the "door hexes for which items exist in the pool" slot_data entry with "door items that exist in the pool". From this, "Unlockable doors for which some item exists that unlocks them" can be inferred (with the help of disabled_entities as well), and the appropriate change has been made client side.

This allows a new client side feature that displays in-game what item a door is locked by, which aids in hinting.
It also should be a slight memory use reduction on average, as the amount of door items is always less than or equal to the amount of doors they unlock.

A new client release has been made to support the slot_data change.
https://github.com/NewSoupVi/The-Witness-Randomizer-for-Archipelago/releases/tag/v6.0.0p9

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Jun 23, 2024
@NewSoupVi NewSoupVi added is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jun 23, 2024
@NewSoupVi NewSoupVi marked this pull request as draft June 24, 2024 12:38
@NewSoupVi
Copy link
Member Author

NewSoupVi commented Jun 24, 2024

Drafting because this solution is incompatible with #2916, where a door item might not open a specific door despite the door not being disabled

@NewSoupVi NewSoupVi marked this pull request as ready for review June 24, 2024 12:49
@NewSoupVi
Copy link
Member Author

NewSoupVi commented Jun 24, 2024

I now know how I want to solve the conflict, and merging either PR will (correctly) create a merge conflict on the other, so I'll leave both open.

@NewSoupVi
Copy link
Member Author

NewSoupVi commented Jul 25, 2024

As of the release of https://github.com/NewSoupVi/The-Witness-Randomizer-for-Archipelago/releases/tag/v6.0.0, this is technically a bug fix, because I fucked up the backcompat on the new client.
(I'm investigating a client side partial revert / workaround as well though)

@NewSoupVi NewSoupVi added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jul 25, 2024
Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

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

Merged into main and just printed out the IDs, they now properly match the options being used and show the item IDs for panel/door items that exist in the pool. Also connected to a game with it and things seemed fine

@NewSoupVi
Copy link
Member Author

NewSoupVi commented Sep 1, 2024

Adding some positive data:

People have been playing with this in an apworld for months, and it has not caused any issues with door shuffle - The "locked by" feature also seems to work as intended (well, the client-side position detection has some kinks still, but that has nothing to do with the changes from this PR)

@NewSoupVi NewSoupVi removed the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants