Guitar Freak
_LüA_n☺b_
[TFS 0.3+] ALL possible item attributes (FULL LIST + "How to" for other TFSs).
Uploaded.To: Attributes.lua
Speedyshare: Attributes.lua
OTLand: Attributes.rar
(it is in .rar because .lua is not handled by otl attachments)
Its a .lua file so it weights like 5kb only.
Please notice that you will need a special program to view LUA files correctly, the one most people use (me included) is:
NOTEPAD++
Now below is the segment of the file that contained all this, no modifications.
http://svn.otland.net/public/viewvc.cgi/tags/0.3.2/items.cpp?view=co&root=forgottenserver
Lets say you want the plate armor to raise your max HP percent by 10% when you wear it, then you'd have to do this:
Thats just an example for that attribute, but you can play around with more attributes at once or stuff like that, let your imagination fly :thumbup:
-------------------------E---------------------------
--------------------------N--------------------------
---------------------------D-------------------------
Now Ill show you the quick steps to find the items.cpp file respective to your TFS version, if you're using one different than mine.
Hey there everyone!
I was just checking some files on my old OT and I remembered that when I was new (and even not so new), I always had a HORRIBLE time trying to figure out which were the possible Item Attributes I could add to my custom items for the current distro, and I never figured out so I were very limited on my creations, I could just do the ones that already were in some item by default.
I remember I searched around all forums for it and nothing, couldnt find anything related. I also frenetically searched all the folders on my OTs, all the files and still nothing! Couldnt find a proper list of attributes.
It wasnt until a few weeks back that I was checking some stuff in sources that I happened to realize that all those attributes are listed in the source file called items.cpp.
For those who knew, its pretty obvious I know, but still it isnt so obvious for people with not many experience in OTs so they have no idea what sources even are, or those people with experience in OTs but never mess with sources.
Then its pretty much impossible for them to find this list because they dont even know those files exist (or contain that type of stuff).
So considering there's no thread here (or anywhere Ive looked actually, or maybe Im just blind) with this full list, Im posting it here for anyone interested in it.
Since the items.cpp file is huge and the attributes might not be so clear for some people, I took some time to put them on a separate simple and clean list.
However, they were so many that I might have missed one or two when I was doing it so Ill post the 2 things, the "Clean List" being the one I remade, and the other one is the full thing straight from the file so you can copy + paste it on a Word document or related and save it or check it better there.
NOTE: Im NOT claiming any credits for the most part of this tutorial. This was pretty much a copy + paste from the items.cpp file so there's no real credits for me on this more than just taking the time to make the thread and the "Clean List", which all together took me about 3-4 hours to make, organize and detail so it is as clear as possible. For everything else, the credits remain to the respective TFS creators like Talaturen, Elf, Kornholio, etc.
Here we go, remember this is the list for TFS 0.3.2 item attributes. At the end of the thread I show you how to find the ones for your distro in case you have a different one (the example for that is based on the newest TFS).
* The parenthesis ( ) next to some attributes are my short explanations of them. Example: name (name of the item)
(Notice I didnt explain them all because some are either too obvious or I just didnt know what they do/are )
* The "or" in some parenthesis means it can be wrote in different ways but it will mean the same. Example: writeable (or writable)
* The thing that says "key values" below most attributes are the values you can choose for the respective attributes. Example:
That means one of the values to set for slottype would be "head", like this:
(Notice I didnt put the key values of all the attributes, only for basic and most important of them based on my opinion, for all of them check the "full segment" list after this one)
* The small point "·" behind every attribute is just decoration, just to keep it more visually-organized.
Thats pretty much it. Here you go:
If you want it tabbed better (because I made a lot more organized tabulations but they look all weird here for some reason), feel free to download the file here:I was just checking some files on my old OT and I remembered that when I was new (and even not so new), I always had a HORRIBLE time trying to figure out which were the possible Item Attributes I could add to my custom items for the current distro, and I never figured out so I were very limited on my creations, I could just do the ones that already were in some item by default.
I remember I searched around all forums for it and nothing, couldnt find anything related. I also frenetically searched all the folders on my OTs, all the files and still nothing! Couldnt find a proper list of attributes.
It wasnt until a few weeks back that I was checking some stuff in sources that I happened to realize that all those attributes are listed in the source file called items.cpp.
For those who knew, its pretty obvious I know, but still it isnt so obvious for people with not many experience in OTs so they have no idea what sources even are, or those people with experience in OTs but never mess with sources.
Then its pretty much impossible for them to find this list because they dont even know those files exist (or contain that type of stuff).
So considering there's no thread here (or anywhere Ive looked actually, or maybe Im just blind) with this full list, Im posting it here for anyone interested in it.
Since the items.cpp file is huge and the attributes might not be so clear for some people, I took some time to put them on a separate simple and clean list.
However, they were so many that I might have missed one or two when I was doing it so Ill post the 2 things, the "Clean List" being the one I remade, and the other one is the full thing straight from the file so you can copy + paste it on a Word document or related and save it or check it better there.
NOTE: Im NOT claiming any credits for the most part of this tutorial. This was pretty much a copy + paste from the items.cpp file so there's no real credits for me on this more than just taking the time to make the thread and the "Clean List", which all together took me about 3-4 hours to make, organize and detail so it is as clear as possible. For everything else, the credits remain to the respective TFS creators like Talaturen, Elf, Kornholio, etc.
Here we go, remember this is the list for TFS 0.3.2 item attributes. At the end of the thread I show you how to find the ones for your distro in case you have a different one (the example for that is based on the newest TFS).
Clean List:
Note:
* The parenthesis ( ) next to some attributes are my short explanations of them. Example: name (name of the item)
(Notice I didnt explain them all because some are either too obvious or I just didnt know what they do/are )
* The "or" in some parenthesis means it can be wrote in different ways but it will mean the same. Example: writeable (or writable)
* The thing that says "key values" below most attributes are the values you can choose for the respective attributes. Example:
Code:
slottype
[U]key values[/U]
head
Code:
<attribute key="slotType" value="[U]head[/U]"/>
(Notice I didnt put the key values of all the attributes, only for basic and most important of them based on my opinion, for all of them check the "full segment" list after this one)
* The small point "·" behind every attribute is just decoration, just to keep it more visually-organized.
Thats pretty much it. Here you go:
PHP:
· name (name of the item)
· article (article behind the name, for example "a tree" or "an armor")
· plural (name in plural)
· type
key values
magicfield
depot
mailbox
trashholder
teleport
door
bed
· description
· runespellname
· weight
· showcount
· armor
· defense
· extradefense (or extradef)
· attack
· extraattack (or extraatk)
· attackspeed (in miliseconds, so 1000 = 1 sec)
· rotateto
· moveable (or movable)
· blockprojectile
· allowpickupable
· floorchange
key values
down
north
south
west
east
· corpsetype
key values
venom
blood
undead
fire
energy
· containersize
· fluidsource
· writeable (or writable)
key values
canWriteText = 0 for no, 1 for yes.
canReadText = 0 for no, 1 for yes.
· maxtextlen (or maxtextlength)
· writeonceitemid
· worth
· forceserialize (or forceserialization or forcesave)
· leveldoor
· weapontype
key values
sword
club
axe
shield
distance
wand (or rod)
ammunition
fist
· slottype
key values
head
body
legs
feet
backpack
two-handed
necklace
ring
ammo
hand
· ammotype
· shoottype
· effect
· range
· stopduration
· decayto
· transformequipto
· transformdeequipto
· duration
· showduration
key values
0 = Doest show.
1 = Shows.
· charges
· showcharges (same key values as showduration)
· breakchance
key values
Min 0, max 100.
0 = Never breaks.
100 = Breaks in 1st hit.
You can use any value between 0-100, being the number you choose the % chance of breaking.
· ammoaction
· hitchance
key values
Min 0, Max 100.
· maxhitchance (same key values as hit chance)
· preventloss
key values
0 = Doesnt prevent loss.
1 = Prevents loss.
· preventdrop (same as above)
· invisible
key values
1 = Invisible.
· speed
· healthgain
· healthticks (in miliseconds, so 1000 = 1 second)
· managain
· manaticks (same as healthticks)
· manashield
key values
1 = Activates manashield.
· skillsword (these ones increase the respective skill depending on the number you put as value)
· skillaxe
· skillclub
· skilldist
· skillfish
· skillshield
· skillfist
· maxhealthpoints (same as skills, but increases your max HP depending on the value you choose)
· maxhealthpercent (same as above but increases it in PERCENTAGE, note that the value you will write must be AMOUNTYOUWANT+100, because 100 is 100% = the total HP you have, so if you want to add 50% HP, you must set the value to 150, [B]not[/B] 50%, putting 50% will cut the total HP to half)
· maxmanapoints (same structure as maxhealthpoints)
· maxmanapercent (same structure as maxhealthpercent)
· soulpoints (same as above)
· soulpercent (same structure as maxhealthpercent *not sure bout this one though*)
· magiclevelpoints (the number you put on value here will be the amount of Magic Levels added)
· magiclevelpercent (same as above but in percentage, and it has same structure as maxhealthpercent, value = AMOUNT+100)
· absorbpercentall (the number you put is the % of damage it will absorb, from ALL types of attacks)
· absorbpercentelements (the number you put is the % of damage it will absorb, from attacks based on ELEMENTS)
· absorbpercentmagic (the number you put is the % of damage it will absorb, from all attacks based on MAGIC)
· absorbpercentenergy (same as above but from energy atks)
· absorbpercentfire (at this point you probably understood how these work)
· absorbpercentpoison (or absorbpercentearth)
· absorbpercentice
· absorbpercentholy
· absorbpercentdeath
· absorbpercentlifedrain
· absorbpercentmanadrain
· absorbpercentdrown
· absorbpercentphysical (physical = melee-related damages I guess?)
· absorbpercenthealing
· absorbpercentundefined (dont ask, no idea what this is, Im guessing the dmgs that dont fit on the other categories)
· suppressshock (or suppressenergy) (1 = removes ENERGY condition)
· suppressburn (or suppressfire) (same for FIRE condition)
· suppresspoison (or suppressearth) (you got it)
· suppressfreeze (or suppressice)
· suppressdazzle (or suppressholy)
· suppresscurse (or suppressdeath)
· suppressdrown
· suppressphysical
· suppresshaste
· suppressparalyze
· suppressdrunk
· suppressregeneration
· suppresssoul
· suppressoutfit
· suppressinvisible
· suppressinfight (Im guessing this means it removes the "battle" lock for logging out)
· suppressexhaust
· suppressmuted
· suppresspacified
· suppresslight
· suppressattributes
· suppressmanashield
· field
key values
fire
energy
earth (or poison)
ice (or freezing)
holy (or dazzled)
death (or cursed)
drown
physical
ticks (these are extra "subvalues" for the fields dmg itself)
count
start
damage
· elementphysical (These are the weapons with elemental damages, like poison dagger, etc. The value you put is the amount of atk on that element)
· elementfire
· elementenergy
· elementearth
· elementice
· elementholy
· elementdeath
· elementlifedrain
· elementmanadrain
· elementhealing
· elementundefined
· replaceable (or replacable)
· partnerdirection
· maletransformto (transforms you to male)
· femaletransformto (same as above but to female)
· transformto (not sure)
Uploaded.To: Attributes.lua
Speedyshare: Attributes.lua
OTLand: Attributes.rar
(it is in .rar because .lua is not handled by otl attachments)
Its a .lua file so it weights like 5kb only.
Please notice that you will need a special program to view LUA files correctly, the one most people use (me included) is:
NOTEPAD++
Now below is the segment of the file that contained all this, no modifications.
Full segment copied straight from the file:
Well thats pretty much it. If you want the file items.cpp itself you can download it here:
PHP:
bool Items::loadFromXml()
{
if(xmlDocPtr doc = xmlParseFile(getFilePath(FILE_TYPE_OTHER, "items/items.xml").c_str()))
{
int32_t intValue;
std::string strValue;
uint32_t id = 0;
xmlNodePtr root = xmlDocGetRootElement(doc);
if(xmlStrcmp(root->name,(const xmlChar*)"items") != 0)
{
xmlFreeDoc(doc);
return false;
}
xmlNodePtr itemNode = root->children;
while(itemNode)
{
if(xmlStrcmp(itemNode->name,(const xmlChar*)"item") == 0)
{
if(readXMLInteger(itemNode, "id", intValue)){
id = intValue;
if(id > 20000 && id < 20100)
{
id = id - 20000;
ItemType* iType = new ItemType();
iType->id = id;
items.addElement(iType, iType->id);
}
ItemType& it = Item::items.getItemType(id);
if(readXMLString(itemNode, "name", strValue))
it.name = strValue;
if(readXMLString(itemNode, "article", strValue))
it.article = strValue;
if(readXMLString(itemNode, "plural", strValue))
it.pluralName = strValue;
xmlNodePtr itemAttributesNode = itemNode->children;
while(itemAttributesNode)
{
if(readXMLString(itemAttributesNode, "key", strValue))
{
std::string tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "type")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "key")
it.type = ITEM_TYPE_KEY;
else if(tmpStrValue == "magicfield")
it.type = ITEM_TYPE_MAGICFIELD;
else if(tmpStrValue == "depot")
it.type = ITEM_TYPE_DEPOT;
else if(tmpStrValue == "mailbox")
it.type = ITEM_TYPE_MAILBOX;
else if(tmpStrValue == "trashholder")
it.type = ITEM_TYPE_TRASHHOLDER;
else if(tmpStrValue == "teleport")
it.type = ITEM_TYPE_TELEPORT;
else if(tmpStrValue == "door")
it.type = ITEM_TYPE_DOOR;
else if(tmpStrValue == "bed")
it.type = ITEM_TYPE_BED;
else
std::cout << "[Warning - Items::loadFromXml] Unknown type " << strValue << std::endl;
}
}
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 == "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;
}
else if(tmpStrValue == "rotateto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.rotateTo = intValue;
}
else if(tmpStrValue == "moveable" || tmpStrValue == "movable")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.moveable = (intValue == 1);
}
else if(tmpStrValue == "blockprojectile")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.blockProjectile = (intValue == 1);
}
else if(tmpStrValue == "allowpickupable")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.allowPickupable = (intValue == 1);
}
else if(tmpStrValue == "floorchange")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "down")
it.floorChangeDown = true;
else if(tmpStrValue == "north")
it.floorChangeNorth = true;
else if(tmpStrValue == "south")
it.floorChangeSouth = true;
else if(tmpStrValue == "west")
it.floorChangeWest = true;
else if(tmpStrValue == "east")
it.floorChangeEast = true;
}
}
else if(tmpStrValue == "corpsetype")
{
tmpStrValue = asLowerCaseString(strValue);
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "venom")
it.corpseType = RACE_VENOM;
else if(tmpStrValue == "blood")
it.corpseType = RACE_BLOOD;
else if(tmpStrValue == "undead")
it.corpseType = RACE_UNDEAD;
else if(tmpStrValue == "fire")
it.corpseType = RACE_FIRE;
else if(tmpStrValue == "energy")
it.corpseType = RACE_ENERGY;
else
std::cout << "[Warning - Items::loadFromXml] Unknown corpseType " << strValue << std::endl;
}
}
else if(tmpStrValue == "containersize")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.maxItems = intValue;
}
else if(tmpStrValue == "fluidsource")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
FluidTypes_t fluid = getFluidType(tmpStrValue);
if(fluid != FLUID_NONE)
it.fluidSource = fluid;
else
std::cout << "[Warning - Items::loadFromXml] Unknown fluidSource " << strValue << std::endl;
}
}
else if(tmpStrValue == "writeable" || tmpStrValue == "writable")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.canWriteText = (intValue != 0);
it.canReadText = (intValue != 0);
}
}
else if(tmpStrValue == "maxtextlen" || tmpStrValue == "maxtextlength")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.maxTextLen = intValue;
}
else if(tmpStrValue == "writeonceitemid")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.writeOnceItemId = intValue;
}
else if(tmpStrValue == "worth")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.worth = intValue;
}
else if(tmpStrValue == "forceserialize" || tmpStrValue == "forceserialization" || tmpStrValue == "forcesave")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.forceSerialize = (intValue != 0);
}
else if(tmpStrValue == "leveldoor")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.levelDoor = intValue;
}
else if(tmpStrValue == "weapontype")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "sword")
it.weaponType = WEAPON_SWORD;
else if(tmpStrValue == "club")
it.weaponType = WEAPON_CLUB;
else if(tmpStrValue == "axe")
it.weaponType = WEAPON_AXE;
else if(tmpStrValue == "shield")
it.weaponType = WEAPON_SHIELD;
else if(tmpStrValue == "distance")
it.weaponType = WEAPON_DIST;
else if(tmpStrValue == "wand" || tmpStrValue == "rod")
it.weaponType = WEAPON_WAND;
else if(tmpStrValue == "ammunition")
it.weaponType = WEAPON_AMMO;
else if(tmpStrValue == "fist")
it.weaponType = WEAPON_FIST;
else
std::cout << "[Warning - Items::loadFromXml] Unknown weaponType " << strValue << std::endl;
}
}
else if(tmpStrValue == "slottype")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "head")
{
it.slotPosition |= SLOTP_HEAD;
it.wieldPosition = SLOT_HEAD;
}
else if(tmpStrValue == "body")
{
it.slotPosition |= SLOTP_ARMOR;
it.wieldPosition = SLOT_ARMOR;
}
else if(tmpStrValue == "legs")
{
it.slotPosition |= SLOTP_LEGS;
it.wieldPosition = SLOT_LEGS;
}
else if(tmpStrValue == "feet")
{
it.slotPosition |= SLOTP_FEET;
it.wieldPosition = SLOT_FEET;
}
else if(tmpStrValue == "backpack")
{
it.slotPosition |= SLOTP_BACKPACK;
it.wieldPosition = SLOT_BACKPACK;
}
else if(tmpStrValue == "two-handed")
{
it.slotPosition |= SLOTP_TWO_HAND;
it.wieldPosition = SLOT_TWO_HAND;
}
else if(tmpStrValue == "necklace")
{
it.slotPosition |= SLOTP_NECKLACE;
it.wieldPosition = SLOT_NECKLACE;
}
else if(tmpStrValue == "ring")
{
it.slotPosition |= SLOTP_RING;
it.wieldPosition = SLOT_RING;
}
else if(tmpStrValue == "ammo")
it.wieldPosition = SLOT_AMMO;
else if(tmpStrValue == "hand")
it.wieldPosition = SLOT_HAND;
else
std::cout << "[Warning - Items::loadFromXml] Unknown slotType " << strValue << std::endl;
}
}
else if(tmpStrValue == "ammotype")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
it.ammoType = getAmmoType(strValue);
if(it.ammoType == AMMO_NONE)
std::cout << "[Warning - Items::loadFromXml] Unknown ammoType " << strValue << std::endl;
}
}
else if(tmpStrValue == "shoottype")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
ShootType_t shoot = getShootType(strValue);
if(shoot != NM_SHOOT_UNK)
it.shootType = shoot;
else
std::cout << "[Warning - Items::loadFromXml] Unknown shootType " << strValue << std::endl;
}
}
else if(tmpStrValue == "effect")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
MagicEffectClasses effect = getMagicEffect(strValue);
if(effect != NM_ME_UNK)
it.magicEffect = effect;
else
std::cout << "[Warning - Items::loadFromXml] Unknown effect " << strValue << std::endl;
}
}
else if(tmpStrValue == "range")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.shootRange = intValue;
}
else if(tmpStrValue == "stopduration")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.stopTime = (intValue != 0);
}
else if(tmpStrValue == "decayto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.decayTo = intValue;
}
else if(tmpStrValue == "transformequipto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.transformEquipTo = intValue;
}
else if(tmpStrValue == "transformdeequipto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.transformDeEquipTo = intValue;
}
else if(tmpStrValue == "duration")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.decayTime = std::max((int32_t)0, intValue);
}
else if(tmpStrValue == "showduration")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.showDuration = (intValue != 0);
}
else if(tmpStrValue == "charges")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.charges = intValue;
}
else if(tmpStrValue == "showcharges")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.showCharges = (intValue != 0);
}
else if(tmpStrValue == "breakchance")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.breakChance = std::max(0, std::min(100, intValue));
}
else if(tmpStrValue == "ammoaction")
{
if(readXMLString(itemAttributesNode, "value", strValue))
{
AmmoAction_t ammo = getAmmoAction(strValue);
if(ammo != AMMOACTION_NONE)
it.ammoAction = ammo;
else
std::cout << "[Warning - Items::loadFromXml] Unknown ammoAction " << strValue << std::endl;
}
}
else if(tmpStrValue == "hitchance")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.hitChance = std::max(0, std::min(100, intValue));
}
else if(tmpStrValue == "maxhitchance")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.maxHitChance = std::max(0, std::min(100, intValue));
}
else if(tmpStrValue == "preventloss")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.preventLoss = (intValue != 0);
}
else if(tmpStrValue == "preventdrop")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.preventDrop = (intValue != 0);
}
else if(tmpStrValue == "invisible")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.invisible = (intValue != 0);
}
else if(tmpStrValue == "speed")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.speed = intValue;
}
else if(tmpStrValue == "healthgain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.regeneration = true;
it.abilities.healthGain = intValue;
}
}
else if(tmpStrValue == "healthticks")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.regeneration = true;
it.abilities.healthTicks = intValue;
}
}
else if(tmpStrValue == "managain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.regeneration = true;
it.abilities.manaGain = intValue;
}
}
else if(tmpStrValue == "manaticks")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.regeneration = true;
it.abilities.manaTicks = intValue;
}
}
else if(tmpStrValue == "manashield")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.manaShield = (intValue != 0);
}
else if(tmpStrValue == "skillsword")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_SWORD] = intValue;
}
else if(tmpStrValue == "skillaxe")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_AXE] = intValue;
}
else if(tmpStrValue == "skillclub")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_CLUB] = intValue;
}
else if(tmpStrValue == "skilldist")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_DIST] = intValue;
}
else if(tmpStrValue == "skillfish")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_FISH] = intValue;
}
else if(tmpStrValue == "skillshield")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_SHIELD] = intValue;
}
else if(tmpStrValue == "skillfist")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.skills[SKILL_FIST] = intValue;
}
else if(tmpStrValue == "maxhealthpoints")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.stats[STAT_MAXHEALTH] = intValue;
}
else if(tmpStrValue == "maxhealthpercent")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.statsPercent[STAT_MAXHEALTH] = intValue;
}
else if(tmpStrValue == "maxmanapoints")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.stats[STAT_MAXMANA] = intValue;
}
else if(tmpStrValue == "maxmanapercent")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.statsPercent[STAT_MAXMANA] = intValue;
}
else if(tmpStrValue == "soulpoints")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.stats[STAT_SOUL] = intValue;
}
else if(tmpStrValue == "soulpercent")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.statsPercent[STAT_SOUL] = intValue;
}
else if(tmpStrValue == "magiclevelpoints")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.stats[STAT_MAGICLEVEL] = intValue;
}
else if(tmpStrValue == "magiclevelpercent")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.statsPercent[STAT_MAGICLEVEL] = intValue;
}
else if(tmpStrValue == "absorbpercentall")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
for(uint32_t i = COMBAT_FIRST; i <= COMBAT_LAST; i++)
it.abilities.absorbPercent[i] += intValue;
}
}
else if(tmpStrValue == "absorbpercentelements")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.absorbPercent[COMBAT_ENERGYDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_FIREDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_EARTHDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_ICEDAMAGE] += intValue;
}
}
else if(tmpStrValue == "absorbpercentmagic")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.absorbPercent[COMBAT_ENERGYDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_FIREDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_EARTHDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_ICEDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_HOLYDAMAGE] += intValue;
it.abilities.absorbPercent[COMBAT_DEATHDAMAGE] += intValue;
}
}
else if(tmpStrValue == "absorbpercentenergy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_ENERGYDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentfire")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_FIREDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentpoison" || tmpStrValue == "absorbpercentearth")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_EARTHDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentice")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_ICEDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentholy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_HOLYDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentdeath")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_DEATHDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentlifedrain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_LIFEDRAIN] += intValue;
}
else if(tmpStrValue == "absorbpercentmanadrain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_MANADRAIN] += intValue;
}
else if(tmpStrValue == "absorbpercentdrown")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_DROWNDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercentphysical")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_PHYSICALDAMAGE] += intValue;
}
else if(tmpStrValue == "absorbpercenthealing")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_HEALING] += intValue;
}
else if(tmpStrValue == "absorbpercentundefined")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.abilities.absorbPercent[COMBAT_UNDEFINEDDAMAGE] += intValue;
}
else if(tmpStrValue == "suppressshock" || tmpStrValue == "suppressenergy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_ENERGY;
}
else if(tmpStrValue == "suppressburn" || tmpStrValue == "suppressfire")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_FIRE;
}
else if(tmpStrValue == "suppresspoison" || tmpStrValue == "suppressearth")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_POISON;
}
else if(tmpStrValue == "suppressfreeze" || tmpStrValue == "suppressice")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_FREEZING;
}
else if(tmpStrValue == "suppressdazzle" || tmpStrValue == "suppressholy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_DAZZLED;
}
else if(tmpStrValue == "suppresscurse" || tmpStrValue == "suppressdeath")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_CURSED;
}
else if(tmpStrValue == "suppressdrown")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_DROWN;
}
else if(tmpStrValue == "suppressphysical")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_PHYSICAL;
}
else if(tmpStrValue == "suppresshaste")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_HASTE;
}
else if(tmpStrValue == "suppressparalyze")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_PARALYZE;
}
else if(tmpStrValue == "suppressdrunk")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_DRUNK;
}
else if(tmpStrValue == "suppressregeneration")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_REGENERATION;
}
else if(tmpStrValue == "suppresssoul")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_SOUL;
}
else if(tmpStrValue == "suppressoutfit")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_OUTFIT;
}
else if(tmpStrValue == "suppressinvisible")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_INVISIBLE;
}
else if(tmpStrValue == "suppressinfight")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_INFIGHT;
}
else if(tmpStrValue == "suppressexhaust")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_EXHAUST;
}
else if(tmpStrValue == "suppressmuted")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_MUTED;
}
else if(tmpStrValue == "suppresspacified")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_PACIFIED;
}
else if(tmpStrValue == "suppresslight")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_LIGHT;
}
else if(tmpStrValue == "suppressattributes")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_ATTRIBUTES;
}
else if(tmpStrValue == "suppressmanashield")
{
if(readXMLInteger(itemAttributesNode, "value", intValue) && intValue != 0)
it.abilities.conditionSuppressions |= CONDITION_MANASHIELD;
}
else if(tmpStrValue == "field")
{
it.group = ITEM_GROUP_MAGICFIELD;
it.type = ITEM_TYPE_MAGICFIELD;
CombatType_t combatType = COMBAT_NONE;
ConditionDamage* conditionDamage = NULL;
if(readXMLString(itemAttributesNode, "value", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "fire")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_FIRE, false, 0);
combatType = COMBAT_FIREDAMAGE;
}
else if(tmpStrValue == "energy")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_ENERGY, false, 0);
combatType = COMBAT_ENERGYDAMAGE;
}
else if(tmpStrValue == "earth" || tmpStrValue == "poison")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_POISON, false, 0);
combatType = COMBAT_EARTHDAMAGE;
}
else if(tmpStrValue == "ice" || tmpStrValue == "freezing")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_FREEZING, false, 0);
combatType = COMBAT_ICEDAMAGE;
}
else if(tmpStrValue == "holy" || tmpStrValue == "dazzled")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_DAZZLED, false, 0);
combatType = COMBAT_HOLYDAMAGE;
}
else if(tmpStrValue == "death" || tmpStrValue == "cursed")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_CURSED, false, 0);
combatType = COMBAT_DEATHDAMAGE;
}
else if(tmpStrValue == "drown")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_DROWN, false, 0);
combatType = COMBAT_DROWNDAMAGE;
}
else if(tmpStrValue == "physical")
{
conditionDamage = new ConditionDamage(CONDITIONID_COMBAT, CONDITION_PHYSICAL, false, 0);
combatType = COMBAT_PHYSICALDAMAGE;
}
else
std::cout << "[Warning - Items::loadFromXml] Unknown field value " << strValue << std::endl;
if(combatType != COMBAT_NONE)
{
it.combatType = combatType;
it.condition = conditionDamage;
uint32_t ticks = 0;
int32_t damage = 0, start = 0, count = 1;
xmlNodePtr fieldAttributesNode = itemAttributesNode->children;
while(fieldAttributesNode)
{
if(readXMLString(fieldAttributesNode, "key", strValue))
{
tmpStrValue = asLowerCaseString(strValue);
if(tmpStrValue == "ticks")
{
if(readXMLInteger(fieldAttributesNode, "value", intValue))
ticks = std::max(0, intValue);
}
if(tmpStrValue == "count")
{
if(readXMLInteger(fieldAttributesNode, "value", intValue))
count = std::max(1, intValue);
}
if(tmpStrValue == "start")
{
if(readXMLInteger(fieldAttributesNode, "value", intValue))
start = std::max(0, intValue);
}
if(tmpStrValue == "damage")
{
if(readXMLInteger(fieldAttributesNode, "value", intValue))
{
damage = -intValue;
if(start > 0)
{
std::list<int32_t> damageList;
ConditionDamage::generateDamageList(damage, start, damageList);
for(std::list<int32_t>::iterator it = damageList.begin(); it != damageList.end(); ++it)
conditionDamage->addDamage(1, ticks, -*it);
start = 0;
}
else
conditionDamage->addDamage(count, ticks, damage);
}
}
}
fieldAttributesNode = fieldAttributesNode->next;
}
if(conditionDamage->getTotalDamage() > 0)
it.condition->setParam(CONDITIONPARAM_FORCEUPDATE, true);
}
}
}
else if(tmpStrValue == "elementphysical")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_PHYSICALDAMAGE;
}
}
else if(tmpStrValue == "elementfire")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_FIREDAMAGE;
}
}
else if(tmpStrValue == "elementenergy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_ENERGYDAMAGE;
}
}
else if(tmpStrValue == "elementearth")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_EARTHDAMAGE;
}
}
else if(tmpStrValue == "elementice")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_ICEDAMAGE;
}
}
else if(tmpStrValue == "elementholy")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_HOLYDAMAGE;
}
}
else if(tmpStrValue == "elementdeath")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_DEATHDAMAGE;
}
}
else if(tmpStrValue == "elementlifedrain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_LIFEDRAIN;
}
}
else if(tmpStrValue == "elementmanadrain")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_MANADRAIN;
}
}
else if(tmpStrValue == "elementhealing")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_HEALING;
}
}
else if(tmpStrValue == "elementundefined")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.abilities.elementDamage = intValue;
it.abilities.elementType = COMBAT_UNDEFINEDDAMAGE;
}
}
else if(tmpStrValue == "replaceable" || tmpStrValue == "replacable")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.replaceable = (intValue != 0);
}
else if(tmpStrValue == "partnerdirection")
{
if(readXMLString(itemAttributesNode, "value", strValue))
it.bedPartnerDir = getDirection(strValue);
}
else if(tmpStrValue == "maletransformto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.transformToOnUse[PLAYERSEX_MALE] = intValue;
ItemType& ot = getItemType(intValue);
if(ot.transformToFree == 0)
ot.transformToFree = it.id;
if(it.transformToOnUse[PLAYERSEX_FEMALE] == 0)
it.transformToOnUse[PLAYERSEX_FEMALE] = intValue;
}
}
else if(tmpStrValue == "femaletransformto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
{
it.transformToOnUse[PLAYERSEX_FEMALE] = intValue;
ItemType& ot = getItemType(intValue);
if(ot.transformToFree == 0)
ot.transformToFree = it.id;
if(it.transformToOnUse[PLAYERSEX_MALE] == 0)
it.transformToOnUse[PLAYERSEX_MALE] = intValue;
}
}
else if(tmpStrValue == "transformto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.transformToFree = intValue;
}
else
std::cout << "[Warning - Items::loadFromXml] Unknown key value " << strValue << std::endl;
}
itemAttributesNode = itemAttributesNode->next;
}
if(it.pluralName.size() == 0 && it.name.size() != 0)
it.pluralName = it.name + "s";
}
else
std::cout << "[Warning - Items::loadFromXml] No itemid found" << std::endl;
}
itemNode = itemNode->next;
}
xmlFreeDoc(doc);
}
//Lets do some checks...
for(uint32_t i = 0; i < Item::items.size(); ++i)
{
const ItemType* it = Item::items.getElement(i);
if(!it)
continue;
//check bed items
if((it->transformToFree != 0 || it->transformToOnUse[PLAYERSEX_FEMALE] != 0 || it->transformToOnUse[PLAYERSEX_MALE] != 0) && it->type != ITEM_TYPE_BED)
std::cout << "[Warning - Items::loadFromXml] Item " << it->id << " is not set as a bed-type." << std::endl;
}
return true;
}
http://svn.otland.net/public/viewvc.cgi/tags/0.3.2/items.cpp?view=co&root=forgottenserver
NOTE:
If you're not sure of what these attributes are or do, let me give you an example.
If you're not sure of what these attributes are or do, let me give you an example.
Lets say you want the plate armor to raise your max HP percent by 10% when you wear it, then you'd have to do this:
- Find "plate armor" in items.xml.
- It will say this:
Code:<item id="2463" article="a" name="plate armor"> <attribute key="weight" value="12000"/> <attribute key="armor" value="10"/> <attribute key="slotType" value="body"/> </item>
- You would then find the respective attribute on my list, in this case it would be "maxhealthpercent". So you would add this line to plate armor:
Code:<attribute key="maxhealthpercent" value="110"/>
It is 110 instead of 10, because 100% is the total HP, so if you put 10% it will recognize it as if you wanted to transform his total HP to 10% of it. Like if you have 3000 HP it would end up in 300 HP. So if you put 110% it adds 10% to the total.
It will look like this in the end:
Code:<item id="2463" article="a" name="plate armor"> <attribute key="weight" value="12000"/> <attribute key="armor" value="10"/> <attribute key="slotType" value="body"/> [COLOR="Blue"][B]<attribute key="maxhealthpercent" value="110"/>[/B][/COLOR] </item>
- Then you go to folder data > movements and open movements.xml, and register the "attributed" item there so it works in-game, adding this:
Code:<movevent type="Equip" itemid="2463" slot="armor" level="1" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2463" slot="armor" event="function" value="onDeEquipItem"/>
- Then restart your server, enter and see your current HP, then wear the plate armor and see how it will increase 10% until you un-equip it.
Thats just an example for that attribute, but you can play around with more attributes at once or stuff like that, let your imagination fly :thumbup:
-------------------------E---------------------------
--------------------------N--------------------------
---------------------------D-------------------------
Now Ill show you the quick steps to find the items.cpp file respective to your TFS version, if you're using one different than mine.
- Go to this link:
[forgottenserver] Index of /tags
Thats the repository of all the public sources of the different TFS distributions.
- Find your version, in my case it was 0.3.2 but lets say you want the ones for the new TFS 0.3.5pl1, so you click on the folder that says "0.3.5pl1/" and it should take you to this link:
[forgottenserver] Index of /tags/0.3.5pl1
- Once there, find the file items.cpp in the list of files provided. Click on it and it will take you to this link:
[forgottenserver] Log of /tags/0.3.5pl1/items.cpp
- In there, you'll see at the top something like this (below the link that says Parent Directory):
Code:Links to HEAD: (view) (annotate)
- Click "View" to view it there in your browser.
Update: It seems like in some versions it is available for download but on others you can only view it. To download those you need to download the full sources and then find the file items.cpp, etc.
- Now that you have the file items.cpp opened, just look up for something like "name" or "article" (with the ""), and it should take you straight to where the attributes part begin. Now just read and have fun :thumbup:
Well thats all folks.
This is the first "tutorial" I post so bare with me for any errors/mistakes it may have or for any spelling mistake (Im not native nor nowhere near an english speaker, I just learn as I go), I made it from scratch with only a file and I took a LOT of time to make this guide as detailed, clear and organized as I possibly could.
However as always Im open for suggestions, corrections, comments, flames, jokes or whatever you desire. Its a free world... kind of.
Well hope it helps you out, have fun! :thumbup:
Cheers.
~{Guitar Freak}~
This is the first "tutorial" I post so bare with me for any errors/mistakes it may have or for any spelling mistake (Im not native nor nowhere near an english speaker, I just learn as I go), I made it from scratch with only a file and I took a LOT of time to make this guide as detailed, clear and organized as I possibly could.
However as always Im open for suggestions, corrections, comments, flames, jokes or whatever you desire. Its a free world... kind of.
Well hope it helps you out, have fun! :thumbup:
Cheers.
~{Guitar Freak}~
Attachments
-
Attributes.rar2.1 KB · Views: 275 · VirusTotal
Last edited: