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"

Json string to table from database for inventory system

Hello I am working with the rpg inventory system and am trying to figure out how to send my table data to my database as a string then on load have the data put back into the table from the data base so as that players always have the same items that they had from the last time that they were logged in.

here is what I have so far.

We get the players inventory from the table on exiting the client and make it into a string then that string is emited to the data base

alt text That then prints this string into the database.. note the player only has a leather hood equipped on leaving the game so all other slots are empty

     { Inventory: '{"shoulders":"None","chest":"None","hands":"None","legs":"None","feet":"None","accessory":"None","back":"None","rightRing":"None","leftRing":"None","waist":"None","trinket":"None","mainHand":"None","offHand":"None","inventory":[{"amount":1,"itemId":"None"}],"head":"Armor_Leather_Hood"}' 

When the player reconnects we then attempt to retrieve the string and load it into the table however somewhere I have gone wrong :(

alt text

Does anyone by chance know the way as to which I can make this work or where I have slipped up in the bps?

Thank you for your time.

Product Version: UE 4.20
save-string.png (360.6 kB)
load-items.png (505.6 kB)
more ▼

asked Dec 21 '18 at 05:54 PM in Blueprint Scripting

avatar image

18 6 9 12

avatar image Mark.Holland Apr 17 '19 at 01:53 PM

Did you get this to work?

I'm trying to do something similar but have discovered that the filldatatable nodes only work in editor so won't work in a packaged game.

Issue: https://issues.unrealengine.com/issue/UE-64206 My question: https://answers.unrealengine.com/questions/890380/dynamic-localisation-runtime-data-in-blueprints.html

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

0 answers: sort voted first
Be the first one to answer this question
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