Mod:Create a popup message

From Wikipedia 2197
Jump to navigation Jump to search

This tutorial shows how to create a popup window that appears in the game The Sum to display a message.

This tutorial explains how to display a yellow message window like this one.

Required tools[edit | edit source]

Create a popup message window[edit | edit source]

Access the .txt file of the location[edit | edit source]

Each location has its dialogue 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 store voices.

Write the message[edit | edit source]

  1. Open the two files place_code_name_where_the_message_appears.txt and for each of them:
    1. Press
       ctrl 
      +
       f 
      and search for "// INFORMATIONS"
    2. Copy/paste the following code:
      AJOUT_Message_Arrivee = {<Jc><img:gui/images/Trouver.zar>You found a beautiful pair of shoes! It was anything but planned! You know someone who will be happy to hear that...<C->}

      Bulb.png  In place of "Trouver.zar" in the message code, you can replace that filename with any .zar image found in the Game/core/gui/image/ folder. If you are unable to view them, install the Red!Viewer program. 


  2. Go to the
     File 
    menu and then
     Save 
    .

Code the message in the Level editor[edit | edit source]

Open the location file (Level editor)[edit | edit source]

  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 a location which must end with .mis.

Script the message (advanced)[edit | edit source]

Coding a message inside the level_editor requires a script. Refer to the Mod:Scripts section for the basics of coding in the Level editor.

Display the message[edit | edit source]

  1. Click on the
     Level 
    tab.
  2. Click on the
     Triggers... 
    button at the bottom left.
  3. Click on
     New... 
    .
  4. Add a short description to the script (example: QUEST 1 - Pers1).
  5. Click
     New... 
    again.
  6. Add a series of conditions of your choice.
  7. Click on the tab
       Actions 
    . It will change to
     ✔ Actions 
    .
  8. Click on
     New... 
    .
  9. Click on the
     Center View 
    tab and select
     Display World Text 
    . Select the code name of the text to display in the list, as written in the .txt files of the place (example: AJOUT_Message_Arrivee).
  10. Click on
     Ok 
    3 times (for each open window).
  11. Go to the
     File 
    menu and then
     Save 
    .