Undertale Dialogue Editor
This tool was created for use in Undertale Together's development, it's based on the script included in UndertaleModTool.
​
I decided to add it here in case anyone else wants to use it for their own mods.
Some things to keep in mind:
- The [Export lang file] option doesn't work when trying to save on the folder where the exe is located, please choose a different folder when exporting and MAKE SURE that the file has saved before closing the editor.
- This editor is only for editing jsons created by UndertaleWithJSONs.csx script, it can't edit Undertale's text_data directly.
​
- The json file has to be formatted before opening it (usually this is not a problem but due to the wacky way of opening json files in the editor this step is necessary), I use this website to do that, the amount of tabs doesn't matter.
- The Battles previews don't really work, they are there in the options and they render, but they don't reflect how they will look in-game, so don't use them as a true reference.
​
- The Undertale Together edition by default uses an iteration of New Papyrus created for Undertale Together, so don't use it unless you also use New Papyrus in your mod, more info below , if you are using the Undertale Together edition you can press [P] to switch between Normal and New Papyrus.
- Previews will heavily depend on the Font Assets used, by default the tool uses Undertale's vanilla fonts, an download with a Multilingual set of fonts is also included (the one used in Undertale Together), to avoid parity issues you can import your mod fonts using UndertaleModTool.
​
- The \[] flags are already set, the name of the Player is "Angela" (and "Camila" for P2 in Undertale Together", the gold amount is "9999", and the item name is picked at random from the item_name_# entries (i have no idea what happens if there are no entries lol)
​
How to Use:
Once you start the editor it will ask you to select a json file, select the lang_file you want to edit.
Use the Up and Down arrows to navigate the menu, press Enter to perform an action, press Backspace to edit and preview the current dialogue.
Press F1 to see the available flags, use the mouse wheel or the arrow keys to scroll down while in the help message.
​
How to add New Papyrus
This changes the spacing used in the Papyrus font to save some space, in order to add those changes to vanilla Undertale do the following steps
In obj_base_writer_Draw_0 locate the following line:
draw_text_transformed(finalx, finaly, myletter, (htextscale * halfscale), (vtextscale * halfscale), angle)
Above that line add the following:
if (myfont == fnt_papyrus)
{
if (myletter == "(")
offsetx += 2
if (myletter == ")")
offsetx += 2
if (myletter == ",")
offsety += 2
if (myletter == ".")
offsety += 2
if (myletter == "I" || myletter == "Í" || myletter == "Ï" || myletter == "Î" || myletter == "Ì")
offsetx -= 1
}
Then locate the following line:
if (myfont == fnt_papyrus)
{...}
And replace it with
if (myfont == fnt_papyrus)
{
if (myletter == "D")
letterx += 1
if (myletter == "Q")
letterx += 3
if (myletter == "M")
letterx += 1
if (myletter == "L")
letterx -= 2
if (myletter == "K")
letterx -= 1
if (myletter == "C" || myletter == "Ç")
letterx += 1
if (myletter == "." || myletter == "," || myletter == ";" || myletter == ":")
letterx -= 6
if (myletter == "!" || myletter == "¡")
letterx -= 6
if (myletter == "O" || myletter == "Ó" || myletter == "Ö" || myletter == "Ô" || myletter == "Ò" || myletter == "W")
letterx += 2
if (myletter == "I" || myletter == "Í" || myletter == "Ï" || myletter == "Î" || myletter == "Ì")
letterx -= 8
if (myletter == "T")
letterx -= 2
if (myletter == "P")
letterx -= 2
if (myletter == "R")
letterx -= 2
if (myletter == "A" || myletter == "Á" || myletter == "Ä" || myletter == "Â" || myletter == "À")
letterx += 1
if (myletter == "H")
letterx += 0
if (myletter == "B")
letterx += 1
if (myletter == "G")
letterx += 1
if (myletter == "F")
letterx -= 3
if (myletter == "?" || myletter == "¿")
letterx -= 5
if (myletter == "'")
letterx -= 6
if (myletter == "J")
letterx -= 1
if (myletter == "E" || myletter == "É" || myletter == "Ë" || myletter == "Ê" || myletter == "È")
letterx -= 1
if (myletter == " ")
letterx -= 4
if (myletter == "(" || myletter == ")" || myletter == chr(34))
letterx -= 3
if (myletter == "," || myletter == ".")
letterx -= 3
if (myletter == "V")
letterx -= 1
}
​