All was working well except as I’m updating the story people using an old save can’t access any new items I come up with as (I think) the initialisation passages don’t run again.
I can’t add solely the new items to a new passage when I publish a new “chapter” as that seems to remove the old objects,
and if I write all the objects as a massive list each time I add to the story then that will overwrite the inventory/ object location data (the inv above) again messing with old save files.
Essentially I’ve been using $objects as a spreadsheet, but can’t add new rows to it when I publish a new “chapter”. Any advice appreciated
StoryInit loads only at the start of a game (playthrough). If you update the StoryInit passage and a player loads an old save, the new elements won’t be added to that old save.
Thanks. The reddit example looks like it could do what I want but will probably be quite laborious to code for each thing I’ll need to do it with
What I guess I’m really after was a way of pushing additional line items (like a “pink hat”…) into my $objects variable after it was initialised without overwriting it as I assume I can do that outside of Storyinit and then wont have to mess around with save files.
However, as explained by Manon, if the end-user loads a Save from a point in time before the 'purple gloves' property was added to $objects then that property will cease to exist.
Note: Ideally static data like the Item’s price / type / image should not be stored in a Story variable, because that data doesn’t change over the life-cycle of a specific play-through.
Great thanks. So I’ll shift all my static data into a non story variable (will have to look up into what - only really figured out $ and _ variables) and rework the non static ones that are causing the issue (really just inventory) into something better able to survive the load process. I’m sure there’s plenty of examples out there - will just have to do some research
At least I learned this relatively early in writing this thing.