• 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

johnsamir

Active Member
Joined
Oct 13, 2009
Messages
231
Solutions
1
Reaction score
35
Location
Nowhere
@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> -->
 
OP
OP
soul4soul

soul4soul

Intermediate OT User
Joined
Aug 13, 2007
Messages
1,840
Solutions
3
Reaction score
102
Location
USA
@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.
 

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
964
Solutions
23
Reaction score
494
Location
Santiago - Chile
@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:

Evil Puncker

I know nothing
TFS Developer
Joined
May 30, 2009
Messages
8,103
Solutions
218
Reaction score
4,018
indeed great tool, I've reported a few issues/suggestions, this tool rocks
 
OP
OP
soul4soul

soul4soul

Intermediate OT User
Joined
Aug 13, 2007
Messages
1,840
Solutions
3
Reaction score
102
Location
USA
@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.
 
OP
OP
soul4soul

soul4soul

Intermediate OT User
Joined
Aug 13, 2007
Messages
1,840
Solutions
3
Reaction score
102
Location
USA
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.
 
OP
OP
soul4soul

soul4soul

Intermediate OT User
Joined
Aug 13, 2007
Messages
1,840
Solutions
3
Reaction score
102
Location
USA
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
 
Top