Closed facugra closed 3 years ago
I'll leave this open for now, and experiment with ways to do this, but it's probably impossible.
Yeah I imagine this could get tricky to solve. At the very least you could try to empty the mod slots into the player's normal inventory during the OnDestroy() method of your BaseUnityPlugin. Then serialize what was moved and write it to a file. During the next load, read the file and move things from the player's inventory back to the mod slots. It doesn't handle the case where the player doesn't have any inventory space, but it's better than nothing...
Damn yeah, I just lost my Swamp Key and my troll armor set.
Thanks, I'll take a look
I enabled and then disabled this mod. All my upgraded armor and a troll piece were gone. That really sucks. If you also lose your armor when you die, then this mod is a no-go. Shouldn't even be available for people to use.
Update: I confirmed that I do not lose my equipment on death. Only if disable/remove the mod after having items in the extra slots. I did notice that in the config there is a warning about this problem, but there is no warning on the main mod description page, which is weird.
@Razinell When you die you don't loose the armor and items equipped to the quick slots. If your inventory was not full enough and can fit 8 items that are equipped, they will be present in the death tombstone. If your inventory is full and there is no space the equipment will drop on the floor around the tombstone.
In the end you only loose all items equipped when you de-activate the mod or f.e. load your character which was using the mod on Vanilla version of the game.
Hi Randy,
What about playerprefs.save?
https://docs.unity3d.com/ScriptReference/PlayerPrefs.Save.html
Is this possibly something you can use for your mod to save the slots to a file?
Player prefs is not an appropriate place to store save data, as per the unity docs. I'm working on a new version, just be patient everyone, please.
do not install the mod equipementandquickslot with the auto update of a mod launcher or you will lose everything in your slots https://valheim.thunderstore.io/package/RandyKnapp/EquipmentAndQuickSlots/2.0.1/
There's a big warning right on the page: !! READ ME FIRST BEFORE UPGRADING !!
Same here