Save/Load GVs

Thu 3. Dec 2020, 23:16

Im currently integrating AD to my UE4 project. The only things I can think of that save and load are GVs. The rest is done in project through stored variables (Flowplayer info, inventory, etc).

Currently happy with the GV debugger, but I'm currently figuring out how to handle GVs with my save system. How do we save and load GVs? There isn't a GV database variable, so I can't set it to "SaveGame" and store into my file. Do I have to create a custom array imported from the database and use that to manage variables? If that's the case, then the GV Debugger is useless.

Thanks! Any help is greatly appreciated.
sbnewsom
 
Posts: 3
Joined: Fri 21. Apr 2017, 10:14

Re: Save/Load GVs

Wed 9. Dec 2020, 15:25

sbnewsom wrote:Im currently integrating AD to my UE4 project. The only things I can think of that save and load are GVs. The rest is done in project through stored variables (Flowplayer info, inventory, etc).

Currently happy with the GV debugger, but I'm currently figuring out how to handle GVs with my save system. How do we save and load GVs? There isn't a GV database variable, so I can't set it to "SaveGame" and store into my file. Do I have to create a custom array imported from the database and use that to manage variables? If that's the case, then the GV Debugger is useless.

Thanks! Any help is greatly appreciated.

Hello sbnewsom,

you can use get "Get Articy GV" function to access all variable sets and variables. By casting and checking for names you can then store the current variable values in maps, mapping from variable name to a primitive of the relevant type (String, bool, int).
Upon loading, you can then access the the saved map data and load their values back into the game.

The GV debugger's purpose is to inspect (and change) variable values, as that helps with testing and as the name implies, debugging issues. For example, if you write some save/load code for your variables, you can see if the variable values were correctly restored by using the GV debugger.
User avatar
Quexlaw
Articy Staff
Articy Staff
 
Posts: 5
Joined: Thu 7. Jun 2018, 11:16

Re: Save/Load GVs

Mon 14. Dec 2020, 20:12

Quexlaw wrote:
sbnewsom wrote:Im currently integrating AD to my UE4 project. The only things I can think of that save and load are GVs. The rest is done in project through stored variables (Flowplayer info, inventory, etc).

Currently happy with the GV debugger, but I'm currently figuring out how to handle GVs with my save system. How do we save and load GVs? There isn't a GV database variable, so I can't set it to "SaveGame" and store into my file. Do I have to create a custom array imported from the database and use that to manage variables? If that's the case, then the GV Debugger is useless.

Thanks! Any help is greatly appreciated.

Hello sbnewsom,

you can use get "Get Articy GV" function to access all variable sets and variables. By casting and checking for names you can then store the current variable values in maps, mapping from variable name to a primitive of the relevant type (String, bool, int).
Upon loading, you can then access the the saved map data and load their values back into the game.

The GV debugger's purpose is to inspect (and change) variable values, as that helps with testing and as the name implies, debugging issues. For example, if you write some save/load code for your variables, you can see if the variable values were correctly restored by using the GV debugger.


Thanks, today it just hit me what I could possibly do and this just confirmed my belief. I could load in with the saved variables, and load them back into the database on load. Probably handled either through Game Instance or any game mode blueprint. And it'll resume.
sbnewsom
 
Posts: 3
Joined: Fri 21. Apr 2017, 10:14

Return to articy:draft Unreal Importer

Who is online

Users browsing this forum: No registered users and 11 guests

Who We Are
Contact Us
Social Links