Difference between revisions of "Category:Oblivion XML"
Jump to navigation
Jump to search
→Oblivion XML Schema
imported>JRoush m (→General Syntax) |
imported>JRoush |
||
Line 19: | Line 19: | ||
XML is a general syntax - the meaning of specific elements depends entirely on the program parsing the file. | XML is a general syntax - the meaning of specific elements depends entirely on the program parsing the file. | ||
The elements recognized by the Oblivion parser can be divided into three basic categories. [[Menu Element|"Menu" Elements]] define actual objects in the menu, such as buttons, text, images, etc. There are only a few elements | The elements recognized by the Oblivion parser can be divided into three basic categories. [[Menu Element|"Menu" Elements]] define actual objects in the menu, such as buttons, text, images, etc. There are only a few different kinds of menu elements, but they are used repeatedly to create the complex menu structures. | ||
[[Property Element|"Property Elements | [[Property Element|"Property" Elements]] are always children of Menu Elements, | ||
defining things like the position, color, transparency, etc. of their parent. | defining things like the position, color, transparency, etc. of their parent. | ||
For example, an <image> menu element might have <width> and <height> elements as children, which Oblivion will use to determine the size of the displayed image. | For example, an <image> menu element might have <width> and <height> elements as children, which Oblivion will use to determine the size of the displayed image. | ||
Line 31: | Line 31: | ||
Oblivion only recognizes three XML [[Traits]]: "name", "src", and "trait". | Oblivion only recognizes three XML [[Traits]]: "name", "src", and "trait". | ||
<!-- An example of an 'image' [[Menu Element]] --> | |||
<image name="MyImage"> <!-- This image has it's [[Trait|'name' trait]] set to 'MyImage', --> | |||
<height> 10 </height> <!-- and it's [[Property Element#Sizeable|'height' property]] set to 10 pixels. --> | |||
<width> <!-- It's [[Property Element#Sizeable|width]] is set to twice it's height --> | |||
<copy src="MyImage" trait="height" /> | |||
<mul> 2 </mul> <!-- using the '[[Operator Element#Copy Operator|copy]]' and '[[Operator Element#Algebraic Operators|mul]]' operators --> | |||
</width> | |||
</image> | |||
=== Oblivion Menu Files === | === Oblivion Menu Files === | ||
Menu xml data is stored in the ''Oblivion\Data\Menus'' directory. Each menu is stored in it's own file. Oblivion reloads a menu from disk every time it is opened, so changes to the file can be seen by closing and re-opening the menu - a very useful trick for editing. Note, however, that some menus are never closed (e.g. the HUD). These menus can be reloaded in game using "Reload ''menuname''" [[:Category:Console Functions|console function]]. | Menu xml data is stored in the ''Oblivion\Data\Menus'' directory. Each menu is stored in it's own file. Oblivion reloads a menu from disk every time it is opened, so changes to the file can be seen by closing and re-opening the menu - a very useful trick for editing. Note, however, that some menus are never closed (e.g. the HUD). These menus can be reloaded in game using "Reload ''menuname''" [[:Category:Console Functions|console function]]. |