I've got a rather large data structure for my protagonist which I refer to as $hero
I use variables with properties (i.e., separated with dots, sometimes more than once) like $hero.health.current and $hero.health.maximum
<<set $hero to >>
<<set $hero.health to >>
<<set $hero.health.current to 0>>
<<set $hero.health.maximum to 30>>
All of this occurs inside my StoryInit passage and everything is okay.
However, when I go to autosave my game progress I've noticed that it seems to be saving only SIMPLE variables, like $hello (ie. those without the dots).
I would like to be able to save my data structure for $hero to include all of the items belonging to it.
How can I do this? I've looked at the docs but nothing obvious jumps out at me that I'm doing wrong.
Does it have anything to do with making these objects serializable?
A code snippet of how I might be able to save the data inside of $hero would be helpful.
Thanks in advance.