clementinise / CustomSounds

Let's you easily load audio files (With LCSoundTool) and replace any in game audio clip
GNU General Public License v3.0
6 stars 3 forks source link

[Error : Unity Log] ArgumentException: An item with the same key has already been added. Key: ShovelSwing-fuk-you-25 #3

Closed ShatterDive closed 8 months ago

ShatterDive commented 8 months ago

The issue appears when trying to replace the shovelSwing sound and sync in mutiplayer LCSoundTool: 1.4.0 CustomSounds: 2.2.0 BepInExPack: 5.4.2100 image

clementinise commented 8 months ago

Do you have two files with the same name or same percentage?

ShatterDive commented 8 months ago

in the folder only has 1 file.

clementinise commented 8 months ago

I will add a debug mode in the next update, because I have no idea

Danice123 commented 8 months ago

Something is fundamentally broken here. I can replicate this in multiple ways: (Tested with no other mods but custom sounds and dependancies loaded)

customsounds reload at any time when there is a custom sound loaded except the first time a sound is loaded. Command works fine when the folder is empty. No errors on game boot and sound overrides work correctly locally. And if you boot with nothing in the custom sound folder, you can reload to hot load new sounds, but the second invocation will fail with this error. Also loading a sound, removing it and reloading an empty folder, then adding the sound back will also cause this error.

customsounds sync just always causes this error when there is a custom sound.

Danice123 commented 8 months ago

Actually think this is an issue with LCSoundTool not handling this mod's use case correctly, opened https://github.com/no00ob/LCSoundTool/issues/6

Likely LCSoundTool 1.3.2 works, downgrading to that should band aid the issue

no00ob commented 8 months ago

I merged the fix by @Danice123 and it will be out in the next update, which should hopefully be in the next few days.