Where can I find a list of xml tags for monsters?
example: "flags","health","attacks","loot"..
I've currently found these (but there's probably more):
summons, immunities, voices, loot, elements, defenses, attack, flags, look, strategy, targetChange, health
Ok, otland pepes. I have been reading trough
What currently confuses me is the usage of
In the snippet below you can clearly see that the main tag
TFS: 0.4 3777
I've currently found these (but there's probably more):
summons, immunities, voices, loot, elements, defenses, attack, flags, look, strategy, targetChange, health
Ok, otland pepes. I have been reading trough
monsters.cpp to compile a list of xml tags and attributes used.What currently confuses me is the usage of
deserializeSpell() function because I have no idea which attributes belong to attack or defenseIn the snippet below you can clearly see that the main tag
<defenses> has two attributes: defense & armor. But if you look into the part where it iterates over <defense> nodes you can see that it is calling deserializeSpell() function to continue the process..
C++:
else if(!xmlStrcmp(p->name, (const xmlChar*)"attacks"))
{
xmlNodePtr tmpNode = p->children;
while(tmpNode)
{
if(!xmlStrcmp(tmpNode->name, (const xmlChar*)"attack"))
{
spellBlock_t sb;
if(deserializeSpell(tmpNode, sb, monsterName))
mType->spellAttackList.push_back(sb);
else
SHOW_XML_WARNING("Cant load spell");
}
tmpNode = tmpNode->next;
}
}
else if(!xmlStrcmp(p->name, (const xmlChar*)"defenses"))
{
if(readXMLInteger(p, "defense", intValue))
mType->defense = intValue;
if(readXMLInteger(p, "armor", intValue))
mType->armor = intValue;
xmlNodePtr tmpNode = p->children;
while(tmpNode)
{
if(!xmlStrcmp(tmpNode->name, (const xmlChar*)"defense"))
{
spellBlock_t sb;
if(deserializeSpell(tmpNode, sb, monsterName))
mType->spellDefenseList.push_back(sb);
else
SHOW_XML_WARNING("Cant load spell");
}
tmpNode = tmpNode->next;
}
}
TFS: 0.4 3777
Last edited: