Oblivion

How item descriptions are stored and how to create new ones.





The files
  • All custom item and spell descriptions are stored inside .XML files located in Data\Menus\Strings folder, for example Oblivion_strings.xml file that comes with the mod contains all descriptions for base game items.
  • The name of the file must contain the word "strings" in it, but otherwise is not important.

Contents
File structure is pretty simple, but there are a few things that need explaining. Here's a basic example:

<rect name="Oblivion_esm">

<_00000A>I am the description of a lockpick.</_00000A>
<_019171>I am the description of an iron dagger.</_019171>
<_000136>I am the description of Heal Minor Wounds spell.</_000136>

</rect>


Let's examine it line-by-line:
  • All items are first defined by the name of the esm\esp file they come from, this is the <rect name="filename"> line. Note that dot in file name is replaced by an underscore, so if you want to add descriptions to items from "An Awesome Mod.esp", line would look like <rect name="An Awesome Mod_esp">. All potential dot characters must be replaced by an underscore, not just the one between file name and extension.
  • Next comes the main part, where descriptions for individual items are stored inside the <_FormID>...text...</_FormID> blocks. Note that FormIDs are used without first 2 symbols (aka mod index).
  • Finally, the </rect> line closes the block from point 1. This is the end of descriptions for that particular mod.



Possibilities and limitations
  • %r in description text is replaced by a new-line character, like in OBSE strings.
  • You can put multiple different <rect name="filename"></rect> blocks for different mods in a single XML file, if you want.
  • You cannot have multiple <rect name="filename"></rect> blocks with the same name in multiple XML files (or in one file, for that matter). This means that item description is only defined once and cannot be overridden by different XML file.
  • Technical limit for description length would be whatever OBSE string length limit is (I wasn't able to find an exact number in OBSE documentation, but I'm pretty sure it's way larger than practical limit). Practical limit is dependent on UI mod used, Darnified UI can display up to about 1000 characters, but most descriptions are usually shorter.

Article information

Added on

Edited on

Written by

qwertyasdfgh

0 comments