So on the Pangya Mobile front.

The game has a story, but all the dialogue is in a GameObject/MonoBehaviour, so I can only dump it (the thing you see on the left)

So, by hand, with a lot of Regex replacing I turned a dump into valid JSON.

the whole file is around 8MB/273k lines

@pixel i want to see the hellspwan regex to do this

@cato it was several, but considering the structure, especially with typing it wasn't that hard.

it definitely was a bit more finicky to get different object in arrays done properly, but using the array indices in the dump doing something like \[\d+\]\n.+ and replacing that with },\n{ worked fine

My indentations was completely messed up, I just used a formatter afterwards to clean it up.

@cato and the types also made stuff like:

int (\w) = (\d+) -> "$1": $2,

possible, for example

so it was more handywork than tough regexes, but waaay less work than trying to write a parser for the dump format!

@pixel yeah :D i love using regex for that kinda stuff

Sign in to participate in the conversation

Welcome to, pixeldesu's personal Mastodon instance!