Web UI (HTML/CSS/JS Interface Widgets)

Hey guys just a quick update on a useful new feature…but I can’t start without mentioning this awful new forum interface. Not only is it extremely unreadable with the overbolded text but the overall layout and spacing of everything is just ridiculous. Would you expect anything less from Epic Games though? This is like the perfect metaphor for how they treat their engine updates…half-arssed and unfinished.

MAILING LIST

Plus I can’t even edit the first post anymore which means making updates to this thread isn’t really going to be possible any time soon. So since the forums are pretty much bricked what we might do is finally build out our website. Right now there was nothing but some placeholder pages and a link to the documentation, but we could get it all updated with actual images and descriptions of the plugins. Most importantly we would include an option to sign up for an email list so you can get updates about our plugins without having to visit these awful forums anymore. I’ll be sure to let you all know when I’ve taken some time to get that setup, but I definitely think that’s what we’re going to do.

COMMENTS + TRAILING COMMAS

Anyway moving on to the update. We’ve been trying to migrate from using UE4-based INI files to our own custom JSON files. This not only provides more flexibility but also allows you to lock down your INI files so end-users cannot edit those settings (such as rendering or scalability settings to cheat and hide foliage). It creates a great separation between engine settings you don’t want them to touch and your own custom game settings.

What I mean is, you usually have Engine.ini and Game.ini and Input.ini and GameUserSettings.ini and so on all in your AppData folder. But you shouldn’t have any of these in there except for GameUserSettings.ini and maybe Input.ini but as usual these engine developers don’t care at all about security. So buried away deep in the C++ code (without any access from project settings) is a way to disable all INI files except the GameUserSettings.ini which forces these INI files to ONLY be in the PAK files of your shipping builds.

Here’s the problem though. If you do this and start using JSON files as a new file type for your custom settings files, they quickly become unusable due to the JSON standard. It does not support trailing commas and even worse it does not support line or block comments:

json2

Since this is all considered invalid JSON, if you accidently include a trailing comma, your JSON will not parse. If you accidently include a comment somewhere, your JSON will not parse.

So there’s a significant difference between wanting to parse valid JSON for HTTP which should remain strict, and user-edited JSON that could easily become “invalid” even though their text editor had no problem with them adding the comments or a trailing comma.

Therefore the following function has been developed for this very purpose:

RESEARCH + RANT

Now when initially trying to tackle this problem I came across a few examples on Stack Overflow. No joke, some dude tried to solve it with RegEx, was all like “yea I made sure to cover all the potential options” and had an entire explanation about how RegEx will do greedy capturing, ect. In fact this was the “accepted solution” and had over 100 upvotes on it. Can you believe so many programmers are this stupid? Literally the only way to properly parse/capture comments is with TOKENIZATION! That example from Stack Overflow? It can literally be broken in 2 seconds by using an escape character in your strings:

{ "this is a key": "this is a string with \"quotes\" in it" }

And it would have absolutely no idea what to do because RegEx is OBVIOUSLY not the right tool for the job at all. So why bring this up? Because we actually took the time to implement the RIGHT SOLUTION which properly TOKENIZES and knows the context of whether a character is escaped, inside a comment, or inside a string. So you don’t have to worry about “accepted solution” Stack Overflow morons putting inferior code into your games that will ultimately just break the moment someone tries to type a string with a quote in it.

Anyway this function (along with probably some basic load/save .json file functions) should be included in the next update. Again I will let you all know about creating a mailing list so you all don’t have to use the forums anymore for updates.