Difference between revisions of "Mod:Create a dialogue"

From Wikipedia 2197
Jump to navigation Jump to search
(Created page with "Ce tutoriel vous expliquera comment créer ou modifier des dialogues dans ''Nous Aurons''. file:Ecran Notepad++.jpg|thumb|Ce tutoriel utilise principalem...")
 
m
Line 1: Line 1:
Ce tutoriel vous expliquera comment créer ou modifier des dialogues dans ''[[Wikipédia 2197|Nous Aurons]]''.
+
This tutorial shows how to create or edit dialogs in ''[[Wikipedia 2197|The Sum]]''.
[[file:Ecran Notepad++.jpg|thumb|Ce tutoriel utilise principalement l'éditeur de texte Notepad++.]]
+
[[file:Notepad++.jpg|thumb|This tutorial uses mainly the Notepad++ text editor.]]
  
== Outils requis ==
+
== Required tools ==
* [[Mod:Éditeurs#Notepad.2B.2B|Notepad++]]
+
* [[Mod:Editors#Notepad.2B.2B|Notepad++]]
* [[Mod:Éditeurs#.C3.89diteur_de_niveaux_.28Level_editor.29|Éditeur de niveaux (''Level Editor'')]]
+
* [[Mod:Editors#Level_editor|Level Editor]]
  
== Avant de commencer ==
+
== Before You Begin ==
Prenez le temps de parcourir la section ''Speech'' du [http://10projets.org/nousaurons/editor_readme.html#Levelsection8 fichier "readme" de l'éditeur de Fallout Tactics] (anglais).
+
Please take some time to browse the "Speech" section of the [http://10projets.org/nousaurons/editor_readme.html#Levelsection8 readme file from the Fallout Tactics editor].
  
== Créer un dialogue ==
+
== Create a dialogue ==
=== Accéder au fichier '''.txt''' du lieu ===
+
=== Access the '''.txt''' file of the location ===
Chaque lieu possède son fichier de dialogues (au nom de code éponyme) déjà importé. Il se trouve dans ''Game/NousAurons/locale/'' (version française) et ''Game/core/locale/'' (version anglaise). Certains de ces fichiers sont dans un dossier du même nom pour permettre d'y stocker des voix.{{Idée|Tout fichier '''.mp3''' (dans le même dossier) avec le même nom de fichier qu'une entrée de dialogue (ex: '''AJOUT_Di_1_1.mp3''' pourra être entendu dans le jeu.}}
+
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.{{Idea|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.}}
=== Commencer l'écriture ===
+
=== Writing introduction ===
# Ouvrez les deux fichiers '''nom_de_code_du_lieu_ou_ajouter_le_dialogue.txt''' et pour chacun d'eux:
+
# Open the two files '''location_code_name_where_the_dialogue_takes_place.txt'' and for each of them:
## Appuyez sur {{Faux bouton|ctrl|couleur=blanc}}+{{Faux bouton|f|couleur=blanc}} et cherchez "// DIALOGUES"
+
## Press {{False button|ctrl|color=white}}+{{False button|f|color=white}} and search for "// DIALOGUES"
## Copiez/collez le code suivant: <syntaxhighlight>
+
## Copy/paste the following code: <syntaxhighlight>
AJOUT_Di_1 = {<Ck>- Portion de dialogue}
+
ADD_Di_1 = {<Ck>- Dialog portion}
 
</syntaxhighlight>
 
</syntaxhighlight>
# Ajouter autant de portions de dialogues qu'il vous faut.
+
# Add as many dialog portions as you need.
# Accédez au menu {{Faux bouton|File|couleur=blanc}} puis {{Faux bouton|Save|couleur=gris}}.
+
# Go to the {{Fake button|File|color=white}} menu and then {{Fake button|Save|color=gray}}.
  
=== Convention d'écriture ===
+
=== Writing convention ===
* Chaque nom de code de dialogue (ex:''AJOUT_Di_1'') doit être unique dans le fichier où il se trouve.
+
* Each dialog code name (ex: ''AJOUT_Di_1'') must be unique in the file where it is added.
* '''''AJOUT_'':''' aide à retrouver le dialogue en premier dans la liste alphabétique lorsqu'il est intégré à l'[[Mod:Éditeurs#.C3.89diteur_de_niveaux_.28Level_editor.29|éditeur de niveaux]].
+
* '''''AJOUT_'':''' helps to find the dialog first in the alphabetical list when it is integrated in the [[Mod:Editors#Level_editor|Level editor]].
* '''''Di_'':''' indique qu'il s'agit d'une portion de dialogue.
+
* '''''Di_'':''' indicates that it is a portion of a dialog.
* '''''Acc'':''' indique qu'il s'agit de la première portion de dialogue du personnage.
+
* '''''Acc'':''' indicates that this is the character's first piece of dialogue.
* '''''R'':''' indique qu'il s'agit d'une réponse du joueur.
+
* '''''R'':''' indicates that this is a response from the player.
* '''''Rdm'' suivi d'un chiffre de 1 à 6:''' est utilisé pour indiquer que la portion de dialogue flottera au dessus de la tête du personnage
+
* '''''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'':''' indique que la portion de dialogue est une quête, ou relié à une quête.
+
* '''''OBJ'':''' indicates that the dialogue portion is a quest label, or related to a quest.
* '''''Pers'' suivi d'un chiffre de 1 à 6:''' réfère à un personnage dont le nom de code est identique dans l'éditeur de niveaux.
+
* '''''Pers'' followed by a number from 1 to 6:''' refers to a character whose code name is identical in the level editor.
* '''''Int'' et ''Cha'':''' indiquent une portion de dialogue qui se déclenche quand le joueur a un score d'[[Intelligence]] ou de [[Charisme]] bas.
+
* '''''Int and Cha'':''' indicate a portion of dialogue that is triggered when the player has a low Intelligence or Charisma score.
* '''''<Ck>-'':''' est placé dans tout dialogue pour changer la couleur du texte pour noir et le précéder d'un tiret.
+
* '''''<Ck>-'':'' is placed in any dialog to change the color of the text to black and precede it with a dash.
* Quelques expressions courtes peuvent être ajoutées au nom de code du dialogue pour le différencier (ex:Occupe){{Avertissement|Les caractères "/" et ":" ne peuvent être utilisés tels quels dans les dialogues. Remplacez les par "^" et "#" pour bien les afficher.}}
+
* A few short phrases can be added to the dialog code name to differentiate it (ex: Mad){{Warning|The characters "/" and ":" cannot be used as is in dialogs. Replace them with "^" and "#" to display them properly in the game}}
  
=== Étapes de rédaction ===
+
=== Writing steps ===
# Accédez aux fichiers '''.txt''' appropriés (ceux portant le nom de code du lieu où sera ajouté le dialogue)
+
# Access the appropriate ''.txt'' files (those with the code name of the location where the dialogue will be added)
# Choisissez le nom de code du personnage qui parle (si possible identique au nom de code d'un personnage déjà dans le lieu, comme ''Pers1'')
+
# Choose the code name of the character speaking (if possible identical to the code name of a character already in the location, like ''Pers1'')
# Écrivez une ligne d'introduction:<syntaxhighlight>
+
# Write an introduction line:<syntaxhighlight>
AJOUT_Di_Pers1_Acc = {<Ck>- Bonjour!}
+
ADD_Di_Pers1_Acc = {<Ck>- Hello!}
 
</syntaxhighlight>
 
</syntaxhighlight>
# Ajoutez ou non une réponse du joueur:<syntaxhighlight>
+
# Add or don't add a player reply:<syntaxhighlight>
AJOUT_Di_Pers1_AccR = {<Ck>- Allo!}
+
ADD_Di_Pers1_AccR = {<Ck>- Hi!}
</syntaxhighlight>{{Idée|Cette réponse peut nécessiter certaines conditions, indiquées après la portion de dialogue sous forme de commentaire (précédé de ''// ''). Ex: ''//Intelligence < 5''}}
+
</syntaxhighlight>{{Idea|This response may require certain conditions, indicated after the dialog portion as a comment (preceded by ''//''). Ex: ''//Intelligence < 5''}}
# Ajoutez les dialogues qui suivent logiquement:<syntaxhighlight>
+
# Add the dialogs that logically follow:<syntaxhighlight>
AJOUT_Di_Pers1_1 = {<Ck>- Aurais-tu une minute pour m'aider?}
+
ADD_Di_Pers1_1 = {<Ck>- Would you have a minute to help me?}
AJOUT_Di_Pers1_1R = {<Ck>- Avec plaisir!}
+
ADD_Di_Pers1_1R = {<Ck>- I'd love to!}
AJOUT_Di_Pers1_1R_Refuse_aider = {<Ck>- Oublie-ça!} //Insensible
+
ADD_Di_Pers1_1R_Refuse_to_help = {<Ck>- Forget it!} //Insensible
AJOUT_Di_Pers1_2 = {<Ck>- Merveilleux. J'étais suis sur le point de m'évanouir, c'est trop lourd!}
+
ADD_Di_Pers1_2 = {<Ck>- Wonderful. I was about to pass out, this is too heavy!}
AJOUT_Di_Pers1_2_Refuse_aider = {<Ck>- C'est tellement insensible de ta part!}
+
ADD_Di_Pers1_2_Refuse_help = {<Ck>- This is so insensitive of you!}
 
</syntaxhighlight>
 
</syntaxhighlight>
# Ajoutez quelques portions de dialogue apparaissant au dessus de la tête du personnage:<syntaxhighlight>
+
# Add some portions of dialogue appearing above the character's head:<syntaxhighlight>
AJOUT_Di_Pers1_Rdm1 = {Belle journée pareil<C->}
+
ADD_Di_Pers1_Rdm1 = {Beautiful day still<C->}
AJOUT_Di_Pers1_Rdm2 = {<Cr>C'est lourd!<C->}
+
ADD_Di_Pers1_Rdm2 = {<Cr>This is heavy!<C->}
AJOUT_Di_Pers1_Rdm3 = {C'est quoi ça?<C->}
+
ADD_Di_Pers1_Rdm3 = {What's that?<C->}
AJOUT_Di_Pers1_Rdm4 = {J'aurais besoin d'aide...<C->}
+
ADD_Di_Pers1_Rdm4 = {I could use some help...<C->}
AJOUT_Di_Pers1_Rdm5 = {<Co>Comment ils font, les autres?<C->}
+
ADD_Di_Pers1_Rdm5 = {<Co>How are the others doing?<C->}
AJOUT_Di_Pers1_Rdm6 = {J'ai beau essayer, c'est inutile.<C->}
+
ADD_Di_Pers1_Rdm6 = {I try as hard as I can, it's useless.<C->}
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Codes d'écriture ===
+
=== Writing codes ===
Les codes suivants servent à colorer le texte et ajouter des caractères spéciaux, par exemple.
+
The following codes are used to color the text and add special characters, for example.
* '''''\n'':''' Passer une ligne.
+
* '''''\n'':''' Skip a line.
* '''''<C*>'' et ''<C->'':''' Ajouter/enlever une Couleur. Remplacez '''*''' par ''b'' (bleu), ''c'' (cyan), ''k'' (noir), ''m'' (magenta), ''o'' (orange), ''r'' (rouge), ''w'' (blanc) ou ''y'' (jaune).
+
* '''''<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:***,***,***>'':''' Ajouter une couleur RGB spécifique. Remplacez '''***''' par un chiffre de 1 à 255.  
+
* '''''<rgb:***,***,***>'':''' Add a specific RGB color. Replace '''***''' with a number from 1 to 255.  
* '''''<b+>'' et ''<b->'':''' Ajouter/enlever Gras.
+
* '''''<b+>'' and ''<b->'':'' Add/Remove Bold.
* '''''<Jl>'', ''<Jc>'', ''<Jr>'' et ''<Jj>'':''' Texte aligné à gauche, au centre, à droite ou justifié.
+
* '''''<Jl>'', ''<Jc>'', ''<Jr>'' and ''<Jj>'':'' Left-aligned, center-aligned, right-aligned or justified text.
  → [http://10projets.org/nousaurons/editor_readme.html#TextCodes Plus d'informations (anglais)]
+
  → [http://10projets.org/nousaurons/editor_readme.html#TextCodes More information (English)]
  
== Ajouter le dialogue à l'éditeur de niveaux ==
+
== Add dialog to Level editor ==
=== Ouvrir le fichier du lieu (éditeur de niveaux) ===
+
=== Open the location file (level editor) ===
# Ouvrez le dossier ''Game''/ puis '''FT Improver.EXE'''.{{Avertissement|Utiliser '''FT Tools.exe''' à la place résultera en une erreur.}}
+
# Open the folder ''Game''/ then '''FT Improver.EXE'''.{{Warning|Use '''FT Tools.exe''' instead will result in an error.}}
# Passez les vidéos en cliquant dessus.
+
# Pass the videos by clicking on them.
# Cliquez sur {{Faux bouton|MORE|couleur=noir|bouton=oui}}.
+
# Click on {{False button|MORE|color=black|button=yes}}.
# Cliquez sur {{Faux bouton|LEVEL EDITOR|couleur=noir|bouton=oui}}.
+
# Click {{False button|LEVEL EDITOR|color=black|button=yes}}.
# Accédez au menu {{Faux bouton|File|couleur=gris|bordure=noir}} puis {{Faux bouton|Open|couleur=gris}}.
+
# Navigate to the {{False button|File|color=gray|border=black}} menu then {{False button|Open|color=gray}}.
# Ouvrez le fichier du lieu précédemment créé qui doit se terminer par '''.ent'''.
+
# Open the file of the location previously created which must end with ''.mis''.
  
=== Intégrer le dialogue ===
+
=== Add the dialog ===
# Cliquez sur l'onglet {{Faux bouton|Level|couleur=noir2}}.
+
# Click on the {{False Button|Level|color=black2}} tab.
# Cliquez sur le bouton {{Faux bouton|Speech...|couleur=gris|bordure=noir}} en bas.
+
# Click on the {{False Button|Speech...|color=gray|border=black}} button at the bottom.
# Cliquez sur le bouton {{Faux bouton|Add|couleur=gris|bordure=noir}} en haut.
+
# Click on the {{False Button|Add|color=gray|edge=black}} button at the top.
# Faites défiler la liste à gauche jusqu'en bas.
+
# Scroll left to the bottom of the list.
# Cliquez sur {{Faux bouton|New Node|couleur=noir}} et remplacez le "New Node" par le nom de code de votre première portion de dialogue sous le bouton {{Faux bouton|Remove|couleur=gris|bordure=noir}}
+
# 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.
#* {{Faux bouton|✔&nbsp;&nbsp;&nbsp;&nbsp;Floating&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|couleur=noir2}}'''(coché par défaut):''' fait flotter le dialogue au dessus de la tête du personnage.
+
#* {{False button|✔&nbsp;&nbsp;&nbsp;&nbsp;Floating&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|color=black2}}''(checked by default):''' floats the dialog over the character's head.
#* {{Faux bouton|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Windowed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|couleur=noir2}}''':''' ajoute le dialogue dans une boîte en bas avec le portrait du personnage et un bouton {{Faux bouton|OK|couleur=blanc|bouton=oui}}.
+
#* {{False button|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|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.
# Ajoutez le nom de code du dialogue sous {{Faux bouton|Default Event|couleur=gris}} (pour les scripts).
+
# Add the code name of the dialog under {{False Button|Default Event|color=gray}} (for scripts).
# Sélectionnez le code du dialogue à la droite de {{Faux bouton|Random 1|couleur=gris}}.{{Idée|Lorsque vous ajoutez les dialogues flottants ''Rdm1'' à ''6'', vous pouvez les ajouter les 6 un à la suite de l'autre. Le jeu les présentera au hasard.}}
+
# 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}}
  
=== Scripter le dialogue (avancé) ===
+
=== Scripting dialogue (advanced) ===
Coder un dialogue à l'intérieur de l'[[Mod:Éditeurs#.C3.89diteur_de_niveaux_.28Level_editor.29|éditeur de niveaux]] nécessite un grand nombre de scripts. Référez-vous à la section [[Mod:Scripts]] pour connaître les bases du codage dans l'éditeur de niveaux.
+
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.
  
==== Préparer le code à ajouter ====
+
==== Prepare the code to be added ====
Le [https://docs.google.com/spreadsheets/d/18ThIXbzwQTrOZfpMNC0ySB2-eH5YKY_HKtT3xwHx6OM/edit#gid=0 tableau suivant] vous permet de connaître à l'avance les codes les plus complexes à utiliser pour programmer votre dialogue, suivant un certain nombre de conditions spéciales pré-déterminées (exemple: le joueur refuse d'aider, essaie de séduire, est menaçant.e, 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 ====
 
==== Coder la première portion du dialogue ====

Revision as of 21:42, 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 Template:False Button tab.
  2. Click on the Template:False Button button at the bottom.
  3. Click on the Template:False Button button at the top.
  4. Scroll left to the bottom of the list.
  5. 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.
    •             
      :' 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 Template:False Button (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.)

Coder la première portion du dialogue


Alert.png  La section
 Triggers... 
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.
 



  1. Cliquez sur l'onglet
     Level 
    .
  2. Cliquez sur
     Triggers... 
    en bas à gauche.
  3. Cliquez sur
     New... 
    .
  4. Ajoutez une description (exemple: PERS1 - Accueil)
  5. L'onglet
     ✔ Conditions 
    est déjà ouvert. Cliquez sur
     New... 
    .
  6. La condition
     Always 
    est déjà sélectionnée. Cliquez sur
     Ok 
    en bas à droite.
  7. Cliquez sur l'onglet
       Actions 
    . Il se transforme ainsi :
     ✔ Actions 
    .
  8. Cliquez sur
     New... 
    .
  9. Cliquez sur l'onglet
     Center View 
    et sélectionnez
     Set Click Speech 
    .
  10. Sous
     Set Click Speech for Unit 
    , cliquez sur
     list... 
    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.
  11. Sous
     to 
    , sélectionnez le code du dialogue que vous avez précédemment intégré.
  12. Appuyez sur
     Ok 

    Bulb.png  En 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.

  1. Cliquez sur l'onglet
     Level 
    .
  2. Cliquez sur
     Triggers... 
    en bas à gauche.
  3. Cliquez sur
     New... 
    .
  4. Ajoutez une description (exemple: PERS1 - 01)
  5. L'onglet
     ✔ Conditions 
    est déjà ouvert. Cliquez sur
     New... 
    .
  6. Cliquez sur l'onglet
     Always 
    et sélectionnez
     Speech Occured 
    , puis sous
     Speech Event was 
    , sélectionnez la portion de dialogue que vous avez codé avant.
  7. Cliquez sur l'onglet
       Actions 
    . Il se transforme ainsi :
     ✔ Actions 
    .
  8. Cliquez sur
     New... 
    .
  9. Cliquez sur l'onglet
     Center View 
    et sélectionnez
     Set Click Speech 
    .
  10. Sous
     Set Click Speech for Unit 
    , cliquez sur
     list... 
    et sélectionner le nom de code du personnage que vous voulez faire parler de nouveau.
  11. Sous
     to 
    , sélectionnez le code de la prochaine section du dialogue.
  12. Appuyez sur
     Ok 

    Bulb.png  Cette é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).

  1. Cliquez sur l'onglet
     Level 
    .
  2. Cliquez sur
     Triggers... 
    en bas à gauche.
  3. Cliquez sur
     New... 
    .
  4. Ajoutez une description (exemple: PERS1 - 01R)
  5. L'onglet
     ✔ Conditions 
    est déjà ouvert. Cliquez sur
     New... 
    .
  6. Cliquez sur l'onglet
     Always 
    et sélectionnez
     Speech Occured 
    , puis sous
     Speech Event was 
    , sélectionnez la portion de dialogue à laquelle une réponse sera donnée.
  7. Cliquez sur l'onglet
       Actions 
    . Il se transforme ainsi :
     ✔ Actions 
    .
  8. Cliquez sur
     New... 
    .
  9. Cliquez sur l'onglet
     Center View 
    et sélectionnez
     Set Variable 
    .
  10. Sous
     Variable 
    , tapez, par exemple: Pers1_message.
  11. Sous
        Value 
    , tapez, par exemple: AccR.
  12. Appuyez sur
     Ok 
  13. Cliquez sur
     New... 
    .
  14. Ajoutez une description (exemple: PERS1 - 01R (message))
  15. L'onglet
     ✔ Conditions 
    est déjà ouvert. Cliquez sur
     New... 
    .
  16. Cliquez sur l'onglet
     Always 
    et sélectionnez
     Variable 
    , puis sous
     Variable 
    , tapez la variable que vous venez juste de choisir, puis sous
     is Value 
    la valeur que vous venez de choisir.
  17. Cliquez sur l'onglet
       Actions 
    . Il se transforme ainsi :
     ✔ Actions 
    .
  18. Cliquez sur
     New... 
    .
  19. Cliquez sur l'onglet
     Center View 
    et sélectionnez
     Force Speech 
    .
  20. Sous
     Unit 
    , cliquez sur
     list... 
    et sélectionner le nom de code du personnage qui répondra. S'il s'agit du joueur, tapez "LeJoueur" plutôt.
  21. Sous
     will use speech node 
    , sélectionnez le code de la section du dialogue correspondant à la réponse.
  22. Cochez la case
     Blocking 
    en haut à droite.
  23. 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.
  24. 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:

  1. Cliquez sur
     New... 
    .
  2. Cliquez sur l'onglet
     Always 
    et sélectionnez
     Quantity - Unit 
    , puis sous
     Unit 
    , tapez "LeJoueur", puis sous
     has 
    , cliquez sur
     change 
    . Cliquez sur
     More than 
    et entrez la valeur "4" à la droite de que vous venez de
     Num 
    . Appuyez sur
     Ok 
  3. Sous
     type 
    cliquez sur
     change 
    puis sélectionnez
     Stat 
    . Cliquez sur
     strength 
    à droite et changez le pour
     intelligence 
    . Appuyez sur
     Ok 
    .