Page 1 of 1
scaling resource costs per talent level?
Posted: Tue Sep 23, 2014 12:18 am
by chronomancer
Is there a way to make a talent's resource cost scale with talent level? I'd like to rebalance some talents, most notably sustains, that have a high resource cost (ie., Ruin) which make investing in them an all-or-nothing proposition. If the cost were to scale upwards with investment, then the cost would be relative to the payoff.
Also, on an unrelated note, is there a list of TOME variable names some place? That would be of great help to new modders like myself.
Re: scaling resource costs per talent level?
Posted: Tue Sep 23, 2014 2:25 am
by HousePet
You can make variable costs for talents. But with sustained costs, don't use anything other than raw talent level in the calculation, or bad things could happen.
Re: scaling resource costs per talent level?
Posted: Mon Sep 29, 2014 3:07 am
by chronomancer
I tried this:
sustain_vim = 10 * self:getTalentLevel(t),
...but the game simply hangs on load, so I suspect that I'm missing something pretty basic.
Re: scaling resource costs per talent level?
Posted: Mon Sep 29, 2014 3:18 am
by grayswandir
Like HousePet said, it
might not be a good idea to do changing sustain costs. You'd have to try it and see if anything breaks if you have it sustained when you level it up.
Code: Select all
sustain_vim = function(self, t) return 10 * self:getTalentLevel(t) end,
Also, I noticed there's a built-in drain_vim that affects your vim regen. The other resources don't seem to have that.
Re: scaling resource costs per talent level?
Posted: Mon Sep 29, 2014 3:29 am
by HousePet
If you don't use raw level, it will be possible to use an amulet of mastery to raise/lower you maximum resource value infinitely.
Re: scaling resource costs per talent level?
Posted: Mon Sep 29, 2014 9:20 am
by Razakai
Maybe see if there's a function to deactivate the sustain each time the talent level changes? That plus using the raw level should take care of any weird interactions.
Re: scaling resource costs per talent level?
Posted: Tue Sep 30, 2014 2:54 am
by chronomancer
Does the code I've shown qualify as using "raw" talent level? I'm very new at this; most of what I'm doing is either simple math changes or cut & pastes. I'd probably be far more effective at coding if I had a better idea of what the functions were & how they worked, but I've had limited success in tracking down documentation on this. The wiki has been occasionally helpful, but it assumes a degree of prior knowledge with the code, so it's been hit and miss so far.
edit: was incorrectly describing functions as variables... which doubtless muddied the waters. My bad.
Re: scaling resource costs per talent level?
Posted: Tue Sep 30, 2014 2:57 am
by HousePet
Use self:getTalentLevelRaw(t)
Re: scaling resource costs per talent level?
Posted: Tue Sep 30, 2014 3:11 am
by chronomancer
Thanks!
Still no luck getting it to work, so perhaps sustains with scaling costs are simply not doable. On the other hand, this has helped to clarify at least one mystery variable. (Though I suppose these are not really variables but functions? I should be more careful with my lingo.) Based on the comments, I'm assuming:
getTalentLevelRaw(t) = talent level based purely on points invested (ie., 3 = 3 pts, regardless of class multipliers etc)
getTalentLevel(t) = talent level after all multipliers are factored in?
Although the wiki (
http://te4.org/wiki/T4_Modules_Howto_Guide/Talents) seems to describe "getTalentLevel(t)" as the way I envision "getTalentLevelRaw(t)" working... so maybe I have it backwards!
