Archer Damage Addon

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Archer Damage Addon

#1 Post by jenx »

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 http://forums.te4.org/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

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#2 Post by jenx »

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

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#3 Post by jenx »

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

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#4 Post by jenx »

ok - this all works now. I've included damage bonuses, on hit, on hit burst, and onhit crit burst. Have fun!
MADNESS rocks

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#5 Post by jenx »

Updated to include effect of global speed, which will increase average damage per TURN, whenever global speed is increased.
MADNESS rocks

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

Re: Archer Damage Addon

#6 Post by MisiuPysiu »

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

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#7 Post by jenx »

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

Sradac
Sher'Tul
Posts: 1081
Joined: Fri Sep 21, 2007 3:18 am
Location: Angolwen

Re: Archer Damage Addon

#8 Post by Sradac »

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?

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#9 Post by jenx »

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

rexorcorum
Graphical God
Posts: 482
Joined: Wed Jan 05, 2011 8:05 am
Location: There and Back again

Re: Archer Damage Addon

#10 Post by rexorcorum »

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) ] ~

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Archer Damage Addon

#11 Post by lukep »

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)

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#12 Post by jenx »

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: Select all

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: Select all

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

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#13 Post by jenx »

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

Sradac
Sher'Tul
Posts: 1081
Joined: Fri Sep 21, 2007 3:18 am
Location: Angolwen

Re: Archer Damage Addon

#14 Post by Sradac »

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.

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Archer Damage Addon

#15 Post by jenx »

I'm glad it is helpful.
MADNESS rocks

Post Reply