summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-07-22 22:31:58 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-07-22 22:40:59 -0700
commit6b91c6d0b3e31a8c0560193ae2df0f1894b59c1f (patch)
tree908a93c3f7d108b92102ff70430819176eaecb26
parent4e9e719d1eb5564e3594099a456da19bfb7a9c02 (diff)
downloadtools-6b91c6d0b3e31a8c0560193ae2df0f1894b59c1f.tar.gz
tools-6b91c6d0b3e31a8c0560193ae2df0f1894b59c1f.tar.bz2
tools-6b91c6d0b3e31a8c0560193ae2df0f1894b59c1f.tar.xz
tools-6b91c6d0b3e31a8c0560193ae2df0f1894b59c1f.zip
Update schema to what ManaPlus actually reads
-rw-r--r--client/config.xsd540
-rw-r--r--client/tmw.xsd1689
2 files changed, 1744 insertions, 485 deletions
diff --git a/client/config.xsd b/client/config.xsd
new file mode 100644
index 0000000..ae9cc30
--- /dev/null
+++ b/client/config.xsd
@@ -0,0 +1,540 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- vim: set sts=2 sw=2: -->
+<!--
+ Last updated for ManaPlus v1.4.7.19-21-g58f499d
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:its="http://www.w3.org/2005/11/its" elementFormDefault="qualified">
+ <xs:import namespace="http://www.w3.org/2005/11/its" schemaLocation="dl/its.xsd"/>
+ <!--
+ XML::getBoolProperty
+ -->
+ <xs:simpleType name="bool">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!-- roots, with their children nearby -->
+ <!--
+ This is used by local config files and by updates files
+ Configuration::init/ConfigurationObject::initFromXML
+ branding
+ portable.xml
+ command-line
+ config
+ <configdir>/test.xml
+ <configdir>/config.xml
+ serverConfig
+ <configdir>/<server>/config.xml
+ paths
+ paths.xml
+ features
+ featuresFile features.xml
+ -->
+ <xs:element name="configuration" type="root_configuration"/>
+ <xs:complexType name="root_configuration">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="list">
+ <xs:complexType>
+ <!-- what manaplus does is actually impossible to represent -->
+ <!-- TODO in a future version fix this horrible abuse of XML -->
+ <xs:choice>
+ <xs:element name="nested_conf_1" type="configuration" maxOccurs="unbounded"/>
+ <xs:element name="nested_conf_2" type="configuration" maxOccurs="unbounded"/>
+ </xs:choice>
+ <xs:attribute name="name" type="nested_configuration" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="option">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:simpleType name="nested_configuration">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="nested_conf_1"/>
+ <xs:enumeration value="nested_conf_2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ Theme::readSkin
+ <lots of stuff>.xml
+ -->
+ <xs:element name="skinset" type="root_skinset"/>
+ <xs:complexType name="root_skinset">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="widget">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="part">
+ <xs:complexType>
+ <xs:attribute name="type" type="widget_part_type" use="required"/>
+ <xs:attribute name="xpos" type="xs:int" default="0"/>
+ <xs:attribute name="ypos" type="xs:int" default="0"/>
+ <xs:attribute name="width" type="xs:int" default="1"/>
+ <xs:attribute name="height" type="xs:int" default="1"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- only if full skin (?) -->
+ <xs:element name="option">
+ <xs:complexType>
+ <!-- some of these are handled specially, but it's still stringy -->
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="type" type="widget_type" use="required"/>
+ <xs:attribute name="xpos" type="xs:int" default="0"/>
+ <xs:attribute name="ypos" type="xs:int" default="0"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="image" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:simpleType name="widget_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Window"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="widget_part_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value=""/>
+ <xs:enumeration value="top-left-corner"/>
+ <xs:enumeration value="standart"/>
+ <xs:enumeration value="up"/>
+ <xs:enumeration value="hstart"/>
+ <xs:enumeration value="in"/>
+ <xs:enumeration value="normal"/>
+ <xs:enumeration value="top-edge"/>
+ <xs:enumeration value="highlighted"/>
+ <xs:enumeration value="down"/>
+ <xs:enumeration value="hmiddle"/>
+ <xs:enumeration value="in-highlighted"/>
+ <xs:enumeration value="checked"/>
+ <xs:enumeration value="top-right-corner"/>
+ <xs:enumeration value="pressed"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="hend"/>
+ <xs:enumeration value="out"/>
+ <xs:enumeration value="disabled"/>
+ <xs:enumeration value="left-edge"/>
+ <xs:enumeration value="disabled"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="hgrip"/>
+ <xs:enumeration value="out-highlighted"/>
+ <xs:enumeration value="disabled-checked"/>
+ <xs:enumeration value="bg-quad"/>
+ <xs:enumeration value="vstart"/>
+ <xs:enumeration value="normal-highlighted"/>
+ <xs:enumeration value="right-edge"/>
+ <xs:enumeration value="vmiddle"/>
+ <xs:enumeration value="checked-highlighted"/>
+ <xs:enumeration value="bottom-left-corner"/>
+ <xs:enumeration value="vend"/>
+ <xs:enumeration value="bottom-edge"/>
+ <xs:enumeration value="vgrip"/>
+ <xs:enumeration value="bottom-right-corner"/>
+ <xs:enumeration value="closeImage"/>
+ <xs:enumeration value="closeImageHighlighted"/>
+ <xs:enumeration value="stickyImageUp"/>
+ <xs:enumeration value="stickyImageDown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ Theme::loadColors
+ colors.xml
+ -->
+ <xs:element name="colors" type="root_colors"/>
+ <xs:complexType name="root_colors">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="progressbar">
+ <xs:complexType>
+ <xs:attribute name="id" type="colors_progressbar_id" use="required"/>
+ <xs:attribute name="color" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="palette">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="color">
+ <xs:complexType>
+ <xs:attribute name="id" type="colors_palette_id" use="required"/>
+ <xs:attribute name="color" type="xs:string" use="required"/>
+ <xs:attribute name="effect" type="colors_palette_effect" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="color" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:simpleType name="colors_progressbar_id">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="HP"/>
+ <xs:enumeration value="HP_POISON"/>
+ <xs:enumeration value="MP"/>
+ <xs:enumeration value="NO_MP"/>
+ <xs:enumeration value="EXP"/>
+ <xs:enumeration value="INVY_SLOTS"/>
+ <xs:enumeration value="WEIGHT"/>
+ <xs:enumeration value="JOB"/>
+ <xs:enumeration value="UPDATE"/>
+ <xs:enumeration value="MONEY"/>
+ <xs:enumeration value="ARROWS"/>
+ <xs:enumeration value="STATUS"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="colors_palette_id">
+ <xs:restriction base="xs:string">
+ <!-- colors.xml, the _OUTLINE version must come after the base -->
+ <xs:enumeration value="BROWSERBOX"/>
+ <xs:enumeration value="BROWSERBOX_OUTLINE"/>
+ <xs:enumeration value="SELFNICK"/>
+ <xs:enumeration value="SELFNICK_OUTLINE"/>
+ <xs:enumeration value="TEXT"/>
+ <xs:enumeration value="TEXT_OUTLINE"/>
+ <xs:enumeration value="CARET"/>
+ <xs:enumeration value="SHADOW"/>
+ <xs:enumeration value="OUTLINE"/>
+ <xs:enumeration value="BORDER"/>
+ <xs:enumeration value="PROGRESS_BAR"/>
+ <xs:enumeration value="PROGRESS_BAR_OUTLINE"/>
+ <xs:enumeration value="BUTTON"/>
+ <xs:enumeration value="BUTTON_OUTLINE"/>
+ <xs:enumeration value="BUTTON_DISABLED"/>
+ <xs:enumeration value="BUTTON_DISABLED_OUTLINE"/>
+ <xs:enumeration value="BUTTON_HIGHLIGHTED"/>
+ <xs:enumeration value="BUTTON_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="BUTTON_PRESSED"/>
+ <xs:enumeration value="BUTTON_PRESSED_OUTLINE"/>
+ <xs:enumeration value="CHECKBOX"/>
+ <xs:enumeration value="CHECKBOX_OUTLINE"/>
+ <xs:enumeration value="DROPDOWN"/>
+ <xs:enumeration value="DROPDOWN_OUTLINE"/>
+ <xs:enumeration value="LABEL"/>
+ <xs:enumeration value="LABEL_OUTLINE"/>
+ <xs:enumeration value="LISTBOX"/>
+ <xs:enumeration value="LISTBOX_OUTLINE"/>
+ <xs:enumeration value="LISTBOX_SELECTED"/>
+ <xs:enumeration value="LISTBOX_SELECTED_OUTLINE"/>
+ <xs:enumeration value="RADIOBUTTON"/>
+ <xs:enumeration value="RADIOBUTTON_OUTLINE"/>
+ <xs:enumeration value="POPUP"/>
+ <xs:enumeration value="POPUP_OUTLINE"/>
+ <xs:enumeration value="TAB"/>
+ <xs:enumeration value="TAB_OUTLINE"/>
+ <xs:enumeration value="TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="TAB_SELECTED"/>
+ <xs:enumeration value="TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="TEXTBOX"/>
+ <xs:enumeration value="TEXTFIELD"/>
+ <xs:enumeration value="TEXTFIELD_OUTLINE"/>
+ <xs:enumeration value="WINDOW"/>
+ <xs:enumeration value="WINDOW_OUTLINE"/>
+ <xs:enumeration value="PARTY_CHAT_TAB"/>
+ <xs:enumeration value="PARTY_CHAT_TAB_OUTLINE"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB_OUTLINE"/>
+ <xs:enumeration value="GUILD_CHAT_TAB"/>
+ <xs:enumeration value="GUILD_CHAT_TAB_OUTLINE"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB_OUTLINE"/>
+ <xs:enumeration value="GM_CHAT_TAB"/>
+ <xs:enumeration value="GM_CHAT_TAB_OUTLINE"/>
+ <xs:enumeration value="PARTY_CHAT_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="PARTY_CHAT_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="GUILD_CHAT_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="GUILD_CHAT_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="GM_CHAT_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="GM_CHAT_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="PARTY_CHAT_TAB_SELECTED"/>
+ <xs:enumeration value="PARTY_CHAT_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB_SELECTED"/>
+ <xs:enumeration value="PARTY_SOCIAL_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="GUILD_CHAT_TAB_SELECTED"/>
+ <xs:enumeration value="GUILD_CHAT_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB_SELECTED"/>
+ <xs:enumeration value="GUILD_SOCIAL_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="GM_CHAT_TAB_SELECTED"/>
+ <xs:enumeration value="GM_CHAT_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="BACKGROUND"/>
+ <xs:enumeration value="BACKGROUND_GRAY"/>
+ <xs:enumeration value="SCROLLBAR_GRAY"/>
+ <xs:enumeration value="DROPDOWN_SHADOW"/>
+ <xs:enumeration value="HIGHLIGHT"/>
+ <xs:enumeration value="HIGHLIGHT_OUTLINE"/>
+ <xs:enumeration value="TAB_FLASH"/>
+ <xs:enumeration value="TAB_FLASH_OUTLINE"/>
+ <xs:enumeration value="TAB_PLAYER_FLASH"/>
+ <xs:enumeration value="TAB_PLAYER_FLASH_OUTLINE"/>
+ <xs:enumeration value="SHOP_WARNING"/>
+ <xs:enumeration value="ITEM_EQUIPPED"/>
+ <xs:enumeration value="ITEM_EQUIPPED_OUTLINE"/>
+ <xs:enumeration value="ITEM_NOT_EQUIPPED"/>
+ <xs:enumeration value="ITEM_NOT_EQUIPPED_OUTLINE"/>
+ <xs:enumeration value="CHAT"/>
+ <xs:enumeration value="CHAT_OUTLINE"/>
+ <xs:enumeration value="GM"/>
+ <xs:enumeration value="GM_OUTLINE"/>
+ <xs:enumeration value="GLOBAL"/>
+ <xs:enumeration value="GLOBAL_OUTLINE"/>
+ <xs:enumeration value="PLAYER"/>
+ <xs:enumeration value="PLAYER_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB"/>
+ <xs:enumeration value="WHISPER_TAB_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB_HIGHLIGHTED"/>
+ <xs:enumeration value="WHISPER_TAB_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE_HIGHLIGHTED"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE_HIGHLIGHTED_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB_SELECTED"/>
+ <xs:enumeration value="WHISPER_TAB_SELECTED_OUTLINE"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE_SELECTED"/>
+ <xs:enumeration value="WHISPER_TAB_OFFLINE_SELECTED_OUTLINE"/>
+ <xs:enumeration value="IS"/>
+ <xs:enumeration value="IS_OUTLINE"/>
+ <xs:enumeration value="SERVER"/>
+ <xs:enumeration value="SERVER_OUTLINE"/>
+ <xs:enumeration value="LOGGER"/>
+ <xs:enumeration value="LOGGER_OUTLINE"/>
+ <xs:enumeration value="HYPERLINK"/>
+ <xs:enumeration value="HYPERLINK_OUTLINE"/>
+ <xs:enumeration value="UNKNOWN_ITEM"/>
+ <xs:enumeration value="UNKNOWN_ITEM_OUTLINE"/>
+ <xs:enumeration value="GENERIC"/>
+ <xs:enumeration value="GENERIC_OUTLINE"/>
+ <xs:enumeration value="HEAD"/>
+ <xs:enumeration value="HEAD_OUTLINE"/>
+ <xs:enumeration value="USABLE"/>
+ <xs:enumeration value="USABLE_OUTLINE"/>
+ <xs:enumeration value="TORSO"/>
+ <xs:enumeration value="TORSO_OUTLINE"/>
+ <xs:enumeration value="ONEHAND"/>
+ <xs:enumeration value="ONEHAND_OUTLINE"/>
+ <xs:enumeration value="LEGS"/>
+ <xs:enumeration value="LEGS_OUTLINE"/>
+ <xs:enumeration value="FEET"/>
+ <xs:enumeration value="FEET_OUTLINE"/>
+ <xs:enumeration value="TWOHAND"/>
+ <xs:enumeration value="TWOHAND_OUTLINE"/>
+ <xs:enumeration value="SHIELD"/>
+ <xs:enumeration value="SHIELD_OUTLINE"/>
+ <xs:enumeration value="RING"/>
+ <xs:enumeration value="RING_OUTLINE"/>
+ <xs:enumeration value="NECKLACE"/>
+ <xs:enumeration value="NECKLACE_OUTLINE"/>
+ <xs:enumeration value="ARMS"/>
+ <xs:enumeration value="ARMS_OUTLINE"/>
+ <xs:enumeration value="AMMO"/>
+ <xs:enumeration value="AMMO_OUTLINE"/>
+ <xs:enumeration value="SERVER_VERSION_NOT_SUPPORTED"/>
+ <xs:enumeration value="SERVER_VERSION_NOT_SUPPORTED_OUTLINE"/>
+ <xs:enumeration value="WARNING"/>
+ <xs:enumeration value="WARNING_OUTLINE"/>
+ <xs:enumeration value="CHARM"/>
+ <xs:enumeration value="CHARM_OUTLINE"/>
+ <xs:enumeration value="PLAYER_ADVANCED"/>
+ <xs:enumeration value="PLAYER_ADVANCED_OUTLINE"/>
+ <xs:enumeration value="BUBBLE_NAME"/>
+ <xs:enumeration value="BUBBLE_NAME_OUTLINE"/>
+ <xs:enumeration value="BUBBLE_TEXT"/>
+ <xs:enumeration value="BUBBLE_TEXT_OUTLINE"/>
+ <xs:enumeration value="BLACK"/>
+ <xs:enumeration value="BLACK_OUTLINE"/>
+ <xs:enumeration value="RED"/>
+ <xs:enumeration value="RED_OUTLINE"/>
+ <xs:enumeration value="GREEN"/>
+ <xs:enumeration value="GREEN_OUTLINE"/>
+ <xs:enumeration value="BLUE"/>
+ <xs:enumeration value="BLUE_OUTLINE"/>
+ <xs:enumeration value="ORANGE"/>
+ <xs:enumeration value="ORANGE_OUTLINE"/>
+ <xs:enumeration value="YELLOW"/>
+ <xs:enumeration value="YELLOW_OUTLINE"/>
+ <xs:enumeration value="PINK"/>
+ <xs:enumeration value="PINK_OUTLINE"/>
+ <xs:enumeration value="PURPLE"/>
+ <xs:enumeration value="PURPLE_OUTLINE"/>
+ <xs:enumeration value="GRAY"/>
+ <xs:enumeration value="GRAY_OUTLINE"/>
+ <xs:enumeration value="BROWN"/>
+ <xs:enumeration value="BROWN_OUTLINE"/>
+ <xs:enumeration value="STATUSBAR_ON"/>
+ <xs:enumeration value="STATUSBAR_OFF"/>
+ <xs:enumeration value="TABLE_BACKGROUND"/>
+ <xs:enumeration value="SLOTS_BAR"/>
+ <xs:enumeration value="SLOTS_BAR_OUTLINE"/>
+ <xs:enumeration value="HP_BAR"/>
+ <xs:enumeration value="HP_BAR_OUTLINE"/>
+ <xs:enumeration value="MP_BAR"/>
+ <xs:enumeration value="MP_BAR_OUTLINE"/>
+ <xs:enumeration value="NO_MP_BAR"/>
+ <xs:enumeration value="NO_MP_BAR_OUTLINE"/>
+ <xs:enumeration value="XP_BAR"/>
+ <xs:enumeration value="XP_BAR_OUTLINE"/>
+ <xs:enumeration value="WEIGHT_BAR"/>
+ <xs:enumeration value="WEIGHT_BAR_OUTLINE"/>
+ <xs:enumeration value="MONEY_BAR"/>
+ <xs:enumeration value="MONEY_BAR_OUTLINE"/>
+ <xs:enumeration value="ARROWS_BAR"/>
+ <xs:enumeration value="ARROWS_BAR_OUTLINE"/>
+ <xs:enumeration value="STATUS_BAR"/>
+ <xs:enumeration value="STATUS_BAR_OUTLINE"/>
+ <xs:enumeration value="JOB_BAR"/>
+ <xs:enumeration value="JOB_BAR_OUTLINE"/>
+ <xs:enumeration value="OLDCHAT"/>
+ <xs:enumeration value="OLDCHAT_OUTLINE"/>
+ <xs:enumeration value="AWAYCHAT"/>
+ <xs:enumeration value="AWAYCHAT_OUTLINE"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="colors_palette_effect">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="STATIC"/>
+ <xs:enumeration value="PULSE"/>
+ <xs:enumeration value="SPECTRUM"/>
+ <xs:enumeration value="RAINBOW"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ Theme::loadInfo
+ info.xml
+ -->
+ <xs:element name="info" type="root_info"/>
+ <xs:complexType name="root_info">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="copyright" type="xs:string"/>
+ <xs:element name="font" type="xs:string"/>
+ <xs:element name="boldFont" type="xs:string"/>
+ <xs:element name="particleFont" type="xs:string"/>
+ <xs:element name="helpFont" type="xs:string"/>
+ <xs:element name="secureFont" type="xs:string"/>
+ <xs:element name="npcFont" type="xs:string"/>
+ <xs:element name="japanFont" type="xs:string"/>
+ <xs:element name="chinaFont" type="xs:string"/>
+ <xs:element name="fontSize" type="xs:int"/>
+ <xs:element name="npcfontSize" type="xs:int"/>
+ <xs:element name="guialpha" type="xs:float"/>
+ <!-- the below must not occur before the default ones above -->
+ <!-- TODO in a future version fix this moderate abuse of XML -->
+ <!-- <= 120 dpi -->
+ <xs:element name="fontSize_low" type="xs:int"/>
+ <xs:element name="npcfontSize_low" type="xs:int"/>
+ <!-- <= 160 dpi -->
+ <xs:element name="fontSize_medium" type="xs:int"/>
+ <xs:element name="npcfontSize_medium" type="xs:int"/>
+ <!-- <= 213 dpi -->
+ <xs:element name="fontSize_tv" type="xs:int"/>
+ <xs:element name="npcfontSize_tv" type="xs:int"/>
+ <!-- <= 240 dpi -->
+ <xs:element name="fontSize_high" type="xs:int"/>
+ <xs:element name="npcfontSize_high" type="xs:int"/>
+ <!-- <= 320 dpi -->
+ <xs:element name="fontSize_xhigh" type="xs:int"/>
+ <xs:element name="npcfontSize_xhigh" type="xs:int"/>
+ <!-- <= 480 dpi (max) -->
+ <xs:element name="fontSize_xxhigh" type="xs:int"/>
+ <xs:element name="npcfontSize_xxhigh" type="xs:int"/>
+ </xs:choice>
+ </xs:complexType>
+ <!--
+ ServerDialog::loadServers
+ serverlistplus.xml
+ -->
+ <xs:element name="serverlist" type="root_serverlist"/>
+ <xs:complexType name="root_serverlist">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="server">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="connection">
+ <xs:complexType>
+ <xs:attribute name="hostname" type="xs:string" use="required"/>
+ <xs:attribute name="althostname" type="xs:string" use="optional"/>
+ <xs:attribute name="port" type="xs:ushort" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="description" type="xs:string"/>
+ <xs:element name="registerUrl" type="xs:string"/>
+ <xs:element name="onlineListUrl" type="xs:string"/>
+ <xs:element name="support" type="xs:string"/>
+ <xs:element name="persistentIp" type="xs:boolean"/>
+ <xs:element name="updateMirror" type="xs:string"/>
+ <!-- TODO in a future version fix this horrible abuse of XML -->
+ <xs:element name="description_ru" type="xs:string"/>
+ <xs:element name="description_fr" type="xs:string"/>
+ <xs:element name="description_pt" type="xs:string"/>
+ <xs:element name="description_es" type="xs:string"/>
+ <xs:element name="description_ja" type="xs:string"/>
+ <xs:element name="description_de" type="xs:string"/>
+ <xs:element name="description_pl" type="xs:string"/>
+ <xs:element name="description_pt_BR" type="xs:string"/>
+ <xs:element name="description_it" type="xs:string"/>
+ <xs:element name="description_vls" type="xs:string"/>
+ <xs:element name="description_id" type="xs:string"/>
+ <xs:element name="description_zh_CN" type="xs:string"/>
+ <xs:element name="description_nl_BE" type="xs:string"/>
+ <xs:element name="description_nl" type="xs:string"/>
+ </xs:choice>
+ <xs:attribute name="type" type="serverlist_server_type" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="minVersion" type="xs:string" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="version" type="xs:int" use="required"/>
+ </xs:complexType>
+ <xs:simpleType name="serverlist_server_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="tmwathena"/>
+ <xs:enumeration value="evol"/>
+ <xs:enumeration value="eathena"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ <updaterwindow>:loadXMLFile
+ resources.xml
+ -->
+ <xs:element name="updates" type="root_updates"/>
+ <xs:complexType name="root_updates">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="update" type="updates_update"/>
+ <xs:element name="mod" type="updates_update"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="updates_update">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="hash" type="xs:string" use="required"/>
+ <xs:attribute name="type" type="updates_update_type" use="required"/>
+ <xs:attribute name="description" type="xs:string" use="optional"/>
+ <xs:attribute name="group" type="xs:string" use="optional"/> <!-- only for 'mod'? -->
+ <xs:attribute name="version" type="xs:string" use="optional"/>
+ <xs:attribute name="notVersion" type="xs:string" use="optional"/>
+ <xs:attribute name="required" type="yesno" default="yes"/>
+ </xs:complexType>
+ <xs:simpleType name="updates_update_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="data"/>
+ <xs:enumeration value="music"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="yesno">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="yes"/>
+ <xs:enumeration value="no"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
diff --git a/client/tmw.xsd b/client/tmw.xsd
index 139f3b9..7019770 100644
--- a/client/tmw.xsd
+++ b/client/tmw.xsd
@@ -1,637 +1,1356 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- vim: set sts=2 sw=2: -->
+<!--
+ Last updated for ManaPlus v1.4.7.19-21-g58f499d
+ Integer ranges are not currently bounds-checked.
+-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:its="http://www.w3.org/2005/11/its" elementFormDefault="qualified">
+ <xs:import namespace="http://www.w3.org/2005/11/its" schemaLocation="dl/its.xsd"/>
+ <!-- stuff up here is used everywhere-->
+ <xs:element name="include" type="include"/>
+ <xs:complexType name="include">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <xs:complexType name="empty"/>
<!--
- meta
+ XML::getBoolProperty
-->
+ <xs:simpleType name="bool">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!-- roots, with their children nearby -->
<!--
- Probably most 'sequence' below should really be 'choice',
- and the corresponding maxOccurs should be hoisted.
- TODO see what happens for duplicates in that case (see <chars> in particular)
+ EffectManager::loadXmlFile
+ effectsFile: effects.xml
+ effectsPatchFile: effects_patch.xml
+ effectsPatchDir: effects.d/*.xml
-->
- <xs:import namespace="http://www.w3.org/2005/11/its" schemaLocation="dl/its.xsd"/>
+ <xs:element name="being-effects" type="root_being-effects"/>
+ <xs:complexType name="root_being-effects">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="effect">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="particle" type="xs:string" use="optional"/>
+ <xs:attribute name="audio" type="xs:string" use="optional"/>
+ <xs:attribute name="sprite" type="xs:string" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- common
+ Configuration::init/ConfigurationObject::initFromXML
+ branding
+ portable.xml
+ command-line
+ config
+ <configdir>/test.xml
+ <configdir>/config.xml
+ serverConfig
+ <configdir>/<server>/config.xml
+ paths
+ paths.xml
+ features
+ featuresFile features.xml
-->
- <xs:complexType name="weapon_items">
+ <xs:element name="configuration" type="root_configuration"/>
+ <xs:complexType name="root_configuration">
<xs:sequence>
- <xs:element name="item" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="list">
+ <xs:complexType>
+ <!-- what manaplus does is actually impossible to represent -->
+ <!-- TODO in a future version fix this horrible abuse of XML -->
+ <xs:choice>
+ <xs:element name="nested_conf_1" type="root_configuration" maxOccurs="unbounded"/>
+ <xs:element name="nested_conf_2" type="root_configuration" maxOccurs="unbounded"/>
+ </xs:choice>
+ <xs:attribute name="name" type="nested_configuration" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="option">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
</xs:sequence>
</xs:complexType>
- <xs:element name="include">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:simpleType name="cursor">
+ <xs:simpleType name="nested_configuration">
<xs:restriction base="xs:string">
- <xs:enumeration value="small"/>
- <xs:enumeration value="large"/>
+ <xs:enumeration value="nested_conf_1"/>
+ <xs:enumeration value="nested_conf_2"/>
</xs:restriction>
</xs:simpleType>
- <xs:simpleType name="sex">
- <xs:restriction base="xs:string">
- <xs:enumeration value="male"/>
- <xs:enumeration value="female"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="replace_dir">
- <!-- also used for drawBefore -->
- <xs:restriction base="xs:string">
- <xs:enumeration value="left"/>
- <xs:enumeration value="right"/>
- <xs:enumeration value="upall"/>
- <xs:enumeration value="downall"/>
- <xs:enumeration value="up"/>
- <xs:enumeration value="down"/>
- <xs:enumeration value="default"/>
- <xs:enumeration value="upright"/>
- <xs:enumeration value="upleft"/>
- <xs:enumeration value="downright"/>
- <xs:enumeration value="downleft"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="replace_sprite">
- <!-- also used for drawBefore -->
- <xs:restriction base="xs:string">
- <xs:enumeration value="hair"/>
- <xs:enumeration value="hat"/>
- <xs:enumeration value="pants"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="sound_event">
- <xs:restriction base="xs:string">
- <xs:enumeration value="strike"/>
- <xs:enumeration value="hit"/>
- <xs:enumeration value="miss"/>
- <xs:enumeration value="die"/>
- <xs:enumeration value="hurt"/>
- <xs:enumeration value="move"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="item_drawBefore">
- <xs:attribute name="name" type="replace_sprite" use="required"/>
- <xs:attribute name="direction" type="replace_dir" use="required"/>
+ <!--
+ Particle::addEffect(file|dye, x, y, rot)
+ -->
+ <xs:element name="effect" type="root_effect"/>
+ <xs:complexType name="root_effect">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="particle">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:group ref="particle_extras" minOccurs="0" maxOccurs="unbounded"/>
+ <!-- this should probably be required to go first -->
+ <xs:choice minOccurs="0">
+ <xs:element name="animation" type="animation_1"/>
+ <xs:element name="rotation" type="animation_1"/>
+ <xs:element name="image" type="xs:string"/>
+ </xs:choice>
+ <xs:group ref="particle_extras" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="position-x" type="xs:float" default="0"/>
+ <xs:attribute name="position-y" type="xs:float" default="0"/>
+ <xs:attribute name="position-z" type="xs:float" default="0"/>
+ <!-- TODO is this really? It was so unusual, but it's common. -->
+ <xs:attribute name="lifetime" type="xs:int" use="optional"/>
+ <xs:attribute name="size-adjustable" type="bool" default="false"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
</xs:complexType>
- <xs:complexType name="item_sprite">
+ <xs:group name="particle_extras">
+ <xs:choice>
+ <xs:element name="emitter" type="particle_emitter"/>
+ <xs:element name="deatheffect" type="death_effect"/>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="death_effect">
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="gender" type="sex" use="optional"/>
+ <xs:attribute name="on-floor" type="bool" default="true"/>
+ <xs:attribute name="on-sky" type="bool" default="true"/>
+ <xs:attribute name="on-other" type="bool" default="false"/>
+ <xs:attribute name="on-impact" type="bool" default="true"/>
+ <xs:attribute name="on-timeout" type="bool" default="true"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
- <xs:complexType name="item_replace">
- <xs:sequence>
- <xs:element name="item" maxOccurs="unbounded">
+ <!--
+ SimpleAnimation::initializeAnimation
+ -->
+ <xs:complexType name="animation_1">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="frame">
<xs:complexType>
- <xs:attribute name="from" type="xs:integer" use="optional"/>
- <xs:attribute name="to" type="xs:integer" use="optional"/>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="index" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- <xs:attribute name="direction" type="replace_dir" use="optional"/>
- <xs:attribute name="sprite" type="replace_sprite" use="required"/>
+ <xs:element name="sequence">
+ <xs:complexType>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="start" type="xs:int" use="required"/>
+ <xs:attribute name="end" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="end" type="empty"/>
+ </xs:choice>
+ <xs:attribute name="imageset" type="xs:string" use="required"/>
+ <xs:attribute name="width" type="xs:int" use="required"/>
+ <xs:attribute name="height" type="xs:int" use="required"/>
</xs:complexType>
- <xs:complexType name="item_sound">
- <!-- TODO also being used for monster sounds, see if that's really ok -->
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="event" type="sound_event" use="required"/>
- </xs:extension>
- </xs:simpleContent>
+ <!--
+ ParticleEmitter::ParticleEmitter
+ -->
+ <xs:complexType name="animation_2">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="frame">
+ <xs:complexType>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="index" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="sequence">
+ <xs:complexType>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="start" type="xs:int" use="required"/>
+ <xs:attribute name="end" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="end" type="empty"/>
+ </xs:choice>
+ <xs:attribute name="imageset" type="xs:string" use="required"/>
+ <xs:attribute name="width" type="xs:int" use="required"/>
+ <xs:attribute name="height" type="xs:int" use="required"/>
+ <xs:attribute name="subX" type="xs:int" use="optional"/>
+ <xs:attribute name="subY" type="xs:int" use="optional"/>
+ <xs:attribute name="subWidth" type="xs:int" use="optional"/>
+ <xs:attribute name="subHeight" type="xs:int" use="optional"/>
</xs:complexType>
- <xs:simpleType name="attack_action">
- <xs:restriction base="xs:string">
- <xs:enumeration value="attack"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="attack_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="direct"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="unit_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="currency"/>
- <xs:enumeration value="weight"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="sprite_action">
- <xs:restriction base="xs:string">
- <xs:enumeration value="stand"/>
- <xs:enumeration value="walk"/>
- <xs:enumeration value="attack"/>
- <xs:enumeration value="dead"/>
- <xs:enumeration value="default"/>
- <xs:enumeration value="sit"/>
- <xs:enumeration value="attack_bow"/>
- <xs:enumeration value="attack_sword_stab"/>
- <xs:enumeration value="attack_dagger_stab"/>
- <xs:enumeration value="attack_spear"/>
- <xs:enumeration value="attack_chop"/>
- <xs:enumeration value="attack_2hand"/>
- <xs:enumeration value="cast"/>
- <xs:enumeration value="attack_dagger_stab"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="literal_stand">
- <xs:restriction base="xs:string">
- <xs:enumeration value="stand"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="sequence">
- <xs:attribute name="start" type="xs:integer" use="required"/>
- <xs:attribute name="end" type="xs:integer" use="required"/>
- <xs:attribute name="delay" type="xs:integer" use="optional"/>
- <xs:attribute name="offsetX" type="xs:integer" use="optional"/>
- <xs:attribute name="offsetY" type="xs:integer" use="optional"/>
- </xs:complexType>
- <xs:complexType name="animation">
- <xs:sequence>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="frame">
- <xs:complexType>
- <xs:attribute name="index" type="xs:integer" use="required"/>
- <xs:attribute name="delay" type="xs:integer" use="optional"/>
- <xs:attribute name="offsetX" type="xs:integer" use="optional"/>
- <xs:attribute name="offsetY" type="xs:integer" use="optional"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="sequence" type="sequence"/>
- </xs:choice>
- <xs:element name="end" minOccurs="0">
+ <!--
+ SpriteDef::loadAnimation
+ -->
+ <xs:complexType name="animation_3">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="frame">
<xs:complexType>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="index" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- <xs:attribute name="direction" type="replace_dir" use="optional"/>
- <xs:attribute name="imageset" type="xs:string" use="optional"/>
- <xs:attribute name="width" type="xs:integer" use="optional"/>
- <xs:attribute name="height" type="xs:integer" use="optional"/>
+ <xs:element name="sequence">
+ <xs:complexType>
+ <xs:attributeGroup ref="frame_or_sequence_attrs"/>
+ <xs:attribute name="start" type="xs:int" use="required"/>
+ <xs:attribute name="end" type="xs:int" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="optional"/>
+ <xs:attribute name="repeat" type="xs:int" default="1"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="end" type="empty"/>
+ <xs:element name="jump">
+ <xs:complexType>
+ <xs:attribute name="action" type="xs:string" use="required"/>
+ <xs:attribute name="rand" type="xs:int" default="100"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="label">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="goto">
+ <xs:complexType>
+ <xs:attribute name="label" type="xs:string" use="required"/>
+ <xs:attribute name="rand" type="xs:int" default="100"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="direction" default="default">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="up"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="down"/>
+ <xs:enumeration value="upleft"/>
+ <xs:enumeration value="upright"/>
+ <xs:enumeration value="downleft"/>
+ <xs:enumeration value="downright"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
</xs:complexType>
- <xs:complexType name="emitter">
- <xs:choice maxOccurs="unbounded">
+ <xs:attributeGroup name="frame_or_sequence_attrs">
+ <xs:attribute name="delay" type="xs:int" default="0"/>
+ <xs:attribute name="offsetX" type="xs:int" default="0"/>
+ <xs:attribute name="offsetY" type="xs:int" default="0"/>
+ <xs:attribute name="rand" type="xs:int" default="100"/>
+ </xs:attributeGroup>
+ <!--
+ ParticleEmitter::ParticleEmitter
+ -->
+ <xs:complexType name="particle_emitter">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="property">
<xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
+ <!-- TODO in a future version fix this horrible abuse of XML -->
+ <xs:attribute name="name" type="particle_property" use="required"/>
+ <!-- type varies depending on property -->
<xs:attribute name="value" type="xs:string" use="optional"/>
- <xs:attribute name="min" type="xs:decimal" use="optional"/>
- <xs:attribute name="max" type="xs:decimal" use="optional"/>
- <xs:attribute name="change-func" type="change_func" use="optional"/>
- <xs:attribute name="change-amplitude" type="xs:integer" use="optional"/>
- <xs:attribute name="change-period" type="xs:integer" use="optional"/>
+ <xs:attribute name="min" type="xs:float" use="optional"/>
+ <xs:attribute name="max" type="xs:float" use="optional"/>
+ <xs:attribute name="change-func" default="none">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="none"/>
+ <xs:enumeration value="saw"/>
+ <xs:enumeration value="sawtooth"/>
+ <xs:enumeration value="sine"/>
+ <xs:enumeration value="sinewave"/>
+ <xs:enumeration value="triangle"/>
+ <xs:enumeration value="square"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="change-amplitude" type="xs:float" use="optional"/>
+ <xs:attribute name="change-period" type="xs:int" use="optional"/>
+ <xs:attribute name="change-phase" type="xs:int" use="optional"/>
+ <!-- only for subimage -->
+ <xs:attribute name="x" type="xs:int" use="optional"/>
+ <xs:attribute name="y" type="xs:int" use="optional"/>
+ <xs:attribute name="width" type="xs:int" use="optional"/>
+ <xs:attribute name="height" type="xs:int" use="optional"/>
</xs:complexType>
</xs:element>
- <xs:element name="animation" type="animation"/>
- <xs:element name="emitter" type="emitter"/>
+ <xs:element name="emitter" type="particle_emitter"/>
+ <xs:element name="rotation" type="animation_2"/>
+ <xs:element name="animation" type="animation_2"/>
+ <xs:element name="deatheffect" type="death_effect"/>
</xs:choice>
</xs:complexType>
- <xs:simpleType name="change_func">
+ <xs:simpleType name="particle_property">
<xs:restriction base="xs:string">
- <xs:enumeration value="sine"/>
+ <!-- xs:float -->
+ <xs:enumeration value="position-x"/>
+ <!-- xs:float -->
+ <xs:enumeration value="position-y"/>
+ <!-- xs:float -->
+ <xs:enumeration value="position-z"/>
+ <!-- xs:string -->
+ <xs:enumeration value="image"/>
+ <!-- xs:string for value, also xs:int for x/w/width/height -->
+ <xs:enumeration value="subimage"/>
+ <!-- xs:float -->
+ <xs:enumeration value="horizontal-angle"/>
+ <!-- xs:float -->
+ <xs:enumeration value="vertical-angle"/>
+ <!-- xs:float -->
+ <xs:enumeration value="power"/>
+ <!-- xs:float -->
+ <xs:enumeration value="gravity"/>
+ <!-- xs:int -->
+ <xs:enumeration value="randomness"/>
+ <!-- xs:float -->
+ <xs:enumeration value="bounce"/>
+ <!-- xs:int -->
+ <xs:enumeration value="lifetime"/>
+ <!-- xs:int -->
+ <xs:enumeration value="output"/>
+ <!-- xs:int -->
+ <xs:enumeration value="output-pause"/>
+ <!-- xs:float -->
+ <xs:enumeration value="acceleration"/>
+ <!-- xs:float -->
+ <xs:enumeration value="die-distance"/>
+ <!-- xs:float -->
+ <xs:enumeration value="momentum"/>
+ <!-- xs:int -->
+ <xs:enumeration value="fade-out"/>
+ <!-- xs:int -->
+ <xs:enumeration value="fade-in"/>
+ <!-- xs:float -->
+ <xs:enumeration value="alpha"/>
+ <!-- ignored -->
+ <xs:enumeration value="follow-parent"/>
</xs:restriction>
</xs:simpleType>
<!--
- end meta
- -->
- <!--
- effects.xml
+ QuestsWindow::loadXmlFile
+ questsFile: quests.xml
+ questsPatchFile: quests_patch.xml
+ questsPatchDir: quests.d/*.xml
-->
- <xs:element name="being-effects">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="effect" maxOccurs="unbounded">
+ <xs:element name="quests" type="root_quests"/>
+ <xs:complexType name="root_quests">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="var">
<xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="audio" type="xs:string" use="optional"/>
- <xs:attribute name="particle" type="xs:string" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="quest" type="quests_var_quest"/>
+ <xs:element name="effect" type="quests_var_effect"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- charcreation.xml
+ QuestsWindow::loadQuest
-->
- <xs:element name="chars">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="haircolor">
+ <xs:complexType name="quests_var_quest">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="text" type="xs:string"/>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="reward" type="xs:string"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="group" type="xs:string" use="required"/>
+ <!--
+ For all known quests, exactly one of these is provided, with a single
+ integer value. However, manaplus actually parses both, and as a
+ comma-separated list. (xsd spec says they should be space-separated).
+ -->
+ <!-- TODO fix this horrible abuse of XML-->
+ <xs:attribute name="complete" type="xs:int" use="optional"/>
+ <xs:attribute name="incomplete" type="xs:int" use="optional"/>
+ </xs:complexType>
+ <!--
+ QuestsWindow::loadEffect
+ -->
+ <xs:complexType name="quests_var_effect">
+ <xs:attribute name="map" type="xs:string" use="required"/>
+ <xs:attribute name="npc" type="xs:int" use="required"/>
+ <xs:attribute name="effect" type="xs:int" use="required"/>
+ <!-- Really a comma-separated list, but xsd wants space-separated -->
+ <!-- TODO fix this horrible abuse of XML-->
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!--
+ SkillDialog::loadXmlFile
+ skillsFile or skillsFile2: skills.xml or ea-skills.xml (but these were backwards before v1.4.1.18)
+ skillsPatchFile: skills_patch.xml
+ skillsPatchDir: skills.d/*.xml
+ -->
+ <xs:element name="skills" type="root_skills"/>
+ <xs:complexType name="root_skills">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="set">
<xs:complexType>
- <xs:attribute name="min" type="xs:integer" use="required"/>
- <xs:attribute name="max" type="xs:integer" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="skill">
+ <xs:complexType>
+ <!-- By code, sometimes 'id' is 'var', but I don't see it in the wild. -->
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="useButton" type="xs:string" default="Use"/>
+ <xs:attribute name="icon" type="xs:string" use="optional"/>
+ <xs:attribute name="level" type="xs:int" default="0"/>
+ <xs:attribute name="shortName" type="xs:string" use="optional"/>
+ <xs:attribute name="description" type="xs:string" use="optional"/>
+ <xs:attribute name="particle" type="xs:string" use="optional"/>
+ <xs:attribute name="soundHit" type="xs:string" use="optional"/>
+ <xs:attribute name="soundHitDelay" type="xs:int" use="optional"/>
+ <xs:attribute name="soundMiss" type="xs:string" use="optional"/>
+ <xs:attribute name="soundMissDelay" type="xs:int" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
- <xs:element name="hairstyle">
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <!--
+ EquipmentWindow::fillBoxes
+ equipmentWindowFile: equipmentwindow.xml
+ -->
+ <xs:element name="equipment" type="root_equipment"/>
+ <xs:complexType name="root_equipment">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="playerbox" type="equipment_playerbox"/>
+ <xs:element name="slot" type="equipment_slot"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="image" type="xs:string" default="equipmentbox.png"/>
+ </xs:complexType>
+ <!--
+ EquipmentWindow::loadPlayerBox
+ -->
+ <xs:complexType name="equipment_playerbox">
+ <xs:attribute name="x" type="xs:int" use="required"/>
+ <xs:attribute name="y" type="xs:int" use="required"/>
+ <xs:attribute name="width" type="xs:int" use="required"/>
+ <xs:attribute name="height" type="xs:int" use="required"/>
+ </xs:complexType>
+ <!--
+ EquipmentWindow::loadSlot
+ -->
+ <xs:complexType name="equipment_slot">
+ <xs:attribute name="name" type="equipment_slot_name" use="required"/>
+ <xs:attribute name="x" type="xs:int" use="required"/>
+ <xs:attribute name="y" type="xs:int" use="required"/>
+ <xs:attribute name="image" type="xs:int" use="required"/>
+ </xs:complexType>
+ <xs:simpleType name="equipment_slot_name">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="shoes"/>
+ <xs:enumeration value="boot"/>
+ <xs:enumeration value="boots"/>
+ <xs:enumeration value="bottomclothes"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="pants"/>
+ <xs:enumeration value="topclothes"/>
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="torso"/>
+ <xs:enumeration value="body"/>
+ <xs:enumeration value="misc1"/>
+ <xs:enumeration value="cape"/>
+ <xs:enumeration value="misc2"/>
+ <xs:enumeration value="scarf"/>
+ <xs:enumeration value="scarfs"/>
+ <xs:enumeration value="hat"/>
+ <xs:enumeration value="hats"/>
+ <xs:enumeration value="wings"/>
+ <xs:enumeration value="glove"/>
+ <xs:enumeration value="gloves"/>
+ <xs:enumeration value="weapon"/>
+ <xs:enumeration value="weapons"/>
+ <xs:enumeration value="shield"/>
+ <xs:enumeration value="shields"/>
+ <xs:enumeration value="amulet"/>
+ <xs:enumeration value="amulets"/>
+ <xs:enumeration value="ring"/>
+ <xs:enumeration value="rings"/>
+ <xs:enumeration value="arrow"/>
+ <xs:enumeration value="arrows"/>
+ <xs:enumeration value="ammo"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ Units::loadXMLFile
+ unitsFile: units.xml
+ unitsPatchFile: units_patch.xml
+ unitsPatchDir: units.d/*.xml
+ -->
+ <xs:element name="units" type="root_units"/>
+ <xs:complexType name="root_units">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="unit">
<xs:complexType>
- <xs:attribute name="min" type="xs:integer" use="required"/>
- <xs:attribute name="max" type="xs:integer" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="level">
+ <xs:complexType>
+ <xs:attribute name="symbol" type="xs:string" use="required"/>
+ <xs:attribute name="count" type="xs:int" use="required"/>
+ <xs:attribute name="round" type="xs:int" use="optional"/>
+ <xs:attribute name="separator" type="xs:string" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="type" type="units_unit_type" use="required"/>
+ <xs:attribute name="conversion" type="xs:int" default="1"/>
+ <xs:attribute name="mix" type="yesno" default="no"/>
+ <xs:attribute name="base" type="xs:string" default="¤"/>
+ <xs:attribute name="round" type="xs:int" default="2"/>
+ <xs:attribute name="separator" type="xs:string" default=" "/>
</xs:complexType>
</xs:element>
- <xs:element name="stat">
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="units_unit_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="currency"/>
+ <xs:enumeration value="weight"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="yesno">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="yes"/>
+ <xs:enumeration value="no"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ StatusEffect::loadXmlFile
+ statusEffectsFile: status-effects.xml
+ statusEffectsPatchFile: status-effects_patch.xml
+ statusEffectsPatchDir: status-effects.d/*.xml
+ -->
+ <xs:element name="status-effects" type="root_status-effects"/>
+ <xs:complexType name="root_status-effects">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="status-effect">
<xs:complexType>
- <xs:attribute name="min" type="xs:integer" use="required"/>
- <xs:attribute name="max" type="xs:integer" use="required"/>
- <xs:attribute name="sum" type="xs:integer" use="required"/>
+ <xs:attribute name="block-id" type="xs:int" use="optional"/>
+ <xs:attributeGroup ref="status_or_stun_attrs"/>
</xs:complexType>
</xs:element>
- <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="stun-effect">
<xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
+ <xs:attributeGroup ref="status_or_stun_attrs"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:attributeGroup name="status_or_stun_attrs">
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="start-message" type="xs:string" use="optional"/>
+ <xs:attribute name="start-audio" type="xs:string" use="optional"/>
+ <xs:attribute name="start-particle" type="xs:string" use="optional"/>
+ <xs:attribute name="icon" type="xs:string" use="optional"/>
+ <xs:attribute name="action" type="xs:string" use="optional"/>
+ <xs:attribute name="persistent-particle-effect" type="yesno" use="optional"/>
+ <xs:attribute name="end-message" type="xs:string" use="optional"/>
+ <xs:attribute name="end-audio" type="xs:string" use="optional"/>
+ <xs:attribute name="end-particle" type="xs:string" use="optional"/>
+ </xs:attributeGroup>
<!--
- hair.xml
+ maps and tilesets omitted, they have a DTD from tiled
-->
- <xs:element name="colors">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="its:rules" minOccurs="0"/>
- <xs:element name="color" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
<!--
- features.xml, paths.xml
+ EmoteDB::loadXmlFile
+ emotesFile: emotes.xml
+ emotesPatchFile: emotes.xml
+ emotesPatchDir: emotes.d/*.xml
+ EmoteDB::loadSpecialXmlFile
+ manaplus_emotes.xml
-->
- <xs:element name="configuration">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="option" maxOccurs="unbounded">
+ <xs:element name="emotes" type="root_emotes"/>
+ <xs:complexType name="root_emotes">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="emote">
<xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="sprite">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="variant" type="xs:int" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="particlefx" type="xs:string"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <!-- altid is only in manaplus_emotes.xml -->
+ <xs:attribute name="altid" type="xs:int" use="optional"/>
+ <xs:attribute name="time" type="xs:int" default="500"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- emotes.xml
+ NPCDB::loadXmlFile
+ npcsFile: npcs.xml
+ npcsPatchFile: npcs.xml
+ npcsPatchDir: npcs.d/*.xml
-->
- <xs:element name="emotes">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="its:rules" minOccurs="0"/>
- <xs:element name="emote" maxOccurs="unbounded">
+ <xs:element name="npcs" type="root_npcs"/>
+ <xs:complexType name="root_npcs">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="npc">
<xs:complexType>
- <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="sprite">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="variant" type="xs:integer" use="required"/>
+ <xs:attribute name="variant" type="xs:int" default="0"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:integer" use="required"/>
+ <xs:element name="particlefx" type="xs:string"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="targetSelection" type="bool" default="true"/>
+ <xs:attributeGroup ref="being_basic_attributes"/>
+ <xs:attribute name="deadSortOffsetY" type="xs:int" default="31"/>
+ <xs:attribute name="avatar" type="xs:unsignedShort" default="0"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:attributeGroup name="being_basic_attributes">
+ <xs:attribute name="targetCursor" type="cursor" default="medium"/>
+ <!--
+ default for hoverCursor varies:
+ npc: "talk"
+ monster: "attack"
+ pet: "talk"
+ -->
+ <xs:attribute name="hoverCursor" type="xs:string" use="optional"/>
+ <xs:attribute name="targetOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="targetOffsetY" type="xs:int" default="0"/>
+ <xs:attribute name="nameOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="nameOffsetY" type="xs:int" default="0"/>
+ <xs:attribute name="sortOffsetY" type="xs:int" default="0"/>
+ <xs:attribute name="hpBarOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="hpBarOffsetY" type="xs:int" default="0"/>
+ </xs:attributeGroup>
+ <xs:simpleType name="cursor">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="small"/>
+ <xs:enumeration value="medium"/>
+ <xs:enumeration value="large"/>
+ </xs:restriction>
+ </xs:simpleType>
<!--
- equipmentwindow.xml
+ ItemDB::loadXmlFile
+ itemsFile: items.xml
+ itemsPatchFile: items_patch.xml
+ itemsPatchDir: items.d/*.xml
-->
- <xs:element name="equipment">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="window">
- <xs:complexType>
- <xs:attribute name="width" type="xs:integer" use="required"/>
- <xs:attribute name="height" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="playerbox">
- <xs:complexType>
- <xs:attribute name="x" type="xs:integer" use="required"/>
- <xs:attribute name="y" type="xs:integer" use="required"/>
- <xs:attribute name="width" type="xs:integer" use="required"/>
- <xs:attribute name="height" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="slot" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="x" type="xs:integer" use="required"/>
- <xs:attribute name="y" type="xs:integer" use="required"/>
- <xs:attribute name="image" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <!--
- items.xml
- -->
- <xs:element name="items">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="its:rules" minOccurs="0"/>
- <xs:element ref="include" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="items" type="root_items"/>
+ <xs:complexType name="root_items">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="item">
<xs:complexType>
- <!--
- TODO change xml files to all be <replace/> <sprite/>
- -->
- <xs:sequence>
- <xs:element name="drawBefore" minOccurs="0" type="item_drawBefore"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="sprite" type="item_sprite"/>
- <xs:element name="replace" type="item_replace"/>
- </xs:choice>
- <xs:element name="sound" minOccurs="0" maxOccurs="unbounded" type="item_sound"/>
- <xs:element name="particlefx" minOccurs="0" type="xs:string"/>
- </xs:sequence>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="type" type="xs:string" use="optional"/>
- <xs:attribute name="name" type="xs:string" use="optional"/>
- <xs:attribute name="attack-action" type="xs:string" use="optional"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="sprite" type="items_item_sprite"/>
+ <xs:element name="particlefx" type="xs:string"/>
+ <xs:element name="sound" type="items_item_sound"/>
+ <xs:element name="floor" type="items_item_floor"/>
+ <xs:element name="replace" type="items_item_replace"/>
+ <xs:element name="drawAfter" type="items_item_draworder"/>
+ <xs:element name="drawBefore" type="items_item_draworder"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="type" type="items_item_type" default="other"/>
+ <xs:attribute name="weight" type="xs:int" default="0"/>
+ <xs:attribute name="view" type="xs:int" default="0"/>
+ <xs:attribute name="name" type="xs:string" default="unnamed"/>
<xs:attribute name="image" type="xs:string" use="optional"/>
+ <xs:attribute name="floor" type="xs:string" use="optional"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
- <xs:attribute name="hp" type="xs:integer" use="optional"/>
- <xs:attribute name="weight" type="xs:integer" use="optional"/>
+ <xs:attribute name="attack-action" type="xs:string" use="optional"/>
+ <xs:attribute name="skyattack-action" type="xs:string" use="optional"/>
+ <xs:attribute name="waterattack-action" type="xs:string" use="optional"/>
+ <xs:attribute name="drawBefore" type="xs:string" use="optional"/>
+ <xs:attribute name="drawAfter" type="xs:string" use="optional"/>
+ <xs:attribute name="pet" type="xs:int" default="0"/>
+ <xs:attribute name="maxFloorOffset" type="xs:int" default="0"/>
+ <xs:attribute name="useButton" type="xs:string" use="optional"/>
+ <xs:attribute name="useButton2" type="xs:string" use="optional"/>
+ <xs:attribute name="colors" type="xs:string" use="optional"/>
+ <!-- Can't use both tag and tag1; tag has precedence. -->
<xs:attribute name="tag" type="xs:string" use="optional"/>
- <xs:attribute name="effect" type="xs:string" use="optional"/>
- <xs:attribute name="defense" type="xs:integer" use="optional"/>
- <xs:attribute name="sellProtected" type="xs:boolean" use="optional"/>
- <xs:attribute name="attack-range" type="xs:integer" use="optional"/>
+ <xs:attribute name="tag1" type="xs:string" use="optional"/>
+ <xs:attribute name="tag2" type="xs:string" use="optional"/>
+ <xs:attribute name="tag3" type="xs:string" use="optional"/>
+ <xs:attribute name="drawPriority" type="xs:int" default="0"/>
+ <xs:attribute name="attack-range" type="xs:int" default="0"/>
<xs:attribute name="missile-particle" type="xs:string" use="optional"/>
- <xs:attribute name="mp" type="xs:integer" use="optional"/>
- <xs:attribute name="str" type="xs:integer" use="optional"/>
- <xs:attribute name="agi" type="xs:integer" use="optional"/>
- <xs:attribute name="vit" type="xs:integer" use="optional"/>
- <xs:attribute name="int" type="xs:integer" use="optional"/>
- <xs:attribute name="dex" type="xs:integer" use="optional"/>
- <xs:attribute name="luck" type="xs:integer" use="optional"/>
- <xs:attribute name="drawBefore" type="xs:string" use="optional"/>
+ <xs:attribute name="hit-effect-id" type="xs:string" use="optional"/>
+ <xs:attribute name="critical-hit-effect-id" type="xs:string" use="optional"/>
+ <xs:attribute name="miss-effect-id" type="xs:string" use="optional"/>
+ <xs:attribute name="sellProtected" type="bool" default="false"/>
+ <xs:attribute name="pickupCursor" type="xs:string" default="pickup"/>
+ <xs:attribute name="attack" type="xs:string" use="optional"/>
+ <xs:attribute name="criticalattack" type="xs:string" use="optional"/>
+ <xs:attribute name="mattack" type="xs:string" use="optional"/>
+ <xs:attribute name="defense" type="xs:string" use="optional"/>
+ <xs:attribute name="criticaldefense" type="xs:string" use="optional"/>
+ <xs:attribute name="mdefense" type="xs:string" use="optional"/>
+ <xs:attribute name="hp" type="xs:string" use="optional"/>
+ <xs:attribute name="mp" type="xs:string" use="optional"/>
+ <xs:attribute name="level" type="xs:string" use="optional"/>
+ <xs:attribute name="speed" type="xs:string" use="optional"/>
+ <xs:attribute name="range" type="xs:string" use="optional"/>
+ <xs:attribute name="flee" type="xs:string" use="optional"/>
+ <xs:attribute name="str" type="xs:string" use="optional"/>
+ <xs:attribute name="agi" type="xs:string" use="optional"/>
+ <xs:attribute name="vit" type="xs:string" use="optional"/>
+ <xs:attribute name="int" type="xs:string" use="optional"/>
+ <xs:attribute name="dex" type="xs:string" use="optional"/>
+ <xs:attribute name="luck" type="xs:string" use="optional"/>
+ <xs:attribute name="effect" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="items_item_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="generic"/>
+ <xs:enumeration value="other"/>
+ <xs:enumeration value="usable"/>
+ <xs:enumeration value="equip-1hand"/>
+ <xs:enumeration value="equip-2hand"/>
+ <xs:enumeration value="equip-torso"/>
+ <xs:enumeration value="equip-arms"/>
+ <xs:enumeration value="equip-head"/>
+ <xs:enumeration value="equip-legs"/>
+ <xs:enumeration value="equip-shield"/>
+ <xs:enumeration value="equip-ring"/>
+ <xs:enumeration value="equip-charm"/>
+ <xs:enumeration value="equip-necklace"/>
+ <xs:enumeration value="equip-neck"/>
+ <xs:enumeration value="equip-feet"/>
+ <xs:enumeration value="equip-ammo"/>
+ <xs:enumeration value="racesprite"/>
+ <xs:enumeration value="hairsprite"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="items_item_sprite">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="variant" type="xs:int" default="0"/>
+ <xs:attribute name="race" type="xs:int" default="0"/>
+ <xs:attribute name="gender" default="unisex">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="unisex"/>
+ <xs:enumeration value="male"/>
+ <xs:enumeration value="female"/>
+ <xs:enumeration value="other"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="items_item_sound">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="event" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="hit"/>
+ <xs:enumeration value="strike"/>
+ <xs:enumeration value="miss"/>
+ <xs:enumeration value="use"/>
+ <xs:enumeration value="equip"/>
+ <xs:enumeration value="unequip"/>
+ <xs:enumeration value="drop"/>
+ <xs:enumeration value="pickup"/>
+ <xs:enumeration value="take"/>
+ <xs:enumeration value="put"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="delay" type="xs:int" default="0"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="items_item_floor">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="sprite">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="variant" type="xs:int" default="0"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="particlefx" type="xs:string"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="items_item_replace">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="item">
+ <xs:complexType>
+ <xs:attribute name="from" type="xs:int" use="optional"/>
+ <xs:attribute name="to" type="xs:int" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="sprite" type="items_item_x_sprite" use="optional"/>
+ <xs:attribute name="direction" type="items_item_x_direction" default="all"/>
+ </xs:complexType>
+ <xs:complexType name="items_item_draworder">
+ <xs:attribute name="name" type="items_item_x_sprite" use="required"/>
+ <xs:attribute name="priority" type="xs:int" use="optional"/>
+ <xs:attribute name="direction" type="items_item_x_direction" default="all"/>
+ </xs:complexType>
+ <xs:simpleType name="items_item_x_sprite">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="race"/>
+ <xs:enumeration value="type"/>
+ <xs:enumeration value="shoes"/>
+ <xs:enumeration value="boot"/>
+ <xs:enumeration value="boots"/>
+ <xs:enumeration value="bottomclothes"/>
+ <xs:enumeration value="bottom"/>
+ <xs:enumeration value="pants"/>
+ <xs:enumeration value="topclothes"/>
+ <xs:enumeration value="top"/>
+ <xs:enumeration value="torso"/>
+ <xs:enumeration value="body"/>
+ <xs:enumeration value="misc1"/>
+ <xs:enumeration value="misc2"/>
+ <xs:enumeration value="scarf"/>
+ <xs:enumeration value="scarfs"/>
+ <xs:enumeration value="hair"/>
+ <xs:enumeration value="hat"/>
+ <xs:enumeration value="hats"/>
+ <xs:enumeration value="wings"/>
+ <xs:enumeration value="glove"/>
+ <xs:enumeration value="gloves"/>
+ <xs:enumeration value="weapon"/>
+ <xs:enumeration value="weapons"/>
+ <xs:enumeration value="shield"/>
+ <xs:enumeration value="shields"/>
+ <xs:enumeration value="amulet"/>
+ <xs:enumeration value="amulets"/>
+ <xs:enumeration value="ring"/>
+ <xs:enumeration value="rings"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="items_item_x_direction">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="down"/>
+ <xs:enumeration value="downleft"/>
+ <xs:enumeration value="leftdown"/>
+ <xs:enumeration value="left"/>
+ <xs:enumeration value="upleft"/>
+ <xs:enumeration value="leftup"/>
+ <xs:enumeration value="up"/>
+ <xs:enumeration value="upright"/>
+ <xs:enumeration value="rightup"/>
+ <xs:enumeration value="right"/>
+ <xs:enumeration value="downright"/>
+ <xs:enumeration value="rightdown"/>
+ <xs:enumeration value="downall"/>
+ <xs:enumeration value="upall"/>
+ <xs:enumeration value="died"/>
+ <!-- handled by implicit else -->
+ <xs:enumeration value="all"/>
+ </xs:restriction>
+ </xs:simpleType>
<!--
- maps.xml
+ SoundDB::loadXmlFile
+ soundsFile: sounds.xml
+ soundsPatchFile: sounds_patch.xml
+ soundsPatchDir: sounds.d/*.xml
-->
- <xs:element name="maps">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="map" maxOccurs="unbounded">
+ <xs:element name="sounds" type="root_sounds"/>
+ <xs:complexType name="root_sounds">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="sound">
<xs:complexType>
- <xs:sequence>
- <xs:element name="atlas">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
- <xs:element name="atlas" maxOccurs="unbounded">
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <!--
+ ColorDB::loadHair
+ hairColorFile: hair.xml
+ hairColorPatchFile: hair.xml
+ hairColorPatchDir: hair.d/*.xml
+ ColorDB::loadColorLists
+ itemColorFile: itemcolors.xml
+ itemColorPatchFile: itemcolors_patch.xml
+ itemColorPatchDir: itemcolors.d/*.xml
+ -->
+ <xs:element name="colors" type="root_colors"/>
+ <xs:complexType name="root_colors">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice>
+ <!-- hair.xml -->
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="color" type="colors_color"/>
+ </xs:choice>
+ <!-- itemcolors.xml -->
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="list">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="color" type="colors_color"/>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="colors_color">
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!--
+ MapDB::loadInfo
+ mapsFile: maps.xml
+ mapsPatchFile: maps_patch.xml
+ mapsPatchDir: maps.d/*.xml
+ -->
+ <xs:element name="maps" type="root_maps"/>
+ <xs:complexType name="root_maps">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="map" type="maps_map"/>
+ <xs:element name="atlas" type="maps_atlas"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <!-- MapDB::readMap -->
+ <xs:complexType name="maps_map">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="atlas">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!-- MapDB::readMap -->
+ <xs:complexType name="maps_atlas">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="file">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+ <!--
+ MapDB::loadRemap
+ mapsRemapFile: maps/remap.xml
+ -->
+ <xs:element name="remap" type="root_remap"/>
+ <xs:complexType name="root_remap">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <!-- TODO <xs:element ref="include"/> -->
+ <xs:element name="map">
<xs:complexType>
- <xs:sequence>
- <xs:element name="file" maxOccurs="unbounded">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <!--
+ DeadDB::loadXmlFile
+ deadMessagesFile: deadmessages.xml
+ deadMessagesPatchFile: deadmessages_patch.xml
+ deadMessagesPatchDir: deadmessages.d/*.xml
+ -->
+ <xs:element name="dead-messages" type="root_dead-messages"/>
+ <xs:complexType name="root_dead-messages">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="message" type="xs:string"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- monsters.xml
+ AvatarDB::loadXmlFile
+ avatarsFile: avatars.xml
+ avatarsPatchFile: avatars_patch.xml
+ avatarsPatchDir: avatars.d/*.xml
-->
- <xs:element name="monsters">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="its:rules" minOccurs="0"/>
- <xs:element name="monster" minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="avatars" type="root_avatars"/>
+ <xs:complexType name="root_avatars">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="avatar">
<xs:complexType>
- <xs:sequence>
- <xs:choice maxOccurs="unbounded">
- <xs:element name="sprite" type="xs:string"/>
- <xs:element name="particlefx" type="xs:string"/>
- <xs:element name="sound" type="item_sound"/>
- <xs:element name="attack" minOccurs="0">
- <xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="critical-hit-effect-id" type="xs:integer" use="optional"/>
- <xs:attribute name="hit-effect-id" type="xs:integer" use="optional"/>
- <xs:attribute name="effect-id" type="xs:integer" use="optional"/>
- <xs:attribute name="particle-effect" type="xs:string" use="optional"/>
- <xs:attribute name="missile-particle" type="xs:string" use="optional"/>
- <xs:attribute name="action" type="attack_action" use="optional"/>
- <xs:attribute name="type" type="attack_type" use="optional"/>
- </xs:complexType>
- </xs:element>
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="id" type="xs:integer" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="sprite">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="variant" type="xs:int" default="0"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="targetCursor" type="cursor" use="optional"/>
+ <xs:attribute name="targetOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="targetOffsetY" type="xs:int" default="0"/>
+ <xs:attribute name="width" type="xs:int" default="0"/>
+ <xs:attribute name="height" type="xs:int" default="0"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- <xs:attribute name="offset" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- npcs.xml
+ MonsterDB::loadXmlFile
+ monstersFile: monsters.xml
+ monstersPatchFile: monsters_patch.xml
+ monstersPatchDir: monsters.d/*.xml
-->
- <xs:element name="npcs">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="npc" maxOccurs="unbounded">
+ <xs:element name="monsters" type="root_monsters"/>
+ <xs:complexType name="root_monsters">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="monster">
<xs:complexType>
- <!-- This 'minOccurs' is suspicious -->
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="sprite">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="variant" type="xs:integer" use="optional"/>
- <xs:attribute name="gender" type="sex" use="optional"/>
+ <xs:attribute name="variant" type="xs:int" default="0"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
+ <xs:element name="sound">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="event" type="monster_sound_event" use="required"/>
+ <xs:attribute name="delay" type="xs:int" default="0"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="attack">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="effect-id" type="xs:int" use="optional"/>
+ <xs:attribute name="hit-effect-id" type="xs:int" use="optional"/>
+ <xs:attribute name="critical-hit-effect-id" type="xs:int" use="optional"/>
+ <xs:attribute name="miss-effect-id" type="xs:int" use="optional"/>
+ <xs:attribute name="action" type="xs:string" default="attack"/>
+ <xs:attribute name="skyaction" type="xs:string" default="skyattack"/>
+ <xs:attribute name="wateraction" type="xs:string" default="waterattack"/>
+ <xs:attribute name="missile-particle" type="xs:string" use="optional"/>
+ </xs:complexType>
+ </xs:element>
<xs:element name="particlefx" type="xs:string"/>
</xs:choice>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="targetSelection" type="xs:boolean" use="optional"/>
- <xs:attribute name="nameOffsetX" type="xs:integer" use="optional"/>
- <xs:attribute name="nameOffsetY" type="xs:integer" use="optional"/>
- <xs:attribute name="targetOffsetX" type="xs:integer" use="optional"/>
- <xs:attribute name="targetOffsetY" type="xs:integer" use="optional"/>
- <xs:attribute name="targetCursor" type="cursor" use="optional"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attributeGroup ref="being_basic_attributes"/>
+ <xs:attribute name="maxHP" type="xs:int" use="optional"/>
+ <xs:attribute name="deadSortOffsetY" type="xs:int" default="31"/>
+ <xs:attribute name="colors" type="xs:string" use="optional"/>
+ <xs:attribute name="walkType" type="monster_walktype" default="walk"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <!-- skills.xml (modern), ea-skills.xml (for old versions) -->
- <xs:element name="skills">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="its:rules" minOccurs="0"/>
- <xs:element name="set" maxOccurs="unbounded">
+ </xs:choice>
+ </xs:sequence>
+ <!-- really optional with default="1002", but that's not sane -->
+ <xs:attribute name="offset" type="xs:int" use="required"/>
+ </xs:complexType>
+ <xs:simpleType name="monster_walktype">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="walk"/>
+ <xs:enumeration value="fly"/>
+ <xs:enumeration value="swim"/>
+ <xs:enumeration value="walkswim"/>
+ <xs:enumeration value="swimwalk"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="monster_sound_event">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="hit"/>
+ <xs:enumeration value="miss"/>
+ <xs:enumeration value="hurt"/>
+ <xs:enumeration value="die"/>
+ <xs:enumeration value="move"/>
+ <xs:enumeration value="sit"/>
+ <xs:enumeration value="sittop"/>
+ <xs:enumeration value="spawn"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!--
+ PETDB::loadXmlFile
+ petsFile: pets.xml
+ petsPatchFile: pets_patch.xml
+ petsPatchDir: pets.d/*.xml
+ -->
+ <xs:element name="pets" type="root_pets"/>
+ <xs:complexType name="root_pets">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="pet">
<xs:complexType>
- <xs:sequence>
- <xs:element name="skill" maxOccurs="unbounded">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="sprite">
<xs:complexType>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="icon" type="xs:string" use="required"/>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="variant" type="xs:int" default="0"/>
+ </xs:extension>
+ </xs:simpleContent>
</xs:complexType>
</xs:element>
- </xs:sequence>
+ <xs:element name="particlefx" type="xs:string"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:int" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="targetSelection" type="bool" default="true"/>
+ <xs:attributeGroup ref="being_basic_attributes"/>
+ <xs:attribute name="deadSortOffsetY" type="xs:int" default="31"/>
+ <xs:attribute name="startFollowDistance" type="xs:int" default="3"/>
+ <xs:attribute name="followDistance" type="xs:int" default="0"/>
+ <xs:attribute name="warpDistance" type="xs:int" default="11"/>
+ <xs:attribute name="walkSpeed" type="xs:int" default="0"/>
+ <xs:attribute name="offsetX" type="xs:int" default="0"/>
+ <xs:attribute name="offsetY" type="xs:int" default="1"/>
+ <xs:attribute name="sitOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="sitOffsetY" type="xs:int" default="1"/>
+ <xs:attribute name="moveOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="moveOffsetY" type="xs:int" default="1"/>
+ <xs:attribute name="deadOffsetX" type="xs:int" default="0"/>
+ <xs:attribute name="deadOffsetY" type="xs:int" default="1"/>
+ <xs:attribute name="attackOffsetX" type="xs:int" use="optional"/>
+ <xs:attribute name="attackOffsetY" type="xs:int" use="optional"/>
+ <xs:attribute name="thinkTime" type="xs:int" default="500"/>
+ <xs:attribute name="directionType" type="xs:int" default="1"/>
+ <xs:attribute name="sitDirectionType" type="xs:int" default="1"/>
+ <xs:attribute name="deadDirectionType" type="xs:int" default="1"/>
+ <xs:attribute name="attackDirectionType" type="xs:int" default="4"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- status-effects.xml
+ ModDB::loadXmlFile
+ modsFile: mods.xml
+ modsPatchFile: mods_patch.xml
+ modsPatchDir: mods.d/*.xml
-->
- <xs:element name="status-effects">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="status-effect" maxOccurs="unbounded">
+ <xs:element name="mods" type="root_mods"/>
+ <xs:complexType name="root_mods">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="include"/>
+ <xs:element name="mod">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="id" type="xs:integer" use="required"/>
- <xs:attribute name="block-id" type="xs:integer" use="optional"/>
- <xs:attribute name="persistent-particle-effect" type="xs:boolean" use="optional"/>
- <xs:attribute name="start-particle" type="xs:string" use="optional"/>
- <xs:attribute name="icon" type="xs:string" use="optional"/>
- <xs:attribute name="start-message" type="xs:string" use="optional"/>
- <xs:attribute name="end-message" type="xs:string" use="optional"/>
+ <xs:attribute name="description" type="xs:string" use="optional"/>
+ <xs:attribute name="help" type="xs:string" use="optional"/>
+ <xs:attribute name="localdir" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
<!--
- units.xml
+ CharDB::load
+ charCreationFile: charcreation.xml
-->
- <xs:element name="units">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="unit" maxOccurs="unbounded">
+ <xs:element name="chars" type="root_chars"/>
+ <xs:complexType name="root_chars">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <!-- TODO <xs:element ref="include"/> -->
+ <xs:element name="haircolor">
<xs:complexType>
- <xs:sequence>
- <xs:element name="level" minOccurs="0">
- <xs:complexType>
- <xs:attribute name="symbol" type="xs:string" use="required"/>
- <xs:attribute name="count" type="xs:integer" use="required"/>
- <xs:attribute name="round" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="type" type="unit_type" use="required"/>
- <xs:attribute name="base" type="xs:string" use="required"/>
- <xs:attribute name="round" type="xs:integer" use="required"/>
+ <xs:attribute name="min" type="xs:int" use="required"/>
+ <xs:attribute name="max" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="hairstyle">
+ <xs:complexType>
+ <xs:attribute name="min" type="xs:int" use="required"/>
+ <xs:attribute name="max" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="look">
+ <xs:complexType>
+ <xs:attribute name="min" type="xs:int" use="required"/>
+ <xs:attribute name="max" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="stat">
+ <xs:complexType>
+ <xs:attribute name="min" type="xs:int" use="required"/>
+ <xs:attribute name="max" type="xs:int" use="required"/>
+ <xs:attribute name="sum" type="xs:int" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="item">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <!--
- weapons.xml
- -->
- <xs:element name="weapons">
- <xs:complexType>
- <xs:choice maxOccurs="unbounded">
- <xs:element name="swords" type="weapon_items"/>
- <xs:element name="bows" type="weapon_items"/>
- <xs:element name="shields" type="weapon_items"/>
</xs:choice>
- </xs:complexType>
- </xs:element>
- <xs:element name="effect">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="particle" maxOccurs="unbounded">
+ </xs:sequence>
+ </xs:complexType>
+ <!--
+ SpriteDef::load
+ SpriteDef::loadSprite
+ -->
+ <xs:element name="sprite" type="root_sprite"/>
+ <xs:complexType name="root_sprite">
+ <xs:sequence>
+ <xs:element ref="its:rules" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <!-- SpriteDef::includeSprite -->
+ <xs:element name="include">
<xs:complexType>
- <xs:sequence>
- <xs:element name="rotation" minOccurs="0">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="sequence" type="sequence"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" use="optional"/>
- <xs:attribute name="imageset" type="xs:string" use="required"/>
- <xs:attribute name="width" type="xs:integer" use="required"/>
- <xs:attribute name="height" type="xs:integer" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="animation" type="animation" minOccurs="0"/>
- <xs:element name="emitter" type="emitter" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="position-x" type="xs:integer" use="required"/>
- <xs:attribute name="position-y" type="xs:integer" use="required"/>
- <xs:attribute name="position-z" type="xs:integer" use="required"/>
- <xs:attribute name="lifetime" type="xs:integer" use="optional"/>
- <xs:attribute name="follow-parent" type="xs:integer" use="optional"/>
- <xs:attribute name="size-adjustable" type="xs:boolean" use="optional"/>
+ <xs:attribute name="file" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="sprite">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="imageset" maxOccurs="unbounded">
+ <!-- SpriteDef::loadImageSet -->
+ <xs:element name="imageset">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="width" type="xs:int" use="required"/>
+ <xs:attribute name="height" type="xs:int" use="required"/>
<xs:attribute name="src" type="xs:string" use="required"/>
- <xs:attribute name="width" type="xs:integer" use="required"/>
- <xs:attribute name="height" type="xs:integer" use="required"/>
- <xs:attribute name="offsetY" type="xs:integer" use="optional"/>
+ <xs:attribute name="offsetX" type="xs:int" default="0"/>
+ <xs:attribute name="offsetY" type="xs:int" default="0"/>
</xs:complexType>
</xs:element>
- <xs:element name="action" minOccurs="0" maxOccurs="unbounded">
+ <!-- SpriteDef::loadAction -->
+ <xs:element name="action">
<xs:complexType>
- <xs:sequence>
- <xs:element name="animation" type="animation" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="name" type="sprite_action" use="required"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <!-- SpriteDef::loadAnimation -->
+ <xs:element name="animation" type="animation_3"/>
+ </xs:choice>
+ <!-- TODO mostly enum? -->
+ <xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="imageset" type="xs:string" use="required"/>
+ <xs:attribute name="hp" type="xs:int" default="100"/>
</xs:complexType>
</xs:element>
- <xs:element name="include" minOccurs="0">
- <xs:complexType>
- <xs:attribute name="file" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="action" type="literal_stand"/>
- <xs:attribute name="variants" type="xs:integer"/>
- <xs:attribute name="variant_offset" type="xs:integer"/>
- </xs:complexType>
- </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="variants" type="xs:int" use="optional"/>
+ <xs:attribute name="variant_offset" type="xs:int" use="optional"/>
+ </xs:complexType>
+ <xs:element name="weapons" type="root_weapons"/>
+ <xs:complexType name="root_weapons">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="swords" type="weapons_items"/>
+ <xs:element name="bows" type="weapons_items"/>
+ <xs:element name="shields" type="weapons_items"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="weapons_items">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="item">
+ <xs:complexType>
+ <xs:attribute name="id" type="xs:integer" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
</xs:schema>