begin MenuMode MenuType (optional)
begin MenuMode begin MenuMode 1 begin MenuMode 1012 begin MenuMode iTest ;filtered according to the current value of the int variable
With no parameter, this block type will run whenever the game is NOT in gamemode -- whenever ANY menu is being displayed.
If you include a parameter, you can specify the menu type, or the specific menu, when you want the script block to run:
|Menu Code||Menu Name|
|1||"main four" (the character interface: stats, magic, inventory, quest log)|
|2||any other menu (message boxes, containers, etc.)|
|3||console ( opened with '~' )|
|4||title screen main menu (added by JIPLN)|
|Menu Code||Menu Name|
|1026||Book Menu (Book Menu Restored Plugin)|
|1036||RaceMenu, BarberMenu, PlasticSurgeryMenu|
|1060||You're SPECIAL book|
|1061||Item Mod Menu (New Vegas)|
|1069||Tweaks Menu (LStewieAl's Tweaks)|
|1074||Love Tester (New Vegas)|
|1075||Companion Wheel (New Vegas)|
|1076||The Medical Questionnaire (Not Used) (New Vegas)|
|1077||Recipe (New Vegas)|
|1080||Slot Machine MiniGame (New Vegas)|
|1081||Blackjack Table MiniGame (New Vegas)|
|1082||Roulette Table MiniGame (New Vegas)|
|1083||Caravan MiniGame (New Vegas)|
|1084||Character Creation Traits (not the Medical Questionnaire) (New Vegas)|
- For Effect Scripts, this block will never run when the Pause menu is open.
- Lutana NVSE Plugin (and JIP NVSE Plugin v40+, which Lutana was merged in to) hooks the MenuMode function to properly detect MenuMode 3 (Console)
- The Main Menu that appears when F3 first starts up does not have its own menu code. However, the following three (and only these three) will return true: 1004, 1007, 1013.
- The Main Menu has its own code in Fallout New Vegas with the JIPLN plugin which is 4, so the above is only needed if you are not using it.
- Quest scripts on Quests set to start-game-enabled will run even on the main menu. Be extremely careful when using scripts that attempt to perform game-related behaviour in MenuMode to ensure that they are operating on a loaded saved game. For instance, unsafely calling SetNameEx on a base effect in MenuMode will result in a guaranteed crash, before the main menu displays -- which is almost indistinguishable from other boot-related crashes like missing master files. The easiest way to avoid this is to check for an initialisation variable that has been set in a begin-GameMode block.