Page 1 of 2

Bug in UCC Saver (Inventory)

Posted: Fri Mar 08, 2019 7:55 pm
by GorkaGames
UCC Saver works fine on the Character's position but fails (I have been testing 5 or 6 times) on the Inventory.
It saves and loads inventory, and usually loads well the different Inventory Types, but fails on the ammo amount / Grenade count / etc.. It's wired the way it fails but most of the times you get double the amount before (once you load, you get double than before). I have tried with different Inventory types (Assault riffle, pistol, grenade, Rocket Launcher (this last one didn't save it, only the Rockets...)

Can you please test it? Any advise?

Thanks

Re: Bug in UCC Saver (Inventory)

Posted: Fri Mar 08, 2019 8:21 pm
by Tony Li
Hi,

I'll check this. Which Opsive character controller are you using, and what version?

Re: Bug in UCC Saver (Inventory)

Posted: Fri Mar 08, 2019 8:24 pm
by GorkaGames
I've got Third Person and First Person Character Controller, so its' equivalent to UCC2. Anyway I get some results in third Person than First Person.
Version is last one: 2.1.1

Re: Bug in UCC Saver (Inventory)

Posted: Fri Mar 08, 2019 8:37 pm
by Tony Li
Thanks! I'll be checking this out tomorrow. I'll let you know what I find.

Re: Bug in UCC Saver (Inventory)

Posted: Sat Mar 09, 2019 7:49 am
by GorkaGames
Yes please, I have 154.235 bullets right now, lol.... (It seems that get multiplied by 2 every time :)

Re: Bug in UCC Saver (Inventory)

Posted: Sat Mar 09, 2019 4:55 pm
by Tony Li
I ran out of time to finish the fix today. I'll do my best to send you a version to test tomorrow.

Re: Bug in UCC Saver (Inventory)

Posted: Sat Mar 09, 2019 6:18 pm
by GorkaGames
No worries, leave it for Monday, tomorrow is Sunday, Thanks!

Re: Bug in UCC Saver (Inventory)

Posted: Mon Mar 11, 2019 4:49 pm
by Tony Li
Please give this update a try and let me know if it works correctly for you:

Opsive_UCC_Support_Common_2019-03-11.unitypackage

Re: Bug in UCC Saver (Inventory)

Posted: Mon Mar 11, 2019 7:12 pm
by GorkaGames
Thanks for the update. It's getting better but not working good yet:
- Body updates ok
-Pistol updates ok (type and ammo)
-Assaulr Rifle updates ok but Ammo it doesn't double as before but anyway adds more ammo than the one it gets. (maybe adds the clip or something?)
- Rocket and Launcher don't update (always 0)
- Grenade doesn't update at all (always 0)

I have "Remove All on death" and "Load Default Loadout On Respawn" unchecked on the Inventory.

What I do for testing is picking up some weapons and ammo everytime I save the game to see how it updates....

Re: Bug in UCC Saver (Inventory)

Posted: Mon Mar 11, 2019 9:42 pm
by Tony Li
Thanks for your patience. I'm working with Justin at Opsive to get this ironed out. Here's an updated package that logs some extra debug info:

Opsive_UCC_Support_Common_2019-03-11b.unitypackage

Can you identify an inventory state that doesn't work correctly when saved and loaded? For example:

You save the game with:
  • 4 frag grenades
  • Assault rifle with 28 rounds in the magazine and 48 extra ammo
  • 2 pistols, one with 12 rounds in the magazine, one with 9 rounds in the magazine, 47 extra ammo
  • Rocket launcher with 1 rocket loaded, 3 extra
  • Rocket launcher is currently equipped
When you load the game, the player has:
  • 0 frag grenades
  • Assault rifle with 48 rounds in the magazine and 48 extra ammo
  • 2 pistols, one with 12 rounds in the magazine, one with 9 rounds in the magazine, 94 extra ammo
  • Rocket launcher with 1 rocket loaded, 3 extra
  • Assault rifle is currently equipped
I realized that the UCC Saver didn't restore which weapon the player has currently equipped. I've added that to this version.

When you save, it will log a JSON representation of the save data to the Console window. It will look similar to this:
Spoiler

Code: Select all

{
    "items": [
        {
            "itemID": 0,
            "slot": 0,
            "count": 1.0,
            "equipped": false,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 96.0,
                    "consumableCount": 44.0
                }
            ]
        },
        {
            "itemID": 6,
            "slot": 1,
            "count": 1.0,
            "equipped": true,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 4.0,
                    "consumableCount": -1.0
                }
            ]
        },
        {
            "itemID": 13,
            "slot": 0,
            "count": 1.0,
            "equipped": true,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 3.0,
                    "consumableCount": 1.0
                }
            ]
        },
        {
            "itemID": 5,
            "slot": 0,
            "count": 1.0,
            "equipped": false,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 4.0,
                    "consumableCount": -1.0
                }
            ]
        },
        {
            "itemID": 3,
            "slot": 0,
            "count": 1.0,
            "equipped": false,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 48.0,
                    "consumableCount": 11.0
                }
            ]
        },
        {
            "itemID": 3,
            "slot": 1,
            "count": 1.0,
            "equipped": false,
            "itemActionData": [
                {
                    "id": 0,
                    "count": 0.0,
                    "consumableCount": 11.0
                }
            ]
        }
    ]
}
Would you please include that information with your save state and incorrect load state?