Mod:Create a dialogue
This tutorial shows how to create or edit dialogs in The Sum.
Required tools
Before You Begin
Please take some time to browse the "Speech" section of the readme file from the Fallout Tactics editor.
Create a dialogue
Access the .txt file of the location
Each location has its dialog file (with an eponymous code name) already imported. It is in Game/NousAurons/locale/ (French version) and Game/core/locale/ (English version). Some of these files are in a folder of the same name to allow to also store voice files.
Writing introduction
- Open the two files 'location_code_name_where_the_dialogue_takes_place.txt and for each of them:
- Press ctrl+fand search for "// DIALOGUES"
- Copy/paste the following code:
ADD_Di_1 = {<Ck>- Dialog portion}
- Press
- Add as many dialog portions as you need.
- Go to the Filemenu and thenSave.
Writing convention
- Each dialog code name (ex: AJOUT_Di_1) must be unique in the file where it is added.
- AJOUT_: helps to find the dialog first in the alphabetical list when it is integrated in the Level editor.
- Di_: indicates that it is a portion of a dialog.
- Acc: indicates that this is the character's first piece of dialogue.
- R: indicates that this is a response from the player.
- Rdm followed by a number from 1 to 6: is used to indicate that the dialogue portion will float over the character's head.
- OBJ: indicates that the dialogue portion is a quest label, or related to a quest.
- Pers followed by a number from 1 to 6: refers to a character whose code name is identical in the level editor.
- Int and Cha: indicate a portion of dialogue that is triggered when the player has a low Intelligence or Charisma score.
- <Ck>-: is placed in any dialog to change the color of the text to black and precede it with a dash.
- A few short phrases can be added to the dialog code name to differentiate it (ex: Mad)The characters "/" and ":" cannot be used as is in dialogs. Replace them with "^" and "#" to display them properly in the game
Writing steps
- Access the appropriate .txt files (those with the code name of the location where the dialogue will be added)
- Choose the code name of the character speaking (if possible identical to the code name of a character already in the location, like Pers1)
- Write an introduction line:
ADD_Di_Pers1_Acc = {<Ck>- Hello!}
- Add or don't add a player reply:
ADD_Di_Pers1_AccR = {<Ck>- Hi!}
This response may require certain conditions, indicated after the dialog portion as a comment (preceded by //). Ex: //Intelligence < 5 - Add the dialogs that logically follow:
ADD_Di_Pers1_1 = {<Ck>- Would you have a minute to help me?} ADD_Di_Pers1_1R = {<Ck>- I'd love to!} ADD_Di_Pers1_1R_Refuse_to_help = {<Ck>- Forget it!} //Insensible ADD_Di_Pers1_2 = {<Ck>- Wonderful. I was about to pass out, this is too heavy!} ADD_Di_Pers1_2_Refuse_help = {<Ck>- This is so insensitive of you!}
- Add some portions of dialogue appearing above the character's head:
ADD_Di_Pers1_Rdm1 = {Beautiful day still<C->} ADD_Di_Pers1_Rdm2 = {<Cr>This is heavy!<C->} ADD_Di_Pers1_Rdm3 = {What's that?<C->} ADD_Di_Pers1_Rdm4 = {I could use some help...<C->} ADD_Di_Pers1_Rdm5 = {<Co>How are the others doing?<C->} ADD_Di_Pers1_Rdm6 = {I try as hard as I can, it's useless.<C->}
Writing codes
The following codes are used to color the text and add special characters, for example.
- \n: Skip a line.
- <C*> and <C->: Add/remove a Color. Replace *' with b (blue), c (cyan), k (black), m (magenta), o (orange), r (red), w (white) or y (yellow).
- <rgb:***,***,***>: Add a specific RGB color. Replace *** with a number from 1 to 255.
- <b+> and <b->: Add/Remove Bold.
- <Jl>, <Jc>, <Jr> and <Jj>: Left-aligned, center-aligned, right-aligned or justified text.
→ More information (English)
Add dialog to Level editor
Open the location file (level editor)
- Open the folder Game/ then FT Improver.EXE.
- Pass the videos by clicking on them.
- Click on ⦿ MORE.
- Click ⦿ LEVEL EDITOR.
- Navigate to the Filemenu thenOpen.
- Open the file of the location previously created which must end with .mis.
Add the dialog
- Click on the Template:False Button tab.
- Click on the Template:False Button button at the bottom.
- Click on the Template:False Button button at the top.
- Scroll left to the bottom of the list.
- Click on Template:False Button and replace the "New Node" with the code name of your first portion of the dialog under the Template:False Button button.
- ✔ Floating(checked by default): floats the dialog over the character's head.
- Windowed: adds the dialog in a box at the bottom of the screen with the character's portrait and a⦿ OKbutton.
- Add the code name of the dialog under Template:False Button (for scripts).
- Select the dialog code to the right of Random 1.When you add the floating dialogs Rdm1 to 6, you can add all 6 of them one after the other. The game will display them randomly
Scripting dialogue (advanced)
Coding a dialog inside the Mod:Editors#Level_editor requires a lot of scripting. Refer to the Mod:Scripts section for the basics of coding in the Level editor.
Prepare the code to be added
The table here allows you to know in advance the most complex codes to use to program your dialog, according to a number of special pre-determined conditions (e.g. the player refuses to help, tries to seduce the other character, is threatening, etc.)
Coder la première portion du dialogue
- Cliquez sur l'onglet Level.
- Cliquez sur Triggers...en bas à gauche.
- Cliquez sur New....
- Ajoutez une description (exemple: PERS1 - Accueil)
- L'onglet ✔ Conditionsest déjà ouvert. Cliquez surNew....
- La condition Alwaysest déjà sélectionnée. Cliquez surOken bas à droite.
- Cliquez sur l'onglet Actions. Il se transforme ainsi :✔ Actions.
- Cliquez sur New....
- Cliquez sur l'onglet Center Viewet sélectionnezSet Click Speech.
- Sous Set Click Speech for Unit, cliquez surlist...et sélectionner le nom de code du personnage que vous voulez faire parler. Si vous n'avez pas ajouté de personnage déjà, suivez ces étapes.
- Sous to, sélectionnez le code du dialogue que vous avez précédemment intégré.
- Appuyez sur OkEn tout temps, double-cliquer sur un élément de la liste de triggers vous permet d'y retourner pour le modifier.
Coder les autres portions du dialogue
Les portions de dialogue suivantes n'utiliseront plus la condition Always, mais nécessiteront toutes une condition spéciale pour apparaître.
- Cliquez sur l'onglet Level.
- Cliquez sur Triggers...en bas à gauche.
- Cliquez sur New....
- Ajoutez une description (exemple: PERS1 - 01)
- L'onglet ✔ Conditionsest déjà ouvert. Cliquez surNew....
- Cliquez sur l'onglet Alwayset sélectionnezSpeech Occured, puis sousSpeech Event was, sélectionnez la portion de dialogue que vous avez codé avant.
- Cliquez sur l'onglet Actions. Il se transforme ainsi :✔ Actions.
- Cliquez sur New....
- Cliquez sur l'onglet Center Viewet sélectionnezSet Click Speech.
- Sous Set Click Speech for Unit, cliquez surlist...et sélectionner le nom de code du personnage que vous voulez faire parler de nouveau.
- Sous to, sélectionnez le code de la prochaine section du dialogue.
- Appuyez sur OkCette étape réalisée, après un premier dialogue, cliquer de nouveau sur le personnage lancera un nouveau dialogue.
Coder une réponse du joueur ou un enchaînement d'interactions
Il est possible de coder une série d'interactions apparaissant automatiquement après une portion de dialogue (après le clic du bouton de la fenêtre de dialogue).
- Cliquez sur l'onglet Level.
- Cliquez sur Triggers...en bas à gauche.
- Cliquez sur New....
- Ajoutez une description (exemple: PERS1 - 01R)
- L'onglet ✔ Conditionsest déjà ouvert. Cliquez surNew....
- Cliquez sur l'onglet Alwayset sélectionnezSpeech Occured, puis sousSpeech Event was, sélectionnez la portion de dialogue à laquelle une réponse sera donnée.
- Cliquez sur l'onglet Actions. Il se transforme ainsi :✔ Actions.
- Cliquez sur New....
- Cliquez sur l'onglet Center Viewet sélectionnezSet Variable.
- Sous Variable, tapez, par exemple: Pers1_message.
- Sous Value, tapez, par exemple: AccR.
- Appuyez sur Ok
- Cliquez sur New....
- Ajoutez une description (exemple: PERS1 - 01R (message))
- L'onglet ✔ Conditionsest déjà ouvert. Cliquez surNew....
- Cliquez sur l'onglet Alwayset sélectionnezVariable, puis sousVariable, tapez la variable que vous venez juste de choisir, puis sousis Valuela valeur que vous venez de choisir.
- Cliquez sur l'onglet Actions. Il se transforme ainsi :✔ Actions.
- Cliquez sur New....
- Cliquez sur l'onglet Center Viewet sélectionnezForce Speech.
- Sous Unit, cliquez surlist...et sélectionner le nom de code du personnage qui répondra. S'il s'agit du joueur, tapez "LeJoueur" plutôt.
- Sous will use speech node, sélectionnez le code de la section du dialogue correspondant à la réponse.
- Cochez la case Blockingen haut à droite.
- Répétez les étapes à partir de 18 pour ajouter toutes les portions de dialogues que vous le souhaitez. Elles s'enchaîneront toutes une à la suite de l'autre.
- Appuyez sur Ok
Coder une portion du dialogue qui dépend d'une condition
Lorsque vous ajoutez une condition, vous pouvez toujours ajouter un nombre de conditions supplémentaires qui devront toutes être vraies pour que le script actionne la portion de dialogue prévue. Ceci vous permet, par exemple, de créer une portion de dialogue spécifique si le joueur a un score d'intelligence < 5 et une autre si son score est >= 5. Si vous ne considérez pas toutes les possibilités, il se peut qu'il ne se passe rien si le joueur n'a pas les caractéristiques nécessaires. Pour coder une réponse apparaissant seulement si le personnage-joueur a au moins 5 d'intelligence, suivez toutes les étapes de la portion précédente, mais ajoutez celles-ci après l'étape 6:
- Cliquez sur New....
- Cliquez sur l'onglet Alwayset sélectionnezQuantity - Unit, puis sousUnit, tapez "LeJoueur", puis soushas, cliquez surchange. Cliquez surMore thanet entrez la valeur "4" à la droite de que vous venez deNum. Appuyez surOk
- Sous typecliquez surchangepuis sélectionnezStat. Cliquez surstrengthà droite et changez le pourintelligence. Appuyez surOk.