x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Exporting character data from struct to JSON/CSV

I'm working on a way to export character data from a struct to a JSON or CSV file, but I'm kinda stuck.

We have character blueprints that derive from a basic character class. This class contains a struct with attributes like health, actions points, you name it. When creating blueprints, we can change those values in the editor to give characters starting values.

Now I know that you can easily export unreal data tables since the editor provides export functions for those, so I want to "connect" the structs from character blueprints to corresponding data tables, which can then be exported.

Deriving our struct from FTableRowBase (like shown here: https://docs.unrealengine.com/en-us/Gameplay/DataDriven) at least makes it to work with data tables but I'd have to create a row for each character manually. I want the changes made to the character blueprint to be taken also to the data table. I thought of creating data tables besides the character blueprints and then just putting a reference to the table in the blueprint, but I can't use pointers to structs and now I'm kinda out of ideas.

Any suggestions on this would be really much appreciated.

Product Version: UE 4.19
Tags:
more ▼

asked Nov 20 '18 at 08:43 PM in Using UE4

avatar image

GenerationLost
6 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Edit: I could solve it giving the character blueprins a pointer variable for a UDataTable and an FName identifier, so each character has the table and can look up it's specific content by finding it's corresponding row using it's identifier name. This way I still have to manually insert each attributes again, but this will later only be done in the table itself, not in each character blueprint anymore, since they keep a ref to the table anyway.

Not the best solution in terms of usability, I think, since it'd be more convenient to be able to change character stats within it's own blueprint, but that should not be necessary later, since then it'll all be up to our artists using their own tool.

more ▼

answered Nov 26 '18 at 05:30 PM

avatar image

GenerationLost
6 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question