Page 1 of 1

addTemporaryValue

Posted: Thu Mar 12, 2015 11:15 pm
by isaacssv552
Where can I find a list of possible values for addTemporaryValue?
e.g.
-- movement_speed
-- summon_time
-- resists
-- silence
-- stun
-- inc_damage
-- etc.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 12:27 am
by HousePet
There is an infinite number of possible values you can add.
For a load of useful ones, check Actor.lua.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 2:34 am
by isaacssv552
Is there some particular format the value must use? I'm trying to add a temporary value for inc_resource_multi.life but it doesn't actually do anything. I can change inc_resource_multi.life without using a temporary value but when I try to use a temporary value nothing happens.

On a different note, where could I find the function that fires when the player changes the amount of points they have in a talent? Also, is it possible to make a talent completely hidden from the player? For example, a talent that toggles the difficulty level but is hidden from the player.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 4:02 am
by HousePet
inc_resource_multi.life isn't a normal value, its a life value in the inc_resource_multi table.
So what you need to do is increase the value of inc_resource_multi by {[life] = value}.
See for example how Shivgoroth Form alters your cold resistance, which is a value in the resists table.
Shivgoroth Form also increases a talent level.
For an example of a hidden talent, look at exotic weapon mastery.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 12:10 pm
by isaacssv552
Thanks, I think I understand it now.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 4:24 pm
by isaacssv552
I am testing live = self:addTemporaryValue("inc_resource_multi", { [life]=boost } ) but I get a error saying that life is a nil table index. Also, hide = true only hides the talent if the player has no points in it.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 4:46 pm
by Effigy
I think it's intended that talents aren't hidden when you have points in them.

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 6:07 pm
by isaacssv552
So there isn't a way to hide talent completely? Also which file is the inc_resource_multi table in?

Re: addTemporaryValue

Posted: Fri Mar 13, 2015 11:53 pm
by HousePet
Try looking at how Solipsism does it.

Re: addTemporaryValue

Posted: Tue Mar 17, 2015 12:25 pm
by isaacssv552
I ended up just finding another way to solve the problem. Thanks anyway though.