Перейти к основному содержимому

Paper Dialog

Display a customizable dialog

Поля

ПолеТипПо умолчаниюОписание
messageVar<String>—Lines of text displayed in the dialog body.ПлейсхолдерыМногострочное
bodyItemVar<Item>—Item showcased in the dialog body (empty for none).
buttonsList<DialogButtonConfig>empty—Варианты:action_buttonboolean_buttonmultiple_choice_buttonnumber_range_buttontext_input_buttontrigger_button
action_button (3)
ПолеТипПо умолчаниюОписание
labelVar<String>—Text displayed on the button.Плейсхолдеры
commandVar<String>—Command executed when the button is clicked.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
boolean_button (8)
ПолеТипПо умолчаниюОписание
labelVar<String>—Label displayed next to the toggle.Плейсхолдеры
keyVar<String>DialogKey.BOOLEAN.keyKey used to insert the value in the command. Default: 'boolean'.Плейсхолдеры
initialVar<Boolean>false—
onTrueVar<String>—Value inserted in the command when the toggle is true.Плейсхолдеры
onFalseVar<String>—Value inserted in the command when the toggle is false.Плейсхолдеры
commandVar<String>—Command template executed when the confirmation button is clicked. Use $(<key>) to insert the value.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
buttonLabelVar<String>OKLabel for the confirmation button.Плейсхолдеры
multiple_choice_button (6)
ПолеТипПо умолчаниюОписание
labelVar<String>—Label displayed above the options.Плейсхолдеры
keyVar<String>DialogKey.CHOICE.keyKey used to insert the selected option in the command. Default: 'choice'.Плейсхолдеры
optionsVar<String>—Comma separated options. Append * to mark the initial option.Плейсхолдеры
commandVar<String>—Command template executed when the confirmation button is clicked. Use $(<key>) to insert the selected option.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
buttonLabelVar<String>OKLabel for the confirmation button.Плейсхолдеры
number_range_button (9)
ПолеТипПо умолчаниюОписание
labelVar<String>—Label displayed above the slider.Плейсхолдеры
keyVar<String>DialogKey.VALUE.keyKey used to insert the value in the command. Default: 'value'.Плейсхолдеры
startVar<Int>0—
endVar<Int>0—
initialVar<Int>MIN_VALUE—
stepVar<Int>1—
commandVar<String>—Command template executed when the confirmation button is clicked. Use $(<key>) to insert the value.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
buttonLabelVar<String>OKLabel for the confirmation button.Плейсхолдеры
text_input_button (11)
ПолеТипПо умолчаниюОписание
labelVar<String>—Label displayed above the text input.Плейсхолдеры
keyVar<String>DialogKey.INPUT.keyKey used to insert the value in the command. Default: 'input'.Плейсхолдеры
commandVar<String>—Command template executed when the confirmation button is clicked. Use $(<key>) to insert the value.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
buttonLabelVar<String>OKLabel for the confirmation button.Плейсхолдеры
widthVar<Int>200—
labelVisibleVar<Boolean>true—
initialVar<String>——
maxLengthVar<Int>256—
maxLinesVar<Int>0—
heightVar<Int>0—
trigger_button (2)
ПолеТипПо умолчаниюОписание
labelVar<String>—Text displayed on the button.Плейсхолдеры
triggersList<Ref<TriggerableEntry>>emptyEntries triggered when the button is clicked.
exitButtonExitButtonConfig——
ExitButtonConfig (3)
ПолеТипПо умолчаниюОписание
labelVar<String>—Text displayed on the exit button.Плейсхолдеры
commandVar<String>—Command executed when the exit button is clicked.Плейсхолдеры
asOpVar<Boolean>falseWhether to execute the command as OP.
showExitButtonVar<Boolean>trueWhether to display the exit button.Плейсхолдеры
columnsVar<Int>1Number of columns to display.Плейсхолдеры
dialogTypeDialogDisplayTypeMULTI_ACTIONWindow layout: button grid, yes/no confirmation, or single-button notice.
afterActionDialogCloseBehaviourCLOSEWhat happens client-side after clicking a button.Значения:CLOSENONEWAIT_FOR_RESPONSE
Общие поля TypeWriter (criteria, modifiers, triggers, displayName)
ПолеТипПо умолчаниюОписание
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—
displayNameVar<String>—Custom display name for the dialog title.Плейсхолдеры

How to use it​

Build the whole window in this one entry.

  1. Set displayName (title), message (body text, several lines allowed) and optionally bodyItem.
  2. Pick dialogType: MULTI_ACTION (grid with columns), CONFIRMATION (first button = yes, exit button = no) or NOTICE (one button).
  3. Add buttons in buttons. Choose a type for each: action, trigger, text input, boolean, multiple choice or number range.
  4. Configure exitButton. It is shown when showExitButton is on, and always in CONFIRMATION mode. With an empty command, it just closes the dialog.
  5. Choose afterAction: CLOSE, NONE (stay open) or WAIT_FOR_RESPONSE.

Commands run as the clicking player (as OP for the duration of the command when asOp is on). In a command, $(key) is replaced by the value of the input with that key. A trigger button fires its triggers for the player, so you can continue a quest sequence from a click without any command.

See the main page for the full table of button types and layouts.