Ok so I've worked a bit more on the import/export scripts from the JLC format, and fixed one issue with the JS, one that you could probably implement to help all.
So here are my thoughts/fixes:
1) In the formatActorNames function, I changed this line to remove tabs. This now causes each character to have its name in a consistent color throughout the script. Before it looked like my image a few posts up, due to the reason that tab-characters were included in the names, causing the actorColors array to detect them as different actors.
Here's the codefix (just add replace.. to the end)
Code: Select all
var characterName = text.getText().replace(/\t/g, '');
2) I need to add instructions to make connections back in the tree. This is the current format I'm using, along with some custom code in the google doc for the dialog formatter to highlight it. So instead of having a separate tag to jump to, I simple tell it to jump to a specific branch. I also imaging adding -->#13 would make it jump to that conversation. I haven't made the code for it in the importer yet, so that's what I would love some suggestions for.
Is there perhaps some sequencer command or lua command I could use to make jumps to:
a) another branch within the same conversation
b) to the start of the conversation or
c) a different conversation?
That would make it easier than to modify the importer. But if that's not possible, I'm willing change the importer, but it still would help with some guides on how to locate a node by it's "Menu Text" and make a connection.
- Skärmavbild 2021-02-23 kl. 19.22.57.png (185.2 KiB) Viewed 880 times
3) Another thing that gets in the way is the repeated [branch] command in the end which I mentioned before. It's very easy to forget to change the one in the end when you change the branch command. At first I through the indentation was important, but I realized that it only jumps back/forth in the depthLevel depending on if the same [branch] is or isn't detected. I guess I could convert it so it detects the indentation level with tabs, kinda like Python, but the problem is that Google docs does this super annoying thing where it sets the first line indent in some cases, so there really isn't a tab in the file. Do you know if it's possible to disable this behavior, and just have tabs?
- dialog.gif (934.91 KiB) Viewed 880 times
My plan is to hand this over to our writer soon, and trying make it as easy as possible for him to focus on the text, and not on codes