Calculating DPS

FarAwaY

TH.net Regular
Reaction score
9
Well what I want is to make a little system calculating the DPS of a unit.
But I cant find the necessary values - atk cooldown, minimum damage, maximum damage in trigger editor.

How do I do it then?
 

FarAwaY

TH.net Regular
Reaction score
9
Well, the Attack Cooldown can be found in the OE, under Combat - Attack1/2 - Cooldown.
But, here is some reading for you:
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=44516

DPS calculations can be found in the point 2.2, and attack speed is 2.3 ;)

No, I know that.

But what I said is that I cannot find the values in the Trigger Editor.
Im making a system remember? I cant create it without the values because apparently the trigger actions dont exist.
 

Flare

Stops copies me!
Reaction score
662
You cannot modify (or retrieve a value for) properties like attack damage (base, min or max), attack speed and most (if not all) other properties pertaining to physical attacks via the Trigger Editor. The only way you can is to add/remove abilities that modify the stats (e.g. Gloves of Haste bonus, Claws of Attack bonus).

Upgrades may be suitable, if (1) there is only 1 unit per player that can be affected, (2) the bonuses will not need to be reversed and (3) there is some limit as to how far the increases will go (since making upgrades with a large number of levels, or a large number of separate upgrades, is a bit inconvenient)
 

reyghost

New Member
Reaction score
14
I dont think that u can find that that in GUI.Maybe u can try using adamage detection system,calculate the damage dealt and time between 2 damage sources to act(though this sounds very difficult).
If u know JASS better try use it instead of GUI.
 

FarAwaY

TH.net Regular
Reaction score
9
No no....Im not trying to modify them, because yeah I know you cant modify them through triggers.

Because what I want is to GET them through triggers, if possible. To add them up, then divide them by cooldown to make a personal DPS system. Is there no way to find out how much damage the unit is dealing every second?
 

FarAwaY

TH.net Regular
Reaction score
9
Thanks reyghost...your idea helped me think of a way. But first I'll need a few values.
 

Flare

Stops copies me!
Reaction score
662
You cannot modify (or retrieve a value for) properties

The only near-perfect solution is to store every unit's properties, and everytime you need to get their current attack speed/damage, you would have to retrieve that stored value, then factor in buffs, items, spells, etc (all of which would have to be done by hand). It'd be capable of handling in-combat and out-of-combat situations, if done correctly, but it'd be a pain to do

It should work, but it's certainly not the most convenient or practical thing to do :p

You could also force the unit to attack a target dummy - would give you an accurate reading of attack speed and damage dealt (if the dummy had no resistances or vulnerabilities to any damage type), but that would result in moving the unit to the dummy, which would look odd (units 'disappearing' for no apparent reason) and impact on gameplay, due to potential abuse. To my knowledge, there isn't any effective way to make a perfect clone of a unit (i.e. abilities and items are fine - buffs would be a problem) so the target dummy method, while useful for an out-of-combat situation (i.e. nothing empowering or weakening the unit), it wouldn't work properly for a combat situation if buffs were applied.
 

FarAwaY

TH.net Regular
Reaction score
9
Yeah of course, flare. That SHOULD work, but like you said its not very practical.

However, I believe I have found the solution to the problem. By using reyghost's method of "finding the time" between the 2 attacks, I have been successful.

All I did was start a timer, and it would calculate the damage dealt and time elapsed, then I would put them into variables. When the unit attacked for a second time, I combined the the second damage dealt + the damage dealt variable, and I did the current elapsed time - the elapsed time variable, once again putting them into a single value which read:

Set DPS = DamageDealt_Var + Damage Taken / 2 / Elapsed Time for Gamer Timer - Time_Var.

And it worked perfectly. ^^ Did a test with 2.5 second attack cooldown and 30 damage. I got 12.
 

FarAwaY

TH.net Regular
Reaction score
9
Add another Trigger at Map Init that says:

-Pick Every Unit in playable map area and do:
-Add to DPS System the event [Picked Unit] Takes Damage

From there, you work it out on your own...Set them all into variables, and calculate them.

Thanks reyghost btw, for your insight. It was perfect.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top