Loading in a previously exported quest set causes strange behaviour
Funwayguy opened this issue ยท 3 comments
If a user exports a quest set, renames the local set in-game, then imports back in the previously exported set (so that the names don't conflict) both sets will appear to have loaded in just fine but with duplicate quest UUIDs making for some weird behaviours.
Despite the set saving and loading just fine, many interactions such as edits only seem to apply to the last loaded copy of the duplicate and not the actual one the user clicked on. This is likely because HQM has lost track of the duplicates and can only store the last copy of the duplicate in the UUID mapping.
I'd suggest attempting a sort of UUID migration when duplicates are found during import to prevent this from happening in future.
Some code to ensure the uniqueness of quest IDs might help with this, and where a conflict is found, a new ID generated. Specifically when loading the UUIDs of quests.
Yes but don't forget to account for the IDs stored on the prerequisites. You'll have to go back and remap all those too after a conflicting ID has been changed.
Edit: Possibly on the quest tasks too