Attribute-scaling abilities?

Xialian

Member
Reaction score
8
How do I make a spell that does for example four times my hero's agility in damage or passively adds that damage to basic attacks? I've been struggling with this for a while and I can't seem to get any further :(
 

thorhunter

You can change this now in User CP.
Reaction score
32
Set integer value = Hero attribute x 4;
Unit - Damage unit dealing -convert (integer to real (integer value))- damage

As for your passive ability, you need to give your unit some sort of damage ability eg. 'Item - damage bonus' that has numerous level and periodically check whether level f this ability equals hero's attribute, if not, set it to value equal to your attribute. I like to use some additional integer variable that remembers the level of an ability rather than checking level of an ability, since the check is really heavy computingwise.
 

Xialian

Member
Reaction score
8
Can you give me an example of a spell doing damage with attributes? As I said, I'm fairly bad at this, and would appreciate so much help making my heroes advanced :D
 

thorhunter

You can change this now in User CP.
Reaction score
32
Trigger:
  • Slash Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slash
    • Actions
      • Animation - Play (Triggering unit)'s attack animation
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Group = (Units within 280.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Set TempG[1] = (Strength of (Triggering unit) (Include bonuses))
      • Set TempG[2] = (Agility of (Triggering unit) (Include bonuses))
      • Set TempG[3] = ((((Level of WWeaponDamageBonus x10 for (Triggering unit)) - 1) x 10) + ((Level of WWeaponDamageBonus x1 for (Triggering unit)) - 1))
      • Set TempReal = (1.00 + (1.00 + ((Real((TempG[1] + TempG[2]))) x 0.10)))
      • Set TempReal = (TempReal x (Real(TempG[3])))
      • Set TempReal = (TempReal + (Real((2 x TempG[1]))))
      • Set TempReal = (TempReal x 0.80)
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real(Temp_Integer[1])) damage of attack type Normal and damage type Normal
            • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group)
 

Xialian

Member
Reaction score
8
How does most of that work? I don't get the "TempG[3] = ((((Level of WWeaponDamageBonus x10 for (Triggering Unit)) - 1) x 10) + ((Level of WWeaponDamageBonus x1 for (Triggering Unit)) - 1))" and so on... Also, I don't know how to post my thing so far, but I've made it like this:

Events
Unit - A unit Starts the effect of an ability
Conditions
(Unit-type of (Triggering unit)) Equal to Hyperassassin (that's his name :D)
Actions
Set HAAgi = (Agility of (Triggering unit) (Include bonuses))
 

thorhunter

You can change this now in User CP.
Reaction score
32
The lines you mentioned should be no concern to you, they sorta refer to an abstract attribute i created for the purpose of my map, this trigger is just copied from there and I didn't remove it for the sake of further calculations (I actually should). The example you posted will work, but remember to specify what ability is being cast.
 

Xialian

Member
Reaction score
8
Yeah, of course I will meantion him as the casting unit :p
But how do I multiply the value (his agility attribute) and convert it to damage? The first thing you mentioned was quite confusing...
 

thorhunter

You can change this now in User CP.
Reaction score
32
Just use it as arithmetic function when setting variable. If you want to use this value to damage unit, theres 'unit - damage unit' function where you sepcify damage type (present in trigger I posted), damage source and damage target. Depending on what kind of ability it is there are various means to detect the unit.
 

Xialian

Member
Reaction score
8
The ability is meant to function like Storm Bolt (but was used for an Omnislash-like ability, which I copied from this website, fixed it with a cooldown (I learn!!)) and chose Firebolt because it does the same thing, but is a different ability.
So basically, it's a point and shoot ability.
 

thorhunter

You can change this now in User CP.
Reaction score
32
Well, the difficulty is that the moment you enter the field of any triggered damage, in most cases it will follow up with the need of triggering the whole thing. In your case, stormbolt isn't the most friendly one to deal with because of varied delay between cast and effect so you'll need to go through the process of triggering whole abilities :). You could go easy with it and make damage instant, if that doesn't make a difference.

Come to think of it, there is an easier way to go around this actually. It involves creating a dummy unit that will cast the spell for you, this way you can easily trigger spells that are just altered versions of warcraft vanilla spells.
 

Xialian

Member
Reaction score
8
I'm gonna split the trigger into 6 later (6 levels), but so far it looks like this:
Unit - A unit Starts the effect of an ability

(Ability being cast) Equal to Shuriken [Q]
(Level of Shuriken [Q] for (Triggering unit)) Equal to 1
(Unit-type of (Triggering unit)) Equal to Hyperassassin

Set HAAgi = (Agility of (Triggering unit) (Include bonuses))
Set AgiComb = (HAAgi x 3)
Set TDMGShu1 = (AgiComb + 30)

Do you spot any problems so far?
 

Xialian

Member
Reaction score
8
I really do not know how to use dummy units. If that's the only way, how do they work?
 

thorhunter

You can change this now in User CP.
Reaction score
32
You can use one variable instead of 3. If missle speed doesn't bother you then set it in your object editor to maximum - either stormbolt or firebolt work. You don't need to split the trigger into 6, unless you're using very different formulas. Even then, you can use 'if then else statement (multiple conditions)' for your trigger. Also, theres still no damage unit function included.
 

Xialian

Member
Reaction score
8
Gah, this is confusing. I think this editor is way too advanced for my head right now, hah. I would love a faster way of chatting right now, that would be a lot easier. I'm not very familiar with the "else", if it can do that thing you just described, will look into it, but I've always used separate triggers when it comes to levels.
 

thorhunter

You can change this now in User CP.
Reaction score
32
Trigger:
  • ST
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slash
    • Actions
      • Set Temp_int = (30 + (4 x (Agility of (Triggering unit) (Include bonuses))))
      • Set Temp_int = (Temp_int x (Level of Slash for (Triggering unit)))
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (Real(Temp_int)) damage of attack type Spells and damage type Normal
 

thorhunter

You can change this now in User CP.
Reaction score
32
You can use same variable. In fact, you could do all calculations in one line of code.
 

Xialian

Member
Reaction score
8
"Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 500.00 damage of attack type Spells and damage type Normal."
I saw that it said something else than 500 in your message, how do I make mine say the same? I can choose variables, but no attack-related ones will be available options when I try.

Edit: Found it, it was the "real" variable, but it can't be set as the same value as my "TDMGShu = (AgiComb + 30)"
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top