ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Oct 23, 2018 6:03 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Archer Damage Addon
PostPosted: Sun Feb 03, 2013 11:22 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
This addon displays more info about archery damage to the screen.

The addon can be found here: http://te4.org/games/addons/tome/archer-damage-info.

This addon displays more onscreen information about the damage your bow/sling does. It gives the standard damage, plus the crit damage, and then the average damage, taking both into account. This is damage per *hit*. It also provides a damage per *turn* average, taking into account attack speed. This addon was developed in light of the discussion in viewtopic.php?f=41&t=33873 or the advantages of Rapid Shot vs Aim, and the effects various modifiers have on damage.

The addon accounts for damage modifiers, crit damage multiplier, attack speed, and the usual stats for damage.

What is can't account for is factors other than the weapon, such as enemy armour, enemy resistances, and your resistance penetration.

So it is also useful for determining the better damage from two or more different weapons, which makes it extremely interesting!

Enjoy !!!!!!!!!!!!!!!!!!!!!!! :P

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Sun Feb 03, 2013 12:42 pm 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
Oops - it works, but doesn't take into account damage increase for physical (or other) damage. I'm trying to figure this out.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Sun Feb 03, 2013 10:34 pm 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
ok - I've added damage increases, but I've left out onhit extra, both regular, crit, and burst crit! So I'll work on these next.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Sun Feb 03, 2013 11:49 pm 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
ok - this all works now. I've included damage bonuses, on hit, on hit burst, and onhit crit burst. Have fun!

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Mon Feb 04, 2013 11:01 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
Updated to include effect of global speed, which will increase average damage per TURN, whenever global speed is increased.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Mon Feb 04, 2013 12:03 pm 
Offline
Archmage

Joined: Tue Nov 11, 2003 10:54 am
Posts: 379
Location: Wroclaw/Poland
Hej Jenx,

Great idea with this addon. One question - how can I use it? I mean, I seem not to see the overall damage per round. Where is it displayed?
Does this addon work with melee weapons too?

Cheers


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Mon Feb 04, 2013 2:11 pm 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
MisiuPysiu wrote:
Hej Jenx,

Great idea with this addon. One question - how can I use it? I mean, I seem not to see the overall damage per round. Where is it displayed?
Does this addon work with melee weapons too?

Cheers


It is on screen on the left, where the other message appear. It only works with bows and slings. To do this for melee weapons would be LOTS of work.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Mon Feb 04, 2013 5:30 pm 
Offline
Sher'Tul

Joined: Fri Sep 21, 2007 3:18 am
Posts: 1081
Location: Angolwen
nope...not seeing it. Not on mouseover of myself, or in the char sheet. Perhaps a better description of how we are supposed to see these details?


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Mon Feb 04, 2013 9:49 pm 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
Sradac wrote:
nope...not seeing it. Not on mouseover of myself, or in the char sheet. Perhaps a better description of how we are supposed to see these details?


Doesn't it appear on the screen, on the left, where the chat is on the right? For archers? Each line says:

ADDON: Average damage per HIT: 151 (84 per cent: 142 / 16 per cent CRIT: 199). Avg damage per TURN: 285

For every time you shoot or use an archery talent.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Tue Feb 05, 2013 2:47 am 
Offline
Graphical God

Joined: Wed Jan 05, 2011 8:05 am
Posts: 404
Location: Seascape
Aha, it works like charm, all you have to do is ACTUALLY shoot :) and the info appears in the "Message Log"

Image

Nicely done, jenx!

_________________
~ [ RexOrcorum, a.k.a "rexo": Official Visual Magus, Addon Beautifier, Achiever, Knight of the 561 Trees, Dark Interfacer ] ~
darkgod wrote:
~ [ DarkGod whips rexorcorum with Suslik (& many others as well) ] ~


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Tue Feb 05, 2013 4:00 am 
Offline
Sher'Tul Godslayer

Joined: Mon Mar 14, 2011 10:32 am
Posts: 1709
Location: Canada
Does this take damage range into account? The damage range of arrows is 1.4 vs. shots' 1.2, which gives arrows a 10% advantage in damage when the same number is displayed on the character sheet.

_________________
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Tue Feb 05, 2013 10:37 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
lukep wrote:
Does this take damage range into account? The damage range of arrows is 1.4 vs. shots' 1.2, which gives arrows a 10% advantage in damage when the same number is displayed on the character sheet.


Yes, and that is the source of the slight variations in the figures each time.

Here is the original code:

Code:
local damrange = self:combatDamageRange(ammo)
dam = rng.range(dam, dam * damrange)
print("[ATTACK ARCHERY] after range", dam)


I simply record this multiple and apply it to the base damage outputted to the screen. It is the only rng in the Archery.lua code that affects the amount of damage. This explains also why the "average" is very close to the actual output, as it mimics it. You can unzip the addon to see how it's done. Lots of code and lots of comments, to explain it all (mainly to myself!).

I hate damage conversion, so I haven't tested to see how accurate that is though. If the code works, it will be accurate, as I mimic DG's code and add the damage bonunses for each element separately, just as his does. (But I do notice some minor differences with onhit damage sometime, that I can't figure out.)

This was not too hard to figure out, as the following example from on hits from ammo shows (all my variables end in JX):

Code:
local conv_dam
      local conv_damtype
      if ammo and ammo.convert_damage then
         for typ, conv in pairs(ammo.convert_damage) do
            if dam > 0 then
               conv_dam = math.min(dam, dam * (conv / 100))
               conv_damtype = typ
               dam = dam - conv_dam
      
               -- remove from base as well
               dam_baseJX = dam_baseJX - conv_dam
               dam_base_critJX = dam_base_critJX - conv_dam

               if conv_dam > 0 then
                  DamageType:get(conv_damtype).projector(self, target.x, target.y, conv_damtype, math.max(0, conv_dam))

                  -- jenx
                  local conv_dam_incJX = 1 + ((self.inc_damage.all or 0) + (self.inc_damage[conv_damtype] or 0)) / 100
                  dam_conv_ammoJX = dam_conv_ammoJX + conv_dam * conv_dam_incJX
               end
            end
         end
      end

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Tue Feb 05, 2013 10:46 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
Ok, I just picked up a rare sling with 50% mind damage conversion and tried it out. the addon works perfectly. I have 0% mind damage increase and 32% physical, and the calculations are working fine. That's a relief.

_________________
MADNESS rocks


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Wed Feb 06, 2013 9:37 pm 
Offline
Sher'Tul

Joined: Fri Sep 21, 2007 3:18 am
Posts: 1081
Location: Angolwen
yeah its there. It wasnt until the next day I realized it shows in the combat log, mostly because I dont even look at the combat log. I was under the impression it gave us an average of this either on char sheet, or mouseover.

I like it this way though, cause then when you crit you can really get a sense of how good your crits are and if you should be going for crit chance, or dmg, or speed, etc.


Top
 Profile  
 
 Post subject: Re: Archer Damage Addon
PostPosted: Sat Feb 09, 2013 12:30 am 
Offline
Sher'Tul Godslayer

Joined: Mon Feb 14, 2011 11:16 pm
Posts: 2263
I'm glad it is helpful.

_________________
MADNESS rocks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group