Skip to content

How to add a new dialogue

MythsList edited this page Sep 19, 2021 · 3 revisions

This page is based off V.1.0.8

Dialogue.txt

Add a new TXT file inside of assets/preload/data/song (Replace song with the song you want the dialogue to be played so for example bopeebo) then rename the TXT file as songDialogue.txt (Also replace song with the song you want it to be so for example bopeeboDialogue).

Here's an example of what you can do with dialogues, it will ALWAYS follow the format side : portrait(s) : text.

Side

  • 'left' - Shows a single portrait on the left side.
  • 'right' - Shows a single portrait on the right side.
  • 'middle' - Shows two portraits on the left and right side.

Portrait(s)

  • For 'left' or 'right' side - Portraits are named like portrait-bf.png so it should be written bf so the game's code loads the correct portrait.
  • For 'middle' side - Same thing but you have to enter two portraits so if you want to load gfand bf, it should be written gf/bf. The / separates both character portraits so the code doesn't confuse them.

Text

  • For any text - you can put whatever you want.

DialogueBox.hx

Setting the background fade style

Basically put your songs in a new case, you can choose between two fade styles (basic and pixel) and the background fade color. If you don't add your songs, the fade style will defaults to basic with a black background.

Making the background fade style

I don't know how to explain this but if you know how to code you should be able to make a new fade style.

Making a new dialogue box

hasDialog is a bool value you must set to true.

isAnimated is self explanatory, if the dialogue box is animated set it to true.

The rest is just a "Load the assets" code.

Making a new portrait

All portraits should look like the one above. They all have the size of 540x540 pixels unless you want 16 bit portraits so 100x100 pixels.

Make a new PNG file in assets/shared/images/portraits named portrait-character.png (Replace character with the character you chose so for example portrait-bf.png)

Setting the portraits

leftposX, leftposY are the coordinates of the left portrait.

rightposX, rightposY are the coordinates of the right portrait.

Setting the text's font and color

The dropText is the text's shadow and swagDialogue is the actual text.

You can customize the font, the color and what sound the text should make.

In case your portraits are 16 bit / 100x100 pixels

Add your character's name inside a new case so basically copy paste the previous case. The code will resize your portrait like the ones from the OG week 6.

Clone this wiki locally