TheLoneTec / Weapon-Modularisation-SK-Armory

Conversion of Weapon Modularisation Weapon Pack for HSK.
2 stars 2 forks source link

All attachments on weapons have disappeared in all saves at once #11

Open glsheff opened 1 month ago

glsheff commented 1 month ago

version HSK 1.4 master latest (2 oct) The bug did not appear immediately. New body kits also disappear when loading. The logs show many identical errors:

System.NullReferenceException: Object reference not set to an instance of an object at RW_ModularizationWeapon.CompModularizationWeapon.PreUpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode, System.Collections.Generic.Dictionary2[TKey,TValue] cachedDataToPostUpatde, System.Collections.Generic.Dictionary2[TKey,TValue] prveChilds) [0x000e5] in <1d034a2a7725402b9b659acad2cea422>:0 at RW_NodeTree.CompBasicNodeComp.internal_PreUpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode, System.Collections.Generic.Dictionary2[TKey,TValue] cachedDataToPostUpatde, System.Collections.Generic.Dictionary2[TKey,TValue] prveChilds) [0x00000] in <881b2efa6e4543e8bce3a22eea2dad5e>:0 at RW_NodeTree.NodeContainer.internal_UpdateNode (RW_NodeTree.CompChildNodeProccesser actionNode) [0x000cb] in <881b2efa6e4543e8bce3a22eea2dad5e>:0
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

I found this in my saves: `

Gun_HeavySMG
                    <id>Gun_HeavySMG445310</id>
                    <map>0</map>
                    <pos>(135, 0, 198)</pos>
                    <health>100</health>
                    <stackCount>1</stackCount>
                    <questTags IsNull="True" />
                    <innerContainer>
                        <InnerList>
                            <ModHvySMG_Magazine Class="ThingWithComps">
                                <def>Module_HvySMG_MagClip</def>
                                <id>Module_HvySMG_MagClip445311</id>
                                <health>70</health>
                                <stackCount>1</stackCount>
                                <questTags IsNull="True" />
                                <innerContainer>
                                    <InnerList />
                                </innerContainer>
                                <targetPartsWithId>
                                    <keys />
                                    <values />
                                </targetPartsWithId>
                            </ModHvySMG_Magazine>
                            <ModHvySMG_Stock Class="ThingWithComps">
                                <def>Module_HvySMG_WireStock</def>
                                <id>Module_HvySMG_WireStock445312</id>
                                <health>70</health>
                                <stackCount>1</stackCount>
                                <questTags IsNull="True" />
                                <innerContainer>
                                    <InnerList />
                                </innerContainer>
                                <targetPartsWithId>
                                    <keys />
                                    <values />
                                </targetPartsWithId>
                            </ModHvySMG_Stock>
                            <ModHvySMG_Sight Class="ThingWithComps">
                                <def>Module_SniperScope</def>
                                <id>Module_SniperScope445313</id>
                                <health>70</health>
                                <stackCount>1</stackCount>
                                <questTags IsNull="True" />
                                <innerContainer>
                                    <InnerList>
                                        <ModSC_SubScope Class="ThingWithComps">
                                            <def>Module_RedDotSight</def>
                                            <id>Module_RedDotSight445315</id>
                                            <health>70</health>
                                            <stackCount>1</stackCount>
                                            <questTags IsNull="True" />
                                            <innerContainer>
                                                <InnerList />
                                            </innerContainer>
                                            <targetPartsWithId>
                                                <keys />
                                                <values />
                                            </targetPartsWithId>
                                        </ModSC_SubScope>
                                    </InnerList>
                                </innerContainer>
                                <targetPartsWithId>
                                    <keys />
                                    <values />
                                </targetPartsWithId>
                            </ModHvySMG_Sight>
                            <ModHvySMG_UnderBarrel Class="ThingWithComps">
                                <def>Module_VerticalGrip</def>
                                <id>Module_VerticalGrip445314</id>
                                <health>70</health>
                                <stackCount>1</stackCount>
                                <questTags IsNull="True" />
                                <innerContainer>
                                    <InnerList />
                                </innerContainer>
                                <targetPartsWithId>
                                    <keys />
                                    <values />
                                </targetPartsWithId>
                            </ModHvySMG_UnderBarrel>
                        </InnerList>
                    </innerContainer>
                    <targetPartsWithId>
                        <keys />
                        <values />
                    </targetPartsWithId>
                    <quality>Poor</quality>
                    <infusions />
                    <wanting />
                    <removal />
                    <verbTracker>
                        <verbs>
                            <li Class="CombatExtended.Verb_ShootCE">
                                <loadID>CompEquippable_Gun_HeavySMG445310_0</loadID>
                                <currentTarget>(0, 0, 0)</currentTarget>
                                <currentDestination>(0, 0, 0)</currentDestination>
                                <lastShotTick>-999999</lastShotTick>
                                <canHitNonTargetPawnsNow>True</canHitNonTargetPawnsNow>
                            </li>
                            <li Class="CombatExtended.Verb_MeleeAttackCE">
                                <loadID>CompEquippable_Gun_HeavySMG445310_0_Smash</loadID>
                                <currentTarget>(0, 0, 0)</currentTarget>
                                <currentDestination>(0, 0, 0)</currentDestination>
                                <lastShotTick>-999999</lastShotTick>
                                <canHitNonTargetPawnsNow>True</canHitNonTargetPawnsNow>
                            </li>
                            <li Class="CombatExtended.Verb_MeleeAttackCE">
                                <loadID>CompEquippable_Gun_HeavySMG445310_1_Smash</loadID>
                                <currentTarget>(0, 0, 0)</currentTarget>
                                <currentDestination>(0, 0, 0)</currentDestination>
                                <lastShotTick>-999999</lastShotTick>
                                <canHitNonTargetPawnsNow>True</canHitNonTargetPawnsNow>
                            </li>
                            <li Class="CombatExtended.Verb_MeleeAttackCE">
                                <loadID>CompEquippable_Gun_HeavySMG445310_2_Poke</loadID>
                                <currentTarget>(0, 0, 0)</currentTarget>
                                <currentDestination>(0, 0, 0)</currentDestination>
                                <lastShotTick>-999999</lastShotTick>
                                <canHitNonTargetPawnsNow>True</canHitNonTargetPawnsNow>
                            </li>
                        </verbs>
                    </verbTracker>
                    <quality>Poor</quality>
                    <taleRef IsNull="True" />
                    <sourcePrecept>null</sourcePrecept>
                    <everSeenByPlayer>True</everSeenByPlayer>
                    <codedPawn>null</codedPawn>
                    <currentAmmo>Ammo_45ACP_FMJ</currentAmmo>
                    <selectedAmmo>Ammo_45ACP_FMJ</selectedAmmo>
                </thing>`

And when loading, saving gives this:

Not all loadIDs which were read were consumed. Singles: Thing_Gun_HeavySMG449047 of type Verse.Thing. pathRelToParent=/selestedWeapon, parent=WeaponCraftingWorkTable275206 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Warning (string) Verse.LoadIDsWantedBank:ConfirmClear () Verse.CrossRefHandler:Clear (bool) Verse.CrossRefHandler:ResolveAllCrossReferences () (wrapper dynamic-method) Verse.ScribeLoader:Verse.ScribeLoader.FinalizeLoading_Patch1 (Verse.ScribeLoader) (wrapper dynamic-method) Verse.Game:Verse.Game.LoadGame_Patch8 (Verse.Game) (wrapper dynamic-method) Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1 (string) Verse.Root_Play/<>c:<Start>b__1_1 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_Context (object) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () And also a graphical bug appeared on one weapon:

Screenshot_1

I use runtimeGC, maybe that played some role.

TheLoneTec commented 1 month ago

Your not using this version are you? This is outdated. use the one provided with HSK

TheLoneTec commented 1 month ago

and yes this seems like a saving error

TheLoneTec commented 1 month ago

if your using the HSK version, please make a bug report in the discord, or atleast use the issue tracker for the main HSK repo.

glsheff commented 1 month ago

Your not using this version are you? This is outdated. use the one provided with HSK

I using the HSK version.