Skip to content

StormFront Server Settings

Sean Proctor edited this page Jun 10, 2013 · 1 revision

Table of Contents

About

With the inception of StormFront and the XML-based StormFrontProtocol, http://www.play.net 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**
- Palette references are described as "@<id></id>" where <id></id> 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.
    • Skin Color**
- A color value of "skin" indicates that the client should pull the color from some sort of skin. WarlockTwo Warlock2 defines a http://warlock.svn.sourceforge.net/viewvc/warlock/warlock2/trunk/warlock2-rcp/com.arcaner.warlock.core/src/main/com/arcaner/warlock/configuration/skin/DefaultSkin.java?revision=283&view=markup DefaultSkin class that tries to emulate StormFront's default skin colors. - Example:

    • Hex Colors**
- Colors in the palette are defined using http://www.htmlgoodies.com/tutorials/colors/article.php/3478951 Standard HTML Hex Color notation, with the exception that all hex characters must be upper case. - Example:
    • Boolean Values**
  - 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**: <w id="sinv" vis="t"></w> - The vis attribute here is **False**: <w id="sinv" vis="f"></w>

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 http://www.dom4j.org dom4j, the following processing instruction needed to be added to the xml file:

%%(xml) %%

Server Settings XML Document

    • <settings></settings>**: The document itself begins and ends with this tag; all of the actual configuration is nested.
    • <palette></palette>**: This is the color palette that all settings with colors make reference to.
- **
    • 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).
    • <presets>**: This element defines the "preset" elements, or the static colors/fonts for things like room names, bold text, speech, whispers, thoughts, etc. &lt;/i&gt;</presets>
- **

    • 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).
  • <strings>**: This element contains all of the user-entered highlight strings and their colors/fonts. &lt;/i&gt;</strings>
  • - **<h>**: 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). &lt;/i&gt;</h>
      • <names>**: This element contains a list of names to highlight / ignore. The entries are identical to the strings element above. &lt;/i&gt;</names>
      • <vars>**: This element contains a list of variables the user has defined. &lt;/i&gt;</vars>
    - **<v></v>**: Represents the last value of a scripting variable. - **name**: The variable name (required) - **value**: The variable value (required) - **<k></k>**: Represents a user-configured variable through GUI. Has the same attributes as the <v> tag. &lt;/i&gt;</v>
      • <stream>**: This element contains stream window definitions including x/y position, width, height, default colors and fonts. &lt;/i&gt;</stream>
    - **<w></w>**: 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. - **<columnfont>**: 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. &lt;/font&gt;&lt;/i&gt;</columnfont>
      • <cmdline>**: This tag describes the colors for the game's entry box. &lt;/font&gt;&lt;/i&gt;</cmdline>
    - **fgcolor**: The foreground color for the entry box. - **bgcolor**: The background color for the entry box. - **barcolor**: The roundtime bar color.
      • <scripts>**: All of the player's scripts are stored here. &lt;/font&gt;&lt;/i&gt;</scripts>
    - **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).