James-Fire / DSP-Mods

2 stars 0 forks source link

[FusionForge] v0.8.0 error when loading in game 0.10.29.21950 #1

Closed starfi5h closed 1 day ago

starfi5h commented 7 months ago
An error has occurred! Game version 0.10.29.21950
6 Mods used: [ErrorAnalyzer1.1.0] [IlLine1.0.0] [DSP Mod Save1.2.1] [LDBTool3.0.1] [DSP Common API1.6.4.0] [FusionForge Plug-In1.1.0.0] 
NullReferenceException: Object reference not set to an instance of an object
FusionForge.FusionForge.Awake ();(IL_0EAC)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
XLogHandler:Register()
GlobalObject:Initialize()
James-Fire commented 7 months ago

I get that in the console too, but it doesn't appear to actually cause any issues? All the recipes are there, and you can use them fine.

So I'm not sure what the actual issue is, or how to fix it. And since it appears to not cause any problems...

starfi5h commented 2 days ago

This line where adding recipes to itemProto gets error https://github.com/James-Fire/DSP-Mods/blob/main/Fusion%20Forge/Fusion%20Forge/Class1.cs#L224C22-L224C29 So the itemTip doesn't show the new recipes added by the mod image

James-Fire commented 2 days ago

This line where adding recipes to itemProto gets error https://github.com/James-Fire/DSP-Mods/blob/main/Fusion%20Forge/Fusion%20Forge/Class1.cs#L224C22-L224C29 So the itemTip doesn't show the new recipes added by the mod image

Oh okay

When did that change? And what did it change to? If you know either of those

starfi5h commented 2 days ago

ItemProto.recipes is initialized in ItemProto.FindRecipes(), which is not ready yet in Awake. so you need to hook the actions to modify ItemProto.recipes in the later stage of the game. For example, hook on LDBTool.PostAddDataAction.