[1.15] Attack speed display bug? (Updated w/cause)
Moderator: Moderator
-
- Wayist
- Posts: 24
- Joined: Fri Nov 22, 2013 10:47 am
[1.15] Attack speed display bug? (Updated w/cause)
My Adventurer's attack speed (on the General Tab) is listed as 83.3%, whereas on the attack tab it's listed as 100%. I don't think I have anything enabled that should be lowering my global attack speed. I'm using Cleave, Beyond the Flesh, Stalk, Berserk, and Wild Growth, a twohander at 100% attack speed and a psiwielded twohander at 100% attack speed.
This is while I'm on a computer that can't connect to the server, so a character dump is here. I'll try to replicate it from somewhere online in a while.
char here: http://te4.org/characters/12140/tome/e9 ... c40e76360d
edit: Found it. Unequipping the sand gauntlets raises my attack speed back up to 100%, putting them back on lowers it to 83% again. Equipping some leather gauntlets doesn't impact speed.
edit2: Replicated it on a new character - equip gauntlets, your global attack speed is listed as lower. I can't tell if it's actively using that speed or not, though, doesn't look like it.
This is while I'm on a computer that can't connect to the server, so a character dump is here. I'll try to replicate it from somewhere online in a while.
char here: http://te4.org/characters/12140/tome/e9 ... c40e76360d
edit: Found it. Unequipping the sand gauntlets raises my attack speed back up to 100%, putting them back on lowers it to 83% again. Equipping some leather gauntlets doesn't impact speed.
edit2: Replicated it on a new character - equip gauntlets, your global attack speed is listed as lower. I can't tell if it's actively using that speed or not, though, doesn't look like it.
-
- Wayist
- Posts: 24
- Joined: Fri Nov 22, 2013 10:47 am
Re: [1.15] Attack speed display bug? (Updated w/cause)
e: Had another potential attack speed bug, but can't replicate it, removed again.
Re: [1.15] Attack speed display bug? (Updated w/cause)
I see this too. Lvl49 berserker, equip Dakhtuns gauntlets, attack speed 83.3%, equip randart drakeskin leather gloves, attack speed 100%. A bit annoying, really, since there's nothing in the description either way and that 50% crit multiplier looks very attractive.
http://te4.org/characters/34419/tome/f1 ... 527b2cfb6d
http://te4.org/characters/34419/tome/f1 ... 527b2cfb6d
Re: [1.15] Attack speed display bug? (Updated w/cause)
Just to add to this, I threw this in to check if it was affecting more than just display.
Combat.lua @ line 163, after returning from attackTargetWith()
game.logSeen(self, "Attack speed: %s", speed)
Using a sword
With light gauntlets: [LOG] Attack speed: 1
With heavier gauntlets: [LOG] Attack speed: 0.9
Combat.lua @ line 163, after returning from attackTargetWith()
game.logSeen(self, "Attack speed: %s", speed)
Using a sword
With light gauntlets: [LOG] Attack speed: 1
With heavier gauntlets: [LOG] Attack speed: 0.9
Re: [1.15] Attack speed display bug? (Updated w/cause)
Well that was a bone-headed move. I didn't notice I had a 111% speed sword equiped instead of a 100% speed sword. With the correct one in place, viewing the character sheet triggers player.combat.physspeed = 1.2 and player.combat_physspeed = 1, but attacking shows that weapon.combat.physspeed = 1 and player.combat_physspeed = 1, so the sheet is off, but the attacks are correct for both types of gloves. I must have accidentally clicked on both sword and gloves when I switched.
Re: [1.15] Attack speed display bug? (Updated w/cause)
Meant to put this here rather than the other thread:
But the heavy gauntlets *do* affect Block rotation, which is what got me to look into this in the first place. I wanted to make sure I was awake before I tested that again. If my Stone Warden isn't wearing any gloves, and I'm not around any NPCs to mess with turn counts, I can get a consistent countdown of 2 turns after the turn I clicked on Block.
If I put on gloves, it will go through 6 cycles of 2 turns, then a cooldown of only 1 after clicking block, then 7 cycles of 2, then a cooldown of 1, repeating.... Every once in a while I'll see a "3" flash before the cooldown drops to 2, without me needing to skip a turn. On the turns that start with a 1 cooldown, I'll sometimes see a 2 for a moment first.
(Block, skip turn, skip turn) x 6
Block, skip turn
(Block, skip turn, skip turn) x 7
Block, skip turn
(Block, skip turn, skip turn) x 6
Block, skip turn
(Block, skip turn, skip turn) x 7
Block, skip turn
etc.
I made sure nothing but the gloves changed this time: Fists of the Desert Scorpion (physspeed = 0.15)
With a set of gloves from Urthol, with a different speed, I'll sometimes have 2 turns left for cooldown, and when I skip a turn, the block ends.
-----
I think I found it. In mod/class/Actor.lua, at line 4124
This uses the base attack speed that is affected by the gloves and doesn't get overridden by weapon speed the way a direct attack does. To test this, I used
which uses the attack speed of your main weapon, if you have one. This affects any "technique" talent, not just block.
But the heavy gauntlets *do* affect Block rotation, which is what got me to look into this in the first place. I wanted to make sure I was awake before I tested that again. If my Stone Warden isn't wearing any gloves, and I'm not around any NPCs to mess with turn counts, I can get a consistent countdown of 2 turns after the turn I clicked on Block.
If I put on gloves, it will go through 6 cycles of 2 turns, then a cooldown of only 1 after clicking block, then 7 cycles of 2, then a cooldown of 1, repeating.... Every once in a while I'll see a "3" flash before the cooldown drops to 2, without me needing to skip a turn. On the turns that start with a 1 cooldown, I'll sometimes see a 2 for a moment first.
(Block, skip turn, skip turn) x 6
Block, skip turn
(Block, skip turn, skip turn) x 7
Block, skip turn
(Block, skip turn, skip turn) x 6
Block, skip turn
(Block, skip turn, skip turn) x 7
Block, skip turn
etc.
I made sure nothing but the gloves changed this time: Fists of the Desert Scorpion (physspeed = 0.15)
With a set of gloves from Urthol, with a different speed, I'll sometimes have 2 turns left for cooldown, and when I skip a turn, the block ends.
-----
I think I found it. In mod/class/Actor.lua, at line 4124
Code: Select all
elseif ab.type[1]:find("^technique/") then
self:useEnergy(game.energy_to_act * self:combatSpeed())
Code: Select all
elseif ab.type[1]:find("^technique/") then
local combat
if self:getInven(self.INVEN_MAINHAND) then
local o = self:getInven(self.INVEN_MAINHAND)[1]
combat = self:getObjectCombat(o, "mainhand")
end
self:useEnergy(game.energy_to_act * self:combatSpeed(combat))
Re: [1.15] Attack speed display bug? (Updated w/cause)
This is what I ended up going with:
Code: Select all
elseif ab.type[1]:find("^technique/") then
local weapon_found = false
if ab.type[1]:find("^technique/shield") or ab.name == "Block" then
local shield = self:hasShield()
if shield then
local combat = shield.special_combat
if combat then
self:useEnergy(game.energy_to_act * self:combatSpeed(combat))
weapon_found = true
print("[MARSON] Speed: ", self:combatSpeed(combat))
--game.logSeen(self, "#WHITE#%s's activation speed: %s", self.name:capitalize(), self:combatSpeed(combat))
end
end
end
if not weapon_found and self:getInven(self.INVEN_MAINHAND) then
local weapon = self:getInven(self.INVEN_MAINHAND)[1]
if weapon then
local combat = self:getObjectCombat(weapon, "mainhand")
if combat then
self:useEnergy(game.energy_to_act * self:combatSpeed(combat))
weapon_found = true
print("[MARSON] Speed: ", self:combatSpeed(combat))
--game.logSeen(self, "#WHITE#%s's activation speed: %s", self.name:capitalize(), self:combatSpeed(combat))
end
end
end
if not weapon_found and self:getInven(self.INVEN_OFFHAND) then
local weapon = self:getInven(self.INVEN_OFFHAND)[1]
if weapon then
local combat = self:getObjectCombat(weapon, "offhand")
if combat then
self:useEnergy(game.energy_to_act * self:combatSpeed(combat))
weapon_found = true
print("[MARSON] Speed: ", self:combatSpeed(combat))
--game.logSeen(self, "#WHITE#%s's activation speed: %s", self.name:capitalize(), self:combatSpeed(combat))
end
end
end
if not weapon_found then
self:useEnergy(game.energy_to_act * self:combatSpeed())
print("[MARSON] Speed: ", self:combatSpeed())
--game.logSeen(self, "#WHITE#%s's activation speed: %s", self.name:capitalize(), self:combatSpeed())
end
else
self:useEnergy()
print("[MARSON] Speed: 1 (default energy)")
--game.logSeen(self, "#WHITE#%s's activation speed: 1 (default energy)", self.name:capitalize())
end[/b]
Last edited by Marson on Sun Feb 02, 2014 2:40 pm, edited 6 times in total.
-
- Sher'Tul Godslayer
- Posts: 2402
- Joined: Tue Jun 18, 2013 10:46 pm
- Location: Ambush!
Re: [1.15] Attack speed display bug? (Updated w/cause)
@ Marson, you are awesome for finding this and fixing it.
Re: [1.15] Attack speed display bug? (Updated w/cause)
Heh. We'll see how bad it crashes. 
I updated the code with more robust sanity checking and pulled out the extra main hand weapon lookups. Is that for creatures with more than two arms?

I updated the code with more robust sanity checking and pulled out the extra main hand weapon lookups. Is that for creatures with more than two arms?
Re: [1.15] Attack speed display bug? (Updated w/cause)
I'm confused. So, if my char is wearing fatigue penalty gauntlets, then his normal attacks with melee weapons are not slowed? But if my character uses unarmed combat or uses talents in any of the technique trees, then his attack speed is slowed? Is this bug present in earlier versions too?
I'm having this same problem on my solipsist and I'd rather not give up something like 17 % of my melee attack speed because of a bug.
I'm having this same problem on my solipsist and I'd rather not give up something like 17 % of my melee attack speed because of a bug.
Re: [1.15] Attack speed display bug? (Updated w/cause)
This all affects how long it takes to activate Technique talents. You can't activate a talent and attack at the same time (not counting attacks rolled into the talent itself, but those don't use the same energy mechanics, so they don't count). So activating these talents shouldn't have an impact on attack speed at all. If you use a lot of them, enemies will be getting a free move on you every half-dozen activations or so, though.
Regarding Solipsist, they use mostly psionic talents, which are tagged with is_mind=true. This line means that the talent's cost is modified by your mindspeed.
Mindspeed defaults to 1, so Psi talents should be using exactly one turn's worth of energy almost every time. I can only find a few places where combatMindSpeed is affected, such as when Crippled or by the Eternity's Counter artifact.
When using a Talent like "Beyond the Flesh", it specifically uses the mindstar's attack speed when telekinetically wielding it.
Regarding Solipsist, they use mostly psionic talents, which are tagged with is_mind=true. This line means that the talent's cost is modified by your mindspeed.
Code: Select all
elseif ab.is_mind then
self:useEnergy(game.energy_to_act * self:combatMindSpeed())
When using a Talent like "Beyond the Flesh", it specifically uses the mindstar's attack speed when telekinetically wielding it.
Re: [1.15] Attack speed display bug? (Updated w/cause)
I just realized that my last update accidentally removed the speed adjustment for unarmed activation, so I put that back.
Re: [1.15] Attack speed display bug? (Updated w/cause)
Ok, thanks for clarifying that.