I wrote a library that allows via action to give an any number of experience points to unit (from 1 to 99999). You can increase this number to how many you want, you only work a little over the library(or say me if it's need).
How to use:
You need to import the library in your map. Open Trigger Editor(press F6), then press view->show libraries. Right click on library field->library->import library->choose my library Add Experience To Unit
You need to copy from my map five effects (Add Exp 1 point, Add Exp 10 points, Add Exp 100 points, Add Exp 1000 points, Add Exp 10000 points). Select them all, click ctrl + c, open your map and click + v.
Then you can call action Add Experience To Unit(Experience Points, Unit) which will give to Unit Experience Points.
In addition, in map, I realized the command -give experience points, when experience points - number of experience points which you want to give your unit.
I think all this will be useful for people who are developing maps with the heroes.
I've had to do this in my RPG for loading a hero and getting his exp back to the right number... I would guess he applies the 1000 XP effect in a loop until 100 XP needed until 10 XP until down to the last XP. It's the best we can do atm :/
I just found in your map solution through set catalog value. I'm shocked.
I do not understand how you knew all this so early. And in your map used such functions and chips, which I began to understand for example only after several months of studying the editor. You did this map http://www.sc2mapster.com/maps/aos-hero-revive-example/ after several days of release of the editor. I do not understand, or you're a genius, or?? oO
You have worked in Warcraft 3 World Editor? Why do you always write that it's easy? And why do you have a map of everywhere [zifoon]? :D . You love yourself so much?
I just found in your map solution through set catalog value. I'm shocked.
I do not understand how you knew all this so early. And in your map used such functions and chips, which I began to understand for example only after several months of studying the editor. You did this map http://www.sc2mapster.com/maps/aos-hero-revive-example/ after several days of release of the editor. I do not understand, or you're a genius, or?? oO
You have worked in Warcraft 3 World Editor? Why do you always write that it's easy? And why do you have a map of everywhere [zifoon]? :D . You love yourself so much?
Na I was using xml before editor was release. So I was using [zifoon] as identifier so I can search quicker through xml editor. It was few days after release of the editor but I played around with xml and native functions a lot so I pretty much knew every function. In addition to that, I do have a casual job designing interface for softwares and that helps too. Though very casual since I still have to finish university.
Not a genius just knew stuff before other people did.
Yeah, I used world editor for couple of years but I wasn't really fan of making maps. I just like challenging the limitation of world editor but that was it. Also I don't love myself per say but healthy dose of narcissism never hurt anybody ^.^
I was quite interested in your function, so I took it apart and rewrote it. It's still using base 10 multiples (so no new effects needed), it just uses arrays and loops to spit out the right experience. There are also 2 versions,1 that takes reals and 1 that takes ints (since it not showing up sucks). So a new Add_Experience_to_Unit.SCLib is attached. Also, I wrote a small javascript script that will spit out the xml for setting up level requirements. You can specify a function and it will spit out a bunch of veterancyLevelArray tags with the appropriate values. Because editing 40 levels worth of experience requirements sucks.
Edit: I re read the post about using set catalog, and nevermind, thats so much easier. Check out the vererancy levels generator though.
i have a question. currently in my ORPG map every time a hero dies, there is a brief lag spike, before they are instantly revived. Im not sure what the problem is, but i asssume it's becuase of the trigger i have that returns the heroes EXP to him. i have a behavior that applies a EXP effect that gives 1 exp point, and i stack the buff x number of times to equal the heroes EXP before he died. once the hero reaches a level higher than 10 the lag increases exponentially when they die and respawn, taking up to 5 seconds or more for the lag to clear, and the hero to respawn. i also get a trigger error for a random trigger every time the hero respawns, (ive tried turning off the triggers that return the error, but then it just picks a different one) will this method help solve either of these problems? thanks in advance!
the lag is caused by the loop to add 1 point of experience a lot of times.
I don't know if the asset supplied here uses the catalog one which is lag free since it is no loop at all just 2 actions, but at least it will cause less lag then the way you have it now.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello everyone.
I wrote a library that allows via action to give an any number of experience points to unit (from 1 to 99999). You can increase this number to how many you want, you only work a little over the library(or say me if it's need).
How to use:
Then you can call action Add Experience To Unit(Experience Points, Unit) which will give to Unit Experience Points. In addition, in map, I realized the command -give experience points, when experience points - number of experience points which you want to give your unit. I think all this will be useful for people who are developing maps with the heroes.
http://www.youtube.com/user/RussianMapster
How does it work behind the scenes?
@vjeux: Go
Or you mean something else?
http://www.youtube.com/user/RussianMapster
This is great Korvin! All the other methods of doing what should be a simple task were so clunky.
@vjeux: Go
I've had to do this in my RPG for loading a hero and getting his exp back to the right number... I would guess he applies the 1000 XP effect in a loop until 100 XP needed until 10 XP until down to the last XP. It's the best we can do atm :/
So people didn't know how to do this? It's simple catalog function using a dummy effect. O_O
http://www.sc2mapster.com/maps/aos-template/files/ ^Mine was made May This wasn't uncommon either
@zifoon: Go
I just found in your map solution through set catalog value. I'm shocked.
I do not understand how you knew all this so early. And in your map used such functions and chips, which I began to understand for example only after several months of studying the editor. You did this map http://www.sc2mapster.com/maps/aos-hero-revive-example/ after several days of release of the editor. I do not understand, or you're a genius, or?? oO
You have worked in Warcraft 3 World Editor? Why do you always write that it's easy? And why do you have a map of everywhere [zifoon]? :D . You love yourself so much?
http://www.youtube.com/user/RussianMapster
Na I was using xml before editor was release. So I was using [zifoon] as identifier so I can search quicker through xml editor. It was few days after release of the editor but I played around with xml and native functions a lot so I pretty much knew every function. In addition to that, I do have a casual job designing interface for softwares and that helps too. Though very casual since I still have to finish university.
Not a genius just knew stuff before other people did.
Yeah, I used world editor for couple of years but I wasn't really fan of making maps. I just like challenging the limitation of world editor but that was it. Also I don't love myself per say but healthy dose of narcissism never hurt anybody ^.^
@zifoon: Go
Interesting solution.
@zifoon: Go
Guess you got an admirer :)
Anyway, good solution. SetCatalog will help us circumvent these binary additions most of the time.
Thanks all! Been looking all over the place for something like this.
@KorvinGump: Go
Very nice library. Didn't realize how useful something like this would be until I saw this thread! :D
I was quite interested in your function, so I took it apart and rewrote it. It's still using base 10 multiples (so no new effects needed), it just uses arrays and loops to spit out the right experience. There are also 2 versions,1 that takes reals and 1 that takes ints (since it not showing up sucks). So a new Add_Experience_to_Unit.SCLib is attached. Also, I wrote a small javascript script that will spit out the xml for setting up level requirements. You can specify a function and it will spit out a bunch of veterancyLevelArray tags with the appropriate values. Because editing 40 levels worth of experience requirements sucks.
Edit: I re read the post about using set catalog, and nevermind, thats so much easier. Check out the vererancy levels generator though.
i have a question. currently in my ORPG map every time a hero dies, there is a brief lag spike, before they are instantly revived. Im not sure what the problem is, but i asssume it's becuase of the trigger i have that returns the heroes EXP to him. i have a behavior that applies a EXP effect that gives 1 exp point, and i stack the buff x number of times to equal the heroes EXP before he died. once the hero reaches a level higher than 10 the lag increases exponentially when they die and respawn, taking up to 5 seconds or more for the lag to clear, and the hero to respawn. i also get a trigger error for a random trigger every time the hero respawns, (ive tried turning off the triggers that return the error, but then it just picks a different one) will this method help solve either of these problems? thanks in advance!
This is what I call, quest rewards made easy. Thanks and awesome job.
@MangledMind: Go
the lag is caused by the loop to add 1 point of experience a lot of times.
I don't know if the asset supplied here uses the catalog one which is lag free since it is no loop at all just 2 actions, but at least it will cause less lag then the way you have it now.