User Tools

Site Tools


scripting:reference:scriptingmainui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:reference:scriptingmainui [2020/03/08 16:02] mitscripting:reference:scriptingmainui [2023/09/14 08:43] (current) – [ScriptedOption command] mit
Line 3: Line 3:
 Most of the elements on the main UI (e.g. the ESC menu, time/status displays and chat box) are fixed or configurable primarily through settings. Most of the elements on the main UI (e.g. the ESC menu, time/status displays and chat box) are fixed or configurable primarily through settings.
  
 +==== Main UI settings =====
 FIXME: (Link to some of the main settings controls). FIXME: (Link to some of the main settings controls).
  
-Some UI elements can optionally be scripted through **MenuOption** event and the ***scriptedoption** command.+==== Notification messages ====
  
-For example, you can change the buttons that appear when a player selects another in the player list to interact with, or you can add a scripted option to the ESC menu when the user presses ESC then F9 using:+The notification system provides a list of messages that are shown to the user on the left side of the screen. The messages disappear after a defined time (a few seconds by default but they can be made to last longer), and if multiple messages are triggered they are queued up, giving the player a few seconds to read each one. 
 + 
 +Notification messages can be automated, generated by command or made using scripted OSD. See [[world_Setup:game_features:Notifications|Notification System Reference]] for more info. 
 + 
 +==== Main On-screen Message ==== 
 + 
 +You can use the commands:\\ 
 +***setmainscore [PLAYER_NAME],[SCORE],[MAXSCORE],[MODE],[SCORE TEXT]**\\ 
 +***setmainmsg [PLAYER_NAME],[TEXT]**\\ 
 +.. to set a message which is permanently displayed at the top left of the player's screen. Generating the TEXT for this in script, using things like game score values or details about the player status allows you to provide dynamic information about the game to the player.  
 + 
 +==== ScriptedOption command ===== 
 + 
 +Some UI elements can optionally be scripted by activation with the ***scriptedoption** command and the **MenuOption** event ( + others). 
 + 
 +For example, you can change the buttons that appear when a player selects another in the player list to interact with (scriptedoptions 2-6), or you can add a scripted option to the ESC menu when the user presses ESC then F9 using:
 <code>*scriptedoption 1,World Tips</code> <code>*scriptedoption 1,World Tips</code>
 which when selected would trigger the event: which when selected would trigger the event:
Line 20: Line 36:
  
 1 - ESC then F9 - triggers Event( "MenuOption", 1 )\\ 1 - ESC then F9 - triggers Event( "MenuOption", 1 )\\
-2 - Player-player barter option replacement  - triggers Event( "MenuOption", 2 )\\ +2 - Player-player barter option replacement  - triggers ?\\ 
-3 - Player-player challenge option replacement - triggers Event( "MenuOption", 3 )\\ +3 - Player-player challenge option replacement - triggers ?\\ 
-4 - Player-player custom option 1 (only appears if set) - triggers Event( "MenuOption", 4 ) ?\\ +4 - Player-player custom option 1 (only appears if set) - triggers **Event( "MenuOption", 4 )**\\ 
-5 - Player-player custom option 2 (only appears if set) - triggers Event( "MenuOption", 5 ) ?\\ +5 - Player-player custom option 2 (only appears if set) - triggers **Event( "MenuOption", 5 )**\\ 
-6 - Player-player custom option 3 (only appears if set) - triggers Event( "MenuOption", 6 ) ?\\ +6 - Player-player custom option 3 (only appears if set) - triggers **Event( "MenuOption", 6 )**\\ 
-7 - Player-player custom option 4 (only appears if set) - triggers Event( "MenuOption", 7 ) ?\\+7 - Player-player custom option 4 (only appears if set) - triggers **Event( "MenuOption", 7 )**\\
 9 - [Unused atm]\\ 9 - [Unused atm]\\
-10 - Battle system accept challenge option 1 - *scriptedoption 10,[ButtonPrompt]\\ +10 - Battle system accept challenge option 1 - Triggers?\\ 
-11 - Battle system accept challenge option 2 - *scriptedoption 11,[ButtonPrompt]\\ +11 - Battle system accept challenge option 2 - Triggers?\\ 
-12 - Battle system victor decision option 1 - *scriptedoption 12,[ButtonPrompt]\\ +12 - Battle system victor decision option 1 - Triggers?\\ 
-13 - Battle system victor decision option 2 - *scriptedoption 13,[ButtonPrompt]\\ +13 - Battle system victor decision option 2 - Triggers?\\ 
-14 - Battle system victor decision option 3 - *scriptedoption 14,[ButtonPrompt]\\ +14 - Battle system victor decision option 3 - Triggers?\\ 
-15 - Optional extra button on towns menu, shows only for town owner - triggers Event( "TownButton", "1" )\\ +15 - Optional extra button on towns menu, shows only for town owner - triggers **Event( "TownButton", "1" )**\\ 
-16 - 2nd optional extra button on towns menu, shows for all players - triggers Event( "TownButton", "2" )\\ +16 - 2nd optional extra button on towns menu, shows for all players - triggers **Event( "TownButton", "2" )**\\ 
-17 - 3rd optional extra button on towns menu, shows only for town owner - triggers Event( "TownButton", "3" )\\ +17 - 3rd optional extra button on towns menu, shows only for town owner - triggers **Event( "TownButton", "3" )**\\ 
-18 - Help & Info menu extra option 1 -  Triggers Event( "MenuOption", "6" )\\ +18 - Help & Info menu extra option 1 -  Triggers **Event( "MenuOption", "18" )**\\ 
-19 - Help & Info menu extra option 2 -  Triggers Event( "MenuOption", "7" )\\ +19 - Help & Info menu extra option 2 -  Triggers **Event( "MenuOption", "19" )**\\ 
-20 - 1st option available in the pub interface - Triggers event ?\\ +20 - 1st option available in the pub interface - Triggers **Event( "MenuOption", "20" )**\\ 
-21 - 2nd option available in the pub interface - Triggers event ?\\ +21 - 2nd option available in the pub interface - Triggers **Event( "MenuOption", "21" )**\\ 
-22 - 3rd option available in the pub interface - Triggers event ?\\ +22 - 3rd option available in the pub interface - Triggers **Event( "MenuOption", "22" )**\\ 
-23 - 4th option available in the pub interface - Triggers event ?\\ +23 - 4th option available in the pub interface - Triggers **Event( "MenuOption", "23" )**\\ 
-24 - 5th option available in the pub interface - Triggers event ?\\ +24 - 5th option available in the pub interface - Triggers **Event( "MenuOption", "24" )**\\ 
-25 - Additional option on netrek mode button UI - Triggers event ?\\ +25 - Additional netrek mode button: ? icon when not in orbit - Triggers **Event( "MenuOption", "25" )**\\ 
-26 - Additional option on netrek mode button UI - Triggers event ?\\ +26 - Additional netrek mode button: $ icon when not in orbit - Triggers **Event( "MenuOption", "26" )**\\ 
-27 - Additional option on netrek mode button UI - Triggers event ?\\ +27 - Additional netrek mode button: i icon when not in orbit - Triggers **Event( "MenuOption", "27" )**\\ 
-28 - Additional option on netrek mode button UI - Triggers event ?\\ +28 - Additional netrek mode button: arrow icon replaces refuel option when in orbit - Triggers **Event( "MenuOption", "28" )**\\ 
-29 - Additional option on netrek mode button UI - Triggers event ?\\ +29 - Additional netrek mode button: ? icon when in orbit - Triggers **Event( "MenuOption", "29" )**\\ 
-30 - Additional option on netrek mode button UI - Triggers event ?\\ +30 - Additional netrek mode button: $ icon when in orbit - Triggers **Event( "MenuOption", "30" )**\\ 
-31 - Additional option on netrek mode button UI - Triggers event ?\\+31 - Additional netrek mode button: i icon when in orbit - Triggers **Event( "MenuOption", "31" )**\\ 
 +32 - Customises the standard building interface 'Extra Info' option. - Triggers **Event( "MenuOption", "32" )** 
 +33 - Additonal button on the building stockroom interface - Triggers **Event( "MenuOption", "32" )**
  
scripting/reference/scriptingmainui.1583701332.txt.gz · Last modified: 2020/03/08 16:02 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki