-
Notifications
You must be signed in to change notification settings - Fork 3
How to add a new dialogue
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
.
- '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.
-
For 'left' or 'right' side - Portraits are named like
portrait-bf.png
so it should be writtenbf
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
gf
andbf
, it should be writtengf/bf
. The/
separates both character portraits so the code doesn't confuse them.
- For any text - you can put whatever you want.
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.
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.
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.
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
)
leftposX
, leftposY
are the coordinates of the left portrait.
rightposX
, rightposY
are the coordinates of the right portrait.
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.
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.