Attack speed math

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
alocritani
Cornac
Posts: 36
Joined: Sat Jul 23, 2011 9:00 am

Attack speed math

#1 Post by alocritani »

Just a simple question: why when I read in tooltip "attack speed + 10%" the value shown in character info is 111.11% instead of 110%?

Doing some calculations I discovered that 100/111.11 is 0.9. This means that normal (100%) attack speed is 90% of my current (normal +10%) speed. I'm quite sure it is intended, but I cannot get the logic behind that.

Can anybody explain me if it is correct or not?

Also, when showing the difference between current (111.11) and previous (100) speeds that difference (+11.11%) is shown in green color, as if it is an improved stat; instead it should be red (lowered stat), according to me.

alocritani
Cornac
Posts: 36
Joined: Sat Jul 23, 2011 9:00 am

Re: Attack speed math

#2 Post by alocritani »

I think the coloring part is done in tome-3.9.41\mod\dialogs\CharacterSheet.lua line 380

Code: Select all

text = compare_fields(player, actor_to_compare, function(actor) return (1/actor:combatMovementSpeed()-1) end, "%.2f%%", "%+.2f%%", 100)
where is inversed is not set

Code: Select all

local compare_fields = function(item1, item2, field, outformat, diffoutformat, mod, isinversed, nobracets, ...)
so I think it should be

Code: Select all

text = compare_fields(player, actor_to_compare, function(actor) return (1/actor:combatMovementSpeed()-1) end, "%.2f%%", "%+.2f%%", 100, true)
the strange thing is that the same logic (1/speed) is not applied to other speeds

Code: Select all

text = compare_fields(player, actor_to_compare, function(actor) return actor.combat_spellspeed - 1 end, "%.2f%%", "%+.2f%%", 100)
...
text = compare_fields(player, actor_to_compare, function(actor) return actor.combat_physspeed - 1 end, "%.2f%%", "%+.2f%%", 100)
edit: the above code is for "General" page - "Attack" page uses instead this code (tome-3.9.41\mod\dialogs\CharacterSheet.lua line 571):

Code: Select all

text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:combatSpeed(...) end, "%.2f%%", "%+.2f%%", 100, false, false, mean)
Last edited by alocritani on Wed Jul 11, 2012 7:26 am, edited 1 time in total.

Dervic
Halfling
Posts: 83
Joined: Thu Jun 21, 2012 9:37 am

Re: Attack speed math

#3 Post by Dervic »

alocritani wrote:Just a simple question: why when I read in tooltip "attack speed + 10%" the value shown in character info is 111.11% instead of 110%?

Doing some calculations I discovered that 100/111.11 is 0.9. This means that normal (100%) attack speed is 90% of my current (normal +10%) speed. I'm quite sure it is intended, but I cannot get the logic behind that.

Can anybody explain me if it is correct or not?

Also, when showing the difference between current (111.11) and previous (100) speeds that difference (+11.11%) is shown in green color, as if it is an improved stat; instead it should be red (lowered stat), according to me.
This is an energy based game and the attack speed concept uses the attack costs less energy mechanic. There are been some changes from a while back (mostly due to crazy stacking) but the numbers still stood from that time.

This should be changed but: Less attack speed in tooltip = a good thing atm. If you see the tooltip on a quick weapon it says attack speed 90%, but that actually means it just costs 90% energy to attack so you get 11,11% more attacks per turn.

It's a bit of a mess in terms of understanding but it seems but be stacking much better than it used to a while back, the tooltips just need some fixing.

alocritani
Cornac
Posts: 36
Joined: Sat Jul 23, 2011 9:00 am

Re: Attack speed math

#4 Post by alocritani »

thanks Dervic!
an in-game better explanation is definitely needed! :)

alocritani
Cornac
Posts: 36
Joined: Sat Jul 23, 2011 9:00 am

Re: Attack speed math

#5 Post by alocritani »

I've checked again.
when activating "Precise Strikes" (reduce you're attack speed by 10%) in character screen - "General" page there is a line with "attack speed -10.00%" and in the "Attack" page the Main Hand speed is 111.11%.

So it seems that in character screen higher speeds are bad. the exact percentage (11.11% slower) is still not 100% clear to me, but it's ok.

For sure having (+11.11%) in green color has to be changed, as it should be red.

Sayan
Yeek
Posts: 12
Joined: Sun Oct 07, 2012 5:07 pm

Re: Attack speed math

#6 Post by Sayan »

This is quite unrelated but still about a.spd.
How does different a.spd on 2nd weapon affects the character? Does it just use slowest or average a.spd to determine how many "energy" or amount of turns the attack uses, or will the weapons desynch and attack at different time?

Post Reply