Skip to content

fix: use overlap detection fallback for unknown WAD names#141

Merged
Crauzer merged 4 commits intoLeagueToolkit:mainfrom
FrogCsLoL:fix/overlap-detection-fallback-wad
Mar 21, 2026
Merged

fix: use overlap detection fallback for unknown WAD names#141
Crauzer merged 4 commits intoLeagueToolkit:mainfrom
FrogCsLoL:fix/overlap-detection-fallback-wad

Conversation

@FrogCsLoL
Copy link
Contributor

@FrogCsLoL FrogCsLoL commented Mar 21, 2026

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.bin in the state directory) or reset their profile after
updating. Old cache entries store fallback_wad: None for mods with custom
WAD names, and the overlap detection only runs on cache miss.

FrogCsLoL and others added 4 commits March 21, 2026 05:47
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.
@Crauzer Crauzer merged commit 28a6e17 into LeagueToolkit:main Mar 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants