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

Black Tek Server Pre-Release

Hi,

is there a specific reason why slot attributes are duplicated in items.xml?
XML:
    <item id="2472" article="a" name="magic plate armor">
        <attribute key="weight" value="8500" />
        <attribute key="armor" value="17" />
        <attribute key="slotType" value="body" />
        <attribute key="imbuementslots" value="2" />
        <attribute key="imbuementslots" value="2" />
    </item>

And would it be possible to generate slots lets say with tiers? Example: magic plate armor can have 2-4 slots when looting.
Lua:
    [2472] = {    -- magic plate armor
        min = 2,
        max = 4,
        slots_in_percent_chance = {
            { slots = 2, chance = 50 },
            { slots = 3, chance = 40 },
            { slots = 4, chance = 10 },
        }
    }[
[QUOTE="llouche, post: 2753968, member: 259013"]
Hi,

is there a specific reason why slot attributes are duplicated in items.xml?
[CODE=xml]    <item id="2472" article="a" name="magic plate armor">
        <attribute key="weight" value="8500" />
        <attribute key="armor" value="17" />
        <attribute key="slotType" value="body" />
        <attribute key="imbuementslots" value="2" />
        <attribute key="imbuementslots" value="2" />
    </item>

And would it be possible to generate slots lets say with tiers? Example: magic plate armor can have 2-4 slots when looting.
Lua:
    [2472] = {    -- magic plate armor
        min = 2,
        max = 4,
        slots_in_percent_chance = {
            { slots = 2, chance = 50 },
            { slots = 3, chance = 40 },
            { slots = 4, chance = 10 },
        }
    }
The dublicated attributes in items.xml is my fault. I’ll fix this soon 😊
 
Last edited:
Hi,

is there a specific reason why slot attributes are duplicated in items.xml?
XML:
    <item id="2472" article="a" name="magic plate armor">
        <attribute key="weight" value="8500" />
        <attribute key="armor" value="17" />
        <attribute key="slotType" value="body" />
        <attribute key="imbuementslots" value="2" />
        <attribute key="imbuementslots" value="2" />
    </item>

And would it be possible to generate slots lets say with tiers? Example: magic plate armor can have 2-4 slots when looting.
Lua:
    [2472] = {    -- magic plate armor
        min = 2,
        max = 4,
        slots_in_percent_chance = {
            { slots = 2, chance = 50 },
            { slots = 3, chance = 40 },
            { slots = 4, chance = 10 },
        }
    }

That key being there twice was an accident I assure you. There was a python script ran to add the same amount of slots to items as real tibia has, and that one was probably overlooked as being one that has it already because they were testing it.


As far as making the amount of slots depend on the classification or tier, that is absolutely possible.
Imbuements has a whole lua api available at your disposal that would allow you to make such things.

To add an imbuement slot to an item via lua, you just call "item:addImbuementSlot(#numberOfSlots)" and voila. You can decide what logic determines how many and if it gets imbuement slots. The xml part is a bonus, everything is completely controllable in lua
 
Back
Top