fix: use overlap detection fallback for unknown WAD names#141
Merged
Crauzer merged 4 commits intoLeagueToolkit:mainfrom Mar 21, 2026
Merged
Conversation
When a mod references a WAD name that doesn't exist in the game (e.g. "Spirit-Blossom-Rift.wad.client"), the builder previously set fallback_wad to None. This caused distribute_override_hashes() to silently drop all new chunks that don't already exist in any game WAD, resulting in corrupted overlays that crash the game. This adds find_best_matching_wad() to GameIndex which counts overlapping chunk hashes across game WADs and picks the best match — the same approach used by cslol-manager's find_by_overlap(). The metadata collection pass now uses this as a fallback when find_wad() returns WadNotFound, ensuring all mod chunks get routed to the correct game WAD.
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.
When a mod references a WAD name that doesn't exist in the game (e.g. "Spirit-Blossom-Rift.wad.client"), the builder previously set fallback_wad to None. This caused distribute_override_hashes() to silently drop all new chunks that don't already exist in any game WAD, resulting in corrupted overlays that crash the game.
This adds find_best_matching_wad() to GameIndex which counts overlapping chunk hashes across game WADs and picks the best match — the same approach used by cslol-manager's find_by_overlap(). The metadata collection pass now uses this as a fallback when find_wad() returns WadNotFound, ensuring all mod chunks get routed to the correct game WAD.
Migration note
Users with existing overlay state should delete their cached metadata file
(
override_meta.binin the state directory) or reset their profile afterupdating. Old cache entries store
fallback_wad: Nonefor mods with customWAD names, and the overlap detection only runs on cache miss.