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

OpenTibia OT Monster Converter

@soul4soul There's a little detail on monster loot outcome in TFS XML output. The program set item id="nameoftheitem" and should be item name="nameoftheitem". Just wanted to notify this (is not hard to do the replacement with text editor), thanks for the share because it works very good! :)
simply use grep-win and replace" itemide "for "name"it will work in all your files. i use that tool to convert scripts c++ codes and so on you will love it. example i need to remove a declaration inside monsters.xml files from othire that was <"inside>".
To use them into tfs 1.3, this engine did it for me, in all the files ( almost 200 ) i use t to change outfits ids into npcs and many many things more
Lua:
    <!-- <inside> -->
                <item id="2050" chance="5000"/><!-- 5% torch -->
                <item id="2379" chance="80000"/><!-- 80% dagger -->
                <item id="2385" chance="23000"/><!-- 23% sabre -->
                <item id="2526" chance="5000"/><!-- 5% studded shield -->
            <!-- </inside> -->
 
@soul4soul There's a little detail on monster loot outcome in TFS XML output. The program set item id="nameoftheitem" and should be item name="nameoftheitem". Just wanted to notify this (is not hard to do the replacement with text editor), thanks for the share because it works very good! :)
Thank you for the report. I fixed the issue for the next release. If you can build from source it's available now.
 
@soul4soul there's another detail to report. Don't know if this could be fixed on code, but, TibiaWiki values of gold are from 0 to 200+. For example, a metal gargoyle can loot:

Code:
<item name="gold coin" chance="100000" countmax="233" />

This will send the message invalid "countmax" used for loot because the max allowed value is 100. For sure you can configure the exact ammount manually (I just set the gold ammount from repository files, maybe is a good idea to don't include gold coins/other currency as loot outcome), but, I thought it was a good decision to report :)

I also saw that the loot is repeating, its chances, sometimes. Like this:
Code:
    <loot>
        <item id="gold coin" chance="98774" countmax="195" />
        <item id="platinum coin" chance="39693" countmax="2" />
        <item id="metal jaw" chance="14943" />
        <item id="strong mana potion" chance="8582" countmax="2" />
        <item id="strong health potion" chance="7203" countmax="2" />
        <item id="metal spats" chance="2989" />
        <item id="bronze gear wheel" chance="2759" />
        <item id="slightly rusted armor" chance="2682" />
        <item id="shiny stone" chance="1073" />
        <item id="underworld rod" chance="1073" />
        <item id="alloy legs" chance="996" />
        <item id="metal bat" chance="920" />
        <item id="iron ore" chance="536" />
        <item id="life ring" chance="383" />
        <item id="energy ring" chance="307" />
        <item id="gold coin" chance="100000" countmax="200" />
        <item id="platinum coin" chance="100000" countmax="2" />
        <item id="metal jaw" chance="100000" />
        <item id="strong health potion" chance="100000" countmax="2" />
        <item id="strong mana potion" chance="100000" countmax="2" />
        <item id="metal spats" chance="41609" />
        <item id="slightly rusted armor" chance="37165" />
        <item id="bronze gear wheel" chance="35479" />
        <item id="shiny stone" chance="19387" />
        <item id="alloy legs" chance="14253" />
        <item id="metal bat" chance="13180" />
        <item id="underworld rod" chance="11877" />
        <item id="life ring" chance="7203" />
        <item id="iron ore" chance="7126" />
        <item id="energy ring" chance="6897" />
        <item id="gold coin" chance="100000" countmax="233" />
        <item id="metal jaw" chance="32337" />
        <item id="strong mana potion" chance="18161" />
        <item id="strong health potion" chance="15326" />
        <item id="metal spats" chance="6743" />
        <item id="shiny stone" chance="2375" />
        <item id="underworld rod" chance="2375" />
        <item id="alloy legs" chance="1456" />
        <item id="metal bat" chance="1073" />
        <item id="life ring" chance="920" />
        <item id="iron ore" chance="843" />
        <item id="energy ring" chance="690" />
    </loot>
You can see how the metal jaws, strong potions, and others are repeated with different chances

Excellent tool by the way, there's lots of loots that are different from main repositories, i'm starting to check them one by one. Regards!
 
Last edited:
@soul4soul there's another detail to report. Don't know if this could be fixed on code, but, TibiaWiki values of gold are from 0 to 200+. For example, a metal gargoyle can loot:

Code:
<item name="gold coin" chance="100000" countmax="233" />

This will send the message invalid "countmax" used for loot because the max allowed value is 100. For sure you can configure the exact ammount manually (I just set the gold ammount from repository files, maybe is a good idea to don't include gold coins/other currency as loot outcome), but, I thought it was a good decision to report :)

I also saw that the loot is repeating, its chances, sometimes. Like this:
Code:
    <loot>
        <item id="gold coin" chance="98774" countmax="195" />
        <item id="platinum coin" chance="39693" countmax="2" />
        <item id="metal jaw" chance="14943" />
        <item id="strong mana potion" chance="8582" countmax="2" />
        <item id="strong health potion" chance="7203" countmax="2" />
        <item id="metal spats" chance="2989" />
        <item id="bronze gear wheel" chance="2759" />
        <item id="slightly rusted armor" chance="2682" />
        <item id="shiny stone" chance="1073" />
        <item id="underworld rod" chance="1073" />
        <item id="alloy legs" chance="996" />
        <item id="metal bat" chance="920" />
        <item id="iron ore" chance="536" />
        <item id="life ring" chance="383" />
        <item id="energy ring" chance="307" />
        <item id="gold coin" chance="100000" countmax="200" />
        <item id="platinum coin" chance="100000" countmax="2" />
        <item id="metal jaw" chance="100000" />
        <item id="strong health potion" chance="100000" countmax="2" />
        <item id="strong mana potion" chance="100000" countmax="2" />
        <item id="metal spats" chance="41609" />
        <item id="slightly rusted armor" chance="37165" />
        <item id="bronze gear wheel" chance="35479" />
        <item id="shiny stone" chance="19387" />
        <item id="alloy legs" chance="14253" />
        <item id="metal bat" chance="13180" />
        <item id="underworld rod" chance="11877" />
        <item id="life ring" chance="7203" />
        <item id="iron ore" chance="7126" />
        <item id="energy ring" chance="6897" />
        <item id="gold coin" chance="100000" countmax="233" />
        <item id="metal jaw" chance="32337" />
        <item id="strong mana potion" chance="18161" />
        <item id="strong health potion" chance="15326" />
        <item id="metal spats" chance="6743" />
        <item id="shiny stone" chance="2375" />
        <item id="underworld rod" chance="2375" />
        <item id="alloy legs" chance="1456" />
        <item id="metal bat" chance="1073" />
        <item id="life ring" chance="920" />
        <item id="iron ore" chance="843" />
        <item id="energy ring" chance="690" />
    </loot>
You can see how the metal jaws, strong potions, and others are repeated with different chances

Excellent tool by the way, there's lots of loots that are different from main repositories, i'm starting to check them one by one. Regards!
Thanks for the report, I was hoping this PR Make monster loot count accept count higher than 100 by EPuncker · Pull Request #2875 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/2875) gets merged into TFS. Since it doesn't look like that will happen anytime soon I will update the converter to split up counts over 100.

indeed great tool, I've reported a few issues/suggestions, this tool rocks
Thanks for taking the time to submit issues and even a pull request!! I should be able to address them soon.
 
I know, I don't agree with that PR for reasons I mentioned in the PR and TFS dev agreed with my comment, not that it's a contest of them agreeing but pointing out the preference to merge #2875 so that's what I'm waiting on.

I started to update my tool but figured out fixing the problem in TFS will have more impact, I should reopen #2875 instead.
 
Updated to v4.0.0

All issues reported in this thread and on the github repo since v3.0.0 have been fixed.

Change Log
  • Support for converting between server and client item ids
  • Major updates to TibiaWiki Converter
    • Fetch item ids, missile ids, and effect ids from the website
    • New template serializer which made outputting TibiaWiki format a breeze
    • Major improvements to getting loot list and preventing duplicate loot list entries
    • Add hard coded look type data
    • Improved and fixed logic converting from TW scene data to TFS attack attributes
  • TFS XML Updates
    • Various issues and typos fixed
    • Updated support for new elements and attributes
  • Various minor fixes
  • Special thanks to @EPuncker and @ramon-bernardo for submitting pull requests
 
any news? certain monster are having problem to being converted from cip to revscripts instead of set attack as poisonfield fire or energy field y name the variable condition and the startdamage is set up to 0
Updated to v4.0.0

All issues reported in this thread and on the github repo since v3.0.0 have been fixed.

Change Log
  • Support for converting between server and client item ids
  • Major updates to TibiaWiki Converter
    • Fetch item ids, missile ids, and effect ids from the website
    • New template serializer which made outputting TibiaWiki format a breeze
    • Major improvements to getting loot list and preventing duplicate loot list entries
    • Add hard coded look type data
    • Improved and fixed logic converting from TW scene data to TFS attack attributes
  • TFS XML Updates
    • Various issues and typos fixed
    • Updated support for new elements and attributes
  • Various minor fixes
  • Special thanks to @EPuncker and @ramon-bernardo for submitting pull requests
 
any news? certain monster are having problem to being converted from cip to revscripts instead of set attack as poisonfield fire or energy field y name the variable condition and the startdamage is set up to 0
No news, but I can look into fixing that issue. No one reported it so I wasn't aware there was an issue.
 
No news, but I can look into fixing that issue. No one reported it so I wasn't aware there was an issue.
yes there are few issues let me post image, this occurs with the up to date exe I've compiled it like 4 days ago download it from github
there are always 16 monster with warnings from source estatus example apocalypse and assassin bat and blue djiin (there are more
also few problem at destination estatus
in destination estatus is related to invisible looktype ( non assigned looktype) example flametower
and from source ids is almost always something related to handle attack drunken convert strenght ability

this occurs convertin cipsoft monsters to rev script ( using clean items.otb) and setting it to convert to serverid.

PS: Thanks for you release im amused
 
No news, but I can look into fixing that issue. No one reported it so I wasn't aware there was an issue.
coul you point me out where should i look? poison, energy fire field conditions are not being converted properly and getstart damge is set to 0
example of ancientscarab converted from cipmon to revscript
Lua:
{name ="condition", interval = 2000, chance = 17, type = CONDITION_POISON, startDamage = 0, tick = 4000, minDamage = -400, maxDamage = -500, radius = 5, target = false, effect = CONST_ME_POISONAREA},
    {name ="condition", interval = 2000, chance = 17, type = CONDITION_POISON, startDamage = 0, tick = 4000, minDamage = -400, maxDamage = -500, radius = 5, target = false, effect = CONST_ME_POISONAREA},
at the momment i have to manually configure them there are like 16 files with this problem
and thrower monster looktype is not being set
i
Code:
monster.outfit = {
}
should be
Code:
monster.outfit = {
    lookTypeEx = 1560
}
 
Last edited:
it seems to not be getting monsters resistances from wiki somehow?

Acid Blob for example, actually almost every monster, maybe they changed something related to it
 
it seems to not be getting monsters resistances from wiki somehow?

Acid Blob for example, actually almost every monster, maybe they changed something related to it
something must be wrong at least i didn't converted from wiki i did from cipsoft files
and
Lua:
startDamage = 0,
is not being converted properly, do you know where should i look ? there are 17 files with startDamage = 0,
from source status there are problems on few files converting strenght ability on change offensive distance
and in how to handle drunkess strenght
and ofcourse in destination estatus does not support outfitlook 1560 i had to add them manually too
 
something must be wrong at least i didn't converted from wiki i did from cipsoft files
and
Lua:
startDamage = 0,
is not being converted properly, do you know where should i look ? there are 17 files with startDamage = 0,
from source status there are problems on few files converting strenght ability on change offensive distance
and in how to handle drunkess strenght
and ofcourse in destination estatus does not support outfitlook 1560 i had to add them manually too

no idea, I never used Lua monsters myself because they aren't 100% tested yet, so I prefer to stay with xml (only when it comes to monsters)
 
no idea, I never used Lua monsters myself because they aren't 100% tested yet, so I prefer to stay with xml (only when it comes to monsters)
you are tight i have converted all monster to xml with no problem i have even added strategies in there, destination status says that random target strategy is supported only but converted the code properly properly and i don't have problem with outfits or conditions , im going re-search
Lua:
<?xml version="1.0" encoding="utf-8"?>
<monster name="amazon" nameDescription="an amazon" experience="60" speed="166" manacost="390">
    <health now="110" max="110" />
    <look type="137" head="113" body="120" legs="95" feet="115" addons="0" mount="0" corpse="3065" />
    <targetchange interval="2000" chance="50" />
    <targetstrategy nearest="100" weakest="0" mostdamage="0" random="0" />
    <flags>
        <flag attackable="1" />
        <flag hostile="1" />
        <flag summonable="1" />
        <flag convinceable="1" />
        <flag illusionable="1" />
        <flag isboss="0" />
        <flag ignorespawnblock="0" />
        <flag pushable="0" />
        <flag canpushitems="1" />
        <flag canpushcreatures="0" />
        <flag staticattack="90" />
        <flag targetdistance="4" />
        <flag healthhidden="0" />
        <flag canwalkonenergy="0" />
        <flag canwalkonfire="0" />
        <flag canwalkonpoison="0" />
    </flags>
    <immunities>
        <immunity paralyze="0" />
        <immunity outfit="0" />
        <immunity invisible="0" />
        <immunity drunk="1" />
        <immunity bleed="0" />
    </immunities>
    <elements>
        <element physicalPercent="0" />
        <element energyPercent="0" />
        <element earthPercent="0" />
        <element firePercent="0" />
        <element lifedrainPercent="0" />
        <element manadrainPercent="0" />
        <element drownPercent="0" />
        <element icePercent="0" />
        <element holyPercent="0" />
        <element deathPercent="0" />
    </elements>
    <attacks>
        <attack name="melee" interval="2000" chance="100" skill="24" attack="16" />
        <attack name="physical" interval="2000" chance="10" min="-20" max="-30" range="7">
            <attribute key="shootEffect" value="throwingknife" />
        </attack>
    </attacks>
    <defenses armor="11" defense="11" />
    <voices interval="5000" chance="10">
        <voice sentence="Yeeee ha!" yell="false" />
        <voice sentence="Your head will be mine!" yell="false" />
    </voices>
    <loot>
        <item id="2691" chance="30000" />
        <item id="2125" chance="200" />
        <item id="2379" chance="80000" />
        <item id="2148" chance="40000" countmax="10" />
        <item id="2467" chance="50000" />
        <item id="2385" chance="23000" />
        <item id="2229" chance="80000" countmax="2" />
        <item id="2147" chance="100" />
        <item id="2526" chance="5000" />
        <item id="2050" chance="5000" />
    </loot>
</monster>
 
yes there are few issues let me post image, this occurs with the up to date exe I've compiled it like 4 days ago download it from github
there are always 16 monster with warnings from source estatus example apocalypse and assassin bat and blue djiin (there are more
also few problem at destination estatus
in destination estatus is related to invisible looktype ( non assigned looktype) example flametower
and from source ids is almost always something related to handle attack drunken convert strenght ability

this occurs convertin cipsoft monsters to rev script ( using clean items.otb) and setting it to convert to serverid.

PS: Thanks for you release im amused
You mentioned a few issues
1. Invisible looktype, as far as I can tell the cip mon files don't include any looktype data for those monsters such as flametower so I have no way to set a looktype. This isn't really fixable but I would be willing to hardcode the data into the converter since it's a limited fixed set of monsters that is unlikely to ever change.
2. For condition spells, cip monster format doesn't include a startDamage, but I think I can fix this issue startDamage is optional and doesn't have to be set for TFS monsters.
3. strength, TFS doesn't have support for configuring strength directly in revscriptsys/xml format. You have to use a script which is more work then I'm will to put in for the converter.
4. Drunken attacks, this can be improved but the formula needs to be figured out for converting from cipbia frunkness to TFS drunkeness. cip values range from 3 to 7 but what do those mean? is a higher number more drunk or a lower number? TFS ranges from 0 to 100? again what do those numbers mean is 100 the most drunk?


it seems to not be getting monsters resistances from wiki somehow?

Acid Blob for example, actually almost every monster, maybe they changed something related to it
That is from wiki->xml format. yeah we don't seem to be pulling the resistances anymore. This is an issue I can fix.
 
Last edited:
You mentioned a few issues
1. Invisible looktype, as far as I can tell the cip mon files don't include any looktype data for those monsters such as flametower so I have no way to set a looktype. This isn't really fixable but I would be willing to hardcode the data into the converter since it's a limited fixed set of monsters that is unlikely to every change.
2. For condition spells, cip monster format doesn't include a startDamage, but I think I can fix this issue startDamage is optional and doesn't have to be set for TFS monsters.
3. strength, TFS doesn't have support for configuring strength directly in revscriptsys/xml format. You have to use a script which is more work then I'm will to put in for the converter.
4. Drunken attacks, this can be improved but the formula needs to be figured out for converting from cipbia frunkness to TFS drunkeness. cip values range from 3 to 7 but what do those mean? is a higher number more drunk or a lower number? TFS ranges from 0 to 100? again what do those numbers mean is 100 the most drunk?



That is from wiki->xml format. yeah we don't seem to be pulling the resistances anymore. This is an issue I can fix.

would be great to get those improvements that you describe in points 1,2,3
for point 3 start damage does not at affect at all if it's set to 0 but would be cool to convert it to the real values.
I'll be waiting then and let me know if i can help with something,.
Thank you very much man, is there a way i could hel you with step 4?
 
@kay Would you be willing and able to clarify cipbia .mon format drunken attack for us. What does the drunken attack strength parameter mean? Drunken (int strength, int effect, int duration) And bonus share if there is some special way to determine the item looktype of invisible monsters.

Code:
9 results - 9 files
assassin.mon:
  35:                  Victim (6, 15, 21) -> Drunken (3, 0, 3) : 11}
bazir.mon:
  46:                  Victim (7, 5, 11) -> Drunken (7, 0, 60) : 15,
bluedjinn.mon:
  41:                  Victim (7, 5, 11) -> Drunken (6, 0, 30) : 5,
dworcvoodoomaster.mon:
  35:                  Victim (7, 5, 11) -> Drunken (3, 0, 6) : 11,
efreet.mon:
  42:                  Victim (7, 5, 11) -> Drunken (6, 0, 60) : 5,
greendjinn.mon:
  41:                  Victim (7, 5, 11) -> Drunken (6, 0, 30) : 5,
marid.mon:
  42:                  Victim (7, 5, 11) -> Drunken (6, 0, 60) : 5,
pharaohdipthrah.mon:
  42:                  Origin (3, 2) -> Drunken (6, 0, 60) : 9,
pharaohrahemos.mon:
  45:                  Victim (7, 5, 11) -> Drunken (3, 0, 50) : 13,
 
Last edited:
Back
Top