Skip to content

Show Number Input ​

Category: Flow

An event content that displays a calculator-style dialog letting the player enter an integer. The entered value is saved to a specified variable and can be used in subsequent event judgments / processing. Use it in scenes where the player picks a number: specifying purchase count, selecting a difficulty, recording a user answer, etc.

Only integers can be entered

Only integers can be entered. Values with a decimal point (0.5, 1.3, etc.) are not supported. If you need decimals, use techniques like converting to units that can be handled as integers (e.g., representing prices in whole yen rather than fractional units).

Define the variable that saves the input value in advance

The variable that saves the input value must be defined in advance in the editor's Variable Tab.

Property List ​

Item (tscn label)Input formatDescription
TitleTextTitle shown at the top of the dialog
Save VariableSelectVariable to save the input value (defined in Variable Tab)
Default ValueNumber (integer)Initial value when the dialog opens (default: 0)
Min ValueNumber (integer)Minimum enterable value (default: 0)
Max ValueNumber (integer)Maximum enterable value (default: 999999)
Cancel EnabledCheckboxEnable the cancel button (default: ON)
Cancel ValueNumber (integer)Value saved to the variable on cancel (default: -1)

Property Details ​

Title ​

Specifies the title string displayed at the top of the dialog.

  • Leave blank to display an empty title
  • Translation-ready: If multi-language support is set up in the Translation Tab, the text of this property is also treated as a translation key

Examples: Enter the purchase count, Difficulty (1-10), Select remaining lives

Save Variable ​

Specifies the variable to save the entered value (or Cancel Value on cancel).

  • Dropdown: Select from all variable IDs created in the Variable tab
  • The variable must be defined in advance in the Variable Tab

Real-time cross-tab updates (2026-09-09)

Adding or removing variables in the Variable tab is reflected in the dropdown immediately.

Deleted variables are shown with a warning

If a previously set variable has been deleted, it is shown with an Error icon in the dropdown. Running the game in this state outputs a *** WARNING : Show Number Input: save_variable '<variable_name>' does not exist in Global.save_data.variable log, and the dialog opens without saving the input value (treated as non-error by design).

Default Value ​

Specifies the value at the moment the dialog is displayed.

  • Integer
  • Default: 0
  • If the player presses OK without changing it, this value is saved

Min Value / Max Value ​

Specifies the valid range of enterable numbers.

  • Integer
  • Default: Min Value 0, Max Value 999999
  • During editing, out-of-range values can be entered, but the value is automatically clamped into range when OK is pressed (e.g., with Min Value 10, entering 5 and pressing OK → 10 is saved)

Cancel Enabled ​

Specifies whether to enable the cancel button.

  • ON (default): The cancel button is displayed, and ESC key also cancels
  • OFF: The cancel button is disabled, and ESC key has no effect (the player must confirm with OK)

Setting it to OFF puts it in "forced input mode." Use this when you want to force the player to enter a value.

Cancel Value ​

Specifies the value assigned to the save variable when the player cancels.

  • Integer
  • Default: -1
  • When Cancel Enabled is OFF, this property has no effect

Typical pattern for cancel detection

By setting Cancel Value to a value outside the normal input range (e.g., -1), you can detect cancellation in subsequent Conditional Branch:

  • {input_variable} == -1 → Canceled
  • {input_variable} >= 0 → Entered via OK

Runtime Behavior ​

When this event content runs, the following processing is performed:

1. Pause all HUD processing ​

Before opening the dialog, pauses the processing of the following HUDs:

  • Screen effects (fade, shake, wait)
  • Images
  • Text and windows
  • Choices
  • Custom buttons
  • Function buttons (menu)

This stops input and progression from other HUDs while the dialog is displayed.

2. Variable existence check ​

  • If the save variable is empty: Outputs *** WARNING : save_variable not specified log
  • If the save variable does not exist in the variable data: Outputs *** WARNING : save_variable '<variable_name>' does not exist in Global.save_data.variable log

In either case, the dialog still opens (treated as non-error). However, saving to the variable is skipped on OK / Cancel.

3. Display the dialog ​

A calculator-style number input dialog is displayed.

  • Title display (translation-ready)
  • Current value display area (large label)
  • Digit buttons 0-9
  • Backspace button
  • OK button
  • Cancel button (only when Cancel Enabled)

4. Input methods ​

The player can enter via:

  • Mouse: Click each button
  • Keyboard: 0-9, Backspace, Enter (OK), ESC (Cancel)
  • Directional keys: Move focus between buttons + Enter to confirm

5. Behavior on OK ​

Pressing the OK button (or Enter key):

  1. Clamps the current input value into Min Value to Max Value
  2. If the save variable is valid, saves the clamped value
  3. Plays the decide sound (sound_decide)
  4. Closes the dialog
  5. Resumes all HUD processing
  6. Advances to the next event content

6. Behavior on Cancel ​

Pressing the Cancel button (or ESC key, only when Cancel Enabled):

  1. If the save variable is valid, saves Cancel Value
  2. Plays the cancel sound (sound_cancel)
  3. Closes the dialog
  4. Resumes all HUD processing
  5. Advances to the next event content

7. When Cancel is disabled ​

When Cancel Enabled is OFF, the Cancel button is disabled and ESC key has no effect. The player must press OK.

Typical Flows ​

Flow 1: Specifying item purchase count ​

Let the player decide how many to buy:

  1. Show Text ← "How many potions will you buy?"
  2. Show Number Input (this event content)
    • Title: Purchase count
    • Save Variable: buy_count
    • Default Value: 1
    • Min Value: 1
    • Max Value: 99
    • Cancel Enabled: ON
    • Cancel Value: 0
  3. Conditional Branch (Formula {buy_count} == 0)
  4. Show Text ← "Purchase canceled"
  5. End Event
  6. End If
  7. (Purchase processing)

Flow 2: Difficulty selection ​

Specify game difficulty from 1 to 10:

  1. Show Text ← "Please select a difficulty from 1 to 10"
  2. Show Number Input (this event content)
    • Title: Difficulty
    • Save Variable: difficulty
    • Default Value: 5
    • Min Value: 1
    • Max Value: 10
    • Cancel Enabled: OFF ← Force input
  3. (Game setup processing based on difficulty)

Flow 3: Age input ​

Let the player input their age:

  1. Show Number Input (this event content)
    • Title: Please enter your age
    • Save Variable: player_age
    • Default Value: 20
    • Min Value: 0
    • Max Value: 150
  2. Show Text ← "So you're {player_age} years old."

Flow 4: Donation by specified gold ​

Let the player decide the donation amount:

  1. Show Text ← "How much will you donate? (Gold: {gold} G)"
  2. Show Number Input (this event content)
    • Title: Donation amount
    • Save Variable: donate_amount
    • Default Value: 100
    • Min Value: 0
    • Max Value: {gold} (* Formula support is not available at this time; a fixed value is recommended)
    • Cancel Enabled: ON
    • Cancel Value: -1
  3. Conditional Branch (Formula {donate_amount} == -1)
  4. Show Text ← "Looks like you changed your mind."
  5. End If
  6. (Donation processing)

Flow 5: In-game numeric quiz ​

Pose a numeric quiz to the player:

  1. Show Text ← "10 + 5 = ?"
  2. Show Number Input (this event content)
    • Title: Answer
    • Save Variable: quiz_answer
    • Default Value: 0
    • Min Value: 0
    • Max Value: 100
  3. Conditional Branch (Formula {quiz_answer} == 15)
  4. Show Text ← "Correct!"
  5. Else
  6. Show Text ← "Incorrect. It's 15, not {quiz_answer}."
  7. End If

Flow 6: Counter reset ​

Instead of resetting a variable to a specific value, let the player decide:

  1. Show Text ← "Where will you start the counter?"
  2. Show Number Input (this event content)
    • Title: Initial counter value
    • Save Variable: counter
    • Default Value: 0
    • Min Value: 0
    • Max Value: 1000

Flow 7: Debug variable setting ​

Directly set a game variable during development:

  1. Show Number Input (this event content)
    • Title: Set debug_var
    • Save Variable: debug_var
    • Default Value: Current value of {debug_var} (enter int directly in the editor)
    • Min Value: -999999
    • Max Value: 999999

Typical Combinations ​

For the complete picture, see Combination Patterns.

Input → Conditional branch ​

Use the input value in a conditional:

  1. Show Number Input (this event content) (input)
  2. Conditional Branch (judge the input variable)
  3. (Processing for each condition)
  4. End If

Input → Cancel detection → Main flow ​

Early exit on cancel:

  1. Show Number Input (this event content) (Cancel Value -1)
  2. Conditional Branch (Formula {input_variable} == -1)
  3. End Event
  4. End If
  5. (Main flow)

Input loop (re-input) ​

Repeat until a valid value is entered:

  1. Loop
  2. Show Number Input (this event content)
  3. Conditional Branch (Formula {input_variable} == expected)
  4. Break Loop
  5. End If
  6. Show Text ← "Please enter a valid value"
  7. Loop End

Input → Calculation → Assign ​

Process the input value into another variable:

  1. Show Number Input (this event content) (Save Variable input_raw)
  2. Assign Variable (variable input_doubled, value {input_raw} * 2, Calculation Result ON)
Related event contentUse
Assign VariablePrerequisite for variable definition; also used after input for processing
Conditional BranchBranching based on input value
End EventEarly exit on cancel
Show Text InputString-input version
Add ChoiceUse this when selecting among fixed choices
PageRelated content
Variable Tab (Editor)Define the save variable
Formula ReferenceFormulas used for conditionals on the input value
Event Content ListList of all event contents

Notes ​

Only integers can be entered ​

This event content only handles integers. Decimals are not supported.

Variables must be defined in the Variable tab in advance ​

The variable that saves the input must be defined in advance in the Variable Tab. If an undefined variable is specified, the input is not saved (the dialog itself still opens).

Min/Max are auto-clamped on OK ​

During editing, values below Min Value or above Max Value can be entered, but they are forced into range on OK button press. This ensures out-of-range values do not cause issues in subsequent processing.

Disabling Cancel enters forced input mode ​

Turning Cancel Enabled OFF disables both the Cancel button and the ESC key. The player must press OK.

Cancel Value is used for cancel detection ​

By setting Cancel Value to a value outside the normal input range (e.g., -1 when Min Value is 0), you can detect cancellation in subsequent conditional branches.

Other HUDs are paused during the dialog ​

While the dialog is displayed, all HUD processing (images, text, choices, buttons, etc.) is paused. Closing the dialog automatically resumes them.

Dialog still opens even if the save variable is unspecified ​

Even if the save variable is unspecified or deleted, the dialog still opens. A warning log (*** WARNING : save_variable not specified) is output, and saving the input value is skipped. Game progression does not stop.

Title is translation-ready ​

The text of the Title property can be internationalized via translation data. See the Translation Tab for details.

Multiple input methods are available ​

Mouse, keyboard, and directional keys can all be used, so you can match the player's environment.