Kitteh6660 / Corruption-of-Champions-Mod

CoC source from fenoxo, modded by Kitteh6660
228 stars 97 forks source link

[Bug] All items reset! #1465

Open Turquoise-Tortoise opened 4 years ago

Turquoise-Tortoise commented 4 years ago

I have checked the following before submitting this issue:

Overview

You lose all items collected since the last load after loading, saving after that and loading later and any items you sold return. Also, when you look at the save editor, the items you saved with since the last load appear there, but the actual game won't acknowledge them at all, while the save editor also shows the items you sold back where they were, too.

Essentially, it ignores all changes to your items while still remembering everything else:[Xp gain, interaction choices, cooldown/other timers, number of days, ect.] Also, I accidentally loaded files that were saved on the current version on a previous one before loading on the current one again at one point, if that helps you figure it out.

Edit-Also, when you go to the main menu, it claims that your game difficulty is on Normal no matter what it says on your save slot listing.

Update Edit: If you start a new game and save it over a slot, the items that were on the save slot will show up instead, even if your character doesn't have as many item slots as you have items.

Game version

CoC 1.0.2 - Mod v1.4.18b

Expected behaviour

Items are different from the last save load after it is saved the next time then loaded the next time.

Actual behaviour

Items in both personal inventory and each storage space reset to what they were when you first saved then loaded game from since when the bug starts.

How often can this be reproduced?

Each time

Steps to reproduce the issue

  1. Load a game
  2. Collect items or sell ones you started that load with, save game.
  3. Load same game. You lose all items collected and regain previously existing ones since last load with it and all consecutive saves and loads.

If possible, attach a save file that reproduces the issue.

^"We don't support that file type" (swf, .sol)

SpearM3064 commented 3 years ago

Confirmed. This is happening with my save game as well. Let me give an example: I currently have 5 trail mix, 5 hard biscuits, 2 whisker fruit, 3 lust draft, 1 canine pepper, and 3 equinum. I just leveled up to level 10, so I have 50 XP.

I buy 5 more trail mix, 5 more hard biscuits, 10 reducto, and sell everything else at the pawn shop. I also explore until I gain 500 XP, so I have a total of 550 XP. I save my game, quit to the desktop, restart CoC, and reload my saved game.

Loading my saved game in the saved game editor says: 10 trail mix, 10 hard biscuits, 10 reducto, and 550 XP.

Loading my saved game in CoC says: 5 trail mix, 5 hard biscuits, 2 whisker fruit, 3 lust draft, 1 canine pepper, 3 equinum, and 550 XP.

I'm not convinced this has anything to do (directly) with the source code, because I was able to load the game into 1.4.15, 1.4.14, etc., and they all exhibited the same behavior. I think it's got something to do with changes in the way Flash works, such as where it saves its files (the default save location was changed some time ago). Someone needs to look into the Load/Save code.

EDIT: Over the next day or two, I plan to try to find out exactly WHEN this issue happens. For example, does it start after someone takes the Strong Back perk? Does it start after someone buys a backpack? Because it doesn't seem to happen at the start of the game when you have only three inventory slots.

jackies99 commented 3 years ago

Still present. Affects Key Items too

MezMez commented 3 years ago

Confirmed. This is happening with my save game as well. Let me give an example: I currently have 5 trail mix, 5 hard biscuits, 2 whisker fruit, 3 lust draft, 1 canine pepper, and 3 equinum. I just leveled up to level 10, so I have 50 XP.

I buy 5 more trail mix, 5 more hard biscuits, 10 reducto, and sell everything else at the pawn shop. I also explore until I gain 500 XP, so I have a total of 550 XP. I save my game, quit to the desktop, restart CoC, and reload my saved game.

Loading my saved game in the saved game editor says: 10 trail mix, 10 hard biscuits, 10 reducto, and 550 XP.

Loading my saved game in CoC says: 5 trail mix, 5 hard biscuits, 2 whisker fruit, 3 lust draft, 1 canine pepper, 3 equinum, and 550 XP.

I'm not convinced this has anything to do (directly) with the source code, because I was able to load the game into 1.4.15, 1.4.14, etc., and they all exhibited the same behavior. I think it's got something to do with changes in the way Flash works, such as where it saves its files (the default save location was changed some time ago). Someone needs to look into the Load/Save code.

EDIT: Over the next day or two, I plan to try to find out exactly WHEN this issue happens. For example, does it start after someone takes the Strong Back perk? Does it start after someone buys a backpack? Because it doesn't seem to happen at the start of the game when you have only three inventory slots.

It starts from the beginning, Vitality Tinctures get changed into Imp Skulls when this happens too. Possibly in a similar line of issues.

brrritssocold commented 3 years ago

I'm not convinced this has anything to do (directly) with the source code, because I was able to load the game into 1.4.15, 1.4.14, etc., and they all exhibited the same behavior. I think it's got something to do with changes in the way Flash works, such as where it saves its files (the default save location was changed some time ago). Someone needs to look into the Load/Save code.

Was this a new save game created with corresponding version? Save games are not backwards compatible and there was substantial re-work of the save code in 1.4.16.

How are you running the game? OS & version, method of running the game (e.g. Flash player projector content debugger 32) If you were playing in the debug player, did you ever get an exception? The partial save looks to me like either the code is crashing or the wrong location is used for the inventory.

If possible, can you zip the save and try to attach it? Having a look at the affected save file would help.

I did a bit of testing but could not trigger the bug (Used chest, stronger back perk 2, pawned items).

SpearM3064 commented 3 years ago

No, unfortunately I cannot send you the affected save file. I had to run CCleaner to get rid of the remnants of some malware that tried to hijack my computer. I forgot that CCleaner erases the CoC save directory. So the affected save was deleted months ago, sorry.

OS is Windows 10, method of running the game is the standalone Flash player. I'm a programmer myself, and I agree that it looks like the wrong location is being used for the inventory.

On Sat, Feb 27, 2021 at 5:52 AM brrritssocold notifications@github.com wrote:

I'm not convinced this has anything to do (directly) with the source code, because I was able to load the game into 1.4.15, 1.4.14, etc., and they all exhibited the same behavior. I think it's got something to do with changes in the way Flash works, such as where it saves its files (the default save location was changed some time ago). Someone needs to look into the Load/Save code.

Was this a new save game created with corresponding version? Save games are not backwards compatible and there was substantial re-work of the save code in 1.4.16.

How are you running the game? OS & version, method of running the game (e.g. Flash player projector content debugger 32 https://www.adobe.com/support/flashplayer/debug_downloads.html) If you were playing in the debug player, did you ever get an exception? The partial save looks to me like either the code is crashing or the wrong location is used for the inventory.

If possible, can you zip the save and try to attach it? Having a look at the affected save file would help.

I did a bit of testing but could not trigger the bug (Used chest, stronger back perk 2, pawned items).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kitteh6660/Corruption-of-Champions-Mod/issues/1465#issuecomment-787061298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOZDFOWADVEWFPE5EF42J3TBDMILANCNFSM4KFYTCIQ .

Turquoise-Tortoise commented 3 years ago

I'm not convinced this has anything to do (directly) with the source code, because I was able to load the game into 1.4.15, 1.4.14, etc., and they all exhibited the same behavior. I think it's got something to do with changes in the way Flash works, such as where it saves its files (the default save location was changed some time ago). Someone needs to look into the Load/Save code.

Was this a new save game created with corresponding version? Save games are not backwards compatible and there was substantial re-work of the save code in 1.4.16.

How are you running the game? OS & version, method of running the game (e.g. Flash player projector content debugger 32) If you were playing in the debug player, did you ever get an exception? The partial save looks to me like either the code is crashing or the wrong location is used for the inventory.

If possible, can you zip the save and try to attach it? Having a look at the affected save file would help.

I did a bit of testing but could not trigger the bug (Used chest, stronger back perk 2, pawned items).

I already said I accidentally loaded a save on an older version and now all the slot saves are doing it. I was using Flash Player SA 32. In other words: the most recent version of the regular Stand Alone. If it were where the files are stored now, wouldn't the saves be gone with new ones working normally instead of the opposite problem?