This is my first text-only tutorial and I think it'll be quite appreciated. If any of you have made abilities/buttons this tutorial should help you out quite a bit. The information in this area is relatively scarce on SC2Mapster or anywhere for that matter.
What I am going to show is how you link a button tool-tip DIRECTLY to the field it talks about. What does that mean? It means that if you went to balance your abilities and constantly change values, you won't have to change your buttons every time because they'll be referencing the direct values in the ability itself.
For instance (from my RPG on an ability's button), instead of: The Protector and nearby allied units have 1 bonus armor.
It would be: The Protector and nearby allied units have <d ref = "Behavior,AuraofStrengthLevel1,Modification.LifeArmorBonus"/> bonus armor.
And in-game this would appear as the above text with "1" instead of the <d ref> crap. And later, if i decide to change Aura of Strength to give 2 armor, I don't have to change the button :D
So how does it work?? You need to know the raw name of the effect or behavior or ability or unit you want to reference (e.g. go to behaviors tab, hit ctrl+d, and you'll see the raw names). As well, the field like the damage amount on a damage effect, but I should have enough examples here to cover this. Then you go into your tool-tip and make sure "Display as Raw Data" is checked. You have to sometimes check it again because it doesn't stay checked. This tutorial is going to be purely by example because that's how I was able to learn.
Hopefully we can build up a list of examples. Remember, CTRL+D to see the raw name of your effects and behaviors. ALSO REMEMBER to always check off display raw data in the tool-tip!!!
1. Referencing damage (effect) amount. Effect's raw name in this example is "KaboomDamage". The Engineer blasts the target with an explosive, dealing <d ref="Effect,KaboomDamage,Amount"/> spell damage.
2. Referencing behavior's (buff) move speed multiplier. Behavior's raw name in this example is "Cloak".
(Also shows how to multiply the value by 100 so that it can be displayed as 50% instead of 0.5) The Assassin cloaks, rendering him invisible to enemy units, but slowing his movement to <d ref="100 *(Behavior,Cloak,Modification.MoveSpeedMultiplier)"/>% of normal.
3. Referencing behavior's (buff) duration. Behavior's raw name in this example is "Discipline". The Assassin attacks 1.5x times faster for <d ref="Behavior,Discipline,Duration"/> seconds.
4. Referencing behavior's (buff) health regen bonus. Behavior's raw name in this example is "Meditation".
(Also shows how to have 1 decimal place on the number, replace "1" with any number you like...) The Assassin gains an additional <d ref="Behavior,Meditation,Modification.VitalRegenArray[0]" precision = "1"/> health regeneration per second.
5. Referencing behavior's (buff) armor bonus and duration at the same time. Behavior's raw name in this example is "GearSkin". Buffs the target with <d ref = "Behavior,GearSkin,Modification.LifeArmorBonus"/> bonus armor for <d ref = "Behavior,GearSkin,Duration"/> seconds.
6. Referencing a unit's maximum life plus a behavior times 2. Unit's raw name is "TinkerWall" and behavior buff's raw name is "Health". The Engineer creates a destructible wall with <d ref = "2 *(Behavior,Health,Modification.VitalMaxArray[0]) + Unit,TinkerWall,LifeMax"/> health at the target location.
7. Referencing a behavior's armor bonus and a modify unit effect. Behavior's raw name is "MechaDefense" and effect is "MechaDefenseGainEnergy". When active, the Engineer has <d ref = "Behavior,MechaDefense,Modification.LifeArmorBonus"/> increased armor and gains <d ref = "Effect,MechaDefenseGainEnergy,VitalArray[2].Change" precision = "1"/> energy when attacked.
8. Referencing a teleport effect's range. Raw name is "Teleport". The Mage teleports to the target location. Maximum range: <d ref="Effect,Teleport,Range"/>.
9. Referencing a behavior buff's energy bonus and energy regen bonus. Raw behavior name is "WisdomAura". The Mage and nearby allied units receive <d ref = "Behavior,WisdomAura,Modification.VitalMaxArray[2]"/> increased energy and <d ref = "Behavior,WisdomAura,Modification.VitalRegenArray[2]" precision="2"/> more energy regeneration.
10. Referencing a damage effect and that damage effect's AOE radius. Raw effect name is "HolyMightDamage". The Protector sends a holy bolt at the target, dealing <d ref="Effect,HolyMightDamage,Amount"/> spell damage over a <d ref="Effect,HolyMightDamage,AreaArray[0].Radius" precision="1"/> area.
The key thing is that a little bit of extra work to put these references into your buttons will save you A LOT of headaches later during playtesting when ability values will be changing all of the time and you'll forget to update your buttons.
If you don't really understand, all you really need to do is copy paste my examples so long as you're referencing the same thing. For instance, if you had an effect named "Super Strike Damage" that your ability Super Strike used... then you'd just take my "The Engineer blasts the target with an explosive, dealing <d ref="Effect,KaboomDamage,Amount"/> spell damage." and put it into your tool-tip (WITH DISPLAY RAW TEXT ON!!). Except you would change "KaboomDamage" to be "SuperStrikeDamage" and then the rest of the description text can be changed to fit your need.
Enjoy people! I know I searched for this stuff and couldn't find anything really. You don't know how long it took me to figure out the reference for damage effect area radius LOL.
Thank you very much for this tutorial. I've been wondering how they did all this, because I know in WC3 you were able to do it.
Also thank you personally for all the help you have given me and many others. I've learned so much from watching your tutorials. I know I and many others greatly appreciate what you do.
Thanks! Yeah this was an immediate tutorial for me once I figured it out... because there is literally 0 good information about this anywhere. It's painful figuring it out too, so I think enough examples should be good...
Thanks a lot OneTwo, i've been looking everywhere for something like this :D
One Question: Is it possible to track the number of stacks of a behaivor that is currently applied to a unit in the data editor?
I would like to set the damage to "(Amount) + (Number of stacks of (Behaivor) on (Unit) * 4)
This will include the bonus damage that the ability gains from buffs and attributes :)
I assume you need to edit this field via triggers each time the unit gains attribute points that increases the ability damage to update the tooltip. Unless there are another solution accessed from the data editor.
The thing about data is that it's static at runtime. Yes you can change it on a PER PLAYER basis through triggers, but it's still 'static' for each unit. So if two different units (owned by the same player) had the same behavior-buff and you modified the tooltip in triggers, both units would see the change regardless if only one had an increase of attributes...
Then it works as i expected. I may edit the values via triggers since each player only will have one unit (a hero) that has behaivors which modifies the ability values. However this may cause problems if i have units under my controll temporarily (like a pet) and wish to modify it's values to lets say: "The pet gains 20% of the heroes Stamina (Hit Points) as bonus health, and 40% of the heroes strength (damage modifier) as bonus damage.".
If i want to use the same "attribute behaivors" for heroes and units, then i will encounter a tooltip problem. A solution could be to create a new "attribute behaivor" for each controllable unit. But that may result in a lot of behaivors :(
I will think about it, probably i'll just add a bonus formula and let the player calculate for themselves if they are interested to know the exact amount. Otherwise it's always visible in the "Text Tag damage display" system that i created for a Final Fantasy alike scrolling combat text.
@OneTwoSC: Go
You could use a Unit Selected trigger to cause the change. :)
Display Raw Data doesn't give me the raw names for everything, such as sub-items in a frame (like the modification properties of a Buff behavior) or pop-up windows (like for the commands/"Info" in Arm Magazine abilities). Additionally, the "select field" button in the text editor for inserting data references crashes my editor in every instance. However, if I move the field select window up to the top of the screen when I open it, it will display the raw field name while the editor is in the process of crashing...
Edit: Ah. In fact, the Insert Data Reference feature doesn't crash if I use it from the text editor window rather than from right below the text field I'm editing in the data editor.
As for Zero0018, that option is new as of 1.3 I believe. Before we had to guess... but now, you can use that tool to automatically get a tooltip for a field.
So it is possible to track the Level of an ability nowadays? :)
I mean to give a dynamic tooltip to the ability-cast button that says how much damage the ability deals etc.? (there is a different damage-effect for every Ability-Level - so i can not reference to one static field!?)
I´m looking for the exact reference to the field "Effect: Vital Fraction Current+", Life. Does anyone know how I can find the exact reference to this value ? I think I tried hundreds of different combinations now, still no luck :(
@Freddy2287: Go I guess that's why you can give each level a whole different tooltip, no need to reference ability levels when you can reference different effects in different tooltips.
I couldn't find the info in your tutorial but I'd really love some help here.
I made an "Agility" attribute, like the WC3 one, that increments in level.
It's a behavior attribute and I want to reference it it's tooltip so a player can see the damage he can do. For example: "Ability does "Agilityx5" damage to target unit.
When I reference my behavior attribute, the damage always stays at 0, even in-game.
Note: There will always only be 1 copy of this unit on the map, so there won't be any interference with extra numbers. Help please! :x
You cannot reference the stack count of a behavior in any way, so you cannot do this directly. What you could do however is show some random value you can set with catalog triggers, and change this value via trigger whenever your attributes change (or just set the damage value the same way and display the damage in the tooltip).
This is my first text-only tutorial and I think it'll be quite appreciated. If any of you have made abilities/buttons this tutorial should help you out quite a bit. The information in this area is relatively scarce on SC2Mapster or anywhere for that matter.
What I am going to show is how you link a button tool-tip DIRECTLY to the field it talks about. What does that mean? It means that if you went to balance your abilities and constantly change values, you won't have to change your buttons every time because they'll be referencing the direct values in the ability itself.
For instance (from my RPG on an ability's button), instead of:
The Protector and nearby allied units have 1 bonus armor.
It would be:
The Protector and nearby allied units have <d ref = "Behavior,AuraofStrengthLevel1,Modification.LifeArmorBonus"/> bonus armor.
And in-game this would appear as the above text with "1" instead of the <d ref> crap. And later, if i decide to change Aura of Strength to give 2 armor, I don't have to change the button :D
So how does it work?? You need to know the raw name of the effect or behavior or ability or unit you want to reference (e.g. go to behaviors tab, hit ctrl+d, and you'll see the raw names). As well, the field like the damage amount on a damage effect, but I should have enough examples here to cover this. Then you go into your tool-tip and make sure "Display as Raw Data" is checked. You have to sometimes check it again because it doesn't stay checked. This tutorial is going to be purely by example because that's how I was able to learn.
Hopefully we can build up a list of examples. Remember, CTRL+D to see the raw name of your effects and behaviors. ALSO REMEMBER to always check off display raw data in the tool-tip!!!
1. Referencing damage (effect) amount. Effect's raw name in this example is "KaboomDamage".
The Engineer blasts the target with an explosive, dealing <d ref="Effect,KaboomDamage,Amount"/> spell damage.
2. Referencing behavior's (buff) move speed multiplier. Behavior's raw name in this example is "Cloak".
(Also shows how to multiply the value by 100 so that it can be displayed as 50% instead of 0.5)
The Assassin cloaks, rendering him invisible to enemy units, but slowing his movement to <d ref="100 *(Behavior,Cloak,Modification.MoveSpeedMultiplier)"/>% of normal.
3. Referencing behavior's (buff) duration. Behavior's raw name in this example is "Discipline".
The Assassin attacks 1.5x times faster for <d ref="Behavior,Discipline,Duration"/> seconds.
4. Referencing behavior's (buff) health regen bonus. Behavior's raw name in this example is "Meditation".
(Also shows how to have 1 decimal place on the number, replace "1" with any number you like...)
The Assassin gains an additional <d ref="Behavior,Meditation,Modification.VitalRegenArray[0]" precision = "1"/> health regeneration per second.
5. Referencing behavior's (buff) armor bonus and duration at the same time. Behavior's raw name in this example is "GearSkin".
Buffs the target with <d ref = "Behavior,GearSkin,Modification.LifeArmorBonus"/> bonus armor for <d ref = "Behavior,GearSkin,Duration"/> seconds.
6. Referencing a unit's maximum life plus a behavior times 2. Unit's raw name is "TinkerWall" and behavior buff's raw name is "Health".
The Engineer creates a destructible wall with <d ref = "2 *(Behavior,Health,Modification.VitalMaxArray[0]) + Unit,TinkerWall,LifeMax"/> health at the target location.
7. Referencing a behavior's armor bonus and a modify unit effect. Behavior's raw name is "MechaDefense" and effect is "MechaDefenseGainEnergy".
When active, the Engineer has <d ref = "Behavior,MechaDefense,Modification.LifeArmorBonus"/> increased armor and gains <d ref = "Effect,MechaDefenseGainEnergy,VitalArray[2].Change" precision = "1"/> energy when attacked.
8. Referencing a teleport effect's range. Raw name is "Teleport".
The Mage teleports to the target location. Maximum range: <d ref="Effect,Teleport,Range"/>.
9. Referencing a behavior buff's energy bonus and energy regen bonus. Raw behavior name is "WisdomAura".
The Mage and nearby allied units receive <d ref = "Behavior,WisdomAura,Modification.VitalMaxArray[2]"/> increased energy and <d ref = "Behavior,WisdomAura,Modification.VitalRegenArray[2]" precision="2"/> more energy regeneration.
10. Referencing a damage effect and that damage effect's AOE radius. Raw effect name is "HolyMightDamage".
The Protector sends a holy bolt at the target, dealing <d ref="Effect,HolyMightDamage,Amount"/> spell damage over a <d ref="Effect,HolyMightDamage,AreaArray[0].Radius" precision="1"/> area.
The key thing is that a little bit of extra work to put these references into your buttons will save you A LOT of headaches later during playtesting when ability values will be changing all of the time and you'll forget to update your buttons.
If you don't really understand, all you really need to do is copy paste my examples so long as you're referencing the same thing. For instance, if you had an effect named "Super Strike Damage" that your ability Super Strike used... then you'd just take my "The Engineer blasts the target with an explosive, dealing <d ref="Effect,KaboomDamage,Amount"/> spell damage." and put it into your tool-tip (WITH DISPLAY RAW TEXT ON!!). Except you would change "KaboomDamage" to be "SuperStrikeDamage" and then the rest of the description text can be changed to fit your need.
Enjoy people! I know I searched for this stuff and couldn't find anything really. You don't know how long it took me to figure out the reference for damage effect area radius LOL.
Thank you very much for this tutorial. I've been wondering how they did all this, because I know in WC3 you were able to do it.
Also thank you personally for all the help you have given me and many others. I've learned so much from watching your tutorials. I know I and many others greatly appreciate what you do.
@cibkc:
Thanks! Yeah this was an immediate tutorial for me once I figured it out... because there is literally 0 good information about this anywhere. It's painful figuring it out too, so I think enough examples should be good...
@OneTwoSC: Go
Thanks a lot OneTwo, i've been looking everywhere for something like this :D
One Question: Is it possible to track the number of stacks of a behaivor that is currently applied to a unit in the data editor?
I would like to set the damage to "(Amount) + (Number of stacks of (Behaivor) on (Unit) * 4)
This will include the bonus damage that the ability gains from buffs and attributes :)
I assume you need to edit this field via triggers each time the unit gains attribute points that increases the ability damage to update the tooltip. Unless there are another solution accessed from the data editor.
@Infernium: Go
The thing about data is that it's static at runtime. Yes you can change it on a PER PLAYER basis through triggers, but it's still 'static' for each unit. So if two different units (owned by the same player) had the same behavior-buff and you modified the tooltip in triggers, both units would see the change regardless if only one had an increase of attributes...
@OneTwoSC: Go
Then it works as i expected. I may edit the values via triggers since each player only will have one unit (a hero) that has behaivors which modifies the ability values. However this may cause problems if i have units under my controll temporarily (like a pet) and wish to modify it's values to lets say: "The pet gains 20% of the heroes Stamina (Hit Points) as bonus health, and 40% of the heroes strength (damage modifier) as bonus damage.".
If i want to use the same "attribute behaivors" for heroes and units, then i will encounter a tooltip problem. A solution could be to create a new "attribute behaivor" for each controllable unit. But that may result in a lot of behaivors :(
I will think about it, probably i'll just add a bonus formula and let the player calculate for themselves if they are interested to know the exact amount. Otherwise it's always visible in the "Text Tag damage display" system that i created for a Final Fantasy alike scrolling combat text.
Thanks for clarifying :)
@Infernium: Go
Yeah you can make one for each ahha.
How can you reference Offsets?
Persistent.PeriodicOffset
<d ref="Effect,AntiMatterOrbCP1,PeriodicOffsetArray[Y]"/>
Does not work
Hmm... I wonder if it is possible to use references like these in Dialog Items, but by referencing variables.
You can reference images
You know you can go to the tooltip and click edit and you can insert data references threw the text editor. Makes it ten times easier.
@OneTwoSC: Go You could use a Unit Selected trigger to cause the change. :)
Display Raw Data doesn't give me the raw names for everything, such as sub-items in a frame (like the modification properties of a Buff behavior) or pop-up windows (like for the commands/"Info" in Arm Magazine abilities). Additionally, the "select field" button in the text editor for inserting data references crashes my editor in every instance. However, if I move the field select window up to the top of the screen when I open it, it will display the raw field name while the editor is in the process of crashing...
Edit: Ah. In fact, the Insert Data Reference feature doesn't crash if I use it from the text editor window rather than from right below the text field I'm editing in the data editor.
Is it possible to reference an ability's level?
@Tobin751: Go
I don't know...
As for Zero0018, that option is new as of 1.3 I believe. Before we had to guess... but now, you can use that tool to automatically get a tooltip for a field.
So it is possible to track the Level of an ability nowadays? :)
I mean to give a dynamic tooltip to the ability-cast button that says how much damage the ability deals etc.? (there is a different damage-effect for every Ability-Level - so i can not reference to one static field!?)
Hey,
I´m looking for the exact reference to the field "Effect: Vital Fraction Current+", Life. Does anyone know how I can find the exact reference to this value ? I think I tried hundreds of different combinations now, still no luck :(
Thanks in advance !!!
@Oneiros333: Go
<d ref="Effect,YOUREFFECT,VitalArray[Life].ChangeFraction[0]"/>
You can always make a test upgrade and change the desired field. Then go to XML view and you´ll find your desired reference.
@Freddy2287: Go I guess that's why you can give each level a whole different tooltip, no need to reference ability levels when you can reference different effects in different tooltips.
I couldn't find the info in your tutorial but I'd really love some help here. I made an "Agility" attribute, like the WC3 one, that increments in level. It's a behavior attribute and I want to reference it it's tooltip so a player can see the damage he can do. For example: "Ability does "Agilityx5" damage to target unit.
When I reference my behavior attribute, the damage always stays at 0, even in-game.
Note: There will always only be 1 copy of this unit on the map, so there won't be any interference with extra numbers. Help please! :x
You cannot reference the stack count of a behavior in any way, so you cannot do this directly. What you could do however is show some random value you can set with catalog triggers, and change this value via trigger whenever your attributes change (or just set the damage value the same way and display the damage in the tooltip).