Difference between revisions of "Category:Oblivion XML"

631 bytes added ,  11:54, 19 December 2009
imported>JRoush
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 in this category, but they are repeatedly to create the complex menu structures.
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"]] are always children of Menu 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".
&lt;!-- An example of an 'image' [[Menu Element]] --&gt;
<image name="MyImage">    &lt;!-- This image has it's [[Trait|'name' trait]] set to 'MyImage', --&gt;
    <height> 10 </height>  &lt;!-- and it's [[Property Element#Sizeable|'height' property]] set to 10 pixels. --&gt;
    <width>                &lt;!-- It's [[Property Element#Sizeable|width]] is set to twice it's height --&gt;
      <copy src="MyImage" trait="height" />
      <mul> 2 </mul>      &lt;!-- using the '[[Operator Element#Copy Operator|copy]]' and '[[Operator Element#Algebraic Operators|mul]]' operators --&gt;
    </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]].
Anonymous user