2
\$\begingroup\$

For a college project that spans a few months, I'm working on a text adventure game in Unreal. I would like to state up-front that even if I wanted to use code, I can't. For some reason my college computers don't have Visual Studio or any other IDE UE supports.

I've made multiple text adventures before (in Flash and Unity) using custom frameworks that get and parse JSON data for the game.

I have no idea how I can accomplish a similar task (loading and parsing JSON data) using UE4's Blueprints. Can anyone help me come up with some sort of way I could go about doing this?

\$\endgroup\$
6
  • \$\begingroup\$ You know this is theoretically possible. I don't know if it is practically viable. This should get you kickstarted: answers.unrealengine.com/questions/120392/… \$\endgroup\$ Jan 23, 2018 at 20:35
  • 1
    \$\begingroup\$ What's the specific thing you've tried, and that isn't working? Loading text files? Printing them to the screen in some nice fashion? Getting the user to type stuff in? As it stands it sounds like you're basically asking "how do I mane an entire text adventure in Unreal?" which is fundamentally one of our off-topic types of questions. \$\endgroup\$
    – user1430
    Jan 23, 2018 at 20:55
  • \$\begingroup\$ That's not what I'm asking at all, Josh. I'm asking how the hell I can even start going to about creating the text adventure. What options I have with blueprints that allows me to store data like json etc. I haven't even started since I have no idea where to begin. \$\endgroup\$ Jan 23, 2018 at 21:23
  • 1
    \$\begingroup\$ So would "How can I store and retrieve JSON data using Blueprints?" be a reasonable rephrasing of your question? \$\endgroup\$
    – user1430
    Jan 23, 2018 at 21:45
  • 1
    \$\begingroup\$ Rather than close this as "how to get started," I've just gone ahead and edited it to focus on the above JSON parsing topic, which is on-topic. \$\endgroup\$
    – user1430
    Jan 24, 2018 at 16:23

1 Answer 1

4
+100
\$\begingroup\$

If you don't need to keep the files in .json, you can simply create a "Data Table", Unreal's desireble method for storing static data. Note that "static" is the key word here, since a data table is not a data base, and the entrys cannot be update during gameplay, only in engine. Right clicking the data table at the content explorer will give you an option to export it to JSON or CSV, and then you can edit it in your prefered IDE. After editing, you can import it back, to update your data table.

If you do need to use .json files (or store data as blueprint variables), you need to get or create a JSON parser, probably in C++, I'm not quite sure if you can do it with blueprints or not. Since it's a bit more complex, you have to study it, and explaning here is not viable.

This may help you as "search words":

  • PublicDependencyModuleNames.AddRange(new string[] { "Json", "JsonUtilities" })
  • FJsonObject
  • Unreal Engine json parser
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .