Save Data for Script Canvas?

0

Hi I have been messing with trying to learn some c++ to work in LY, but to be honest I have never really touched it in my life, and script canvas is my favorite thing to do, my real question is when will script canvas have a save feature like to an xml file. I looked around and unreal's blueprints have a save feature, I know they are different and that cannot be a full explanation, but I also did some more looking and even Cryengine back in Cryengine 3 when LY was born it had a save system. Yes LY did have a save system right out on beta 1.0. Why is this not a feature yet for script canvas? I have been working on a game for over 6 months now and it is all going pretty well, lots of help from others as I build it, but I just recently realized my game is unplayable without this one feature. And flowgraph was taken out so any visual saving feature now is gone. I was looking at other posts and saw that someone working at LY was going to look into it and even put a sticky note on his pc, but that was in July and we are still here without it. I really hope this does not get overlooked, because I have been trying to use LY for a long time now, and my only other choice is to go to Unreal if necessary to continue my games progression. REMOVEDUPLOAD This is what flowgraph had back in 2016.

asked 3 years ago227 views
9 Answers
0
Accepted Answer

Hey @REDACTEDUSER

I wrote the instructions as a tutorial, hopefully it's enough to get you started, feel free to ask questions and let me know if you run into any errors in the tutorial and I'll update it.

I used Visual Studio Code to write the document, if you use VS Code you can press Ctrl+Shift+V to see the document as its formatted.

Edit: Alternatively, I uploaded it to github here

Save Tutorial.zip|attachment (59.3 KB)

answered 3 years ago
0

I would like to know if this is a feature coming within the next version if possible. Even in a PM if you do not want to share any bad news with the community, because if it is not coming I will need to start the transfer of everything and the rebuilding in another engine that gives me all the tools I need to create a successful project. Thanks for your time and I hope to hear from a dev soon. 👍

answered 3 years ago
0

I also hope that the preservation function will be implemented in the near future. Or at least the details of how to implement it with c++ However, I am also poorly versed in the c++ to the introduction of the necessary functions in the script canvas, just mandatory, and should stand first in the road map

answered 3 years ago
0

I posted that a while ago, unfortunately shifting priorities, resources, and the challenges in the past year made it difficult to do much progress on it. The problem with that gem is that it was designed in a very C++-centric way, which makes it non-trivial to add Script Canvas support, the data payload from Script Canvas would need to be marshalled into that SaveData binary format, and then It would support only a subset of Lumberyard's types.

That said, I've been thinking about this problem and I have a potential solution you could consider. There are libraries that add JSON support to Lua (such as https://github.com/rxi/json.lua). Using Script Events, you could send data from a Script Canvas graph for which you implement a Lua Script Event handler. Once the data is received by the Lua script, you could use json.lua to save this data out to file.

Conversely, when you load a json file from Lua with lua.json, you could send a Script Event that passes in the data and a Script Canvas graph would receive it.

It's not an ideal setup, but it may unblock you, we could work through this idea on discord if you'd like to give it a try.

answered 3 years ago
0

Honestly yes I would love to try this LY is my favorite pick for an engine, and I will try anything necessary to get rid of the only block I am having.

answered 3 years ago
0

Cool! The first step would be to do the basic setup for communicating Script Events between Script Canvas and Lua. I need a bit of time to setup a 1.27 build and I'll follow up with some examples on how to do this.

answered 3 years ago
0

I've made some progress on this tonight, I am able to send data from Script Canvas to Lua and save that data as a JSON file. I am now working on loading the data from a Lua script and sending it back to Script Canvas. Once I get that working well, I will write a tutorial for you; my goal is to make it easy for you to adapt it to your needs.

It's getting a bit late, but I will continue on it tomorrow.

answered 3 years ago
0

Thanks, I have downloaded the json.lua folder from github, not sure where to start with this, but I will wait to see what you come up with. 👍 (WashedUpR6#8009) not sure if you want to do this on discord dm, forums, or discord server.

answered 3 years ago
0

Thanks for all your hard work, I would love a tutorial on it also to learn on how to add it into our pipeline with the exact needs like you said. I can't thank you enough.

answered 3 years ago

This post is closed: Adding new answers, comments, and votes is disabled.