addTemporaryValue

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

addTemporaryValue

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

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

Re: addTemporaryValue

#2 Post by HousePet »

There is an infinite number of possible values you can add.
For a load of useful ones, check Actor.lua.
My feedback meter decays into coding. Give me feedback and I make mods.

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: addTemporaryValue

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

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

Re: addTemporaryValue

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

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: addTemporaryValue

#5 Post by isaacssv552 »

Thanks, I think I understand it now.

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: addTemporaryValue

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

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: addTemporaryValue

#7 Post by Effigy »

I think it's intended that talents aren't hidden when you have points in them.

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: addTemporaryValue

#8 Post by isaacssv552 »

So there isn't a way to hide talent completely? Also which file is the inc_resource_multi table in?

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

Re: addTemporaryValue

#9 Post by HousePet »

Try looking at how Solipsism does it.
My feedback meter decays into coding. Give me feedback and I make mods.

isaacssv552
Wayist
Posts: 25
Joined: Thu Mar 12, 2015 11:12 pm

Re: addTemporaryValue

#10 Post by isaacssv552 »

I ended up just finding another way to solve the problem. Thanks anyway though.

Post Reply