Page 1 of 1

juggernaut

Posted: Mon Aug 09, 2010 8:59 am
by trev
Doesnt seem to be working - keeps telling me i have insufficient stamina despite that clearly not being the case

Re: juggernaut

Posted: Mon Aug 09, 2010 9:01 am
by trev
actually it does work - but 'costs' 82 stamina at level 4 - as opposed to 60

Re: juggernaut

Posted: Mon Aug 09, 2010 9:35 am
by Zonk
trev wrote:actually it does work - but 'costs' 82 stamina at level 4 - as opposed to 60
Sounds like a feature, not a bug - your fatigue value is applied as an increase to talent costs, so if you have fatigue value of 36%, using your talents will cost 36% more, thus(rounded up)82 rather than 60.

Re: juggernaut

Posted: Mon Aug 09, 2010 9:48 am
by trev
aha. that makes sense, thanks

Re: juggernaut

Posted: Mon Aug 09, 2010 4:10 pm
by yufra
I remember this surprising me at some point... do you think we should explicitly add this to the talent description? For example:

Code: Select all

function _M:getTalentFullDescription(t, addlevel)
...
	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina).." + "..self.fatigue end

Re: juggernaut

Posted: Mon Aug 09, 2010 4:15 pm
by darkgod
Maybe yes although with the correct formula ;)
fatigue is a % not a fixed addition

Re: juggernaut

Posted: Mon Aug 09, 2010 8:04 pm
by yufra
Right as usual! :D Here is a potential patch. I opted for math.ceil instead of math.floor because the PlayerDisplay shows the math.floor of the actual stamina. Hopefully this will avoid someone asking why the talent says it uses 35 (when it uses 35.5) but then appears to use 36 (because the PlayerDisplay floors 100-35.5).

Code: Select all

--- modules/tome/class/Actor.lua.old	2010-08-09 12:41:07.000000000 -0700
+++ modules/tome/class/Actor.lua	2010-08-09 12:58:56.000000000 -0700
@@ -1006,7 +1006,7 @@
 	end
 
 	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina).." + "..math.ceil((t.stamina or t.sustain_stamina) * self.fatigue/100).." fatigue" end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
 	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end

Re: juggernaut

Posted: Mon Aug 09, 2010 10:07 pm
by Shoob
a) fatigue affects all resources (I think), but

b) fatigue does not seem to affect sustained mana talents (at least, possibly more sustains are not affected)

Re: juggernaut

Posted: Mon Aug 09, 2010 11:31 pm
by yufra
Thanks Shoob, you are right. Looking at the preUseTalent function in modules/tome/class/Actor.lua all activated talents check their controlling stat (mana, stamina, positive and negative energy) modified by fatigue. Sustained talents do not check fatigue and simply lower the maximum amount of the controlling stat. Finally, the equilibrium stat is exempt from fatigue and I do not know how vim is going to be handled. The patch below will simply modify the amount shown in the UseTalent window to reflect how much will actually be used. This does not give the player a direct reminder that fatigue is increasing the cost, though. Thoughts?

Code: Select all

diff -u modules/tome/class/Actor.lua.old modules/tome/class/Actor.lua
--- modules/tome/class/Actor.lua.old	2010-08-09 16:27:02.000000000 -0700
+++ modules/tome/class/Actor.lua	2010-08-09 16:23:55.000000000 -0700
@@ -1011,12 +1011,12 @@
 	else d[#d+1] = "#6fff83#Use mode: #00FF00#Activated"
 	end
 
-	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(math.ceil(t.mana * (100 + self.fatigue) / 100) or t.sustain_mana) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(math.ceil(t.stamina  * (100 + self.fatigue) / 100) or t.sustain_stamina) end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
-	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
-	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.negative or t.sustain_negative) end
+	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(math.ceil(t.positive * (100 + self.fatigue) / 100) or t.sustain_positive) end
+	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(math.ceil(t.negative * (100 + self.fatigue) / 100) or t.sustain_negative) end
 	if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t)
 	else d[#d+1] = "#6fff83#Range: #FFFFFF#melee/personal"
 	end

Re: juggernaut

Posted: Mon Aug 09, 2010 11:41 pm
by Taxorgian
Also, if the chronomancy classes are added, Paradox/TI should not be affected by fatigue since Paradox/TI is basically self-limiting: in a different way but similar to equilibrium.

Re: juggernaut

Posted: Tue Aug 10, 2010 2:47 am
by yufra
Ack, started a Arcane Blade with my modified getTalentFullDescription and noticed that it crashed on sustained methods. DG, if you are going to use the patch you need to switch the order of the sustain_stat and the stat * fatigue, as in the patch below.

Code: Select all

--- Actor.lua.old	2010-08-09 19:41:18.000000000 -0700
+++ Actor.lua	2010-08-09 19:44:32.000000000 -0700
@@ -1011,12 +1016,12 @@
 	else d[#d+1] = "#6fff83#Use mode: #00FF00#Activated"
 	end
 
-	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
-	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
+	if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.sustain_mana or t.mana * (100 + self.fatigue) / 100) end
+	if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.sustain_stamina or t.stamina  * (100 + self.fatigue) / 100) end
 	if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
 	if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
-	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
-	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.negative or t.sustain_negative) end
+	if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.sustain_positive or t.positive * (100 + self.fatigue) / 100) end
+	if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.sustain_negative or t.negative * (100 + self.fatigue) / 100) end
 	if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t)
 	else d[#d+1] = "#6fff83#Range: #FFFFFF#melee/personal"
 	end

Re: juggernaut

Posted: Tue Aug 10, 2010 7:21 am
by edge2054
Taxorgian wrote:Also, if the chronomancy classes are added, Paradox/TI should not be affected by fatigue since Paradox/TI is basically self-limiting: in a different way but similar to equilibrium.
Yeah, assuming equilibrium isn't an oversight I have to agree. Paradox isn't really a resource at all, it's merely a meter letting the player know how unstable the spacetime continuum has become.

Re: juggernaut

Posted: Tue Aug 10, 2010 2:19 pm
by darkgod
Applied!

And yes equilibrium is not an oversight, same for paradox probably indeed.
Vim wil be affected though