Can Auto Save Store Playmaker Global Variables?

Discussion and help for Easy Save 3
Post Reply
Mulbin
Posts: 7
Joined: Sat Aug 05, 2023 8:20 pm

Can Auto Save Store Playmaker Global Variables?

Post by Mulbin »

I'm using the auto save feature (really a very nice system!) but I've noticed while FSM states are being saved, it doesn't seem to be saving the current value of global variables associated with the FSM. Is there any way to do this with Auto Save?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Can Auto Save Store Playmaker Global Variables?

Post by Joel »

Hi there,

If you want to save PlayMaker variables you should use the PlayMaker actions as they can only be saved from within the FSM:

https://docs.moodkie.com/easy-save-3/es ... -overview/

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Mulbin
Posts: 7
Joined: Sat Aug 05, 2023 8:20 pm

Re: Can Auto Save Store Playmaker Global Variables?

Post by Mulbin »

Oh, that's a shame. Any plans to add suport for variables to the auto save? Seems odd to have something as huge as variable states ommited from the system.
Mulbin
Posts: 7
Joined: Sat Aug 05, 2023 8:20 pm

Re: Can Auto Save Store Playmaker Global Variables?

Post by Mulbin »

So what is the best method to do this? I note that the playmaker action only seems to be able to save variables from the FSM the action is actually in... I can't make an FSM that reaches out to save all the variables in other FSMs.

So I guess for global variables I would make an FSM that grabs the value of every single global in the scene so they are referenced by the fsm.. then save all?

Are local variables also not saved by Auto Save? I can't see how this would work otherwise as each FSM would have to trigger "load all" in every single node, just in case thathappens to be the active node at the moment of saving.... thats going to create a lot of overhead if the game is constantly reloading variables potentially every frame.
Mulbin
Posts: 7
Joined: Sat Aug 05, 2023 8:20 pm

Re: Can Auto Save Store Playmaker Global Variables?

Post by Mulbin »

Sorry more questions... am I right in thinking if I'm using auto save, and also using an FSM with "save multiple" they will have to be saved as two seperate .es3 files? I can't just append all the additional keys to the same file?

Edit - ignore this question! I've found it works so long as it records the auto save first! I was trying to store it after the "save multiple".

Other questions still need an answer though if possible.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Can Auto Save Store Playmaker Global Variables?

Post by Joel »

Hi there,
Mulbin wrote: Sun Aug 06, 2023 1:51 pm Oh, that's a shame. Any plans to add suport for variables to the auto save? Seems odd to have something as huge as variable states ommited from the system.
It's omitted because FSMs aren't serializable at runtime, so we can't save FSMs.

So what is the best method to do this? I note that the playmaker action only seems to be able to save variables from the FSM the action is actually in... I can't make an FSM that reaches out to save all the variables in other FSMs.
For local variables you would need to save them within the FSM they're declared (this is a limitation of PlayMaker rather than at our end).

You can access global variables from any FSM as this is the purpose of global variables. You can use the Save All action with the Save Global Variables option checked if you want to save all global variables (see https://docs.moodkie.com/easy-save-3/es ... ll-action/).
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply