StormFront Server Settings

About
With the inception of StormFront and the XML-based StormFrontProtocol, [Simutronics] introduced a way to save a player's settings and scripts on the server. This makes it very easy to access your configuration and scripts from any location with an internet location, and removes the need for backup.

The purpose of this Wiki is to document the server settings XML document, and also the way in which server settings are added, updated, and removed from the server.

Notation
There are a some special cases of unique notations in the XML file. The most common being:

- Palette references are described as "@" where  is the id of the palette color to be used (see below). - Example: . This preset's foreground color will be the palette entry 97, and background color will be palette entry 84. - A color value of "skin" indicates that the client should pull the color from some sort of skin. WarlockTwo Warlock2 defines a [DefaultSkin] class that tries to emulate StormFront's default skin colors. - Example:  - Colors in the palette are defined using [Standard HTML Hex Color notation], with the exception that all hex characters must be upper case. - Example:  - In the case of a boolean expression the values "y" or "t" is seen as true, and a "f" or null/empty attribute is seen as false. For example: - The line attribute here is **True**:  - The line attribute here is **False**:  - The vis attribute here is **True**: - The vis attribute here is **False**:
 * Palette References**
 * Skin Color**
 * Hex Colors**
 * Boolean Values**

Caveats
The server settings XML document is sent in ISO-8859-1 character encoding (which is incompatible with UTF-8, the default xml encoding). To succesfully parse the XML document with a standard XML library such as [dom4j], the following processing instruction needed to be added to the xml file:

%%(xml)  %%

Server Settings XML Document
- ****: This is a palette color entry under the palette tag. This tag contains two attributes and no data: - **id**: The numeric id for this palette entry (a 0-based index) - **color**: The actual color described in HTML Hex format (i.e #FFFFFF, #C0C0C0, etc). - ** **: This is a preset entry under the presets tag. This tag has 2 required attributes "color" and "bgcolor", all the rest are optional. - **color**: A palette reference to the foreground color for this preset. - **bgcolor**: A palette reference to the background color for this preset. - **ulcolor**: A palette reference to the underline color for this preset (optional). - **line**: A boolean indicating whether or not to highlight the entire line (optional). - ****: This is a highlight string entry under the strings tag. - **text**: The text to highlight (required). - **color**: A palette reference to the foreground color to apply to this highlight. - **bgcolor**: A palette reference to the background color to apply to this highlight. This can be empty ("") or non-existant to inherit the background color from the main window. - **line**: A boolean indicating whether or not to highlight the entire line (optional). - ****: Represents the last value of a scripting variable. - **name**: The variable name (required) - **value**: The variable value (required) - ****: Represents a user-configured variable through GUI. Has the same attributes as the  tag. - ****: This element contains position, size, colors, and other attributes for a stream window. - **id**: The stream window ID - **vis**: A boolean indicating whether or not this stream window is visible. - **frame**: "float" indicates a floating window, "panel" indicates attachment to a specific panel (see panel attribute). - **panel**: The name of the panel this window is attached to. Valid values seem to be "Left" and "Right" - **location**: This seems to mirror the panel attribute, except the value is all lower case (i.e. "left", "right", "center"). Not sure of it's significance. - **open**: A boolean indicating whether or not this stream window is open. - **ts**: Value seems to be a static number for all stream windows, significance isn't apparent. - **width**: The width of the stream window. Can be a raw number or "auto". - **height**: The height of the stream window. Can be a raw number or "auto". - **x**: The x position of the stream window. Can be a raw number or "auto". - **y**: The y position of the stream window. Can be a raw number or "auto". - **color**: A palette reference to the foreground color for this stream window. - **bgcolor**: A palette reference to the background color for this stream window. - ** **: A nested tag to describe the standard font for this stream window. - **charSet**: Not sure what this is used for yet. - **face**: The font face / name for this font. - **size**: The size in pixels of the font. - **weight**: Whether or not this font is bold(?) Have only ever seen this be "normal". - **italic**: A boolean indicating if this font is italic or not. - **strike**: A boolean indicating whether or not this font is strikethrough. - **underline**: A boolean indicating whether or not this font is underlined. - ****: A nested tag to describe the "column" or monospace/fixed font for things like "exp", "info", etc. It has the same attributes as the font tag above. - **fgcolor**: The foreground color for the entry box. - **bgcolor**: The background color for the entry box. - **barcolor**: The roundtime bar color. - **prefix**: The prefix to use when executing a script (i.e. ".") - ** **: A script element. The content inside is the script itself. - **name**: The name of this script - **comment**: A comment to describe the script (this is usually empty, I think StormFront pulls the real value from the first comment of the script data itself) - **fmt**: What format the script is stored in. I've only ever seen this be "tok" (see ScriptTokFormat).
 * **: The document itself begins and ends with this tag; all of the actual configuration is nested.
 * **: This is the color palette that all settings with colors make reference to.
 * **: This element defines the "preset" elements, or the static colors/fonts for things like room names, bold text, speech, whispers, thoughts, etc.
 * **: This element contains all of the user-entered highlight strings and their colors/fonts.
 * **: This element contains a list of names to highlight / ignore. The entries are identical to the strings element above.
 * **: This element contains a list of variables the user has defined.
 * **: This element contains stream window definitions including x/y position, width, height, default colors and fonts.
 * **: This tag describes the colors for the game's entry box.
 * **: All of the player's scripts are stored here.