• 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!

[XML] How to make a monster? FULLY EXPLAINED. NEW!

Moj mistrz

Monster Creator
Joined
Feb 1, 2008
Messages
932
Solutions
10
Reaction score
295
Location
Poland
Hello, today I present you 'How to make a monster' tutorial. It's for 10.7~ clients, but should work also for older versions(just some magic effects wont work). There have been few tutorials which did not explain everything, so here I am trying to not miss anything.
This tutorial will be long and boring, but at the end you may learn something.

Let me start from the beginning - 'How to set up monster name, health, experience, speed..':

1. Go to your '..\data\monster' folder and create monsterName.xml file, open it and paste this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
2. Now under this line paste this:
Code:
<monster name="Test" nameDescription="a test" race="blood" experience="1" skull="black" speed="150" manacost="25">
   <health now="15" max="15"/>
   <look type="136" head="1" body="1" legs="1" feet="1" addons="1" mount="136" corpse="1988"/>
   <targetchange interval="2000" chance="5"/>
   <strategy attack="100" defense="0"/>

Terms explantation:
  • monster name - This one is simple, there you put your monster name - in my case it's 'Test'
  • nameDescription - That is description of your monster, this is how it will look in game
Code:
"You see a test."
"A demon loses 5 hitpoints due to an attack by a test."
Boss monsters type without article (a/an) and with capital letters, this is how it will look in game
Code:
"You see Test."
"A demon loses 5 hitpoints due to an attack by Test."
  • race - It's the monster race, these are types of races available:
Code:
"blood"
"venom"
"undead"
"fire"
"energy"
  • experience - There you set up monster experience
  • skull - There you can type skulls for your monster to have, type skull="none" if you don't want it to have any at all. List of skull types:
Code:
"yellow"
"black"
"red"
"white"
"orange"
"green"
  • speed - There you can adjust your monster speed, set it to "0" means your monster wont move at all
  • manacost - There you can configure manacost needed for the summon, set to "0" if creature should not be summonable/convinceable(read below - 'Flags')
  • health now - Means how much health monster will have when spawned, correct values are above "1"
  • health max - Like above, but value needs to be equal or greater than in 'health now'
  • look type - This is where you set up outfit of your monster, you can type here only outfit numbers, ex.:
Code:
<look type="136"
  • look typeEx - There you can also set up monster outfit with difference that it can be only item id here, ex.:
Code:
<look typeEx="1446"
  • head, body, legs, feet - There you type colors(from 0 to 132) of your monster body parts - works only if monster has outfit which can be edited with colors like player outfits
  • addons - There you can type addons for your monster, "0" means no addons, "1" means first addon, "2" means second addon, "3" means both addons. It wont work if the monster has outfit different than players outfits(which can only have addons)
  • mount - There you can type mount of your creature, it can be mount you already know, but can be also 'a minotaur for example, so imagine creature looking like a 'troll' riding 'minotaur' :D. Type mount="0" if you dont want your monster to have any mounts.
  • corpse - There you set up monster corpse, it can be a container or any item at all(but only containers work if you want your monster to have any loot)
  • targetchange - There you can set up monster retarget
  • interval - How often it will try to change it's target - 2000 = 2 seconds, 5000 = 5 seconds etc.
  • chance - It's the chance to retarget successfully, put "0" if you dont want your monster to retarget at all
  • strategy attack/defense - This one is(should be?) responsible for monster behavior - attack="70" and defense="30" means that monster will be focused with 70% on attack and 30% on defense, but this is only theory, for me it dont work, so leave it as it is or delete it(won't mess up monster)
 
Last edited:
3. Now paste this:
Code:
<flags>
     <flag summonable="1"/>
     <flag attackable="1"/>
     <flag hostile="1"/>
     <flag illusionable="1"/>
     <flag convinceable="1"/>
     <flag pushable="1"/>
     <flag canpushitems="0"/>
     <flag canpushcreatures="0"/>
     <flag targetdistance="1"/>
     <flag staticattack="90"/>
     <flag hidehealth="0" />
     <flag lightcolor="17" />
     <flag lightlevel="1" />
     <flag runonhealth="5"/>
   </flags>

Terms explantation:

  • summonable - Put "1" if you want your monster to be summoned(You need to add value to 'mana="x"' in order to spent mana when summoned), put "0" if you dont want it to be summoned
  • attackable - Put "1" so you can attack it, put "0" if you dont want it to be attackable
  • hostile - Put "1" so your monster will be aggressive, put "0" if you want your monster to be friendly(like 'deer')
  • illusionable - Put "1" if you want players to change into this monster using 'Creature Illusion' spell, put "0" if it shouldn't be illusionable
  • convinceable - Put "1" if you want your monster to be convinced using 'Convince Creature Rune'(You need to add value to 'mana="x"' in order to spent mana when summoned), put "0" if you dont want it to be convinced
  • pushable - Put "1" if you want your monster to be pushed by players or other monsters(can be killed with that sometimes)
  • canpushitems - Put "1" if you want your monster to push other things like boxes, chests etc.
  • canpushcreatures - Put "1" if you want your monster to push other creatures(only creatures with pushable="1", else wont push)
Code:
Note, if you creature can be pushed(pushable="1") then canpushitems and canpushcreatures should be set to "0", since it would be weird if your creature can be pushed and at the same time can push others.
  • targetdistance - It's the range which creature keeps between him and target. So put "1" if you want your creature to fight in melee range(close to you) or put "4" if you want it to keep distance like a warlock.(of course you can put also "2" or "8" targetdistance, "1" and "4" are values used the most)
  • staticattack - This flag is responsible for monster 'dancing' around target, so if you put "100" monster wont move around it's target at all, if you put "1" it will be dancing around you like crazy. I suggest to use it between 85-95.
  • hidehealth - Put "1" if you want your monster healthbar and name to be invisible(you wont be able to target it - no red box around monster), the only monster using it are traps like - plaguethrower, flamethrower, shredderthrower etc.
  • lightcolor - Put "0" so monster wont emite any light at all, put from 1 - 255 so it will emit light of that color
  • lightlevel - This is responsible for lightlevel(works only if your lightcolor is greater than 0), correct values are 1-x(no idea how much exactly, for me 1 is enough)
  • runonhealth - This flag is responsible for monster running away - number is the amount of health, so if runonhealth="5" means that your creature will run when it's health is 5 or below, runonhealth="0" means that creature will fight until death
3.1 Paste this only if you want your creature to use creaturescripts:
Code:
<script>
     <event name="scriptName"/>
   </script>
There you can use creaturescripts made for certain monsters. You put this tag between flags and attacks.
 
Last edited:
4. After flags(or scripts*) paste this:
Code:
   <attacks>
     <attack name="melee" interval="2000" skill="42" attack="50" poison="500"/>
     <attack name="fire" interval="2000" chance="13" length="6" spread="0" min="-150" max="-340"><!-- this represents beam -->
       <attribute key="areaEffect" value="explosion"/>
     </attack>
     <attack name="earth" interval="2000" chance="7" length="8" spread="3" min="-40" max="-220"><!-- this represents wave -->
       <attribute key="areaEffect" value="carniphila"/>
     </attack>
     <attack name="physical" interval="2000" chance="9" radius="3" range="7" target="1" min="-25" max="-90"><!-- this represents ranged bomb attack -->
       <attribute key="areaEffect" value="purpleenergy"/>
       <attribute key="shootEffect" value="energy"/>
     </attack>
     <attack name="manadrain" interval="2000" chance="24" radius="4" target="0" min="-25" max="-90"><!-- this represents bomb attack on itself -->
       <attribute key="areaEffect" value="purpleenergy"/>
     </attack>
   </attacks>

Terms explantation:

  • attack name - There you can use various attacks like 'melee', it includes also spell names like:
Code:
<attack name="sudden death" interval="2000" chance="55" range="7" target="1" min="-5" max="-150"/>
<attack name="great energy beam" interval="2000" chance="11" min="-150" max="-220"/>
  • melee - It's the most popular attack, like the name says it's melee attack which uses this formula to calculate final damage:
Code:
  maxhit = skill*(attack*0,05)+(attack*0,5) or maxhit = skill*(attack/20)+(attack/2)

  So my monster with 42 skill and 50 attack will deal:

  42*(50*0,05)+(50*0,5) = 42*2.5+25 = 105+25 = 130dmg


  Of course if you don't want calculate anything you can simply put min="x" instead of skill="x" and max="x" instead of attack="x" values
  • poison - Makes target poisoned, formula is:
Code:
'desired damage(for example. 25hp/turn)*20 = 500' so poison="500"
  • fire - It's type of the elemental attack - here's the list of the attack types + condition types
Code:
These are types of elemental attacks:

  "physical"
  "energy"
  "earth"
  "fire"
  "lifedrain" or "life drain"
  "manadrain" or "mana drain"
  "healing"
  "drown"
  "ice"
  "holy"
  "death"

Code:
There you have types of condition attacks(remember - 'desired damage * 20 = value'):

  "physicalcondition" or "bleedcondition"
  "firecondition"
  "energycondition"
  "earthcondition" or "poisoncondition"
  "icecondition" or "freezecondition"
  "deathcondition" or "cursecondition"
  "holycondition" or "dazzlecondition"
  "drowncondition"

  *EXAMPLE*

   <attack name="energycondition" interval="2000" chance="50" length="3" spread="0" min="-500" max="-1000"><!-- means min. 25dmg and max. 50dmg per turn -->
     <attribute key="areaEffect" value="purpleenergy"/>
   </attack>
Code:
There you have types of fields:

   "firefield"
   "poisonfield"
   "energyfield"

   *EXAMPLE*

     <attack name="firefield" interval="2000" chance="14" radius="7" target="0"><!-- means firebomb on itself with 7 radius -->
       <attribute key="areaEffect" value="fireattack"/>
     </attack>
  • interval - It's how often the spell will be cast - 2000 = 2seconds
  • chance - It's the chance to cast the spell successfully
  • areaEffect - There you can add various areaEffects for the spell - here's the list
Code:
   "redspark"
   "bluebubble"
   "poff"
   "yellowspark"
   "explosionarea"
   "explosion"
   "firearea"
   "yellowbubble"
   "greenbubble"
   "blackspark"
   "teleport"
   "energy"
   "blueshimmer"
   "redshimmer"
   "greenshimmer"
   "fire"
   "greenspark"
   "mortarea"
   "greennote"
   "rednote"
   "poison"
   "yellownote"
   "purplenote"
   "bluenote"
   "whitenote"
   "bubbles"
   "dice"
   "giftwraps"
   "yellowfirework"
   "redfirework"
   "bluefirework"
   "stun"
   "sleep"
   "watercreature"
   "groundshaker"
   "hearts"
   "fireattack"
   "energyarea"
   "smallclouds"
   "holydamage"
   "bigclouds"
   "icearea"
   "icetornado"
   "iceattack"
   "stones"
   "smallplants"
   "carniphila"
   "purpleenergy"
   "yellowenergy"
   "holyarea"
   "bigplants"
   "cake"
   "giantice"
   "watersplash"
   "plantattack"
   "tutorialarrow"
   "tutorialsquare"
   "mirrorhorizontal"
   "mirrorvertical"
   "skullhorizontal"
   "skullvertical"
   "assassin"
   "stepshorizontal"
   "bloodysteps"
   "stepsvertical"
   "yalaharighost"
   "bats"
   "smoke"
   "insects"
   "dragonhead"
   "orcshaman"
   "orcshamanfire"
   "thunder"
   "ferumbras"
   "confettihorizontal"
   "confettivertical"
   "blacksmoke"
   "redsmoke"
   "yellowsmoke"
   "greensmoke"
   "purplesmoke"
  • shootEffect - There you can add various shootEffect for the spell - here's the list
Code:
   "spear"
   "bolt"
   "arrow"
   "fire"
   "energy"
   "poisonarrow"
   "burstarrow"
   "throwingstar"
   "throwingknife"
   "smallstone"
   "death"
   "largerock"
   "snowball"
   "powerbolt"
   "poison"
   "infernalbolt"
   "huntingspear"
   "enchantedspear"
   "redstar"
   "greenstar"
   "royalspear"
   "sniperarrow"
   "onyxarrow"
   "piercingbolt"
   "whirlwindsword"
   "whirlwindaxe"
   "whirlwindclub"
   "etherealspear"
   "ice"
   "earth"
   "holy"
   "suddendeath"
   "flasharrow"
   "flammingarrow"
   "shiverarrow"
   "energyball"
   "smallice"
   "smallholy"
   "smallearth"
   "eartharrow"
   "explosion"
   "cake"
   "tarsalarrow"
   "vortexbolt"
   "prismaticbolt"
   "crystallinearrow"
   "drillbolt"
   "envenomedarrow"
   "gloothspear"
   "simplearrow"
  • length - How long the beam/wave is - remember to set always spread="0" if there is no spread it still will be cast as wave(so length="x" spread="0")
Code:
                         EXAMPLE
     <attack name="earth" interval="2000" chance="11" length="4" spread="0" min="-40" max="-1500">
       <attribute key="areaEffect" value="smallplants"/>
     </attack>
  • spread - How big spread is - correct values are from 1 to 3
Code:
                         EXAMPLE
     <attack name="holy" interval="2000" chance="14" length="8" spread="3" min="-220" max="-450">
       <attribute key="areaEffect" value="holyarea"/>
     </attack>
  • radius - This is responsible for the size of area(radius wont work with spread and length - if there's already length and/or spread do not add radius).
Code:
Sizes various from 1 - 9(I think).
Code:
                         EXAMPLE
     <attack name="speed" interval="2000" chance="9" radius="8" target="0" speedchange="-440" duration="7000">
       <attribute key="areaEffect" value="redshimmer"/>
     </attack>

  As you can see I've done here paralyze spell, where it changes victims speed by '-440' = '-44%' of total speed for 7 seconds

  #tip - number can't be lower than '-1000'(ex. '-1426') since you cannot slow down something for more than 100%. Even if you put -2000 it will be changed automatically to -1000.
  #tip2 - you can have positive values in speedchange, but instead it will give haste to the victim not paralyze. There you can put any positive value you want - speedchange="5200" means your victim speed will be 520% higher.
  • target - Correct values are 'target="0" - spell cast on monster itself' and 'target="1" - spell cast on target'
  • range - Means how far your monster can shoot a ranged spell(works only if target is set to "1")
 
Last edited:
5. After attacks paste this:

Code:
   <defenses armor="25" defense="52">
     <defense name="healing" interval="2000" chance="17" min="30" max="50">
       <attribute key="areaEffect" value="blueshimmer"/>
     </defense>
     <defense name="speed" interval="2000" chance="10" speedchange="336" duration="2000">
       <attribute key="areaEffect" value="redshimmer"/>
     </defense>
     <defense name="invisible" interval="2000" chance="10" duration="2000">
       <attribute key="areaEffect" value="redshimmer"/>
     </defense>
   </defenses>

Terms explantation:

  • armor - Basically there you can put values which will reduce incoming physical damage to your monster, thats the formula:
Code:
minArmorReduction = (armorValue * 0.475)
maxArmorReduction = (((armorValue * 0.475) - 1) + minArmorReduction)

So with 25 armor you can reduce:

     MIN.(25 * 0.475) = 11.875 ~= 12 dmg,
     MAX.((25 * 0.475) - 1) + 11.875) = 22.75 ~= 23 dmg
  • defense - There you will also reduce incoming physical damage, thats the formula:
Code:
minDefense = maxDefense / 2

So with 52 defense you can reduce:

     MIN. 52 / 2 = 26 dmg,
     MAX. 52 dmg
     
That means with 25 armor and 52 defense your monster can reduce up to 75 physical damage.
  • defense name - There you can use various defenses, read below
  • healing - This one is responsible for creatures self(not always)healing***
Code:
min - min. healing in this case 30
  max - max. healing in this case 50
  interval - 2000 = 2seconds, 5000 = 5s etc.
My script represents self-healing with min. value 30 and max. value 50 with 17% chances to happen every 2 seconds

*** There's script for not only self-healing - everyoneInArea-Healing xD
Code:
<defense name="healing" interval="2000" chance="17" radius="5" min="30" max="50">
  <attribute key="areaEffect" value="blueshimmer"/>
  </defense>
So basically I added there 'radius' to the spell. What is radius?
  • radius - This is responsible for the size of area.
Code:
Sizes varies from 1 - 9(I think).

  • speed - This is speed modifier
  • speedchange - There you can put any value you want, starting from monsterBaseSpeed+numbers, so if monsterBaseSpeed is 200 then put more than 200 in order to have results
  • duration - How long it lasts
  • invisible - Nothing to explain here since you know what invisible is :D
  • duration - How long it lasts

6. After defenses paste this:

Code:
<elements>
  <element holyPercent="-10"/>
  <element deathPercent="-10"/>
  <element icePercent="-10"/>
  <element firePercent="10"/>
  <element earthPercent="10"/> or poisonPercent="-10"
  <element drownPercent="10"/>
  <element energyPercent="-10"/>
  <element physicalPercent="-10"/>
  <element lifedrainPercent="10"/>
  </elements>

So basically there you can put resistance or weakness to certain elements to your monster
  • minus values - Means that your monster will be weak to certain element. You can put there any value you want, starting from -1.
  • positive values - Means that your monster will be resistant to certain element. You can put there values starting from 1 ending on 99(100 would mean full immunity and there's different category for that 'read below').
You may ask why not put here 100% resistance. Well if you put here 100% resistance to for example fire, you monster yes will be immune to fire but it will also WALK AROUND FIRE FIELDS, not onto them as it's supposed to be and you don't want that to happen.
 
7. After elements paste this:

Code:
<immunities>
  <immunity physical="1"/>
  <immunity death="1"/>
  <immunity holy="1"/>
  <immunity ice="1"/>
  <immunity energy="1"/>
  <immunity fire="1"/>
  <immunity earth="1"/>
  <immunity drown="1"/>
  <immunity lifedrain="1"/>
  <immunity paralyze="1"/>
  <immunity drunk="1"/>
  <immunity invisible="1"/>
  <immunity outfit="1"/>
  </immunities>

Not much to explain here. There you put various immunities to your monster, like physical stands for physical-type attacks etc.
If you want your monster to be not immune to certain attack-type just set immunity to "0" example:
Code:
<immunity invisible="0"/>

8*. After immunities paste this(only if you want to have summons):

Code:
<summons maxSummons="10">
  <summon name="rat" interval="2000" chance="10" max="6"/>
  <summon name="cave rat" interval="2000" chance="10" max="4"/>
  </summons>

Terms explantation:

  • maxSummons - Means how many summons can your monster have in total
  • summon name - There you put name of the monster you want to be summoned by your creature
  • interval and chance - How often your monster will spawn it's summons and with which chance:
Code:
interval="2000" chance="10" means that your monster has 10% chance to spawn summon each 2 seconds
  • max - It means how much of each kind of summons it can have at max. In the code above you can have max. 6 rats spawned and 4 cave rats.

9. Paste this after summons(if your monster have any) or immunities:

Code:
<voices interval="2000" chance="5">
  <voice sentence="Here's yelling with small letters." yell="1"/>
  <voice sentence="HERE'S YELLING WITH BIG LETTERS." yell="1"/>
  <voice sentence="Here's speaking with small letters."/>
  <voice sentence="HERE'S SPEAKING WITH BIG LETTERS."/>
  </voices>

Terms explantation:

  • voices interval - Means how often it will be executed:
Code:
1000 - 1 second
2000 - 2 seconds
15000 - 15 seconds
etc.

  • chance - Means whats the chance to be executed
Code:
So <voices interval="2000" chance="5"> means that your monster have 5% chance to execute random voice sentence every 2 seconds
  • voice sentence - There you put any message you want to be spoke by your monster
  • yell - It means yelling, so it can be heard in greater distance(including different floors) than normal message
10. Paste this after voices:

Code:
<loot>
   <item id="2148" countmax="5" chance="100000"/><!-- gold coin -->
   <item id="2006" subtype="4" chance="100000"/><!-- vial of slime -->
   <item id="2088" actionId="4432" chance="100000"/><!-- silver key with 4432 number -->
   <item id="2553" uniqueId="12376" chance="100000"/><!-- pick with 12376 uniqueId -->
   <item id="1950" text="Now you know how to make a book with text in monster loot" chance="100000"/><!-- book with text -->
</loot>

Terms explantation:

  • item id - There you put itemid of item you want to being dropped by creature
  • countmax - There you put maximum value of dropped items(only stackable items) it varies from 1 to whatever you want
  • chance - There you put chance for item to being dropped - little explantation of the numbers below:
Code:
chance="1" - 0.001%
chance="10" - 0.01%
chance="100" - 0.1%
chance="1000" - 1%
chance="10000" - 10%
chance="100000" - 100%
chance="5423" - 5.432%
chance="75826" - 75.826%

  • subtype - It stands for fluid type in any fluid container - possible fluid subtypes:

Code:
* 1 - 'water'
* 2 - 'blood'
* 3 - 'beer'
* 4 - 'slime'
* 5 - 'lemonade'
* 6 - 'milk'
* 7 - 'manafluid'
* 10 - 'lifefluid'
* 11 - 'oil'
* 13 - 'urine'
* 14 - 'coconut milk'
* 15 - 'wine'
* 19 - 'mud'
* 21 - 'fruit juice'
* 26 - 'lava'
* 27 - 'rum'
* 28 - 'swamp'
* 35 - 'tea'
* 43 - 'mead'

All of the other subtypes like 8, 9, 12 etc. are unknown types, so even if you put them, they will be ex. 'vial of unknown'.


  • actionId - There you add actionId to a certain item when dropped.
  • uniqueId - There you add uniqueId to a certain item when dropped.
  • text - There you can add text to all writeable items.
Now save your monster and paste this code to monsters.xml file:
Code:
<monster file="monsterName.xml" name="monsterName"/>

Save it and voilà, you can test your newly made monster, congratulations.
I hope everything is readable and understandable. Sorry for my poor english.
 
Last edited:
Pretty good tutorial. Even I learned a couple new things. Is chancemax still a thing for loot? I haven't made a monster in years but I think it used to be an attribute.
 
Pretty good tutorial. Even I learned a couple new things. Is chancemax still a thing for loot? I haven't made a monster in years but I think it used to be an attribute.
I don't think chancemax is working now, I got used to chance only anyways.
 
Something worth testing for the 70% attack, and 30% def tactics.. what if you removed 'interval' from the attacks and defenses?
Would it then find 1 of the listed attacks 70% of the time, and use it, every 2 seconds by default? or would it simply error? :oops:
 
About attacks and defenses, interval would change from 2s to 1s(it's lowest possible interval), but the tactics seems to be bugged or I really don't know how they work. :p
I'm gonna test your theory to be 100% sure it don't work that way. Thanks for tip.

#edit:
Yeh it works like I said, interval changes to 1s + I've seen that original TFS repository has deleted all of the strategy attack/defense lines in every monster.
 
Last edited:
Really nice, but i just always change the monsters i dont use :p

But if you dont know all the effects, like me this is very helpfull.
 
Last edited:
subtype - It stands for fluid type in any fluid container

Code:
22:22 You see a brown flask of beer.
It weighs 2.50 oz.

<3 thx
 
Last edited:
When i attack enemy with fire elemental, suddenly it's wave that hits enemy hit me too... i need fire elemental dmg only attack the enemy and not dmg on me too
***All i need that fire elemental hit enemy only "Not me and him"****

Sorry for my english
 
Back
Top