Skip to content

Conversation

@tanjo3
Copy link
Contributor

@tanjo3 tanjo3 commented Jan 5, 2026

What is this fixing or adding?

All seeds for TWW use the same game ID. What this means is that when a player loads a new seed with a newly randomized ISO, their old save file will still be there. Assigning each seed a unique game ID, or even just allowing a few more game IDs (see #5186), can help with this, but there is the issue of juggling these extra game save files, as each game ID creates a new .gci file in Dolphin.

This PR does not address this issue. Instead, it's addressing another issue that is related to player experience when playing with multiple TWW seeds. There is currently no save file validation when connecting to the server. Since TWW checks for set flags (in simple terms) to check locations, if a player connects to a save file for a different seed, all the locations checked in that save file will automatically be checked for the current slot, even though the player never checked those locations in that save file. In a worst-case scenario, a player might accidentally open a save file with every location checked and instantly "release" their current slot.

To resolve this, the patcher generates a hash from the seed and slot name, yielding a unique identifier. This identifier is added to the randomized ISO. Upon creating a new save file, the identifier is copied from the ISO to the save file. Thus, whenever a save file is opened, the client can check that the save file and ISO identifiers match. If they do not, the client will automatically disconnect the player from the server, preventing any locations from accidentally being sent.

This change, however, doesn't prevent loading the save state of a different save file from sending locations, as save states will modify the identifier in both the save file and the ISO.

As a bonus, since there is this additional validation, the slot name authentication has been moved up in the task loop, meaning that a player can now connect to the server while on the title screen or file select screen. If they do connect to an invalid save file, the changes in this PR will disconnect them immediately.

Like with #5686, this change requires a version update of the patcher program.
The updated code can be found here: https://github.com/tanjo3/wwrando/tree/ap-add-seed-identifier

How was this tested?

Ran the game, attempted to connect to a valid save file, and an invalid save file. The client properly disconnected me when I tried to connect to the invalid save file. I was able to properly connect and play when I loaded the valid save file.

If this makes graphical changes, please attach screenshots.

N/A

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant