KawaiiBone / LethalCompanyRemnants

Adds store items as scrap, to be found in moons as scrap in Lethal Company. You can now also find the bodies of previous crews accompanying their former gear.
MIT License
1 stars 0 forks source link

one error #2

Closed apeng0907 closed 3 months ago

apeng0907 commented 4 months ago

[Error :KawaiiBone.Remnants] System.ArgumentException: An item with the same key has already been added. Key: All at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <787acc3c9a4c471ba7d971300105af24>:IL_00DD at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000 at LethalLib.Modules.Items.RegisterScrap (Item spawnableItem, System.Int32 rarity, LethalLib.Modules.Levels+LevelTypes levelFlags) [0x0002b] in <4eedb4dc36094adcb65137cf81f2803d>:IL_002B at Remnants.Remnants.AddStoreItemsToScrap () [0x000a9] in <4041ce4229f34ea29ed0f7949351578e>:IL_00A9

KawaiiBone commented 4 months ago

Thank you for reporting this error. When does this error occur? Does it happen the first time you start the game, or does it happen when you have gone back to the main menu and started a new game? Are there any mods you were using at the same time, that add items to the game?

apeng0907 commented 4 months ago

it happen the first time i start the game Mods.log

apeng0907 commented 4 months ago

[Info :KawaiiBone.Remnants] Loading in items. [Info :KawaiiBone.Remnants] TpButton rarity: 1 [Info :KawaiiBone.Remnants] Added TpButton as a scrap item. [Info :KawaiiBone.Remnants] NightVisionItem rarity: 8 [Info :KawaiiBone.Remnants] Added NightVisionItem as a scrap item. [Info :KawaiiBone.Remnants] MedKitMapItem rarity: 1 [Info :KawaiiBone.Remnants] Added MedKitMapItem as a scrap item. [Info :KawaiiBone.Remnants] MedKitItem rarity: 1 [Info :KawaiiBone.Remnants] Added MedKitItem as a scrap item. [Info :KawaiiBone.Remnants] HelmetItem rarity: 1 [Info :KawaiiBone.Remnants] Added HelmetItem as a scrap item. [Info :KawaiiBone.Remnants] StoreWheelbarrowItem rarity: 5 [Info :KawaiiBone.Remnants] Added StoreWheelbarrowItem as a scrap item. [Info :KawaiiBone.Remnants] coilHead rarity: 8 [Info :KawaiiBone.Remnants] Added coilHead as a scrap item. [Info :KawaiiBone.Remnants] TpButtonAdv rarity: 1 [Info :KawaiiBone.Remnants] Added TpButtonAdv as a scrap item. [Info :KawaiiBone.Remnants] DivingKitItem rarity: 1 [Info :KawaiiBone.Remnants] Added DivingKitItem as a scrap item. [Info :KawaiiBone.Remnants] HandheldRadar rarity: 9 [Info :KawaiiBone.Remnants] Added HandheldRadar as a scrap item. [Info :KawaiiBone.Remnants] HackingTool rarity: 9 [Info :KawaiiBone.Remnants] Added HackingTool as a scrap item. [Info :KawaiiBone.Remnants] RocketLauncher rarity: 9 [Info :KawaiiBone.Remnants] Added RocketLauncher as a scrap item. [Info :KawaiiBone.Remnants] ToyHammer rarity: 9 [Error :KawaiiBone.Remnants] System.ArgumentException: An item with the same key has already been added. Key: All at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <787acc3c9a4c471ba7d971300105af24>:IL_00DD at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <787acc3c9a4c471ba7d971300105af24>:IL_0000 at LethalLib.Modules.Items.RegisterScrap (Item spawnableItem, System.Int32 rarity, LethalLib.Modules.Levels+LevelTypes levelFlags) [0x0002b] in <4eedb4dc36094adcb65137cf81f2803d>:IL_002B at Remnants.Remnants.AddStoreItemsToScrap () [0x000a9] in <4041ce4229f34ea29ed0f7949351578e>:IL_00A9 [Info :KawaiiBone.Remnants] Items Are loaded in.

apeng0907 commented 4 months ago

Perhaps it's because of ToyHammer?

apeng0907 commented 4 months ago

I will try Lethal Things to turn off the refresh of ToyHammer inside

KawaiiBone commented 4 months ago

I think I understand now, this means that the item in question (the toyHammer) is already registered in the library LethalLib scrapItems list. No need to worry, this issue will be fixed in the next update I do. Which will be at the end of this week. Thank you for reporting the bug.

apeng0907 commented 4 months ago

thank you,maybe its a new error after update

apeng0907 commented 4 months ago

[Info :KawaiiBone.Remnants] Boombox rarity: 20 [Warning: Unity Log] The referenced script on this Behaviour (Game Object '') is missing! [Warning: Unity Log] The referenced script on this Behaviour (Game Object 'Boombox') is missing! [Warning: Unity Log] The referenced script on this Behaviour (Game Object 'Boombox') is missing! [Error :KawaiiBone.Remnants] System.NullReferenceException: Object reference not set to an instance of an object at LethalLib.Modules.NetworkPrefabs.CloneNetworkPrefab (UnityEngine.GameObject prefabToClone, System.String newName) [0x00044] in <4eedb4dc36094adcb65137cf81f2803d>:IL_0044 at LethalLib.Modules.Items+ScrapItem..ctor (Item item, System.Int32 rarity, LethalLib.Modules.Levels+LevelTypes spawnLevels, System.String[] spawnLevelOverrides) [0x00098] in <4eedb4dc36094adcb65137cf81f2803d>:IL_0098 at LethalLib.Modules.Items.RegisterScrap (Item spawnableItem, System.Int32 rarity, LethalLib.Modules.Levels+LevelTypes levelFlags) [0x00039] in <4eedb4dc36094adcb65137cf81f2803d>:IL_0039 at Remnants.Behaviours.RegisterItemsBehaviour.AddStoreItemsToScrap (System.Collections.Generic.List`1[T] allItems) [0x00120] in <8c9f3f0283a44dd3882a6d5b8b0ef6e8>:IL_0120 [Info :KawaiiBone.Remnants] Items Are loaded in.

KawaiiBone commented 4 months ago

That is very odd, are you using any other mods when this error happens? And if so, is there any kind that modifies the boombox? It seems that when trying to register the boombox, it cannot find some scripts in it. Thank you for reporting this bug.

apeng0907 commented 4 months ago

Perhaps it comes from the "LC_Office",https://thunderstore.io/c/lethal-company/p/Piggy/LC_Office/, because this: [Info :LethalLevelLoader] Automatically Restored The Following SpawnablePrefab's In OfficeDungeonFlow: Boombox, LungApparatus, BreakerBox, SteelDoorMapModel, VentEntrance, EntranceTeleportA, EntranceTeleportB,

BAHEK-BOP commented 4 months ago

image photos from the console

there seems to be an error in downloading some things

KawaiiBone commented 4 months ago

The error says that something goes wrong when registering the item as scrap. It seems that the mod that modifies the boombox, is not well compatible with the Remnants mod. I will download the mod and try to find a way to make it more compatible with my mod, today. For now, I am focusing on creating a config where the host can influence the Remnants mod a lot. Which means If I can't figure out a way to fix this compatibility issue, it would probably be fixed when the config is done. Example: being able to blacklist this Boombox item from registering as scrap. Thank you for reporting this bug.

KawaiiBone commented 4 months ago

Perhaps it comes from the "LC_Office",https://thunderstore.io/c/lethal-company/p/Piggy/LC_Office/, because this: [Info :LethalLevelLoader] Automatically Restored The Following SpawnablePrefab's In OfficeDungeonFlow: Boombox, LungApparatus, BreakerBox, SteelDoorMapModel, VentEntrance, EntranceTeleportA, EntranceTeleportB,

It seems that indeed its a compatibility problem. The way that the Remnants mod adds items as scrap does not go well with the way that the LC_Office mod modifies items. Sadly I did not find a good way of fixing this issue now. Hopefully later on this issue can be resolved.

KawaiiBone commented 4 months ago

Good news, I found a way to make the LC_Office mod compatible. I will do a small update soon today.

KawaiiBone commented 3 months ago

Does this issue still occur? If not then I shall close this issue soon.