I need a formula to calculate experience of players on each kill. It's based on the value of armor of the 2 opponents. For example if i kill the opponent and i've a total armor of 4000 gold and the opponent has a total of 450, i get less experience than if i had armor of 450 and opponent of 4000. I was thinking to something like ((my armor/opponent armor) / 100) + total damage, but doesn't give the result i would. I tried to search some good formula but i haven't found nothing. Thanks.
If you're calculating based on the ratio of the armor values as in your formula, this means that if your opponent has armor twice as good as you, you get twice as much Xp
To do this, you would have a formula such as following:
(Enemy Armor)/(My Armor)*Xp
Here the Xp is a base amount that you can choose. This is the Xp you get when you kill someone with armor just as good as yours.
In your formula you had the enemy armor and your armor switched. This means that if your opponents armor is twice as good, you would get twice as less Xp.
Also, you use Damage in your formula, I am however not sure why. Do you get Xp based on the damage you deal and not on kills? Because if that is the case, you can also give Xp based on solely the damage given. This way, if your opponents armor makes you have to give twice as much damage to kill him, you also get twice as much Xp. The formula would then be something like:
Damage/(Normal damage) * Xp
Where normal damage is the damage you have to deal to an armorless opponent and Xp is once again te 'base Xp'