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

Add duplicate string handling in StringsFolderLookupOverlay based on load order #578

Open
ModMapper opened this issue Dec 20, 2024 · 0 comments

Comments

@ModMapper
Copy link

Problem

When the same string data exists in multiple BSA files, the final result should depend on the load order.
However, the current implementation does not correctly follow the load order, resulting in incorrect string data being applied.

Context

  • The strings file in A.bsa is being overwritten by the one in B.bsa.
  • B.bsa might not belong to the same mod as A.bsa.

As a result, the intended string data might not be applied according to the load order.

Expected Solution

Update the StringsFolderLookupOverlay logic to properly process BSA files based on the reverse load order:

  1. Remove modKey from the call to GetApplicableArchivePaths.
  2. Use the Reverse function on the list returned by GetApplicableArchivePaths to ensure reverse-order traversal.
foreach (var bsaFile in Archive.GetApplicableArchivePaths(
    release, dataPath, instructions?.BsaOrdering, fileSystem: fileSystem,
    returnEmptyIfMissing: true).Reverse())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant