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

Lua Weapons deal no damage?

stratzilla

Narcissus-OTS
Joined
Jan 22, 2013
Messages
38
Reaction score
0
Location
Canada
I'm using TFS0.3.6 with an 8.6 realmap and I can't seem to deal damage with any weapons. I spent about 20minutes attacking a dog with a club to no avail, dealing 0 damage. I can take damage regularly, though.

My data/weapons folder only has a couple of files related to wands and rods, is this the reason? All my weapons along with attack and defense is stored in data/items/items.xml!lua.
 
Your weapons should also be added in weapons.xml
Like this:
XML:
<melee id="2377" level="20" unproperly="1" event="function" value="default"/>
 
"I spent about 20minutes attacking a dog with a club to no avail, dealing 0 damage." Hahaha that's hilarious!

Anyways, on topic. Limos is just giving an example of how each line in your weapons.xml should look like (Besides the wands/rods). If you want to know, melee id is the id of the item. In this case, it's 2377 (2hSword). 2hSword is melee, so it's a melee id. Level is the required level to use/wield it. I don't know what unproperly is, just leave it at 1. Event should be left as "function" and value should be left as "default".

Edit: Oh! Forgot to mention, is there any errors appearing in the .exe? Specifically about weapons, items, etc...
 
"I spent about 20minutes attacking a dog with a club to no avail, dealing 0 damage." Hahaha that's hilarious!

Anyways, on topic. Limos is just giving an example of how each line in your weapons.xml should look like (Besides the wands/rods). If you want to know, melee id is the id of the item. In this case, it's 2377 (2hSword). 2hSword is melee, so it's a melee id. Level is the required level to use/wield it. I don't know what unproperly is, just leave it at 1. Event should be left as "function" and value should be left as "default".

Edit: Oh! Forgot to mention, is there any errors appearing in the .exe? Specifically about weapons, items, etc...

My server is still in the planning stage so when I launch the .exe I do get a billion and one errors, but at first glance it doesn't appear to show any about weapons. Magic still deals damage, however.

So I guess I have to write hundreds of lines of code for each weapon... ;_;

edit; unless there's an already made file? I had to write a lot of stuff on my own, it'd be a nice change to find some stuff I could use.
 
No no no! Your weapons.xml should already have everything written, you shouldn't have to write a thing. All I can say is try fixing some of those errors, hopefully that should do something. At one point, were you ever able to deal damage to creatures?
 
unproperly="1" is that you can use it if you have a lower level then the required level (you just hit only lower then), if you set it to 0 you can only use it if you have that level or higher.

If you don't have the weapons added in weapons.xml you can also copy and paste them from an other weapons.xml file or use an other weapons.xml.
 
Last edited:
Ah, I'm quite silly. I didn't know they introduced vocation specific weapons to 8.6. That sword I was using as a druid was dealing 0 because it's a knight weapon.
 
Back
Top