-
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/SONGS/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
if it's a start dialogue or songDialogue-end.txt
if it's an end dialogue (Also replace song
with the song you want it to be so for example bopeeboDialogue
or bopeeboDialogue-end
).
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.
hasMusic
is self explanatory, if a certain song has music, it will fade in and at the end it will fade out.
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 also 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 so they can be flipped correctly, etc... They all have the size of 540x540 pixels by default, if you want a different size, you must do extra coding in Portrait.hx.
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
and leftposY
are the coordinates of the left portrait.
rightposX
and 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 and change the value inside the parentheses. The code will resize your portrait like for example the ones from the OG week 6 portraits, the size is multiplied by 6 then by 0.9.