MenuMode (Function)

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

Checks whether a menu is open, or if a particular menu is open, given an argument

Syntax

[help]
(0, 1:int) MenuMode MenuType:int

Example

If (MenuMode 1)
     ;code goes here
endif

This will check to see if the Pipboy menu is open, and runs the code if it is

If MenuMode
     ;code goes here
     ;
endif

This will check to see if ANY menu is open (i.e. not in GameMode), and runs the code if there is

Notes

  • This function can be used as a Condition within Perks, Object Effects, and so on. However, the function may not return correct values for any specific menu type or group, i.e. it may only be possible to use it to check whether or not the game is currently operating in GameMode.
  • For Effect Scripts, this function will never return true 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 Fallout 3 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 it's own code in Fallout: New Vegas with the JIPLN plugin and returns 4, so the above is only needed if you are not using it.
  • ShowRaceMenu, ShowPlasticSurgeonMenu, and ShowBarberMenu all return true for MenuMode 1036.


Menu type:

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)

Specific menu:

Menu Code Menu Name
1001 Message
1002 Inventory
1003 Stats
1004 HUDMainMenu
...
1007 Loading
1008 Container
1009 Dialog
...
1012 SleepWait
1013 Pause
1014 LockPick
...
1016 Quantity
...
1023 Pipboy Data
...
1026 Book Menu (Book Menu Restored Plugin)
1027 LevelUp
...
1035 Pipboy Repair
1036 RaceMenu, BarberMenu, PlasticSurgeryMenu
...
1047 Credits
1048 CharGen
...
1051 TextEdit
...
1053 Barter
1054 Surgery
1055 Hacking
1056 VATS
1057 Computers
1058 Vendor Repair
1059 Tutorial
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)

See Also