Suggestion - persistent local PC/item variables in localvault
Taro94
Member Posts: 125
So, for those who don't know - as of now, any local variables saved on the PC object or one of their items are deleted upon exporting the character, unless they are server vault characters.
I understand the intention behind this design: it is assumed that the PC won't need its variables from any previous module they played in when migrating to a new one and such previously stored variables can even potentially cause some unintended behavior (for example by replaying a module with the same character and having variables from a previous playthrough stored).
At the same time, I feel it could be handled in a much better way, for example by adding a ClearAllVariables function that builders could decide to use to avoid scenarios such as the one above. This would also give them control over what variables they'd like to clear - for example, they're likely to store variables on the PC object only and thus not need to clear any item variables. Not clearing item variables would make sequencer items (which function based on variables) work after exporting a character and starting a new module.
Alternatively, even a global switch on a module that would allow builders to have all variables on the PC and their items clean on entry or not would be a very welcome feature. This solution would make it easy to have pre-EE modules clear variables by default.
Remember that variable clear on character export is not always desired in local vault. Aside from the aforementioned sequencer clear, a builder may want their PCs to be able to "drop-in and drop-out" - that is, exporting their character, then starting a new game with it (for example to switch from an SP session to multiplayer) and continuing their progress in some way. This would work very well in less story-focused modules such as Good VS Evil III or Infinite Dungeons.
I'll admit that my own module, which is original in that it's an SP/LAN persistent world project, would also benefit from persistent local variables in localvault greatly. At the moment the only reliable workaround is a database, which is VERY inconvenient when switching between singleplayer and multiplayer sessions (send your database to the host, play on multiplayer, then have the host send the updated database back to you, etc). Not to mention potential problems related with deleting the character, but not its database, or playing with an earlier exported character version but with newer data from database, etc.
So, please, consider allowing local variables on exported character to persist They don't need to persist by default, but any way of allowing module builders to permit it would be extremely valuable.
I understand the intention behind this design: it is assumed that the PC won't need its variables from any previous module they played in when migrating to a new one and such previously stored variables can even potentially cause some unintended behavior (for example by replaying a module with the same character and having variables from a previous playthrough stored).
At the same time, I feel it could be handled in a much better way, for example by adding a ClearAllVariables function that builders could decide to use to avoid scenarios such as the one above. This would also give them control over what variables they'd like to clear - for example, they're likely to store variables on the PC object only and thus not need to clear any item variables. Not clearing item variables would make sequencer items (which function based on variables) work after exporting a character and starting a new module.
Alternatively, even a global switch on a module that would allow builders to have all variables on the PC and their items clean on entry or not would be a very welcome feature. This solution would make it easy to have pre-EE modules clear variables by default.
Remember that variable clear on character export is not always desired in local vault. Aside from the aforementioned sequencer clear, a builder may want their PCs to be able to "drop-in and drop-out" - that is, exporting their character, then starting a new game with it (for example to switch from an SP session to multiplayer) and continuing their progress in some way. This would work very well in less story-focused modules such as Good VS Evil III or Infinite Dungeons.
I'll admit that my own module, which is original in that it's an SP/LAN persistent world project, would also benefit from persistent local variables in localvault greatly. At the moment the only reliable workaround is a database, which is VERY inconvenient when switching between singleplayer and multiplayer sessions (send your database to the host, play on multiplayer, then have the host send the updated database back to you, etc). Not to mention potential problems related with deleting the character, but not its database, or playing with an earlier exported character version but with newer data from database, etc.
So, please, consider allowing local variables on exported character to persist They don't need to persist by default, but any way of allowing module builders to permit it would be extremely valuable.
1
Comments
A solution I'd prefer would be storing all the data as a big string saved on the PC skin's unidentified description (or identified, or both). It works rather well, but the description is, unfortunately, very limited and I can't store much this way.