MENUITEM.BIN

From OHRRPGCE-Wiki
Jump to navigation Jump to search

MENUITEM.BIN stores data about individual menu items for custom menus. This lump only contains data applicable to an individual item on a menu. Data about the menus into which these menuitems are grouped is stored in MENUS.BIN. The record size is stored in BINSIZE.BIN

About Formal Specs

Offset Data Meaning
0 INT Menu Membership (ID number +1 in MENUS.BIN that this item belongs to, 0 for orphaned)
1-20 VSTR(1i+38b=20i) Menu item caption. If blank, it will be given a default based on type and subtype (menu width is automatically adjusted so all items fit)
21 INT Sort order
22 INT Menu type. See #Menu Item Types
23 INT Menu subtype. See #Menu Item Types
24 INT Tag conditional 1
25 INT Tag conditional 2 (logical AND with tag 1)
26 INT Set tag (positive ON negative OFF)
27 INT Toggle tag
28 INT Bitsets. See #Menu Item Bitsets
29 INT Extra 0 (For your own menu scripting purposes)
30 INT Extra 1
31 INT Extra 2
32 INT Text color - 0 means use the menu's default, 1 to 255 is a color index in master palette, -n - 1 means UI color n
33 INT Text color when disabled - 0 means use the menu's default, 1 to 255 is a color index in master palette, -n - 1 means UI color n

Menu Item Types[edit]

Negative type numbers are reserved for engine-internal stuff. They are not permitted in user-defined menus.

  • Type 0=Label
    • Subtype 0=Selectable (change tags)
    • Subtype 1=Disabled (previously called Unselectable)
    • Subtype 2=Can't be selected
  • Type 1=Special screen
    • Subtype 0=Items
    • Subtype 1=Spells
    • Subtype 2=Status
    • Subtype 3=Equip
    • Subtype 4=Order
    • Subtype 5=Team
    • Subtype 6=Order or Team (depending on "Hero swapping always available" global bitset)
    • Subtype 7=Map (if enabled on this map)
    • Subtype 8=Save (if enabled on this map)
    • Subtype 9=Load
    • Subtype 10=Quit
    • Subtype 11=Volume (music volume and builtin volume menu)
    • Subtype 12=Map (Always)
    • Subtype 13=Save (Always)
    • Subtype 14=Margins (if supported on current platform)
    • Subtype 15=Purchases (if configured for current platform)
    • Subtype 16=Windowed (if available and fullscreen)
    • Subtype 17=Fullscreen (if available and windowed)
    • Subtype 18=Music Volume
    • Subtype 19=Sound FX Volume
  • Type 2=Go to menu
    • Subtype = menu ID
  • Type 3=Show text box
    • Subtype = Text Box ID
  • Type 4=Run Script
    • Script trigger/ID

Menu Item Bitsets[edit]

  • 0=Hide when disabled
  • 1=Close menu when activated
  • 2=Don't run on-close script
  • 3-15=Unused

See Also[edit]