Difference between revisions of "Mod:Create a dialogue"

From Wikipedia 2197
Jump to navigation Jump to search
m
Line 78: Line 78:
  
 
=== Add the dialog ===
 
=== Add the dialog ===
# Click on the {{False Button|Level|color=black2}} tab.
+
# Click on the {{False button|Level|color=black2}} tab.
# Click on the {{False Button|Speech...|color=gray|border=black}} button at the bottom.
+
# Click on the {{False button|Speech...|color=gray|border=black}} button at the bottom.
# Click on the {{False Button|Add|color=gray|edge=black}} button at the top.
+
# Click on the {{False button|Add|color=gray|edge=black}} button at the top.
 
# Scroll left to the bottom of the list.
 
# Scroll left to the bottom of the list.
# Click on {{False Button|New Node|color=black}} and replace the "New Node" with the code name of your first portion of the dialog under the {{False Button|Remove|color=gray|edge=black}} button.
+
# Click on {{False button|New Node|color=black}} and replace the "New Node" with the code name of your first portion of the dialog under the {{False button|Remove|color=gray|edge=black}} button.
 
#* {{False button|✔    Floating      |color=black2}}''(checked by default):'' floats the dialog over the character's head.
 
#* {{False button|✔    Floating      |color=black2}}''(checked by default):'' floats the dialog over the character's head.
 
#* {{False button|      Windowed    |color=black2}}'':'' adds the dialog in a box at the bottom of the screen with the character's portrait and a {{False button|OK|color=white|button=yes}} button.
 
#* {{False button|      Windowed    |color=black2}}'':'' adds the dialog in a box at the bottom of the screen with the character's portrait and a {{False button|OK|color=white|button=yes}} button.
# Add the code name of the dialog under {{False Button|Default Event|color=gray}} (for scripts).
+
# Add the code name of the dialog under {{False button|Default Event|color=gray}} (for scripts).
 
# Select the dialog code to the right of {{Fake button|Random 1|color=gray}}.{{Idea|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}}
 
# Select the dialog code to the right of {{Fake button|Random 1|color=gray}}.{{Idea|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}}
  
Line 94: Line 94:
 
The [https://docs.google.com/spreadsheets/d/18ThIXbzwQTrOZfpMNC0ySB2-eH5YKY_HKtT3xwHx6OM/edit#gid=0 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.)
 
The [https://docs.google.com/spreadsheets/d/18ThIXbzwQTrOZfpMNC0ySB2-eH5YKY_HKtT3xwHx6OM/edit#gid=0 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 ====
+
==== Code the first portion of the dialog ====
{{Avertissement|La section{{Faux bouton|Triggers...|couleur=gris|bordure=noir}} de l'éditeur de niveaux contient un très grand nombre de triggers, ajoutés avec les années. '''Évitez de les modifier à moins que vous sachiez exactement ce que vous faites.''' Ne soyez pas intimidé.e par cette liste, vous n'avez pas à interagir avec ; ajoutez simplement votre code à la fin de celle-ci en utilisant la barre de défilement pour atteindre rapidement à la fin.}}
+
{{Warning|The section{{False button|Triggers...|color=gray|bord=black}} of the level editor contains a very large number of triggers, added over the years. '''Avoid editing them unless you know exactly what you are doing.''' Don't be intimidated by this list, you don't have to interact with it; just add your code to the end of it using the scroll bar to get to the end quickly}}
# Cliquez sur l'onglet {{Faux bouton|Level|couleur=noir2}}.
+
# Click on the {{False Button|Level|color=black2}} tab.
# Cliquez sur {{Faux bouton|Triggers...|couleur=gris|bordure=noir}} en bas à gauche.
+
# Click on the {{False Button|Triggers...|color=gray|border=black}} tab at the bottom left.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False Button|New...|color=gray|edge=black}}.
# Ajoutez une description (exemple: ''PERS1 - Accueil'')
+
# Add a description (example: ''PERS1 - Acc'')
# L'onglet {{Faux bouton|✔ Conditions|couleur=noir2}} est déjà ouvert. Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# The tab {{False button|✔ Conditions|color=black2}} is already open. Click on {{False Button|New...|color=gray|border=black}}.
# La condition {{Faux bouton|Always|couleur=noir2}} est déjà sélectionnée. Cliquez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}} en bas à droite.
+
# The {{False Button|Always|color=black2}} condition is already selected. Click on {{False Button|Ok|color=gray|edge=black}} at the bottom right.
# Cliquez sur l'onglet {{Faux bouton|  Actions|couleur=noir2}}. Il se transforme ainsi : {{Faux bouton|✔ Actions|couleur=noir2}}.
+
# Click on the {{False Button| Actions|color=black2}} tab. It changes to {{False button|✔ Actions|color=black2}}.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False Button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Center View|couleur=noir2}} et sélectionnez {{Faux bouton|Set Click Speech|couleur=noir2}}.
+
# Click on the {{False Button|Center View|color=black2}} tab and select {{False button|Set Click Speech|color=black2}}.
# Sous {{Faux bouton|Set Click Speech for Unit|couleur=gris}}, cliquez sur {{Faux bouton|list...|couleur=gris|bordure=noir}} et sélectionner le nom de code du personnage que vous voulez faire parler. Si vous n'avez pas ajouté de personnage déjà, [[Mod:Créer_un_lieu#Ajouter_un_personnage|suivez ces étapes]].
+
# Under {{Faux Button|Set Click Speech for Unit|color=gray}}, click {{False button|list...|color=gray|bord=black}} and select the code name of the character you want to speak. If you have not added a character already, [[Mod:Create_a_location#Add_a_character|follow these steps]].
# Sous {{Faux bouton|to|couleur=gris}}, sélectionnez le code du dialogue que vous avez précédemment intégré.
+
# Under {{False Button|to|color=gray}}, select the dialog code you previously embedded.
# Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}{{Idée|En tout temps, double-cliquer sur un élément de la liste de triggers vous permet d'y retourner pour le modifier.}}
+
# Click {{False Button|Ok|color=gray|bord=black}}{{Idea|At any time, double-clicking on an item in the trigger list allows you to open it to edit it}}
  
==== Coder les autres portions du dialogue ====
+
==== Code the other portions of the dialogue ====
Les portions de dialogue suivantes n'utiliseront plus la condition ''Always'', mais nécessiteront toutes une condition spéciale pour apparaître.
+
The following dialogue portions will no longer use the ''Always'' condition, but will all require a special condition to appear.
# Cliquez sur l'onglet {{Faux bouton|Level|couleur=noir2}}.
+
# Click on the {{False button|Level|color=black2}} tab.
# Cliquez sur {{Faux bouton|Triggers...|couleur=gris|bordure=noir}} en bas à gauche.
+
# Click on {{False button|Triggers...|color=gray|border=black}} at the bottom left.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|edge=black}}.
# Ajoutez une description (exemple: ''PERS1 - 01'')
+
# Add a description (example: ''PERS1 - 01'')
# L'onglet {{Faux bouton|✔ Conditions|couleur=noir2}} est déjà ouvert. Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# The tab {{False button|✔ Conditions|color=black2}} is already open. Click on {{False Button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Always|couleur=noir2}} et sélectionnez {{Faux bouton|Speech Occured|couleur=noir2}}, puis sous {{Faux bouton|Speech Event was|couleur=gris}}, sélectionnez la portion de dialogue que vous avez codé avant.
+
# Click on the {{False button|Always|color=black2}} tab and select {{False Button|Speech Occured|color=black2}}, then under {{False Button|Speech Event was|color=gray}}, select the portion of the dialog that you coded before.
# Cliquez sur l'onglet {{Faux bouton|  Actions|couleur=noir2}}. Il se transforme ainsi : {{Faux bouton|✔ Actions|couleur=noir2}}.
+
# Click on the {{False Button| Actions|color=black2}} tab. It changes to {{False button|✔ Actions|color=black2}}.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Center View|couleur=noir2}} et sélectionnez {{Faux bouton|Set Click Speech|couleur=noir2}}.
+
# Click on the {{False button|Center View|color=black2}} tab and select {{False Button|Set Click Speech|color=black2}}.
# Sous {{Faux bouton|Set Click Speech for Unit|couleur=gris}}, cliquez sur {{Faux bouton|list...|couleur=gris|bordure=noir}} et sélectionner le nom de code du personnage que vous voulez faire parler de nouveau.
+
# Under {{False button|Set Click Speech for Unit|color=gray}}, click {{Faux Button|list...|color=gray|bord=black}} and select the code name of the character you want to re-speak.
# Sous {{Faux bouton|to|couleur=gris}}, sélectionnez le code de la prochaine section du dialogue.
+
# Under {{False button|to|color=gray}}, select the code for the next section of the dialog.
# Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}{{Idée|Cette étape réalisée, après un premier dialogue, cliquer de nouveau sur le personnage lancera un nouveau dialogue.}}
+
# Press {{False button|Ok|color=gray|edge=black}}{{Idea|This step completed, after the first dialog, clicking on the character again will start a new dialog.}}
  
==== Coder une réponse du joueur ou un enchaînement d'interactions ====
+
==== Code a player response or a sequence of 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).
+
It is possible to code a series of interactions that appear automatically after a portion of the dialog (after the dialog button is clicked).
# Cliquez sur l'onglet {{Faux bouton|Level|couleur=noir2}}.
+
# Click on the {{False button|Level|color=black2}} tab.
# Cliquez sur {{Faux bouton|Triggers...|couleur=gris|bordure=noir}} en bas à gauche.
+
# Click on the {{False button|Triggers...|color=gray|border=black}} tab at the bottom left.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|edge=black}}.
# Ajoutez une description (exemple: ''PERS1 - 01R'')
+
# Add a description (example: ''PERS1 - 01R'')
# L'onglet {{Faux bouton|✔ Conditions|couleur=noir2}} est déjà ouvert. Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# The {{False button|✔ Conditions|color=black2}} tab is already open. Click on {{False Button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Always|couleur=noir2}} et sélectionnez {{Faux bouton|Speech Occured|couleur=noir2}}, puis sous {{Faux bouton|Speech Event was|couleur=gris}}, sélectionnez la portion de dialogue à laquelle une réponse sera donnée.
+
# Click on the {{False button|Always|color=black2}} tab and select {{False Button|Speech Occured|color=black2}}, then under {{False Button|Speech Event was|color=gray}}, select the portion of the dialog that will be responded to.
# Cliquez sur l'onglet {{Faux bouton|  Actions|couleur=noir2}}. Il se transforme ainsi : {{Faux bouton|✔ Actions|couleur=noir2}}.
+
# Click on the {{False button| Actions|color=black2}} tab. It will change to {{False button|✔ Actions|color=black2}}.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Center View|couleur=noir2}} et sélectionnez {{Faux bouton|Set Variable|couleur=noir2}}.
+
# Click on the {{False button|Center View|color=black2}} tab and select {{False Button|Set Variable|color=black2}}.
# Sous {{Faux bouton|Variable|couleur=gris}}, tapez, par exemple: ''Pers1_message''.
+
# Under {{False button|Variable|color=gray}}, type, for example: ''Pers1_message''.
# Sous {{Faux bouton|   Value|couleur=gris}}, tapez, par exemple: ''AccR''.
+
# Under {{False button|  Value|color=gray}}, type, for example: ''AccR''.
# Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}
+
# Press {{False button|Ok|color=gray|bord=black}}
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click {{False button|New...|color=gray|edge=black}}.
# Ajoutez une description (exemple: ''PERS1 - 01R (message)'')
+
# Add a description (example: ''PERS1 - 01R (message)'')
# L'onglet {{Faux bouton|✔ Conditions|couleur=noir2}} est déjà ouvert. Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# The {{False button|✔ Conditions|color=black2}} tab is already open. Click on {{False Button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Always|couleur=noir2}} et sélectionnez {{Faux bouton|Variable|couleur=noir2}}, puis sous {{Faux bouton|Variable|couleur=gris}}, tapez la variable que vous venez juste de choisir, puis sous {{Faux bouton|is Value|couleur=gris}} la valeur que vous venez de choisir.
+
# Click on the {{False button|Always|color=black2}} tab and select {{False Button|Variable|color=black2}}, then under {{False Button|Variable|color=gray}} type in the variable you just chose, then under {{False Button|is Value|color=gray}} type in the value you just chose.
# Cliquez sur l'onglet {{Faux bouton|  Actions|couleur=noir2}}. Il se transforme ainsi : {{Faux bouton|✔ Actions|couleur=noir2}}.
+
# Click on the {{False button| Actions|color=black2}} tab. It will change to {{False Button|✔ Actions|color=black2}}.
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Center View|couleur=noir2}} et sélectionnez {{Faux bouton|Force Speech|couleur=noir2}}.
+
# Click on the {{False button|Center View|color=black2}} tab and select {{False Button|Force Speech|color=black2}}.
# Sous {{Faux bouton|Unit|couleur=gris}}, cliquez sur {{Faux bouton|list...|couleur=gris|bordure=noir}} et sélectionner le nom de code du personnage qui répondra. S'il s'agit du joueur, tapez "LeJoueur" plutôt.
+
# Under {{Faux button|Unit|color=gray}}, click {{Faux Button|list...|color=gray|bord=black}} and select the code name of the character who will be responding. If it is the player, type "ThePlayer" instead.
# Sous {{Faux bouton|will use speech node|couleur=gris}}, sélectionnez le code de la section du dialogue correspondant à la réponse.
+
# Under {{False button|will use speech node|color=gray}}, select the code for the section of the dialog that corresponds to the response.
# Cochez la case {{Faux bouton|Blocking|couleur=noir2}} en haut à droite.
+
# Check the {{False button|Blocking|color=black2}} box in the upper right corner.
# 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.
+
# Repeat the steps from '''18''' to add all the portions of dialogs that you want. They will all follow each other.
# Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}
+
# Press {{False button|Ok|color=gray|border=black}}
  
==== Coder une portion du dialogue qui dépend d'une condition ====
+
==== Code a portion of the dialog that depends on a 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.
+
When you add a condition, you can always add a number of additional conditions that must all be true for the script to activate the intended dialog portion.
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.
+
This allows you, for example, to create a specific dialog portion if the player has an intelligence score < 5 and another if their score is >= 5. If you don't consider all the possibilities, nothing may happen if the player doesn't have the necessary characteristics.
Pour coder une réponse apparaissant seulement si le personnage-joueur a au moins 5 d'intelligence, suivez toutes les étapes de [[Mod:Créer_un_dialogue#Coder_une_r.C3.A9ponse_du_joueur_ou_un_encha.C3.AEnement_d.27interactions|la portion précédente]], mais ajoutez celles-ci après l'étape '''6''':
+
To code a response that appears only if the player-character has at least 5 intelligence, follow all the steps in [[Mod:Create_a_dialogue#Code a player response or a sequence of interactions|the previous portion]], but add these after step ''6'':
# Cliquez sur {{Faux bouton|New...|couleur=gris|bordure=noir}}.
+
# Click on {{False button|New...|color=gray|border=black}}.
# Cliquez sur l'onglet {{Faux bouton|Always|couleur=noir2}} et sélectionnez {{Faux bouton|Quantity - Unit|couleur=noir2}}, puis sous {{Faux bouton|Unit|couleur=gris}}, tapez "LeJoueur", puis sous {{Faux bouton|has|couleur=gris}}, cliquez sur {{Faux bouton|change|couleur=gris|bordure=noir}}. Cliquez sur {{Faux bouton|More than|couleur=noir2}} et entrez la valeur "4" à la droite de que vous venez de {{Faux bouton|Num|couleur=gris}}. Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}
+
# Click on the {{False button|Always|color=black2}} tab and select {{False button|Quantity - Unit|color=black2}}, then under {{False button|Unit|color=gray}}, type "TheGamer", then under {{False button|has|color=gray}}, click on {{False button|Change|color=gray|edge=black}} Click on {{False button|More than|color=black2}} and enter the value "4" to the right of the {{False Button|Num|color=gray}}. Press {{False button|Ok|color=gray|bord=black}}
# Sous {{Faux bouton|type|couleur=gris}} cliquez sur {{Faux bouton|change|couleur=gris|bordure=noir}} puis sélectionnez {{Faux bouton|Stat|couleur=noir2}}. Cliquez sur {{Faux bouton|strength|couleur=noir2}} à droite et changez le pour {{Faux bouton|intelligence|couleur=noir2}}. Appuyez sur {{Faux bouton|Ok|couleur=gris|bordure=noir}}.
+
# Under {{False button|type|color=gray}} click {{False button|change|color=gray|edge=black}} then select {{False button|Status|color=black2}}. Click on {{False button|strength|color=black2}} to the right and change it to {{False button|intelligence|color=black2}}. Press {{False button|Ok|color=gray|border=black}}.

Revision as of 21:58, 21 September 2022

This tutorial shows how to create or edit dialogs in The Sum.

File:Notepad++.jpg
This tutorial uses mainly the Notepad++ text editor.

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.

Bulb.png  Any .mp3 file (in the same folder) with the same file name as a dialog entry (ex: AJOUT_Di_1_1.mp3 will be heard in the game. 



Writing introduction

  1. Open the two files 'location_code_name_where_the_dialogue_takes_place.txt and for each of them:
    1. Press
       ctrl 
      +
       f 
      and search for "// DIALOGUES"
    2. Copy/paste the following code:
      ADD_Di_1 = {<Ck>- Dialog portion}
  2. Add as many dialog portions as you need.
  3. Go to the
     File 
    menu and then
     Save 
    .

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)
    Alert.png  The characters "/" and ":" cannot be used as is in dialogs. Replace them with "^" and "#" to display them properly in the game 


Writing steps

  1. Access the appropriate .txt files (those with the code name of the location where the dialogue will be added)
  2. Choose the code name of the character speaking (if possible identical to the code name of a character already in the location, like Pers1)
  3. Write an introduction line:
    ADD_Di_Pers1_Acc = {<Ck>- Hello!}
  4. Add or don't add a player reply:
    ADD_Di_Pers1_AccR = {<Ck>- Hi!}

    Bulb.png  This response may require certain conditions, indicated after the dialog portion as a comment (preceded by //). Ex: //Intelligence < 5 


  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!}
  6. 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)

  1. Open the folder Game/ then FT Improver.EXE.
    Alert.png  Use FT Tools.exe instead will result in an error. 


  2. Pass the videos by clicking on them.
  3. Click on
    ⦿  MORE 
    .
  4. Click
    ⦿  LEVEL EDITOR 
    .
  5. Navigate to the
     File 
    menu then
     Open 
    .
  6. Open the file of the location previously created which must end with .mis.

Add the dialog

  1. Click on the
     Level 
    tab.
  2. Click on the
     Speech... 
    button at the bottom.
  3. Click on the
     Add 
    button at the top.
  4. Scroll left to the bottom of the list.
  5. Click on
     New Node 
    and replace the "New Node" with the code name of your first portion of the dialog under the
     Remove 
    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
      ⦿  OK 
      button.
  6. Add the code name of the dialog under
     Default Event 
    (for scripts).
  7. Select the dialog code to the right of
     Random 1 
    .
    Bulb.png  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.)

Code the first portion of the dialog


Alert.png  The section
 Triggers... 
of the level editor contains a very large number of triggers, added over the years. Avoid editing them unless you know exactly what you are doing. Don't be intimidated by this list, you don't have to interact with it; just add your code to the end of it using the scroll bar to get to the end quickly
 



  1. Click on the Template:False Button tab.
  2. Click on the Template:False Button tab at the bottom left.
  3. Click on Template:False Button.
  4. Add a description (example: PERS1 - Acc)
  5. The tab
     ✔ Conditions 
    is already open. Click on Template:False Button.
  6. The Template:False Button condition is already selected. Click on Template:False Button at the bottom right.
  7. Click on the Template:False Button tab. It changes to
     ✔ Actions 
    .
  8. Click on Template:False Button.
  9. Click on the Template:False Button tab and select
     Set Click Speech 
    .
  10. Under Template:Faux Button, click
     list... 
    and select the code name of the character you want to speak. If you have not added a character already, follow these steps.
  11. Under Template:False Button, select the dialog code you previously embedded.
  12. Click Template:False Button
    Bulb.png  At any time, double-clicking on an item in the trigger list allows you to open it to edit it 


Code the other portions of the dialogue

The following dialogue portions will no longer use the Always condition, but will all require a special condition to appear.

  1. Click on the
     Level 
    tab.
  2. Click on
     Triggers... 
    at the bottom left.
  3. Click on
     New... 
    .
  4. Add a description (example: PERS1 - 01)
  5. The tab
     ✔ Conditions 
    is already open. Click on Template:False Button.
  6. Click on the
     Always 
    tab and select Template:False Button, then under Template:False Button, select the portion of the dialog that you coded before.
  7. Click on the Template:False Button tab. It changes to
     ✔ Actions 
    .
  8. Click on
     New... 
    .
  9. Click on the
     Center View 
    tab and select Template:False Button.
  10. Under
     Set Click Speech for Unit 
    , click Template:Faux Button and select the code name of the character you want to re-speak.
  11. Under
     to 
    , select the code for the next section of the dialog.
  12. Press
     Ok 

    Bulb.png  This step completed, after the first dialog, clicking on the character again will start a new dialog. 


Code a player response or a sequence of interactions

It is possible to code a series of interactions that appear automatically after a portion of the dialog (after the dialog button is clicked).

  1. Click on the
     Level 
    tab.
  2. Click on the
     Triggers... 
    tab at the bottom left.
  3. Click on
     New... 
    .
  4. Add a description (example: PERS1 - 01R)
  5. The
     ✔ Conditions 
    tab is already open. Click on Template:False Button.
  6. Click on the
     Always 
    tab and select Template:False Button, then under Template:False Button, select the portion of the dialog that will be responded to.
  7. Click on the
      Actions 
    tab. It will change to
     ✔ Actions 
    .
  8. Click on
     New... 
    .
  9. Click on the
     Center View 
    tab and select Template:False Button.
  10. Under
     Variable 
    , type, for example: Pers1_message.
  11. Under
       Value 
    , type, for example: AccR.
  12. Press
     Ok 
  13. Click
     New... 
    .
  14. Add a description (example: PERS1 - 01R (message))
  15. The
     ✔ Conditions 
    tab is already open. Click on Template:False Button.
  16. Click on the
     Always 
    tab and select Template:False Button, then under Template:False Button type in the variable you just chose, then under Template:False Button type in the value you just chose.
  17. Click on the
      Actions 
    tab. It will change to Template:False Button.
  18. Click on
     New... 
    .
  19. Click on the
     Center View 
    tab and select Template:False Button.
  20. Under Template:Faux button, click Template:Faux Button and select the code name of the character who will be responding. If it is the player, type "ThePlayer" instead.
  21. Under
     will use speech node 
    , select the code for the section of the dialog that corresponds to the response.
  22. Check the
     Blocking 
    box in the upper right corner.
  23. Repeat the steps from 18 to add all the portions of dialogs that you want. They will all follow each other.
  24. Press
     Ok 

Code a portion of the dialog that depends on a condition

When you add a condition, you can always add a number of additional conditions that must all be true for the script to activate the intended dialog portion. This allows you, for example, to create a specific dialog portion if the player has an intelligence score < 5 and another if their score is >= 5. If you don't consider all the possibilities, nothing may happen if the player doesn't have the necessary characteristics. To code a response that appears only if the player-character has at least 5 intelligence, follow all the steps in the previous portion, but add these after step 6:

  1. Click on
     New... 
    .
  2. Click on the
     Always 
    tab and select
     Quantity - Unit 
    , then under
     Unit 
    , type "TheGamer", then under
     has 
    , click on
     Change 
    Click on
     More than 
    and enter the value "4" to the right of the Template:False Button. Press
     Ok 
  3. Under
     type 
    click
     change 
    then select
     Status 
    . Click on
     strength 
    to the right and change it to
     intelligence 
    . Press
     Ok 
    .