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

How to edit distance and melee damage?

jclay

Member
Joined
Dec 18, 2011
Messages
109
Reaction score
6
I figured out how to edit sudden death and other spells damage, but I can't figure out how to edit the damage of distance and melee..

And not edit the weapons, like make assassin star:70 instead of 65.. I get that. I mean like the formula for the damage

Any help is appreciated
 
items.xml

Code:
 <item id="7368" article="an" name="assassin star" plural="assassin stars">
        <attribute key="weight" value="200"/>
        <attribute key="attack" value="65"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="shootType" value="redstar"/>
        <attribute key="range" value="4"/>
        <attribute key="breakChance" value="33"/>
        <attribute key="ammoAction" value="moveback"/>
    </item>
edit the 65 to 70.

Range = 4 means that it will attack anyone away from it with 4 squares

i hope you got it
 
items.xml

Code:
 <item id="7368" article="an" name="assassin star" plural="assassin stars">
        <attribute key="weight" value="200"/>
        <attribute key="attack" value="65"/>
        <attribute key="weaponType" value="distance"/>
        <attribute key="shootType" value="redstar"/>
        <attribute key="range" value="4"/>
        <attribute key="breakChance" value="33"/>
        <attribute key="ammoAction" value="moveback"/>
    </item>
edit the 65 to 70.

Range = 4 means that it will attack anyone away from it with 4 squares

i hope you got it

He said

And not edit the weapons, like make assassin star:70 instead of 65.. I get that. I mean like the formula for the damage
 
Yeah, the weapons attack is simple, I get that part. Sorry you misunderstood, I mean the damage formula of the distance attack and melee attack
 
Okay.. heres the thing. Mages have spells/runes that I can edit and have a minimum and max attack. So I'm guessing theres no formula for knights/paladins?

I have a knight and paladin character, and they both hit in a VERY wide range. Sometimes they hit like super low-40 and then sometimes like 300 damage max wtf? I'll try to edit the damage that way you guys said...
 
Can someone explain what this means? Heres my knight vocation in the vocations.xml :

<vocation id="4" clientid="1" name="Knight" description="a knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="15" gainmanaticks="2" gainmanaamount="5" manamultiplier="3.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>

What is the skill id 0 multiplier mean? Maybe that has something to do with the formula?
 
I could be wrong but it is probably something like.
Fist
Axe
Club
Sword
Distance
Fishing
Shielding

Okay.. heres the thing. Mages have spells/runes that I can edit and have a minimum and max attack. So I'm guessing theres no formula for knights/paladins?
I have a knight and paladin character, and they both hit in a VERY wide range. Sometimes they hit like super low-40 and then sometimes like 300 damage max wtf? I'll try to edit the damage that way you guys said...

Are you sure those 300's are not the critical hits. Sometimes the word crit wont show up or do an effect.
 
its a soure file (c++) you need to fix the soure and edit if you are going to weapons.cpp its abit hard if you dont have any experians about it
 
It looks like something that is what I'm looking for, I just don't know where that goes... I've searched the forum, can't find a solution. I'm using mystic spirit v2
 
It looks like something that is what I'm looking for, I just don't know where that goes... I've searched the forum, can't find a solution. I'm using mystic spirit v2

You can find it in weapons.cpp, just search after these and later on change their formulas.

Code:
int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor)

int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const

int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
 
"weapons.cpp" I can't find it anywhere. What folder should it be in? Should I create it if its not there? thanks alot for the help


--- Updated ---


You can find it in weapons.cpp, just search after these and later on change their formulas.

Code:
int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor)

int32_t WeaponMelee::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const

int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const

"weapons.cpp" I can't find that anywhere.. What folder should it be in? And if its not anywhere should I create it?
 
Last edited by a moderator:
Where did you download your server and what do you want to change about the formulas?
 
Back
Top Bottom