Skip to main content

Text Display Dialogue

Dialogue, choice menus and cinematic subtitles shown as floating text_display entities.

Paidv2.4Quests & narrative
RequiresTypeWriter0.9PlaceholderAPIoptional

Overview​

Text Display Dialogue replaces the chat box of TypeWriter dialogue with Minecraft text_display entities. The speaker name and the lines of text float next to the NPC (or at a position you choose), type themselves out, and pop in and out with a short scale animation. Everything is sent with packets to the player in the dialogue: nothing is spawned in the world and other players see nothing.

The extension adds three dialogue entries and one cinematic entry. They behave like the regular TypeWriter dialogue entries (speaker, criteria, modifiers, triggers, typing duration, sound), so you can swap them into an existing conversation without changing the rest of your page.

Features​

  • Floating spoken dialogue — the speaker name and text appear above the speaker with a typing effect and a pop-in animation.
  • Choice menu in the world — each option is a floating line; the player scrolls the hotbar to change the highlighted option and right-clicks to confirm.
  • Player-relative menu — a variant that follows the player at a configurable offset, for speakers that have no position in the world.
  • Cinematic subtitles — display text segments on a cinematic timeline with a delay and a typing animation.
  • Full styling — scale, textOpacity, viewRange, billboard, and separate background colours for the speaker, the text and the options.
  • Option timer — auto-cancel a choice after a delay and fire cancelTriggers, with a live countdown placeholder.
  • Per-option logic — every option has its own criteria, modifiers and triggers, and an optional position.
  • Inventory lock — the player cannot open an inventory, drop an item or swap hands while a dialogue is shown.

Installation​

  1. Install PlaceholderAPI if you want to use %placeholders% in dialogue text (optional).
  2. Obtain the extension from the stores (see the buttons above) and put the JAR in plugins/Typewriter/extensions/.
  3. Restart the server.

The extension needs no other plugin: text display entities are sent with the packet library bundled with TypeWriter. It runs on Paper only: Folia is not supported.

Getting started​

Turn a simple greeting into a floating dialogue with a choice:

  1. In the TypeWriter web panel, open a sequence page that already has an NPC (a speaker) and an interaction trigger, or create one.
  2. Add a Spoken dialogue with Text Display entry. Set speaker to your NPC and write the text, for example Welcome, traveller!. Set duration to 2s to get a typing effect (zero shows the text at once).
  3. Add a Option dialogue with Text Display entry, set the same speaker, write the question in text, then add two or three options. Give each option its own triggers.
  4. Link the triggers of the spoken entry to the option entry so the conversation continues.
  5. Optionally set timer on the option entry to 15s and link cancelTriggers to a farewell entry. The text can show the countdown with %typewriter_textdisplaydialogue_timer%.
  6. Publish the page and talk to the NPC. Right-click the floating text (or the air) to continue; on a choice, scroll the hotbar and right-click to confirm.
Position

By default the text is placed one block above the speaker's position. If the speaker is not an NPC entity with a position, or you want a fixed spot, set position with the position capture tool. Use the player option variant when the menu should follow the player instead.

How it works​

Every dialogue entry splits the text into one text_display per line, so long messages stack downwards. The typing effect uses the standard TypeWriter typing mode. Options appear one after the other (100 ms apart) after the text is complete, and can only be confirmed once all of them are visible.

Controls​

DialogueContinue or confirmChange option
SpokenThe TypeWriter confirmation key, or right-click one of the floating texts. A first press completes the typing, a second one closes the dialogue.Not applicable
Option and Player optionRight-click in the air or on one of the floating texts, once all options are shown.Scroll the hotbar (the held slot never changes). Selection wraps around.

Configuration​

The dialogues have no configuration file. Every displayed text is a snippet, editable in plugins/Typewriter/snippets; the defaults reproduce the standard display. A <token> in a snippet is replaced by its value, and other <tags> stay MiniMessage. In a layout snippet (*.format), the speaker and the hint are shown only when their token is present, while the text and the options are always shown. An empty hint snippet shows no hint.

SnippetUsed byRoleTokens
textdisplay.option.formatOption, Player optionLayout<speaker_name> <text> <options> <instruction>
textdisplay.speaker.formatOption, Player optionSpeaker name<speaker_name>
textdisplay.option.prefix.selectedOption, Player optionPrefix of the selected option-
textdisplay.option.prefix.unselectedOption, Player optionPrefix of the other options-
textdisplay.option.selectedOption, Player optionSelected option line<prefix> <option_number> <option_text>
textdisplay.option.unselectedOption, Player optionOther option lines<prefix> <option_number> <option_text>
textdisplay.instructionOption, Player optionHint-
textdisplay.spoken.formatSpokenLayout<speaker_name> <text> <instruction>
textdisplay.spoken.speaker.formatSpokenSpeaker name<speaker_name>
textdisplay.spoken.text.formatSpokenLine of text<text>
textdisplay.spoken.instructionSpokenHint-
textdisplay.spoken.continueSpokenContinue hint (confirmation key)<key>
textdisplay.cinematic.spoken.formatCinematicLayout<speaker_name> <text> <instruction>
textdisplay.cinematic.spoken.speaker.formatCinematicSpeaker name<speaker_name>
textdisplay.cinematic.spoken.instructionCinematicHint-
textdisplay.inventory.blockedAll dialoguesMessage when a player tries to open an inventory (empty: no message)-
textdisplay.error.initAll dialoguesMessage when the display cannot start (empty: no message)-

The Player option dialogue uses the same snippets as the Option dialogue.

Placeholders​

PlaceholderReturns
%typewriter_textdisplaydialogue_timer%Seconds left on the timer of the current option dialogue, 0 when no timer is running.

The placeholder is registered in PlaceholderAPI (Typewriter expansion), so it also works elsewhere (scoreboards, chat, other plugins) and returns 0 when no timer is running. The extension also replaces it itself in the text of the option dialogues, in the text of each option and in the speaker name, so it works there without PlaceholderAPI. Other PlaceholderAPI placeholders work in these texts when PlaceholderAPI is installed.

Entries​

4 entries, generated from the extension source.

Dialogues3
Cinematics1

Troubleshooting​

Nothing appears and the player sees a red "Dialog initialization error". The extension caught an error while spawning the displays. Read the server log for the line starting with TextDisplay initialization error for the cause, and check that position, when set, is a valid position in an existing world.

The text appears at the player's feet or in the wrong place. The text is anchored to the position of the speaker entity. If speaker is empty, or is not an NPC instance that is visible to the player, the player location (plus one block up) is used. Set position to place it exactly.

The option menu cannot be confirmed. The right-click is only accepted after the typing finished and every option has appeared. With a long duration and many options, wait for the full menu. Options whose criteria do not match are not shown at all; if none match, nothing can be selected.

Scrolling does not change the option. Scroll events are throttled to one every 150 ms, so very fast scrolling is ignored. The held hotbar slot never changes during the dialogue, this is expected.

The countdown shows %typewriter_textdisplaydialogue_timer% as is. Without PlaceholderAPI, the placeholder is only replaced in the option dialogues, and only when timer is above zero. Install PlaceholderAPI to use it in a spoken dialogue or elsewhere.

The player complains that the inventory is locked. While a dialogue is shown, opening an inventory, clicking in it, dropping items and swapping hands are cancelled. This is by design and ends with the dialogue.

  • BetterModel — animated model NPCs that can be the speaker of a floating dialogue.