Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to add new lines

A topic by Smarmellata di Pistacchi created 40 days ago Views: 88 Replies: 4
Viewing posts 1 to 3

Can I just add the new line in the lua/moon files related to the character (in the dialogues folder) and then add it to the translated lua or is it more complicated than that?

When you add a line you need to assign an id to it (the number that you use in the translation file). Just make sure it's something that's not already used and you'll be fine.

Thank you very much! And do you confirm that I also need to edit the dialogue file (for example wilson.lua + wilson.moon) in addition to text_translated.lua? Just wanted to make extra sure so I don't break anything

Yes, you first need to add the line to the game source, and then to the translation file. When added to the source it needs to be wrapped appropriately—for example if Ines says something, it should be something like INES(1025, "This is the text"), where 1025 is the id you assigned.

Thank you very much! I also figured I needed to add the English line to the text_english.lua file in the main folder (otherwise the game would freeze). In case anyone else wanted to know the steps:

  1. Find the last dialogue ID, which is the number in square brackets in the text_translated.lua file. In this case the last one is t[653], so any new lines of dialogue should be 654 or higher.
  2. Unzip game.zip in a separate folder (so you don't mix up files) and open the dialogue folder. Open the files belonging to the character (unless it's Ines, I guess, in which case you'll problably need to find the exact spot/file depending on the dialogue).
  3. Add your new line in both XXX.lua and XXX.moon by following the same syntaxt. For example:
    say(ines, INES(654, "This is a new line of text!."))
  4. Remember to create a new game.zip (containing all files and folders directly, there should be no "game" folder) that contains the edited files and place it in the main folder.
  5. Add your line in both text_english.lua and text_translated.lua in the main folder. For example:
    t[654] = "This is a new line of text!" -- comment with the speaker and the folder/file you can find the line in, if you want

 Any step you miss or do incorrectly will break the game so be careful!