Use util.getVal for resources other than mana (code inside)

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Post Reply
Message
Author
Umbrall
Thalore
Posts: 153
Joined: Sat Feb 23, 2013 7:53 pm

Use util.getVal for resources other than mana (code inside)

#1 Post by Umbrall »

In short, I and multiple other people have had to overload Actor's getTalentFullDescription, and preUseTalent and postUseTalent to account for function costs. To avoid conflicts and for later possible function costs, I propose actually adding them to everything. In order to remove the only major cost, I've done all the copy-pasting.

http://pastebin.com/rBmWCPM0
this contains both the description and preUse in their entirety

http://pastebin.com/VzG2p1bN
this contains the missing postUse

nate
Wyrmic
Posts: 261
Joined: Fri Jan 18, 2013 8:35 am

Re: Use util.getVal for resources other than mana (code insi

#2 Post by nate »

I'm sorry, I'm too lazy to pore over that to see what's original and what you've changed.

What problems are you running into? I've been using functions for resource costs without any problems, using the existing hooks in preUse, postUse, and fullDescription. I'm having trouble imagining reasonable situations where these hooks would be insufficient. Did you notice these hooks? (I didn't at first, somebody had to point them out to me-- DarkGod, I think.)
Proud father of Fx4fx and Chronometer add-ons; proud mother of Fated add-on

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

Re: Use util.getVal for resources other than mana (code insi

#3 Post by HousePet »

You can do this completely with hooks as of 1.0.1
My feedback meter decays into coding. Give me feedback and I make mods.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Use util.getVal for resources other than mana (code insi

#4 Post by darkgod »

applied
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Umbrall
Thalore
Posts: 153
Joined: Sat Feb 23, 2013 7:53 pm

Re: Use util.getVal for resources other than mana (code insi

#5 Post by Umbrall »

HousePet wrote:You can do this completely with hooks as of 1.0.1
No you can't. The old code will run. The old code will break.

Post Reply