After piecing together a lot of stuff from several tutorials and advice from helpful people here, I think I've got unit / hero creation down. I've also been able to declare attributes (behaviors) and apply them correctly, scaling them with veterancy. However, when I got to ability creation, I hit a roadblock.
Right now I'm just trying to reproduce some of the stuff I've seen done in SotIS, Hero Attack and other MOBA SC2 maps. I've noticed in SotIS, some attacks scale with your attributes. For instance, Shadow.Geminus's Shade spell does a set amount of damage (which increases per level) plus a percentage of his Agility. When I was trying to design effects, I couldn't see how this can be implemented in the form of an effect. I searched through SC2Mapster + Starcraft II forums and found that some people did something similar using triggers. Upon the ability being used, it would take the relevant attribute and calculate the bonus damage from the attribute accordingly before applying it.
Is this the best way to go about it? Or is there another way to manage it cleanly using just the data editor?
It's done via upgrades? Interesting... how exactly does that work though? The attributes don't seem to be upgrades, they appear like normal attributes and such.
I don't know exactly how it works with SotIS, but I would use a trigger to set the level of the upgrade to that of the value of the attribute.
For efficiency, I believe there is an event that occurs when a unit's attribute value changes so you shouldn't need a looping trigger every 1 second or so to update the upgrade properly during the whole game.
I think there may be a way to do so in data but it will require some math on your part, some validators a switch effect and multiple effects, one for each level of the attribute you have. its tedious and long in this the back end of the game.
in essence you would calculate the bonus you want to the ability for each level of the attribute, create a validator for each level of that attribute and create a switch effect that has cases validated by those validators. each case in the switch effect would be an outcome of the effect.
Like this:
Case1: Validate Attribute Level 1, Effect 1
Case2: Validate Attribute Level 2, Effect 2
and so forth.
If anyone remembers back in beta I was part of a team that created a game around this concept named Epic. The easist way we found to do this was to run a trigger when a unit's attributes changed (on level up, on item pickup, etc) and then to do a Catalog Field Value Set and calculate out what the new damage is. This requires a huge amount less work, and causes almost zero performance issues.
The benefit to using the Catalog is that you will only have to execute it one time. After that, the ability will work as normal and the damage will be built into the effects. I am sure it is possible to do via data, but you're going to end up with a huge amount of work with very little pay off. "Use the right tool for the right job"
@Soma2035: Go
This is a pretty tricky thing to do, have you ever done anything with Catalogs? i upgrade my abilities through catalogs. Here is one of my abilities that is upgraded via catalogs (you could use some arithmetic and multipliers and modify this)
Here is another trigger that basically takes all melee damage and scales it up or down based on the attacking and defending units "Power" and "Endurance" attributes, its a bit more complected and its not ability specific but it might help you as an example.
Well, I actually haven't really done much with the trigger editor yet. I'm familiarizing myself with the data editor first. The catalog action seems kind of interesting though. Does that just change the base value in the data editor field to which it refers?
I'm wondering if this may be a proper solution to my recent data editor trouble regarding minions not getting bonus damage from the summoning caster.
@Soma2035: Go
Oh, Catalogs are basically triggers used to edit specific fields in the Data editor. The drawback to Catalogs is that they are only able to edit fields that are also editable by upgrades. nonetheless they are an extremely powerful tool for making level able heros.
If you are new to triggers they could be a bit on the complected side, but i would be happy to help teach you how to make some.
You mentioned Shadow.Geminus's Shade spell earlier. To do somthing like that you would not need to use a catalog but you would use triggers. Ill show you how to make something similar
I dont know the exact amount of damage the ability does or how much it scales for so ill just throw out some numbers
Lets say the ability deals 100+(Agi*.5) or 100 damage plus half your hero's agility.
1) The first thing you need to do is make a Damage effect that does not get reduced from armor of type spell damage. I called mine SpellDamage, make it deal 0 damage, we will use a trigger to change the damage later
2) You need to make a trigger that fires every time that ability does damage and then add some damage to it. So lets say that the 100 Damage of our ability (the effect that deals 100 damage) is called "ShadeDamage" You would need to make a trigger like this-
So the event fires any time a unit takes damage from that ability, then the Acton will deal additional damage to a unit using that SpellDamage effect, for the extra Damage part you will need to do an Arithmetic, and then convert a real to an integer in order to put in the stack count of Agility in to the equation then in the other field of your arithmetic multiply by .5
For that specific example you didnt need a catalog, However you WOULD need catalog to do somthing like
Damage= (100+(100*(Agi*.5)) or in other words deal a % extra damage based on your agility
Hope this helps PM me if you have any questions, ide be happy to help
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
After piecing together a lot of stuff from several tutorials and advice from helpful people here, I think I've got unit / hero creation down. I've also been able to declare attributes (behaviors) and apply them correctly, scaling them with veterancy. However, when I got to ability creation, I hit a roadblock.
Right now I'm just trying to reproduce some of the stuff I've seen done in SotIS, Hero Attack and other MOBA SC2 maps. I've noticed in SotIS, some attacks scale with your attributes. For instance, Shadow.Geminus's Shade spell does a set amount of damage (which increases per level) plus a percentage of his Agility. When I was trying to design effects, I couldn't see how this can be implemented in the form of an effect. I searched through SC2Mapster + Starcraft II forums and found that some people did something similar using triggers. Upon the ability being used, it would take the relevant attribute and calculate the bonus damage from the attribute accordingly before applying it.
Is this the best way to go about it? Or is there another way to manage it cleanly using just the data editor?
I'm pretty sure SotIS uses upgrades to achieve this, and I'd advise the same.
@Eiviyn: Go
It's done via upgrades? Interesting... how exactly does that work though? The attributes don't seem to be upgrades, they appear like normal attributes and such.
I don't know exactly how it works with SotIS, but I would use a trigger to set the level of the upgrade to that of the value of the attribute.
For efficiency, I believe there is an event that occurs when a unit's attribute value changes so you shouldn't need a looping trigger every 1 second or so to update the upgrade properly during the whole game.
I think there may be a way to do so in data but it will require some math on your part, some validators a switch effect and multiple effects, one for each level of the attribute you have. its tedious and long in this the back end of the game.
in essence you would calculate the bonus you want to the ability for each level of the attribute, create a validator for each level of that attribute and create a switch effect that has cases validated by those validators. each case in the switch effect would be an outcome of the effect.
Like this:
Case1: Validate Attribute Level 1, Effect 1
Case2: Validate Attribute Level 2, Effect 2
and so forth.
If anyone remembers back in beta I was part of a team that created a game around this concept named Epic. The easist way we found to do this was to run a trigger when a unit's attributes changed (on level up, on item pickup, etc) and then to do a Catalog Field Value Set and calculate out what the new damage is. This requires a huge amount less work, and causes almost zero performance issues.
The benefit to using the Catalog is that you will only have to execute it one time. After that, the ability will work as normal and the damage will be built into the effects. I am sure it is possible to do via data, but you're going to end up with a huge amount of work with very little pay off. "Use the right tool for the right job"
@Soma2035: Go This is a pretty tricky thing to do, have you ever done anything with Catalogs? i upgrade my abilities through catalogs. Here is one of my abilities that is upgraded via catalogs (you could use some arithmetic and multipliers and modify this)
Here is another trigger that basically takes all melee damage and scales it up or down based on the attacking and defending units "Power" and "Endurance" attributes, its a bit more complected and its not ability specific but it might help you as an example.
Hope this helps you out!
I don't have time to go in to more specifics at the moment but if you need some more help with this feel free to PM me.
@Antimatterthunder: Go
Well, I actually haven't really done much with the trigger editor yet. I'm familiarizing myself with the data editor first. The catalog action seems kind of interesting though. Does that just change the base value in the data editor field to which it refers?
I'm wondering if this may be a proper solution to my recent data editor trouble regarding minions not getting bonus damage from the summoning caster.
@Soma2035: Go Oh, Catalogs are basically triggers used to edit specific fields in the Data editor. The drawback to Catalogs is that they are only able to edit fields that are also editable by upgrades. nonetheless they are an extremely powerful tool for making level able heros. If you are new to triggers they could be a bit on the complected side, but i would be happy to help teach you how to make some.
You mentioned Shadow.Geminus's Shade spell earlier. To do somthing like that you would not need to use a catalog but you would use triggers. Ill show you how to make something similar
I dont know the exact amount of damage the ability does or how much it scales for so ill just throw out some numbers Lets say the ability deals 100+(Agi*.5) or 100 damage plus half your hero's agility.
1) The first thing you need to do is make a Damage effect that does not get reduced from armor of type spell damage. I called mine SpellDamage, make it deal 0 damage, we will use a trigger to change the damage later
2) You need to make a trigger that fires every time that ability does damage and then add some damage to it. So lets say that the 100 Damage of our ability (the effect that deals 100 damage) is called "ShadeDamage" You would need to make a trigger like this-
So the event fires any time a unit takes damage from that ability, then the Acton will deal additional damage to a unit using that SpellDamage effect, for the extra Damage part you will need to do an Arithmetic, and then convert a real to an integer in order to put in the stack count of Agility in to the equation then in the other field of your arithmetic multiply by .5
For that specific example you didnt need a catalog, However you WOULD need catalog to do somthing like Damage= (100+(100*(Agi*.5)) or in other words deal a % extra damage based on your agility
Hope this helps PM me if you have any questions, ide be happy to help