Page 1 of 1
1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Sun Dec 29, 2013 12:08 pm
by cttw
Hi darkgod, love the new doomed tree!
Unfortunately (unrelated to the new tree), Unseen Force is broken unless you put 4 or 5 talent points on it. It also displays negative values in the description. Then at lvl 4 the values become positive and it works.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Sun Dec 29, 2013 5:57 pm
by Hachem_Muche
I'm not seeing this error. How do you reproduce this?
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Sun Dec 29, 2013 9:55 pm
by cttw
I was just playing normally. No addons other than Items Vault and Stone Warden, no cat point on the tree.
On this guy:
http://te4.org/characters/7470/tome/d59 ... 8986f73fad
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Sun Dec 29, 2013 11:13 pm
by orange<
I'm seeing the same bug (Mac OSX 10.6.8, TOME 1.13, Stone Warden and Null's New Gems addons)
For level 1 (no points):
Description: For 6 turns you strike -9223372036854775808 (-9223372036854775808 chance for -9223372036854775808) nearby targets(s)...
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Mon Dec 30, 2013 9:33 am
by cttw
Yes that is what it looked like to me too. I'm using the Linux 64 build.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Tue Dec 31, 2013 7:33 pm
by Hachem_Muche
Well the formula for the number of extra hits you get returns math.max(0, ....) so there should be no way to get negative numbers from it. I don't see any other problems in the talent code.
math.max and math.floor are core lua functions, so perhaps there is a problem with the OS/X and linux builds?
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Mon Jan 06, 2014 11:50 am
by Peony
I saw this (also on 64 bit Linux). Looking at the code (without knowing Lua), I think the problem is taking (tl-4) ^ 0.5, which is imaginary. Or NAN. Which could be what -9223372036854775808 actually means.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Tue Jan 07, 2014 6:13 pm
by Isotope-X
I'm encountering this on OSX, and I can confirm that the visual effect occurs but there's no attacks.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Tue Jan 07, 2014 6:40 pm
by cttw
Yes I got the visual effect as well.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Wed Jan 08, 2014 12:39 pm
by Isotope-X
It's a shame, that's Unseen Force has always been one of my favorite talents. Walk into a room surrounded by a tornado of anger...good stuff!
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Wed Jan 08, 2014 1:57 pm
by cttw
It works with enough points.

Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Thu Jan 16, 2014 9:50 pm
by cttw
Still broken in 1.1.5.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Thu Jan 16, 2014 10:59 pm
by Mewtarthio
Hachem_Muche wrote:Well the formula for the number of extra hits you get returns math.max(0, ....) so there should be no way to get negative numbers from it. I don't see any other problems in the talent code.
How about this line?
Code: Select all
getSecondHitChance = function(self, t) return self:combatTalentScale(self:getTalentLevel(t)-4, 15, 35) end,
See that -4 there? Here's where the function gets used:
Code: Select all
local xtrahits = t.getSecondHitChance(self,t)/100
local hitCount = 1 + math.floor(xtrahits)
if rng.percent(xtrahits - math.floor(xtrahits)*100) then hitCount = hitCount + 1 end
(from do_unseen_force)
Now, what it
looks like is that you
should get a 4% chance for a bonus hit at TL 1 and a 35% chance at TL 5, and if you manage to get your chance above 100% (via infinite scaling), you get a free extra hit and a % chance for an additional extra hit based on the remainder (so a hit chance of 350% would mean three extra hits, for a total of four hits, and a 50% chance of a fifth hit).
Unfortunately, what it's
actually doing is giving you a 15% chance of a bonus hit at TL
5 and a 35% chance at TL
9. Worse, the combatTalentScale function (which normally can't return negative numbers) takes the square root (by default) of the talent level. When you've got an effective talent level of -3, the result is the program running into an error that it obviously wasn't designed to handle. I'm honestly surprised its not throwing LUA errors if someone even looks at the talent; still, it appears that it somehow messes with the math.max function and returns an incredibly large negative number.
In short, you need a talent level of at least four before the talent will even work in the realm of real numbers, much less give you any sort of benefit. This was probably not intended.
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Mon Jun 23, 2014 4:09 am
by johnnyzero
Unseen force was broken with the "Applied infinite scaling to afflicted" commit,
97d23b0b9569e1db3bf52affec2a1074057a2fd2.
The offending commit removed the range check to keep the calculated talent level >= 0. Without the range check, combatTalentScale calculates to NaN (printed as large negative values with string.format and %d). Here's a patch which restores the range check:
Code: Select all
diff --git a/game/modules/tome/data/talents/cursed/force-of-will.lua b/game/modules/tome/data/talents/cursed/force-of-will.lua
index 59466e1..6691371 100644
--- a/game/modules/tome/data/talents/cursed/force-of-will.lua
+++ b/game/modules/tome/data/talents/cursed/force-of-will.lua
@@ -308,7 +308,18 @@ newTalent{
getKnockback = function(self, t)
return 2
end,
- getSecondHitChance = function(self, t) return self:combatTalentScale(self:getTalentLevel(t)-4, 15, 35) end,
+ -- Minimum effects until tLvl > 4
+ getAdjustedTalentLevel = function(self, t)
+ local tLevel = self:getTalentLevel(self, t) - 4
+ -- Do not feed a negative talent level to the scaling functions
+ if tLevel < 0 then
+ tLevel = 0
+ end
+ return tLevel
+ end,
+ getSecondHitChance = function(self, t)
+ return self:combatTalentScale(t.getAdjustedTalentLevel(self, t), 15, 35)
+ end,
action = function(self, t)
game.logSeen(self, "An unseen force begins to swirl around %s!", self.name)
local duration = t.getDuration(self, t)
Re: 1.1.3 Unseen Force broken at talent levels 1, 2 and 3
Posted: Mon Jun 23, 2014 8:17 am
by darkgod
fixed thanks