Scripting Dialogue - GameGrumpsJointJustice/courtengine GitHub Wiki

Trigger dialogue from the narrator

Dialogue from the narrator will not have a character name associated in the top left, and will be displayed in green with the typewriter sound effect.

TYPEWRITER
    "[dialogue]"

Example:

TYPEWRITER
    "August 3rd, 9:47AM#District Court#Defendant Lobby No. 2"

Trigger dialogue from a specific character

Dialogue from a character will have that character's name in the top left, and will be displayed in white by default. While speaking, the voice SFX for the gender associated with the character will be played, and the "[currentPoseName]Talking.png" spritesheet will be used for the character.

SPEAK [characterName] [color?]
    "[dialogue]"

    characterName - The characterName of the character speaking
    color - An optional color parameter that indicates what color should be used for this dialogue box.
            If this is omitted, the dialogue will be white.
            Current options: White, Red, Blue, Ltblue, Green. (More can be added on request)
    dialogue - The dialogue spoken

Example:

SPEAK ??? GREEN
    "(It's over!)"

SPEAK Judge
    "Now starting a trial."

Colors

If you want to make a specific phrase a color, and not an entire dialogue box, you can do so with the following commands:

"Something %1Red Text%0"
"Something %2Green Text%0"
"Something %3Blue Text%0"

More colors can be added on request.

Example:

"Our school had a saying: $q%1When something smells, it's usually the Butz.%0$q"

Choices

A choice can be presented to the player with a combination of the DEFINE and CHOICE commands. Before playing the choice, each option should be defined with what will happen when that choice is selected.

CHOICE
    "[choice1Name]" [resultOfChoice1]
    "[choice2Name]" [resultOfChoice2]
    "[choice3Name]" [resultOfChoice3]
    // etc. You may have as few or many choices as you'd like.

Example of usage:

DEFINE CorrectHim
    SPEAK Arin
        "Ummm, technically? It's with a capital T."

    SPEAK Dan
        "Was I asking you??"

    GAME_OVER
END_DEFINE

DEFINE AskAQuestion
    SPEAK Arin
        "Is that how that's usually spelled?"

    SPEAK Dan
        "Oh no, you're right. Sorry about that."
END_DEFINE

CHOICE
    "Correct Him" CorrectHim
    "Ask a question" AskAQuestion
    "Do nothing" 0

Using 0 for the result of a choice will tell the script to proceed as normal, instead of redirecting to any other definition.

Fake Choices

These display the same as a choice, but will always continue the script, regardless of what the player actually chose.

Exceptions

  • Because the entire dialogue is wrapped in quotation marks already, use $q when you need to display " within the text
  • Use ` to display an open quotation mark.
  • Use # to break the dialogue into another line. ** This means we currently do not support showing # within dialogue, but a shortcut can be added on request.
  • & is currently not supported by the engine, but can be supported by adding the character into the font sheet.
  • The game will crash if the dialogue is too long for the box.

Shortcuts

Use Blue text (e.g. for thinking dialogue)

THINK [characterName]
    "[dialogue]"

Switch background and speak as character assigned to that location

This function is just JUMPCUT and SPEAK combined into one, because it can be tedious writing both every time.

SPEAK_FROM [backgroundFileName]
    "[dialogue]"

Example:

SPEAK_FROM COURT_WITNESS
    "time for a cross examination!"