Difference between revisions of "Oblivion XML Reference/Tiles"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DavidJCobb
m (→‎NIF: This isn't markdown!)
imported>DavidJCobb
(→‎NIF: units)
 
Line 14: Line 14:


Note that Oblivion deliberately limits the features that a NIF in a menu can use. <code>NiMaterialProperty</code> and <code>NiAlphaProperty</code> objects will be stripped out of your 3D content when it is spliced into the user interface.
Note that Oblivion deliberately limits the features that a NIF in a menu can use. <code>NiMaterialProperty</code> and <code>NiAlphaProperty</code> objects will be stripped out of your 3D content when it is spliced into the user interface.
The exact relationship between 2D and 3D content is as follows:
{| class="wikitable"
! Direction !! 3D axis and increment !! 2D trait and increment
|-
| Right || X +1 || <code>x</code> + 1
|-
| Down || Z -1 || <code>y</code> + 1
|-
| Front (depth) || Y -0.008 || <code>depth</code> + 1
|}


== Rect ==
== Rect ==

Latest revision as of 23:18, 17 June 2018

In Oblivion's UI system, objects displayed as part of the UI are called tiles.

3d[edit | edit source]

This tag name is an alias for NIF. Tiles using either tag name are treated exactly the same; however, the start and ending tags should be consistent.

Image[edit | edit source]

Image tiles are used to display static textures stored in the DDS format.

Menu[edit | edit source]

Menu tiles act as the root elements for a menu. Each menu's root tile must be a Menu element, and the tile must have a class trait corresponding to a valid menu ID; if these requirements are not met, then the menu will not open or clean up properly, and abnormal behavior (including crashes) may occur.

NIF[edit | edit source]

NIF tiles are used to render a NetImmerse Format 3D mesh to the screen; these are often used for 2D components that require animations or complex shapes. 3D meshes use similar coordinates to tiles in a menu, but with different axes. The contents of the specified NIF file are inserted almost directly into a tile's rendered content.

Note that Oblivion deliberately limits the features that a NIF in a menu can use. NiMaterialProperty and NiAlphaProperty objects will be stripped out of your 3D content when it is spliced into the user interface.

The exact relationship between 2D and 3D content is as follows:

Direction 3D axis and increment 2D trait and increment
Right X +1 x + 1
Down Z -1 y + 1
Front (depth) Y -0.008 depth + 1

Rect[edit | edit source]

Rect tiles are general-purpose containers used to hold, organize, and position other tiles.

Rect tiles are supposed to be invisible, but if the alpha trait is set, then they may render with a solid-color background. This behavior does appear to be intentional, but doesn't occur consistently and may be broken.

Text[edit | edit source]

Text tiles are used to render text values to the screen. Their sizes are dynamically computed by the executable. Under the hood, each Text tile has an executable-constructed 3D mesh: each rendered text glyph is a quad that is UV-mapped to an uncompressed font texture.

Window[edit | edit source]

An unknown tile class not used in any vanilla menus. Further examination of the executable is required.