Oblivion

Menus, tile types, traits, operators, and parse-time tokens all have numeric IDs existing in a common space.

All new IDs
41C menuXXNHUDDebugMenu
41D menuXXNHUDClockMenu
41E menuXXNOptionsMenu
41F menuXXNControlsMenu
1600 traitxxnFontPath
1601 selectorNorthernUI
1602 selectordescendant
1603 traitxxnKeepNiProperties
1604 traitxxnNiScale
1605 operatorxxnOpSine
1606 operatorxxnOpCosine
1607 operatorxxnOpTangent
1608 operatorxxnOpAtan2
1609 operatorxxnOpStringEq
160A operatorxxnOpStringAppend
160B operatorxxnOpBinaryAnd
160C operatorxxnOpBinaryOr
160D selectorxxnStrings
160E operatorxxnOpSetIfZero
160F selectorxxnLocalization

New menus
XXNAlchemyMenu
This menu can be patched over the vanilla AlchemyMenu, and will reuse that menu's ID.

XXNSampleInventoryMenu
This menu was created for testing purposes and displays a simple list of the player's items. It can be patched over the vanilla AlchemyMenu, and will reuse that menu's ID.

XXNHUDDebugMenu (0x41C)
This menu was created for debugging purposes, and is reserved but never used by the mod.

XXNHUDClockMenu (0x41D)
A HUD widget that is shown or hidden with the HUD reticle. This widget shows the current in-game time and date.

XXNOptionsMenu (0x41E)
A menu that can be used to configure some of NorthernUI's INI settings. This menu is opened when the user clicks on an OptionsMenu tile with ID 9001.

XXNControlsMenu (0x41F)
A menu that can be used to configure gamepad controls when NorthernUI is handling gamepad support. This menu is opened when the user clicks on an OptionsMenu tile with ID 9002.

New operators - binary
These operators treat their numeric values as bitmasks. Because floats are used for the underlying storage, full accuracy is not reliable and the upper bits of, say, a dword are totally unusable here; however, for the small bitmasks used in vanilla menus (e.g. the item status bitmask in InventoryMenu), these should be fine. Single-precision floats can represent enough integers continuously to allow for six-bit masks, assuming no other arithmetic errors occur.

xxnOpBinaryAnd
Bitwise AND.

xxnOpBinaryOr
Bitwise OR.

New operators - float
xxnOpAtan2
Runs the atan2 function. The current working value is y, and the argument is x. Return value is in degrees.

Code sample: <copy>5</copy><xxnOpAtan2>4</xxnOpAtan2> <!-- atan2(5, 4) -->

xxnOpCosine
Returns the trigonometric cosine of the argument. The argument should be in degrees.

xxnOpSine
Returns the trigonometric sine of the argument. The argument should be in degrees.

xxnOpTangent
Returns the trigonometric tangent of the argument. The argument should be in degrees.

xxnOpSetIfZero
Returns the argument if the current working value is zero.

New operators - string
A limited number of string operators are implemented but effectively non-functional. The operators work properly, but the game doesn’t have any place to store the strings they’re supposed to operate on: the parser cannot store strings specified as operator arguments, and isn’t coded to try. As such, the operators always act as if the current working value and the argument are both the same string, consisting of a single space.

It is unlikely that this functionality will ever be completed. MenuQue adds (undocumented) support for string operators, and adds its own string operators; patching in string support without breaking compatibility would require me to mimic MenuQue closely enough to ruin all the fun invite accusations of plagiarism.

xxnOpStringAppend
Appends the argument to the end of the current working value, provided both are strings.

xxnOpStringEq
Performs a case-insensitive comparison between the current working value and the argument, and returns an XML boolean.

New selectors
descendant(name_goes_here)
Functionally identical to the vanilla "child" selector. I'd programmed it before knowing that "child" is actually "child or any descendant."

menu()
Selects the tile's containing menu.

NorthernUI()
Selects a special tile that gets created on startup if NorthernUI's datastore.xml file isn't missing. This tile exists "outside of the UI," similarly to the vanilla strings() tile, and can be used to supply values to all open menus.

The game is programmed to write the following traits to the special tile:

_xxnGamepadAvailable - updated every frame based on whether any gamepad is connected.

_xxnShowHUDClock - updated on startup and when INI settings change, to reflect whether the user has enabled the HUD clock menu

_xxnXInputPatchApplied - updated on startup, to reflect whether the XInput hooks were successfully applied (even if no gamepads are currently connected)

xxnStrings()
Selects a special tile that gets created on startup if NorthernUI's strings.xml file isn't missing. This tile exists "outside of the UI," similarly to the vanilla strings() tile, and can be used to supply strings to all open menus.

xxnLocalization()
Selects a special tile that gets created on startup if NorthernUI's localizationconfig.xml isn't missing. This tile exists "outside of the UI," similarly to the vanilla strings() tile, and can be used to supply localization-related configuration to all open menus. This tile loads before NorthernUI and xxnStrings, so those two tiles can reference traits from this tile, but this tile cannot reference traits from them.

New traits
xxnFontPath
Specify the path to a FNT file to make a text tile render its contents using that font. If the FNT file is missing, NorthernUI falls back to font 1. Usable alongside a font trait (which will take effect if NorthernUI’s DLL is not active).

xxnKeepNiProperties
If set to &true; on a nif tile, prevents Oblivion from stripping out NiAlphaProperty and NiMaterialProperty objects when importing the specified NIF file’s contents into the UI scene.

xxnNiScale
If set to a positive non-zero value on a nif tile, sets or overrides the scale multiplier on the tile’s NiNode in order to scale the rendered 3D content. Scale values should be floats between zero and one.

Article information

Added on

Edited on

Written by

DavidJCobb