Forum rules - please read before posting.

Item still in INV on restore?

Has anyone ever encountered a bug in which a game is saved, then an inv item is acquired, and then the original game is restored, but the inv item which was gotten AFTER the save is still in inventory?

I have gotten two different reports about this from two different testers pertaining to two different inventory items. The first time, I thought the tester was probably just mistaken. But then I got another report from a different tester about a different item...

I am not able to reproduce this behavior myself.

The version was 1.59e. I have since upgraded to the latest, but I wasn't able to reproduce this bug before the upgrade and still cannot.

Has anyone heard of this problem?

Comments

  • edited February 2018
    A critical issue if still in the latest release, but I too can't reproduce such behaviour.

    Was it the same item each time?  What platform are you running on, and are you making any changes to the default save method/format?  Are you using multiple player prefabs (player-switching), have local player objects present in your scene files, or having a single player prefab assigned in the Settings Manager spawned for the whole game?
  • edited February 2018
    It was a different item each time. The game autosaves, and there are no manual saves. The game never autosaves anywhere where it is possible to die, only in rooms in which death is impossible.

    The first item was a gold coin. The player went in the room and got the gold coin, but died before he could get out. He restored his game, and went back in to get the gold coin only to discover he already had it.

    The second time was a torch. The autosave happened. Then the player got the torch and went into the room and died. He restored, and went back in again and died, restored again, went back in again and died. After restoring a fourth time, he went back in and found the room too dark to see. He was confused why he suddenly lost his torch on restore. But in actuality he shouldn't have even had it on restore the first three times.

    Both of these players were on Windows. I have made no changes to the save method or format.
  • And the player character - how is it being loaded into each scene?

    Are you adding scenes together, or switching them for each new room?

    Unless there's something screwy going on with the file system I can't imagine it's random, and there must be some key difference between the times the tester loaded with the torch vs the time he didn't.  Is there any other detail to share about the circumstances?
  • Also, how are you autosaving?  After a Cutscene ends, or with the Save: Save or load Action?
  • edited February 2018
    The player character is set in the settings manager. He is loaded in by AC.

    Each room is a new scene.

    I am autosaving by ticking the checkbox on the On Load cutscene (which is called by On Start. So it autosaves every time the character enters the room. But not in the one room in the game where it is possible to die.

    I will post the bug reports I got from the players here:

    Bug Report 1:
    "I got through the Dungeon to turn the Troll Coin gold. I got all the
    way back, but was killed just as I hit space to leave the dungeon.
    However, it turned out when I respawned, I had the gold coin..."

    Bug Report 2:
    "So I went into the dungeon and died around three
    times. Then I couldn't enter any longer due to "It's too dark". So I got
    a torch from the shopkeeper. Is this supposed to work like this? I
    didn't got the torch the first time I spoke with him."

    A Note on bug report 2: He actually did get the torch the first time he spoke to the shopkeeper. He just didn't notice somehow. There is no other way to get the torch, and the shopkeeper always gives you the torch the first time you talk to him, so he did get. What I am more concerned about is why he didn't have to keep getting it over and over every time he died the first few times until suddenly he did. (btw there is no way in the game to lose the torch. Once you have it, you have it until the end of the game.)
  • And in which Unity version was the game built?
  • Unity 5.6.3p2
  • edited February 2018
    All I have to go on are these two bug reports and brief conversations with them about it which yielded no more details except the fact that the second player did in fact get the torch the first time.

    It could be the case they are both somehow mistaken. It happens with players. In fact, if it was just one report hinting at an issue, I'd ignore it. It's just the fact that I have two reports from different players both hinting at an issue, so I thought I'd ask if there is some possibility of something being wrong.
  • They're not - I've recreated it myself.

    Seems it only occurs if the player goes back to the auto-save scene before getting themselves killed in the next scene.  Unsure of the cause, but I'll look into it now.

    Thanks for the report.
  • Actually, I think I might have just been stupid.  I wasn't testing for player position, so re-entering the scene was correctly updating the autosave with the item in the inventory.

    Back to square one, I'm afraid - sorry about that.

    Are you able to find out if anything else was loaded incorrectly?  If the item was incorrectly added to the inventory, was the scene loaded correctly such that it's assumed the player doesn't have it (e.g. a Hotspot is still active / sprite still visible)?  It'll be important to know if it's an issue with the inventory specifically not restoring correctly, or the save data as a whole.

    One thing that did come to mind is that the OnLoad cutscene probably shouldn't trigger autosave.  It didn't cause problem for me, but it might be safer to have the OnStart trigger OnLoad using ActionList: Run, and then auto-save by itself once OnLoad has finished.
  • The only thing like that would be the "It's too dark to see" message. If the player has the torch, the scene never actually changes when they try to exit. The player just walks behind a wall and then there is a fade out and 1 second wait and fades back in. the player walks back out and says it's too dark. If he does have the torch, the scene changes.

    So when he incorrectly had the torch, the scene was changing, so it recognized that he had it. When he didn't have it, it acted correctly as well.

    That's the only think I can think of as neither item it happened with have an in-game hotspot. One is given by another character, and one is a transformed version of a different item. One thing I didn't ask is whether he still had the regular coin AND the gold coin because it would have removed the regular coin when turning it to gold. But I assume not or he probably would have mentioned that.
  • With the torch issue, yes he could not have left and come back because then he would have legitimately had a saved game with the torch. You get the torch in the same room as you enter the dungeon from.

    With the gold coin. The game never saves before getting back out of the dungeon so there was never a chance of him having a save game with the gold coin if he never got out of the dungeon with it.

    The gold coin is given through a script.
    The torch is given through an actionlist
  • Actually both of them are given in action lists. Just checked to make sure.
  • Well, I've been trying to reproduce this for a while now and can't seem to do it. So don't worry about it unless you get reports from someone else. Was mainly checking in here to see if there was a known issue or if someone else had seen the same thing.

    I'll be on the lookout for similar reports in my next round of beta testing as well.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.