Skip to content

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Oct 7, 2025

Nowadays that we have per-game IDs, making the distinction between entity IDs and location IDs no longer makes sense.

This greatly reduces the size of a Witness slot's slot_data by removing the conversion dict from one to the other.

Changes:

  • Removed all location IDs from the WitnessLogic*.txt files
  • Replaced every reference to a location ID with the entity ID
  • Reference entity IDs as ints instead of strs whereever possible, rename everything called "_hex" to "_id"
  • Change the untyped entity dict to an EntityDefinition dataclass

New client: https://github.com/NewSoupVi/The-Witness-Randomizer-for-Archipelago/releases/tag/9.0.0p1

Probably needs more testing (like seed comparisons and mypy checking)

@NewSoupVi NewSoupVi marked this pull request as draft October 7, 2025 10:25
@github-actions github-actions bot added affects: webhost Issues/PRs that touch webhost and may need additional validation. 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 Oct 7, 2025
@NewSoupVi NewSoupVi force-pushed the witness_remove_slot_lookup branch from 2a7b324 to 5864abc Compare October 7, 2025 10:27
@NewSoupVi NewSoupVi added is: refactor/cleanup Improvements to code/output readability or organizization. and removed affects: webhost Issues/PRs that touch webhost and may need additional validation. labels Oct 7, 2025
@NewSoupVi NewSoupVi added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Oct 7, 2025
@NewSoupVi NewSoupVi marked this pull request as ready for review October 15, 2025 16:11
Copy link
Contributor

@nicholassaylor nicholassaylor left a comment

Choose a reason for hiding this comment

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

Looked through all of the files except player_logic.py. None of the code stood out as an issue to me. Data files seem to be accurately converted to exclude the old AP numbers.

Did not check other files for potentially missing references nor any now unused values or functions. One small comment on a value within the files, otherwise everything I looked over seems fine.

Did not test generation

Comment on lines -7 to +8
from .static_locations import ID_START

ID_START = 158000
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to keep ID_START if cross-game ID conflicts are no longer an issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since items are not changing, I see no reason to disturb their IDs atm

Copy link
Member Author

@NewSoupVi NewSoupVi Oct 17, 2025

Choose a reason for hiding this comment

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

Like yes I could also change the ID of the Dots item from 158010 to 10 or whatever, but I guess like... I don't really see a need, since the item IDs are already completely arbitrary. It just means I have to make another breaking / backwards compatible client change

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is: refactor/cleanup Improvements to code/output readability or organizization. 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