FuryFight3r / ScrappingSimulator

A Repository for DefectGamings Scrapping Simulator
4 stars 0 forks source link

[Bug]: Multiple issues after loading a game #124

Closed Newsandbuy closed 8 months ago

Newsandbuy commented 1 year ago

Describe the bug

I dont exactly know how to fit everything into its own report so hopfully its okay to make just one big

after starting and loading the savegame there are no items at the pawn shop and you cant use the gold/silver refinery process at all, with no warning or error. But if i save again, go back to the main menu and load the savegame, everything works as it should but with multiple warnings and errors, also the green progress bar for the refinement starts at ~1/3 rather than the beginning (see screenshot).

this happens everytime i completely close out of the game and start it up again

Savegame: Scrapping_Simulator_Data.zip

Reproduction Steps

  1. Load Savegame
  2. Save via ESC menu
  3. Go back to the main menu and click Play/Continue Saved Game

Expected behaviour

That the refinement works without issues, items spawning in shop and progress bar starting at the left edge.

Screenshot(s)/Video(s)

grafik

Console output

Warnings:

The tree SM_Tree_03 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
The tree SM_Tree_03 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
The tree SM_Plant_Grass_03 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
The tree SM_Env_Tree_01 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.
The tree SM_Env_Tree_06 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly.

Errors:

NullReferenceException: Object reference not set to an instance of an object
componentRandomizer.Start () (at <e339fe024d6a4af19ef0ff05353f0c2f>:0)

NullReferenceException: Object reference not set to an instance of an object
componentRandomizer+<startupDelay>d__10.MoveNext () (at <e339fe024d6a4af19ef0ff05353f0c2f>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c6a0be87269c4a56aa4c8bc00101797f>:0)

Player Logs

No response

FuryFight3r commented 1 year ago

Hi there @Newsandbuy and thank you for reporting this.

I had found that those errors are specifically related to the Main Menu Display Objects (the E-Waste Objects near the Door), which they have now been removed from the Prefab which are now purely display items and no longer contain any In-game Scripts or LODs. So those errors shouldn't have been causing issues within the Game Scene itself, but was able to fix it nonetheless πŸ™‚

With the Pawn Shop Sale Items, they are not saved or loaded, so if you save when the Pawn Shop has a Laptop and LCD TV for example, when you load back in, the sale tables will be empty and will begin their random 5-10 min countdown to produce a new item, so it could take upwards of 10mins for the first item to pop up after loading into/starting the game, though any longer than that and or not spawning at all is certainly an issue, though if there is no error being produced in regards to the PawnShopSaleHandler script, than it should be operating as normal

I will admit, the entire Chemical Refining Set is pretty jank, I would highly advise that the Chem Set be saved Empty to avoid any potential breakages/issues when loading, it certainly seems to be it's worst when something is actively working on the table, like counting down chems, or heating up metal. As the way I had structured the Chem Station just doesn't like being 'Jump Started' or forced into a certain stage of the process when loading, and is only happy when it goes from start to finish. For too long I've been adding bandaid after bandaid to the crummy code, so the Chem Set will be getting a complete coding overhaul/rework in the very near future, once I can figure out a way to structure it that is stable, future proof (allows expandability without breaking), optimised and able to Save/Load without issue πŸ™‚πŸ‘

Newsandbuy commented 1 year ago

Allright, i saw a few posts of you saying that you want to rework the chem set as well as the e waste system to build a better foundation for the future, wich is very good, just wanted to let you know in case no one did before.

FuryFight3r commented 8 months ago

Thanks again for reporting this, this should now be fixed in the latest update πŸ™‚πŸ‘