Is there a way to parse a file offline instead of at runtime?

Hello!

I’m thinking about making a visual novel game and I would like to have some advice on which way to go. I plan to write all of my dialogs using my own version of Inkle’s ink language and I would like to write my own ink files parser. I know that some people are already working on this and that there are other ways to write dialogs using other languages but I’d really like to make it from sractch so that I can learn how to parse files the correct way :slight_smile:

My first question is: are there any good ressources on parsing files using C++ and UE4 that could help me kickstart my development? I’ve searched on the internet and I am currently working on some of the tutorials found on youtube.

My second question (the important one imo) is that I’m searching for a way to parse files offline and put them directly into some sort of data class instead of parsing them at runtime and filing some arrays with all of the dialogs that I need to show.

Visual novel stuff is well covered actually and google searches should get you all you need, look at dialog plugins too.

Parsing files - depends on format, you just need general c++ to parse some custom text file format (I don’t know what Ink is sorry)

Offline files - yes I think UE4 will basically autoimport etc. if you give it a file in a table format like CSV

It’s easy to load text files using File Helper class:
https://api.unrealengine.com/INT/API/Runtime/Core/Misc/FFileHelper/index.html

On GitHub somewhere there’s also a demo plugin to import text files as asset.

Also there are API to handle json or xml inside UE, you might take a look, it is way better base your stuff in a common text format like those.

I recommend using JSON if it’s convenient too, it’s a good flexible format and loads pretty fast.

Thanks a lot for you tips :slight_smile: At first, I wanted to use JSON but found it really hard to digest when you just want to read the dialogs. This is why I decided to go with Ink. But what’s cool is that I just found that the Inky editor allows for exporting my dialogs in JSON format so that’s perfect. I’ll try to implement these and I will come back to you guys to tell you how well it went. Thanks again! :wink:

[USER=“164335”]Evans Bohl[/USER] Hey, I’m just curious how it worked out for you ? I also would like to use Ink to write my Dialogues, and I am sitting now here, looking at the 2 possible github-solutions, GitHub - DavidColson/UnrealInk: Integration of the Ink language into Unreal 4 (https://github.com/ and GitHub - mrbandler/InkUE4Integration: Port from the Unity ink integration (https://github.com/inkl , both which I have difficulties to get running as I am a bit lost currently with c++ and the lack of instructionsteps. Also thinking about writing something similar my own. How did you move forward ? Any suggestions ? Best regards, Dave

Hey @xandercageguy , unfortunately I didn’t continue with ink. But I found a really cool plugin which is called Not Yet Dialog System. I also followed this series of tutorials which helped me a lot: https://www.youtube.com/watch?v=94AEp_dZAHU&list=PLOm1RB2Iez5sJlutZlRGurxLZuzOfVfHd
Hope it helps :slight_smile: