Skip to content

Conversation

@Endaris
Copy link
Collaborator

@Endaris Endaris commented Nov 14, 2024

Closes #51

This PR is ported from a previous PR that had feedback/comments I will sum up.
For mods not currently present on the user system, this PR works fine.
The issues are with importing mods, possibly newer versions that are already present.
The current iteration of the PR implements a backup and replace strategy:
If a file in a mod to be imported is already on disk under the same name, the files get compared and if they are not the same, the present file is moved into a timestamped backup directory and replaced by the new file.
For the most part this is expected to work fine but there are several situations in which this strategy may prove insufficient:

  1. Format changes: If a .flac is replaced by a .ogg, both files would end up in the mod and which one gets picked would be up to the intransparent order in which the game tries to find a file under the key name.
  2. Files that exist in arbitrary quantities: If a mod is installed with chain2 and chain2_2 and an update delivers chain2, chain3, chain4 and chain5, the previously present chain2_2 would not get replaced even if the mod creator did not intend for it to be present besides the other SFX (e.g. it could be identical to the new chain3).

In order to fix these issues the import needs to be
a) keyword focused: instead of files, it needs to focus on keywords to account for changes in file extension
b) group aware: as soon as a single file of a cohesive group of files is changed, it should backup and replace the whole group with the complete new group

Taking these two into account it should be possible to guarantee that users end up with cohesive mods while also assuring that any personal customizations are not overwritten by providing the aforementioned backups.

@Endaris Endaris added enhancement New feature or request Client-side graphics related to graphics labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Client-side enhancement New feature or request graphics related to graphics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import mods through drag & drop

1 participant