Cutscenes and dialogues.
Cutscenes
Making Cutscenes is easy, either drop an .mp4 file in ./videos with the name of the song followed by -cutscene at the end, or drop it in the corresponding song folder and simply name it cutscene.mp4

You can also put an -end before -cutscene to make that cutscene appear at the end of the song.
Starting them manually with also a custom prefix is also possible, check the Cutscenes/Dialogue Scripts page.
Dialogues
Codename Engine also supports Dialogues, though there's a lot to unwrap here, so please read with patience.
Making a basic dialogue is done by making a file called dialogue.xml in the corresponding song folder, and the content should look something like this:
<dialogue box="default">
<!-- All characters -->
<char name="dad" position="left" />
<char name="girlfriend" position="middle" />
<char name="boyfriend" position="right" />
<!-- Lines -->
<line char="dad">
yo its me your <format color="#FF0000">enemy!</format> how are you
</line>
<line char="boyfriend">
shut up u stupid bitch
ur useless af!!! loser!
</line>
<line char="girlfriend">
agreed
</line>
</dialogue>
This dialogue covers all types of characters (only having 3 types of positions).
Starting with the <dialogue> node, it only has 2 parameters:
boxwhich, well, determines the textbox that it should use.forceBoxDefaultTxtSoundwhich overrides all text sounds and applies the default one.
For the <char> node, it has the following parameters:
namedetermines which character to introduce.positiondetermines the position which the character stays on.textSounddetermines what sound the character should play when it speaks. (takes from the./soundsfolder)defaultAnimi have no idea what that is bro
As for the <line> node, the example shows it's default usage, so the next parameters are mostly for advanced usage:
bubbledetermines the animation the textbox should play.callbackdetermines what function to call in a Dialogue Script (see Cutscenes/Dialogue Scripts)changeDefAnimto play a different animation for the character (changeDefAnim="scared").speedis the typing speed (default is0.05).musicVolumechanges the music volume (default is0.8).changeMusicdetermines what song to change to.playSoundplays a sound on the same line (so yes, you can also play a sound at the same time the dialogue starts).nextSoundchanges the sound of whenever you proceed to the next line.
The <line> node also accepts <format> children, to format different parts of the text. The parameters are:
colorfor coloring.fontto change the font of the text.
Setting up Dialogue Characters.
After realizing how to basically make a dialogue, you can now start adding custom characters besides the default ones.
You can start by making an XML file with the character's corresponding name and put it in ./data/dialogue/characters/.
Here's what Boyfriend's data looks like:
<character x="285">
<anim name="normal" anim="normal" fps="24" />
</character>
We'll quickly go through the parameters here, for <character>:
namewhich defines the internal name used for scripting.xandydefine it's position in-game.spriteis the name of the sprite in the files. (keep in mind if you set this to point to a sparrow spritesheet it will automatically make an animation of all the frames in the spritesheet)textSounddetermines what sound the character should play when it speaks. (takes from the./soundsfolder)
Other options include:
skewxandskewyskews the sprite.antialiasingdetermines whether or not the sprite has antialiasing. (true by default)widthandheightdetermine the width and height of the sprite's hitbox. (does not affect the sprite itself)scale,scalexandscaleyare size multipliers for the sprite's width and height. (setting it to 2 means double the size)graphicSize,graphicSizexandgraphicSizeydetermine the width and height of the sprite.updateHitboxdetermines whether or not to update the sprite's hitbox.alphais the "opacity" of the spritecolortints the sprite in the color you set it to (example#FF0000will tint the sprite in full red)playOnCountdowntells the sprite whether or not to play it's animation during countdown or not.beatInterval, beatOffset, honestly, I don't even know what this shit is okay.
As for the <anim> nodes, these are the parameters:
namedefines the internal name of the animation (used for scripting)animis the prefix for finding the animation in the spritesheet.indicesindicates which frames to play from the previously found frames. (For a range you can type1..5to generate1,2,3,4,5)typedetermines the type of the animation. eitherbeatorloop.fpsis the framerate of your animation.xandyare the animation offset. (offset is only applied when the animation is played)forcedwhether or not to force animation playback while a different one is already playing.loopto make your animation loop.
(if you think this is familiar yes this is basically the same as making a sprite in a stage.)
Setting up Dialogue Boxes.
If you feel like also customizing boxes, fret not because you can also change that as well. (although this is gonna be a bit more advanced than the last 2)
You can start by making an XML file with the box's corresponding name and put it in ./data/dialogue/boxes/.
The default box's XML data looks like this:
<dialoguebox y="75">
<!--
Node containing all text settings
-->
<text font="vcr.ttf" x="107" y="206" width="1053" color="#000000" size="40"/>
<!--
All positions for characters
-->
<charpos name="left" x="-500" y="184" flipBubble="true" />
<charpos name="middle" x="0" y="184" />
<charpos name="right" x="500" y="184" />
<!--
All animations for the dialogue box
For example, if you wanna add an "angry" animation, add an animation named "angry" (box idle), and "angry-open" (not needed, for box apparition)
-->
<anim name="normal" anim="speech bubble normal" fps="24" loop="true" x="-30"/>
<anim name="normal-open" anim="Speech Bubble Normal Open" fps="24" />
<anim name="angry" anim="AHH speech bubble" fps="24" loop="true" y="60"/>
<anim name="angry-open" anim="speech bubble loud open" fps="24" y="60"/>
</dialoguebox>
There's a lot to unpack but we'll go over each step in understanding this.
The <dialoguebox> node parameters and also the <anim> node parameters are exactly like the Dialogue Character ones (such as sprite for <dialoguebox>), so we'll skip those. (keep in mind if you make an animation with an -open at the end it will be used as an opening animation).
For the <text> node, which is required for this Dialogue Box to be considered valid, has the following parameters:
xandyto change the positioning of the text in the box.widthto determine the width of the field.colorfor coloring the text.sizeto determine the size of the text (default is20).fontto determine the font that the text should use (picks up the font from./fonts).antialiasingto determine whether or not your text should use antialiasing.borderStyledetermines if it has a border and which type of border the text should use (outline,shadow,outline_fastornone).borderQualityfor determining the quality of the border.shadowOffsetXandshadowOffsetYfor offsetting the shadow (if selected that style).borderSizefor sizing the border.borderColorfor coloring the border.
Now, for the <charpos> node, it's pretty simple, these are the parameters:
nameis the name of the position.xandyis for the position itself, i guess.flipBubbledetermines if the Dialogue Box itself should flip for the character.