Newgamechoices (DEF): Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''newgamechoices''' { [...] } | <span {{code}}>'''newgamechoices''' { [...] }</span> | ||
When defined, overrides the standard Duke 3D episode selection menu with a customizable one. Note that the behavior upon selecting a menu entry needs to be defined inside the event [[EVENT_NEWGAMECUSTOM]]. | When defined, overrides the standard Duke 3D episode selection menu with a customizable one. Note that the behavior upon selecting a menu entry needs to be defined inside the event [[EVENT_NEWGAMECUSTOM]]. | ||
Line 7: | Line 7: | ||
== Tokens == | == Tokens == | ||
'''choice''' <value> { [...] } | <span {{code}}>'''choice''' <value> { [...] }</span> | ||
Defines a menu entry, where <value> must start from 0 and indicates the display order. Can be nested to create submenus. A maximum of 7 display entries are allowed per submenu, and at most one submenu per top-level entry is allowed. Must be defined in a contiguous sequence (i.e. no gaps in the order). If no submenu is defined, will directly move on to the Skill Level Selection. | Defines a menu entry, where <value> must start from 0 and indicates the display order. Can be nested to create submenus. A maximum of 7 display entries are allowed per submenu, and at most one submenu per top-level entry is allowed. Must be defined in a contiguous sequence (i.e. no gaps in the order). If no submenu is defined, will directly move on to the Skill Level Selection. | ||
:: '''name''' | :: <span {{code}}>'''name''' <text></span> | ||
:: Required. Defines the name of the menu entry. This is the text that will be displayed ingame. | :: Required. Defines the name of the menu entry. This is the text that will be displayed ingame. | ||
:: '''locked''' | :: <span {{code}}>'''locked'''</span> | ||
:: Optional. Will make the menu entry inaccessible until the corresponding bit in [[newgamecustomopen]] for the top-layer menu, or [[newgamecustomsubopen]] for the submenu is set using CON scripts. | :: Optional. Will make the menu entry inaccessible until the corresponding bit in [[newgamecustomopen]] for the top-layer menu, or [[newgamecustomsubopen]] for the submenu is set using CON scripts. | ||
:: '''hidden''' | :: <span {{code}}>'''hidden'''</span> | ||
:: Optional. Will make the menu entry invisible until the corresponding bit in [[newgamecustomopen]] for the top-layer menu, or [[newgamecustomsubopen]] for the submenu is set using CON scripts. | :: Optional. Will make the menu entry invisible until the corresponding bit in [[newgamecustomopen]] for the top-layer menu, or [[newgamecustomsubopen]] for the submenu is set using CON scripts. |
Revision as of 04:53, 23 February 2020
newgamechoices { [...] }
When defined, overrides the standard Duke 3D episode selection menu with a customizable one. Note that the behavior upon selecting a menu entry needs to be defined inside the event EVENT_NEWGAMECUSTOM.
Note that this disables the Usermap selection menu entry. The menu itself can however still be accessed through clever use of EVENT_CHANGEMENU or the cmenu command.
Tokens
choice <value> { [...] }
Defines a menu entry, where <value> must start from 0 and indicates the display order. Can be nested to create submenus. A maximum of 7 display entries are allowed per submenu, and at most one submenu per top-level entry is allowed. Must be defined in a contiguous sequence (i.e. no gaps in the order). If no submenu is defined, will directly move on to the Skill Level Selection.
- name <text>
- Required. Defines the name of the menu entry. This is the text that will be displayed ingame.
- locked
- Optional. Will make the menu entry inaccessible until the corresponding bit in newgamecustomopen for the top-layer menu, or newgamecustomsubopen for the submenu is set using CON scripts.
- hidden
- Optional. Will make the menu entry invisible until the corresponding bit in newgamecustomopen for the top-layer menu, or newgamecustomsubopen for the submenu is set using CON scripts.
Examples
The following example recreates the Duke 3D menu, with a submenu for Episode 1, and two additional top-level menu entries World Tour and Plug N' Pray, which are locked and invisible respectively.
Note that without defining the behavior of the new menu using EVENT_NEWGAMECUSTOM , each option will simply restart the current map, or enter E1L1 if no map is active.
newgamechoices { choice 0 { name "L.A. Meltdown" choice 0 { name "Hollywood Holocaust" } choice 1 { name "Red Light District" } choice 2 { name "Death Row" } choice 3 { name "Toxic Dump" } choice 4 { name "The Abyss" } } choice 1 { name "Lunar Apocalypse" } choice 2 { name "Shrapnel City" } choice 3 { name "The Birth" } choice 4 { name "World Tour" locked } choice 5 { name "Plug N' Pray" hidden } }