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.
scaling resource costs per talent level?
Moderator: Moderator
-
- Cornac
- Posts: 33
- Joined: Thu Aug 07, 2014 4:17 am
Re: scaling resource costs per talent level?
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.
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Cornac
- Posts: 33
- Joined: Thu Aug 07, 2014 4:17 am
Re: scaling resource costs per talent level?
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.
sustain_vim = 10 * self:getTalentLevel(t),
...but the game simply hangs on load, so I suspect that I'm missing something pretty basic.
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: scaling resource costs per talent level?
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.
Also, I noticed there's a built-in drain_vim that affects your vim regen. The other resources don't seem to have that.
Code: Select all
sustain_vim = function(self, t) return 10 * self:getTalentLevel(t) end,
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

Re: scaling resource costs per talent level?
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.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: scaling resource costs per talent level?
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.
-
- Cornac
- Posts: 33
- Joined: Thu Aug 07, 2014 4:17 am
Re: scaling resource costs per talent level?
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.
edit: was incorrectly describing functions as variables... which doubtless muddied the waters. My bad.
Last edited by chronomancer on Tue Sep 30, 2014 3:20 am, edited 1 time in total.
Re: scaling resource costs per talent level?
Use self:getTalentLevelRaw(t)
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Cornac
- Posts: 33
- Joined: Thu Aug 07, 2014 4:17 am
Re: scaling resource costs per talent level?
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!
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!
