Save to human readable format

We currently conceptualize configurators for potential customers. Basically we have come very far with the Unreal Engine and there is just one last thing that bothers me a little. Not beeing able to write out a save file or let´s say just some variables to a human readable format. Like a text file or xml. On the customer side it is very likely that data about color or any other kind of possible configuration needs to be used in other systems or databases. But it seems there is no real way to output let´s say the color of an object to a text file. I mean if I can print a variable to the log it probably shouldn´t be that hard to write this out to a simple text file. But as someone who is into Blueprints and not C Programming there seems to be no way at the moment to do this.

Would be great to be able to read and save UStruct as plain text, much as data tables do.

I´m rather an artist than a programmer but I script wherever I can and as far as my knowledge allows it :slight_smile: I did something similar in Max with Maxscript and I like the way it´s done there. Maybe there are better ways but this is how it looks in maxscript.

setINISetting (presetsv as string) “Sun” “colorR” (Direction_ro.sltSunColorpk.color.r as string)
setINISetting (presetsv as string) “Sun” “colorG” (Direction_ro.sltSunColorpk.color.g as string)
setINISetting (presetsv as string) “Sun” “colorB” (Direction_ro.sltSunColorpk.color.b as string)

So basically you set a group, a name and a value.
It looks like this in the written text file

[Initialise]
Scale=5.0
[Sun]
Azimuth=53.72
Height=36.91
Intensity=72.13
colorR=255.0
colorG=206.0
colorB=167.0

and this is how you load and assign it again. you just query group and name and write it back into a variable.

stload005 = getINISetting (presetld as string) “Sun” “ColorR”
stload006 = getINISetting (presetld as string) “Sun” “ColorG”
stload007 = getINISetting (presetld as string) “Sun” “ColorB”
$_Sun.color.r = stload005 as float
$_Sun.color.g = stload006 as float
$_Sun.color.b = stload007 as float

I could imagine something similar in UE4. One node to set a group, name and value and another node where you would plug in all the previous nodes wich (on event) writes out the file to a definable location and name.
Loading could be similar. One node to load the whole file and one to pick a specific group, name and datatype to write it back into a variable.

I would like to load/save in this type of format for BP to change in external editors etc…

You have to do a bit of work yourself but you should have a look at FJsonObjectConverter::UStructToJsonObject and FJsonObjectConverter::JsonObjectToUStruct to see if it gives you what you want