Since the release of the Galaxy editor, I have been looking at the current limit of the Galaxy Editor. People probably have already found out, after hero dies and then revived, the hero loses all the experience, and any bonus from attributes are permanently stuck on the hero.
I am providing this revive system so map makers can test their map with heroes without having to wait for next galaxy editor update.
Defining the Limit
There are only two limits for heroes:
- No working revive system
- No "give experience" function
No Working Revive System
When the "revive" ability is used, the hero's experiences and attributes reset while the hero's attribute bonuses stack.
The reason for this is simple, Blizzard do not need a revive ability for Starcraft Campaigns (Hero dies, mission is over). They only have to save hero after mission is complete (though I have not seen any hero from Blizzard missions so far). Right now only thing stored is ability learned, which is not useful at all.
Overcoming the problem
We need keep the hero from not dying. It's that simple. Once a Hero dies, it's all over everything is gone. It is not like WC3 where the Hero data remains after death.
Easy to do this in trigger right? We only have to do an event when "unit takes fatal damage"~
WRONG, dead wrong
Blizzard has made sure you could not do that. Unlike WC3 function "unit takes damage", the event is only triggered after the damage is taken. That's right, after the damage is taken. Why? Ask Blizzard. What does that mean? Unit takes fatal damage triggers after the unit is dead, that means all the Hero data is gone forever.
So how do we keep the hero from dying but not make the hero invincible? Make the all damages non-lethal. All effect - damage flag has kill or live option. Tick live and the damage is no longer lethal. After this is done, make an unit takes damage condition. Check if the unit is below 1.1HP (non-lethal), after that either kill the unit using the trigger, give the hero EXP or trigger lethal (live unticked) effect - damage that is larger than 2 (preferably more) and ignores spell and life armor to the damaging unit. Don't worry since the "takes damage" event is triggered after the damaging unit when below 1.1 hp will always be the killing unit. After the hero is dead, pause and hide the unit and move him wherever you wish. create a timer and revive the Hero.
Drawbacks
This is a workaround until Blizzard fixes it... So there will be some drawbacks.
If using kill unit method, the unit death animation is not interactive with the attack
Experience System
There is no "give x amount of Experience" function. Only method is making an effect that modifies the unit's experience. That means every time you want to add a specific amount of experience, you have to make an "effect" for it. I have made a custom function for give experience in the library. Pretty much it adds using binary numbers together until the maximum integer. That means it will only go through 1718 loops max, which is an efficient function without lags. I thought about making "x amount of damage" function as well but I realised it won't work properly because of sc2's spell & life damage/armor reduction.
Drawbacks
None
Final Thoughts
Remember this system is temporary solution until Blizzard fixes the problem. I'll be finishing my AoS template for everyone who wants to learn more about Heroes in sc2.
P.S. I'll be starting a big project soon, PM me. I'm looking for terrain editors, concept artists and few data editors.
Since the release of the Galaxy editor, I have been looking at the current limit of the Galaxy Editor. People probably have already found out, after hero dies and then revived, the hero loses all the experience, and any bonus from attributes are permanently stuck on the hero. I am providing this revive system so map makers can test their map with heroes without having to wait for next galaxy editor update. Defining the Limit
There are only two limits for heroes: - No working revive system - No "give experience" function No Working Revive System
When the "revive" ability is used, the hero's experiences and attributes reset while the hero's attribute bonuses stack. The reason for this is simple, Blizzard do not need a revive ability for Starcraft Campaigns (Hero dies, mission is over). They only have to save hero after mission is complete (though I have not seen any hero from Blizzard missions so far). Right now only thing stored is ability learned, which is not useful at all. Overcoming the problem
We need keep the hero from not dying. It's that simple. Once a Hero dies, it's all over everything is gone. It is not like WC3 where the Hero data remains after death. Easy to do this in trigger right? We only have to do an event when "unit takes fatal damage"~ WRONG, dead wrong Blizzard has made sure you could not do that. Unlike WC3 function "unit takes damage", the event is only triggered after the damage is taken. That's right, after the damage is taken. Why? Ask Blizzard. What does that mean? Unit takes fatal damage triggers after the unit is dead, that means all the Hero data is gone forever. So how do we keep the hero from dying but not make the hero invincible? Make the all damages non-lethal. All effect - damage flag has kill or live option. Tick live and the damage is no longer lethal. After this is done, make an unit takes damage condition. Check if the unit is below 1.1HP (non-lethal), after that either kill the unit using the trigger, give the hero EXP or trigger lethal (live unticked) effect - damage that is larger than 2 (preferably more) and ignores spell and life armor to the damaging unit. Don't worry since the "takes damage" event is triggered after the damaging unit when below 1.1 hp will always be the killing unit. After the hero is dead, pause and hide the unit and move him wherever you wish. create a timer and revive the Hero. Drawbacks
This is a workaround until Blizzard fixes it... So there will be some drawbacks.
If using kill unit method, the unit death animation is not interactive with the attack Experience System
There is no "give x amount of Experience" function. Only method is making an effect that modifies the unit's experience. That means every time you want to add a specific amount of experience, you have to make an "effect" for it. I have made a custom function for give experience in the library. Pretty much it adds using binary numbers together until the maximum integer. That means it will only go through 1718 loops max, which is an efficient function without lags. I thought about making "x amount of damage" function as well but I realised it won't work properly because of sc2's spell life damage/armor reduction. Drawbacks
None Final Thoughts
Remember this system is temporary solution until Blizzard fixes the problem. I'll be finishing my AoS template for everyone who wants to learn more about Heroes in sc2.
P.S. I'll be starting a big project soon, PM me. I'm looking for terrain editors, concept artists and few data editors.
MAP DOWNLOAD
Nice info. Do you know how we can make our hero level up? Is that function in the editor yet? Or do we have to use Custom UI? I ask because I am making something like that of which is on the front page right now, the RPG-esque night map. (I actually want to collaberate with that mapper on this)
does this mean we cannot save these hero data to variables? I haven't tried the Bank yet, so I have no idea what that's for.
Yes, you can save the data, you would have to save exp when the unit gains it but that's not the issue. The problem is when you save hero's experience and give it to him when you revive him, the bonuses from attribute still stack. That means if you had 10 STR and each str gave 10 hp, when you revive you will have 100 HP permanently stuck on your hero.
I have found alternative, making a new unit and manually adding all the abilities learned from the previous hero then removing the previous unit permanently. This is a big big hassle but it works. However OP is the best temporary solution for testing heroes. Best solution is waiting for Blizzard to update Galaxy Editor. ^^
Nice info. Do you know how we can make our hero level up? Is that function in the editor yet? Or do we have to use Custom UI? I ask because I am making something like that of which is on the front page right now, the RPG-esque night map. (I actually want to collaberate with that mapper on this)
I implemented this solution in my map (reviving based on non death) however, it is possible for the event to be triggered twice. To counter this I added the following:
However, there seems to be an intermittent error along the lines of "error starting Starcraft2 please try again" that will prevent the revive function you proposed from going off. Any idea as to what can be causing this?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Introduction
Since the release of the Galaxy editor, I have been looking at the current limit of the Galaxy Editor. People probably have already found out, after hero dies and then revived, the hero loses all the experience, and any bonus from attributes are permanently stuck on the hero. I am providing this revive system so map makers can test their map with heroes without having to wait for next galaxy editor update.
Defining the Limit
There are only two limits for heroes: - No working revive system - No "give experience" function
No Working Revive System
When the "revive" ability is used, the hero's experiences and attributes reset while the hero's attribute bonuses stack. The reason for this is simple, Blizzard do not need a revive ability for Starcraft Campaigns (Hero dies, mission is over). They only have to save hero after mission is complete (though I have not seen any hero from Blizzard missions so far). Right now only thing stored is ability learned, which is not useful at all.
Overcoming the problem
We need keep the hero from not dying. It's that simple. Once a Hero dies, it's all over everything is gone. It is not like WC3 where the Hero data remains after death. Easy to do this in trigger right? We only have to do an event when "unit takes fatal damage"~ WRONG, dead wrong Blizzard has made sure you could not do that. Unlike WC3 function "unit takes damage", the event is only triggered after the damage is taken. That's right, after the damage is taken. Why? Ask Blizzard. What does that mean? Unit takes fatal damage triggers after the unit is dead, that means all the Hero data is gone forever. So how do we keep the hero from dying but not make the hero invincible? Make the all damages non-lethal. All effect - damage flag has kill or live option. Tick live and the damage is no longer lethal. After this is done, make an unit takes damage condition. Check if the unit is below 1.1HP (non-lethal), after that either kill the unit using the trigger, give the hero EXP or trigger lethal (live unticked) effect - damage that is larger than 2 (preferably more) and ignores spell and life armor to the damaging unit. Don't worry since the "takes damage" event is triggered after the damaging unit when below 1.1 hp will always be the killing unit. After the hero is dead, pause and hide the unit and move him wherever you wish. create a timer and revive the Hero.
Drawbacks
This is a workaround until Blizzard fixes it... So there will be some drawbacks.
Experience System
There is no "give x amount of Experience" function. Only method is making an effect that modifies the unit's experience. That means every time you want to add a specific amount of experience, you have to make an "effect" for it. I have made a custom function for give experience in the library. Pretty much it adds using binary numbers together until the maximum integer. That means it will only go through 1718 loops max, which is an efficient function without lags. I thought about making "x amount of damage" function as well but I realised it won't work properly because of sc2's spell & life damage/armor reduction.
Drawbacks
None
Final Thoughts
Remember this system is temporary solution until Blizzard fixes the problem. I'll be finishing my AoS template for everyone who wants to learn more about Heroes in sc2.
P.S. I'll be starting a big project soon, PM me. I'm looking for terrain editors, concept artists and few data editors.
MAP DOWNLOAD
Nice info. Do you know how we can make our hero level up? Is that function in the editor yet? Or do we have to use Custom UI? I ask because I am making something like that of which is on the front page right now, the RPG-esque night map. (I actually want to collaberate with that mapper on this)
does this mean we cannot save these hero data to variables? I haven't tried the Bank yet, so I have no idea what that's for.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.
Yes, you can save the data, you would have to save exp when the unit gains it but that's not the issue. The problem is when you save hero's experience and give it to him when you revive him, the bonuses from attribute still stack. That means if you had 10 STR and each str gave 10 hp, when you revive you will have 100 HP permanently stuck on your hero. I have found alternative, making a new unit and manually adding all the abilities learned from the previous hero then removing the previous unit permanently. This is a big big hassle but it works. However OP is the best temporary solution for testing heroes. Best solution is waiting for Blizzard to update Galaxy Editor. ^^
I made the testing map.
If you want to learn about Hero leveling, Bifuu made a tutorial,. http://forums.sc2mapster.com/development/tutorials/431-data-complete-hero-tutorial/?unread
I implemented this solution in my map (reviving based on non death) however, it is possible for the event to be triggered twice. To counter this I added the following:
However, there seems to be an intermittent error along the lines of "error starting Starcraft2 please try again" that will prevent the revive function you proposed from going off. Any idea as to what can be causing this?