Announcement

Collapse
No announcement yet.

Save to human readable format

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] 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.
    Last edited by netfrag-sam; 10-21-2016, 09:08 AM.

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

    Comment


      #3
      I´m rather an artist than a programmer but I script wherever I can and as far as my knowledge allows it 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.

      Comment


        #4
        I would like to load/save in this type of format for BP to change in external editors etc...
        Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
        Hevedy - Image Tools: https://hevedy.itch.io/imagetools

        Comment


          #5
          Originally posted by CriErr View Post
          Would be great to be able to read and save UStruct as plain text, much as data tables do.
          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

          Comment

          Working...
          X