Forum rules - please read before posting.

Does AC write Inventory Item Properties in its save files?

edited October 2018 in Technical Q&A
Custom properties for inventory items are pretty great.
I use them to have a description to gathered in the game.
But I also have items (a good handful) that have various states (variable wise) that can dynamically change depending on in-game events. And to keep track of this in a tidy and an easy way, I thought of using that feature for the inventory items (using a popup in this case) as opposed of using Global Variables that get easily lost in a growing huge list.

However, I noticed that after loading a save file with item properties that were changed runtime, these didn't seem to have been saved.
Did I forget something to setup? Does AC actually save item properties that are changed during runtime?

Unity 2017.1.03f - AC 1.65.0

Comments

  • No, it doesn't - inventory properties are designed to be read-only.

    You could, however, incorporate this with a custom script - see this tutorial.
  • Thanks!
    I followed that tutorial.
    What I did then is that I gathered all the dynamic Inventory Item properties into a AC.GVar list, used the AC.SaveSystem.CreateVariablesData method and stored the resulted string in a Global Variable before saving.
    Then the string is parsed back into Inventory Item property values after the loading is finished.

    So far it works fine.
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.