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

[TFS 0.4][8.6] Weapons with req lvl for vocation

jeffaklumpen

Member
Joined
Jan 20, 2022
Messages
76
Solutions
2
Reaction score
15
GitHub
jeffaklumpen
I'm really scratchin my head over this... I know how to create new weapons and set a required level and vocation. I've done it with a couple of weapons and everything worked fine. This time however it just won't work no matter what I try.

1. I've created a new item in item editor and set the exact same parameters as other weapons.

2. I've added this code with matchin ID and everything in Items.xml

Lua:
    <item id="12677" article="a" name="Axe of Highland">
        <attribute key="description" value="A axe fit for a mighty warrior."/>
        <attribute key="weight" value="4200"/>
        <attribute key="defense" value="40"/>
        <attribute key="attack" value="56"/>
        <attribute key="weaponType" value="axe"/>
        <attribute key="extradef" value="3"/>
        <attribute key="attackspeed" value="1000"/>
    </item>
    
    <item id="12676" article="a" name="Club of Highland">
        <attribute key="description" value="A club fit for a mighty warrior."/>
        <attribute key="weight" value="4200"/>
        <attribute key="defense" value="40"/>
        <attribute key="attack" value="56"/>
        <attribute key="weaponType" value="club"/>
        <attribute key="extradef" value="3"/>
        <attribute key="attackspeed" value="1000"/>
    </item>

3. I've added the following code with matching IDs in Weapons.xml

Code:
    <melee id="12677" level="150" unproperly="1" event="function" value="default"> <!-- Axe of Highland -->
        <vocation id="4"/>
        <vocation id="8" showInDescription="0"/>
    </melee>   
    
    <melee id="12676" level="150" unproperly="1" event="function" value="default"> <!-- Club of Highland -->
        <vocation id="4"/>
        <vocation id="8" showInDescription="0"/>
    </melee>

But when I examine the item in game I see this for both the axe and club:

Namnlös.png

The weird thing is that I added the sword a while ago with the exact same parameters and it works fine. I've checked the code to see if the IDs are used for something else but nope, there's only the axe and club.

How in the name of Zathroth is this possible!?
 
Solution
Is there a way to increase the maximum item ID limit?
Post automatically merged:

The issue seems to be with all items above ID 12660. If I for example put an item with higher ID in a shop I can view in in the shop window but I can't buy it. All items below 12660 works fine.

I have no idea how to solve it though :/
I still recommend replacing useless items with the items you want to use. 🤷‍♀️
I'm not well versed in adding new items, but I remember something about high numbers or a certain number range doing wacky things?

Maybe try replacing some useless trash items at a lower number instead of adding new items to the end of the list?
 
I'm not well versed in adding new items, but I remember something about high numbers or a certain number range doing wacky things?

Maybe try replacing some useless trash items at a lower number instead of adding new items to the end of the list?
Hmm that sounds weird, can't find anything on it when searching. I've only added like 10 new items. Feels like it would be a more common problem :/
 
Is there a way to increase the maximum item ID limit?
Post automatically merged:

The issue seems to be with all items above ID 12660. If I for example put an item with higher ID in a shop I can view in in the shop window but I can't buy it. All items below 12660 works fine.

I have no idea how to solve it though :/
 
Last edited:
Is there a way to increase the maximum item ID limit?
Post automatically merged:

The issue seems to be with all items above ID 12660. If I for example put an item with higher ID in a shop I can view in in the shop window but I can't buy it. All items below 12660 works fine.

I have no idea how to solve it though :/
I still recommend replacing useless items with the items you want to use. 🤷‍♀️
 
Solution
I'm really scratchin my head over this... I know how to create new weapons and set a required level and vocation. I've done it with a couple of weapons and everything worked fine. This time however it just won't work no matter what I try.

1. I've created a new item in item editor and set the exact same parameters as other weapons.

2. I've added this code with matchin ID and everything in Items.xml

Lua:
    <item id="12677" article="a" name="Axe of Highland">
        <attribute key="description" value="A axe fit for a mighty warrior."/>
        <attribute key="weight" value="4200"/>
        <attribute key="defense" value="40"/>
        <attribute key="attack" value="56"/>
        <attribute key="weaponType" value="axe"/>
        <attribute key="extradef" value="3"/>
        <attribute key="attackspeed" value="1000"/>
    </item>
   
    <item id="12676" article="a" name="Club of Highland">
        <attribute key="description" value="A club fit for a mighty warrior."/>
        <attribute key="weight" value="4200"/>
        <attribute key="defense" value="40"/>
        <attribute key="attack" value="56"/>
        <attribute key="weaponType" value="club"/>
        <attribute key="extradef" value="3"/>
        <attribute key="attackspeed" value="1000"/>
    </item>

3. I've added the following code with matching IDs in Weapons.xml

Code:
    <melee id="12677" level="150" unproperly="1" event="function" value="default"> <!-- Axe of Highland -->
        <vocation id="4"/>
        <vocation id="8" showInDescription="0"/>
    </melee>  
   
    <melee id="12676" level="150" unproperly="1" event="function" value="default"> <!-- Club of Highland -->
        <vocation id="4"/>
        <vocation id="8" showInDescription="0"/>
    </melee>

But when I examine the item in game I see this for both the axe and club:

View attachment 65406

The weird thing is that I added the sword a while ago with the exact same parameters and it works fine. I've checked the code to see if the IDs are used for something else but nope, there's only the axe and club.

How in the name of Zathroth is this possible!?
[0.4] - This is first problem xD
Second, add item in moveevent
Idk how its looks in 0.4, just check other items and do it
XML:
    <movevent event="Equip" itemid="15410" slot="feet" level="150" function="onEquipItem">
        <vocation name="Knight" />
        <vocation name="Elite Knight" showInDescription="0" />
    </movevent>
    <movevent event="DeEquip" itemid="15410" slot="feet" function="onDeEquipItem" />
 
Back
Top