Documentation
The below code represents the shema for an NPC dataset.
The root elements
class | name | type | multipicy |
---|---|---|---|
element | npc | npcType | 1..1 |
npcType
class | name | type | multipicy | gained from API method | remark |
---|---|---|---|---|---|
attribute | name | string | 1..1 | GetUnitName("reticleover") | |
attribute | level | int | 1..1 | GetUnitLevel("reticleover") | |
attribute | gender | string enumeration | 0..1 | GetUnitGender("reticleover") | One of "Neutrum", "Female" or "Male" corresponding to the API method's respective return value of 0, 1 or 2 |
attribute | difficulty | string enumeration | 1..1 | GetUnitDifficulty("reticleover") | One of "none", "easy", "normal", "hard" or "deadly" corresponding to the API method's returned MONSTER_DIFFICULTY constant. |
attribute | reaction | string enumeration | 1..1 | GetUnitReaction("reticleover") | One of "default", "interact", "dead", "hostile", "neutral", "friendly", "pc ally" or "ally" corresponding to the API method's returned UNIT_REACTION constant. |
attribute | trader | boolean | 0..1 | CanUnitTrade("reticleover") | seems to have nothing to do with, if the NPC is actually a vendor |
attribute | attackable | boolean | 1..1 | IsUnitAttackable("reticleover") | |
attribute | dead | boolean | 1..1 | IsUnitDead("reticleover") | |
attribute | type | string | 0..1 | GetUnitType("reticleover") | |
attribute | health | string | 1..1 | GetUnitPower("reticleover", POWERTYPE_HEALTH) | |
attribute | magicka | string | 0..1 | GetUnitPower("reticleover", POWERTYPE_MAGICKA) | returned allways 0 by now |
attribute | stamina | string | 0..1 | GetUnitPower("reticleover", POWERTYPE_STAMINA) | returned allways 0 by now |
attribute | follower | boolean | 0..1 | IsUnitFriendlyFollower("reticleover") | |
element | caption | string | 0..1 | GetUnitCaption("reticleover") | if filled, NPC has a profession and caption tells what type, usable to identify vendors (sub-set of professions) |
element | raw | string | 0..1 | GetRawUnitName("reticleover") | combination of name and a letter for the gender, seperated by ^. Does not allways match the result returned by querying the gender directly |
element | class | classType | 1..1 | GetUnitClass("reticleover") | API method returns two values thus the sub type |
element | classId | int | 0..1 | deprecated, now contained in classType | |
element | zone | string | 0..1 | GetUnitZone("reticleover") | as there a sub-zones (e.g. cities), this is not allways the zune you are looking for |
element | location | string | 0..1 | GetPlayerLocationName() | |
element | drowntime | int | 0..1 | GetUnitDrownTime("reticleover") | |
element | race | int | 0..1 | GetUnitRace("reticleover") | apparently NPCs do not have race data stored, except for the 3D model itself |
element | title | string | 0..1 | GetUnitTitle("reticleover") | Until now i never encountered a NPC having a title |
classType
class | name | type | multipicy | remark |
---|---|---|---|---|
attribute | id | int | 1..1 | the class id |
content | the class name | string | 0..1 | was allways empty until now |
Code
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://org.example.esologging/npc" xmlns:tns="http://org.example.esologging/npc" elementFormDefault="qualified"> <element name="npc" type="tns:npcType" /> <complexType name="npcType"> <sequence> <element name="caption" type="string" maxOccurs="1" minOccurs="0" /> <element name="raw" type="string" maxOccurs="1" minOccurs="0" /> <element name="class" type="tns:classType" maxOccurs="1" minOccurs="1" /> <element name="classId" type="int" maxOccurs="1" minOccurs="0" /> <element name="zone" type="string" maxOccurs="1" minOccurs="0" /> <element name="location" type="string" maxOccurs="1" minOccurs="0" /> <element name="drowntime" type="int" maxOccurs="1" minOccurs="0" /> <element name="race" type="string" maxOccurs="1" minOccurs="0" /> <element name="title" type="string" maxOccurs="1" minOccurs="0" /> </sequence> <attribute name="name" type="string" use="required"/> <attribute name="level" type="int" use="required"/> <attribute name="gender" use="optional"> <simpleType> <restriction base="string"> <enumeration value="Male" /> <enumeration value="Female" /> <enumeration value="Neutrum" /> </restriction> </simpleType> </attribute> <attribute name="difficulty" use="required"> <simpleType> <restriction base="string"> <enumeration value="none" /> <enumeration value="easy" /> <enumeration value="normal" /> <enumeration value="hard" /> <enumeration value="deadly" /> </restriction> </simpleType> </attribute> <attribute name="reaction" use="required"> <simpleType> <restriction base="string"> <enumeration value="default" /> <enumeration value="interact" /> <enumeration value="dead" /> <enumeration value="hostile" /> <enumeration value="neutral" /> <enumeration value="friendly" /> <enumeration value="pc ally" /> <enumeration value="ally" /> </restriction> </simpleType> </attribute> <attribute name="trader" type="boolean" use="optional"/> <attribute name="attackable" type="boolean" use="required"/> <attribute name="dead" type="boolean" use="required"/> <attribute name="type" type="string" use="optional"/> <attribute name="health" type="int" use="required"/> <attribute name="magicka" type="int" use="optional"/> <attribute name="stamina" type="int" use="optional"/> <attribute name="follower" type="boolean" use="optional"/> </complexType> <complexType name="classType" mixed="true"> <simpleContent> <extension base="string"> <attribute name="id" type="int" /> </extension> </simpleContent> </complexType> </schema>
Example(s)
Fara Garnona
<npc xmlns="http://org.example.esologging/npc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.example.esologging/npc NPC.xsd" name="Fara Garnona" level="19" gender="Female" difficulty="none" reaction="ally" trader="false" attackable="false" dead="false" type="2" health="645" magicka="0" stamina="0"> <raw>Fara Garnona^F</raw> <class id="0" /> <classId>0</classId> <zone>Grahtwood</zone> <location>Elden Root Temple Wayshrine</location> <drowntime>0</drowntime> </npc>
Twilit Heart
<npc xmlns="http://org.example.esologging/npc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.example.esologging/npc NPC.xsd" name="Twilit Heart" level="19" gender="Neutrum" difficulty="none" reaction="interact" trader="false" attackable="false" dead="false" type="4" health="100" magicka="0" stamina="0"> <raw>Twilit Heart^n</raw> <class id="0" /> <classId>0</classId> <zone>Grahtwood</zone> <location>Laeloria</location> <drowntime>0</drowntime> </npc>
Elarie Two-Spoons
<?xml version="1.0" encoding="UTF-8"?> <npc xmlns="http://org.example.esologging/npc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://org.example.esologging/npc NPC.xsd" name="Elarie Two-Spoons" level="16" gender="Female" difficulty="none" reaction="friendly" trader="false" attackable="false" dead="false" type="2" health="545" magicka="0" stamina="0" follower="false"> <caption>Chef</caption> <raw>Elarie Two-Spoons^F</raw> <class id="0" /> <zone>Grahtwood</zone> <location>Port of Haven</location> <drowntime>0</drowntime> </npc>