Template:Op output and messages

Output and messages
These operations will provide some textual information to the player during the game. There are three operations which will generate a game message (displayed as a chat-like series of text strings in the bottom-left part of the screen), while most others will be displaying various types of dialog boxes. You can also ask a question to player using these operations.

You can clear message list in right bottom corner by dislpaing an empty string. Also when spaming messages shut down display log it will be visible again.

This will create a quick string. Another approach is to display an empty string register

(display_message), without parameters displays the s0 string register. It should be initialisized, i.e. it is necessary to (str_clear, s0), even at the begining of the game.

@ - creates quick string. The file quick_strings.txt should be deleted before release. As variables.txt. When you add new quick_string/variable it will be attached to the end of the txt file for save compatibility. And deleted quick_string/variable will still be there. {!} - don't create text for translation {reg0?One of your prisoners, :} - If reg0=1 then add text "One of your prisoners, :"

display_debug_message = 1104
 * (display_debug_message, , [hex_colour_code]),
 * Displays a string message, but only in debug mode, using provided color (hex-coded 0xRRGGBB). The message is additionally written to rgl_log.txt file in both release and debug modes when edit mode is enabled.

display_log_message = 1105
 * (display_log_message, , [hex_colour_code]),
 * Display a string message using provided color (hex-coded 0xRRGGBB). The message will also be written to game log (accessible through Notes / Game Log), and will persist between sessions (i.e. it will be stored as part of the savegame).

display_message = 1106
 * (display_message, ,[hex_colour_code]),
 * Display a string message using provided color (hex-coded 0xRRGGBB).
 * When edit mode is enabled also write to rgl_log.

set_show_messages = 1107
 * (set_show_messages, ),
 * Suppresses (value = 0) or enables (value = 1) game messages, including those generated by the game engine.

tutorial_box = 1120
 * (tutorial_box, , ),
 * This operation is deprecated but is still used in Native.

dialog_box = 1120
 * (dialog_box, , [title_string_id]),
 * Displays a popup window with the text message and an optional caption.

question_box = 1121
 * (question_box, , [], []),
 * Displays a popup window with the text of the question and two buttons (Yes and No by default, but can be overridden). When the player selects one of possible responses, a ti_question_answered trigger will be executed. Works inside a mission template and in the map window.

tutorial_message = 1122
 * (tutorial_message, , [color], [auto_close_time]),
 * Displays a popup window with tutorial text stored in referenced string or string register. Use -1 to close any currently open tutorial box. Optional parameters allow you to define text color and time period after which the tutorial box will close automatically.

tutorial_message_set_position = 1123
 * (tutorial_message_set_position, , ),
 * Defines screen position for the tutorial box. Assumes screen size is 1000*750.

tutorial_message_set_size = 1124
 * (tutorial_message_set_size, , ),
 * Defines size of the tutorial box. Assumes screen size is 1000*750.

tutorial_message_set_center_justify = 1125
 * (tutorial_message_set_center_justify, ),
 * Sets tutorial box to be center justified (value = 1), or use positioning dictated by tutorial_message_set_position (value = 0).

tutorial_message_set_background = 1126
 * (tutorial_message_set_background, ),
 * Defines whether the tutorial box will have a background or not (1 or 0). Default is off.