• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Items.xml attributes?

Maltexor

Active Member
Joined
Mar 9, 2014
Messages
214
Reaction score
40
Location
Germany
Hey guys,

Just wondering where i can find all the attribute's for Items.xml like:

Code:
<attribute key="description" value="The blade is a magic flame." />
        <attribute key="weight" value="2300" />
        <attribute key="defense" value="20" />
        <attribute key="attack" value="24" />
        <attribute key="elementFire" value="11" />
        <attribute key="weaponType" value="sword" />
        <attribute key="extradef" value="1" />
 
if you have source you can read items.cpp
from line 496
or search this function
void Items::parseItemNode(xmlNodePtr itemNode, uint32_t id)

it's too much to add them here but i can give u simples
 
Code:
            else if(tmpStrValue == "name")
            {
                if(readXMLString(itemAttributesNode, "value", strValue))
                    it.name = strValue;
            }
            else if(tmpStrValue == "article")
            {
                if(readXMLString(itemAttributesNode, "value", strValue))
                    it.article = strValue;
            }
            else if(tmpStrValue == "plural")
            {
                if(readXMLString(itemAttributesNode, "value", strValue))
                    it.pluralName = strValue;
            }
            else if(tmpStrValue == "clientid")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                {
                    it.clientId = intValue;
                    if(it.group == ITEM_GROUP_DEPRECATED)
                        it.group = ITEM_GROUP_NONE;
                }
            }
            else if(tmpStrValue == "blocksolid" || tmpStrValue == "blocking")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.blockSolid = (intValue != 0);
            }
            else if(tmpStrValue == "blockprojectile")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.blockProjectile = (intValue != 0);
            }
            else if(tmpStrValue == "blockpathfind" || tmpStrValue == "blockpathing" || tmpStrValue == "blockpath")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.blockPathFind = (intValue != 0);
            }
            else if(tmpStrValue == "lightlevel")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.lightLevel = intValue;
            }
            else if(tmpStrValue == "lightcolor")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.lightColor = intValue;
            }
            else if(tmpStrValue == "description")
            {
                if(readXMLString(itemAttributesNode, "value", strValue))
                    it.description = strValue;
            }
            else if(tmpStrValue == "runespellname")
            {
                if(readXMLString(itemAttributesNode, "value", strValue))
                    it.runeSpellName = strValue;
            }
            else if(tmpStrValue == "weight")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.weight = intValue / 100.f;
            }
            else if(tmpStrValue == "showcount")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.showCount = (intValue != 0);
            }
            else if(tmpStrValue == "armor")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.armor = intValue;
            }
            else if(tmpStrValue == "defense")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.defense = intValue;
            }
            else if(tmpStrValue == "extradefense" || tmpStrValue == "extradef")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.extraDefense = intValue;
            }
            else if(tmpStrValue == "attack")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.attack = intValue;
            }
            else if(tmpStrValue == "extraattack" || tmpStrValue == "extraatk")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.extraAttack = intValue;
            }
            else if(tmpStrValue == "attackspeed")
            {
                if(readXMLInteger(itemAttributesNode, "value", intValue))
                    it.attackSpeed = intValue;
            }
 
Someone should really make a complete list for people to copy-paste from. :) (TFS 1.0)

Kind Regards.
Eldin.
 
Someone should really make a complete list for people to copy-paste from. :) (TFS 1.0)

Kind Regards.
Eldin.

these are not all
but i will update it with examples after i finish .. cuz i'm busy atm
For TFS 1.0
Code:
<attribute key="description" value=""/>
<attribute key="runespellname" value=""/>
<attribute key="weight" value=""/>
<attribute key="showcount" value=""/>
<attribute key="armor" value=""/>
<attribute key="defense" value=""/>
<attribute key="extradef" value=""/>
<attribute key="attack" value=""/>
<attribute key="rotateto" value=""/>
<attribute key="corpsetype" value=""/>
<attribute key="containersize" value=""/>
<attribute key="fluidsource" value=""/>
<attribute key="readable" value=""/>
<attribute key="writeable" value=""/>
<attribute key="maxtextlen" value=""/>
<attribute key="weapontype" value=""/>
<attribute key="slottype" value=""/>
<attribute key="ammotype" value=""/>
<attribute key="shoottype" value=""/>
<attribute key="effect" value=""/>
<attribute key="range" value=""/>
<attribute key="stopduration" value=""/>
<attribute key="decayto" value=""/>
<attribute key="transformequipto" value=""/>
<attribute key="transformdeequipto" value=""/>
<attribute key="duration" value=""/>
<attribute key="showduration" value=""/>
<attribute key="charges" value=""/>
<attribute key="showcharges" value=""/>
<attribute key="breakchance" value=""/>
<attribute key="hitchance" value=""/>
<attribute key="maxhitchance" value=""/>
<attribute key="invisible" value=""/>
<attribute key="speed" value=""/>
<attribute key="healthgain" value=""/>
<attribute key="healthticks" value=""/>
<attribute key="managain" value=""/>
<attribute key="manaticks" value=""/>
<attribute key="manashield" value=""/>
<attribute key="skillsword" value=""/>
<attribute key="skillaxe" value=""/>
<attribute key="skillclub" value=""/>
<attribute key="skilldist" value=""/>
<attribute key="skillfish" value=""/>
<attribute key="skillshield" value=""/>
<attribute key="skillfist" value=""/>
<attribute key="maxhitpoints" value=""/>
<attribute key="maxhitpointspercent" value=""/>
<attribute key="maxmanapoints" value=""/>
<attribute key="maxmanapointspercent" value=""/>
<attribute key="soulpoints" value=""/>
<attribute key="soulpointspercent" value=""/>
<attribute key="magicpoints ; magiclevelpoints" value=""/>
<attribute key="magicpointspercent" value=""/>
<attribute key="absorbpercentall ; absorbpercentallelements" value=""/>
<attribute key="absorbpercentelements" value=""/>
<attribute key="absorbpercentmagic" value=""/>
<attribute key="absorbpercentenergy" value=""/>
<attribute key="absorbpercentfire" value=""/>
<attribute key="absorbpercentpoison ; absorbpercentearth" value=""/>
<attribute key="absorbpercentice" value=""/>
<attribute key="absorbpercentholy" value=""/>
<attribute key="absorbpercentdeath" value=""/>
<attribute key="absorbpercentlifedrain" value=""/>
<attribute key="absorbpercentmanadrain" value=""/>
<attribute key="absorbpercentdrown" value=""/>
<attribute key="absorbpercentphysical" value=""/>
<attribute key="absorbpercenthealing" value=""/>
<attribute key="absorbpercentundefined" value=""/>
<attribute key="suppressdrunk" value=""/>
<attribute key="suppressenergy" value=""/>
<attribute key="suppressfire" value=""/>
<attribute key="suppresspoison" value=""/>
<attribute key="suppressdrown" value=""/>
<attribute key="suppressphysical" value=""/>
<attribute key="suppressfreeze" value=""/>
<attribute key="suppressdazzle" value=""/>
<attribute key="suppresscurse" value=""/>
<attribute key="field" value=""/>
<attribute key="leveldoor" value=""/>
<attribute key="maletransformto" value=""/>
<attribute key="femaletransformto" value=""/>
<attribute key="transformto" value=""/>
<attribute key="elementice" value=""/>
<attribute key="elementearth" value=""/>
<attribute key="elementfire" value=""/>
<attribute key="elementfire" value=""/>
<attribute key="walkstack" value=""/>
<attribute key="alwaysontop" value=""/>
<attribute key="blocking" value=""/>
 
Some items may need to be registered in movements or weapons.xml for the attributes to work I think.
 
Does anyone want a complete list (with some minor formatting errors)?

I wrote a program to "mine" the C++, and it's almost working .
I'm getting all the attributes and values, but there are a few special cases in the C++ that I don't feel like writing special logic for.

Format looks like this sample, but I can change it easily if anyone has a suggestion:
Code:
<attribute key="type" value=""/>
  value = "key"
  value = "magicfield"
  value = "container"
  value = "depot"
  value = "mailbox"
  value = "trashholder"
  value = "teleport"
  value = "door"
  value = "bed"
  value = "rune"
<attribute key="allowpickupable" value=""/>
<attribute key="pickupable" value=""/>
<attribute key="floorchange" value=""/>
  value = "down"
  value = "north"
  value = "south"
  value = "southalt"
  value = "southex"
  value = "west"
  value = "east"
  value = "eastalt"
  value = "eastex"
<attribute key="writeable" value=""/>
<attribute key="maxtextlen" value=""/>
<attribute key="writeonceitemid" value=""/>

BTW - I don't mind making the code available later, but it's in Java. A Lua scripter probably won't find it easy to work with.
 
Last edited:
Back
Top