scaling resource costs per talent level?

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
chronomancer
Cornac
Posts: 33
Joined: Thu Aug 07, 2014 4:17 am

scaling resource costs per talent level?

#1 Post 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.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: scaling resource costs per talent level?

#2 Post 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.
My feedback meter decays into coding. Give me feedback and I make mods.

chronomancer
Cornac
Posts: 33
Joined: Thu Aug 07, 2014 4:17 am

Re: scaling resource costs per talent level?

#3 Post 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.

grayswandir
Uruivellas
Posts: 708
Joined: Wed Apr 30, 2008 5:55 pm

Re: scaling resource costs per talent level?

#4 Post 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.
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. :)

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: scaling resource costs per talent level?

#5 Post 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.
My feedback meter decays into coding. Give me feedback and I make mods.

Razakai
Uruivellas
Posts: 889
Joined: Tue May 14, 2013 3:45 pm

Re: scaling resource costs per talent level?

#6 Post 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.

chronomancer
Cornac
Posts: 33
Joined: Thu Aug 07, 2014 4:17 am

Re: scaling resource costs per talent level?

#7 Post 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.
Last edited by chronomancer on Tue Sep 30, 2014 3:20 am, edited 1 time in total.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: scaling resource costs per talent level?

#8 Post by HousePet »

Use self:getTalentLevelRaw(t)
My feedback meter decays into coding. Give me feedback and I make mods.

chronomancer
Cornac
Posts: 33
Joined: Thu Aug 07, 2014 4:17 am

Re: scaling resource costs per talent level?

#9 Post 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! :roll:

Post Reply