In my game I save data on the level in a save game object / file. The save game objects help to define certain aspects of the level, such as where characters are placed and which areas are blocked off from character movement. These data files are meant to be persistent and installed with the game. Is this a bad practice and would it cause any problems? My other option seems to be data entry into tables, but for the amount of data entered, this could be tedious. I was using runtime of the game itself, put into a certain mode to create the save files, stream lining the process and I was going to remove the edit mode from the final product.
I did exactly this with my game. I used the save game in editor mode, actually. But once I was done getting the level right, then I would save it.
If the data is only in the save game, you might have a problem, because it’s not shipped with the package, and its location is not the same.
So you might want to make a quick prototype and check it out.
Thanks for the answer.
Yeah, that’s what I was afraid of. I’m thinking I will probably dump the data into a cvs and then load into a data table, which I assume shouldn’t be too hard if I use C++. If you don’t mind me asking, how did you save the data?
You can totally use data tables without CPP.
I saved the data using the usual save game nodes. You can call the code from the editor, as long as the custom event that starts the chain is ‘call i editor’
It took me a few moments to get what you were saying because UE is still a little foreign to me. I’ve only been using it for a couple of months. I’ve never used anything before where you can execute code at compile so I guess I haven’t thought about the ramifications. So if I understand it correctly, you are moving the data from the save file to something like a blueprint class, so it is basically filling out the data structures in the object with all the default values you want when you compile. That’s a useful trick and it sounds like a pretty easy fix.
You write the code for the save game exactly as you would for runtime. But when you make a node ‘call in editor’, you get a button
and you can run the code from the editor.