ID:155174
 
    Click()
winshow(usr,"Passive")
usr << output("\icon[src]", "Passive.Icon")
winset(usr,"Description","text=\"[Info]\"")
winset(usr,"Name","text=\"[Name]\"")
winset(usr,"Mastery","text=\"[Mastery]/[MaxMastery]\"")
Passive
icon_state="Passive"
Name="Passive"
Info="Passive Description"
Mastery=0
MaxMastery=20


What I'm trying to do is change the 'Mastery' variable for the passive into one of the players variable, for example, running speed. This way it'll show up as
"[usr. running speed]/20"


I know I could this did by having an individual Click() procedure for every passive, but I'm wondering if there's a way to do it without having to do so. I'm trying to bring this project in the right direction and saving as much resources as possible is my main goal.
Well I can't speak for the more experienced coders around here, but I did something very similar to this in one of my projects. What we did was made each passive into an obj, and then threw them all in a player's list var. Works nicely to give uniqueness because there is like 300 different passives but you can only pick a maximum of 25.

So anyways, click on the skill tree and a window comes up. All the passive objs are loaded in the window's grid on one side, then on the other side it'd show a specific passive's detailed information after clicking on it.

It wasn't exactly efficient, but we had a bunch of tmp variables set up for certain passives (like running speed) that would update every time you opened the skill tree, and others that were a bit more unique we just used the Find() proc to see if we could locate a specific passive in the user's passive list because it would have been a binary variable anyways. I'm not exactly sure if this is what you're going for or not but I hope I at least gave you an idea or helped shed some light.
In response to DarkMoonProductions
DarkMoonProductions wrote:
Well I can't speak for the more experienced coders around here, but I did something very similar to this in one of my projects. What we did was made each passive into an obj, and then threw them all in a player's list var. Works nicely to give uniqueness because there is like 300 different passives but you can only pick a maximum of 25.

So anyways, click on the skill tree and a window comes up. All the passive objs are loaded in the window's grid on one side, then on the other side it'd show a specific passive's detailed information after clicking on it.

It wasn't exactly efficient, but we had a bunch of tmp variables set up for certain passives (like running speed) that would update every time you opened the skill tree, and others that were a bit more unique we just used the Find() proc to see if we could locate a specific passive in the user's passive list because it would have been a binary variable anyways. I'm not exactly sure if this is what you're going for or not but I hope I at least gave you an idea or helped shed some light.

I like the concept, I'm actually thinking of using something like this for bought passives. Though, I'm still going for the look and feel of the progression passives I had planned. Thanks:)

Now.. if I could just find out how to get this to work..
In response to AbdelJN
Anyone?
In response to AbdelJN
bump