DPS meter help

IronTrout

New Member
Reaction score
20
So I've been working on this damage per second meter (like the ones found on wow).. and well, i've gotten it to pretty much completely work, bar one major factor. For some reason my maths sucks, and is returning a number that doesn't sound right (It does the opposite of what i want :nuts:) I've done the entire thing in vanilla world editor GUI and in desperate need of help. I've attached the entire map to it and u can find all the meter junk under "DPS Counter" folder.

Um, there are some heroes on there too if u want em =3

P.S: If possible try to keep it in GUI (if not, then I'm not all that picky)
P.P.S: I just got WEU, so you can use that too.

View attachment 35454
 

Tyman2007

Ya Rly >.
Reaction score
74
Don't get WEU.. It does a lot more harm than good at times.

Try jass newgen even if you don't know how to use jass

it's a whole lot better than WEU
 

Tyman2007

Ya Rly >.
Reaction score
74
Not everyone plays WoW, what is DPS Meter

Damage Per Second meter
Measures your damage and the time you have been in combat, then calculates your average damage per second.

You deal 60000 damage in 60 seconds, your dps is 1000
you deal 30000 damage in 30 seconds, then take a 30 second break, then deal another 30000 damage in 30 seconds, your dps is 1000.
 

IronTrout

New Member
Reaction score
20
Lol tried Newgen.. Didn't wanna run Wc3 tho, so i gave up. Maybe i'll just stick to vanilla :3
 

IronTrout

New Member
Reaction score
20
So yeah, umm back to the question :p.

here's the code. Its confusing as all hell tho. so the multiboard triggers are to monitor them.

Trigger:
  • Create
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Wait 2.00 seconds
      • Leaderboard - Create a leaderboard for (All players) titled DPS Meter
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Player((Integer A))) slot status) Equal to (==) Is playing
              • Then - Actions
                • Set DPS_Hero = (Random unit from (Units owned by (Player((Integer A))) matching (((Picked unit) is A Hero) Equal to (==) True)))
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Name of DPS_Hero) Equal to (==) <Empty String>
                    • Then - Actions
                      • Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label (<Observing> + (([ + (Name of (Player((Integer A))))) + ])) and value 0
                    • Else - Actions
                      • Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label ((Name of DPS_Hero) + (([ + (Name of (Player((Integer A))))) + ])) and value 0
              • Else - Actions
                • Do nothing


Trigger:
  • DPS 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in (Units owned by Player 1 (Red))) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) is in DPS1_UnitGrp) Equal to (==) False
        • Then - Actions
          • Unit Group - Add (Attacked unit) to DPS1_UnitGrp
          • Unit - Set the custom value of (Attacked unit) to (Integer((Life of (Attacked unit))))
          • Set DPS1_Health = (DPS1_Health + (Integer((Life of (Attacked unit)))))
        • Else - Actions
          • Do nothing
      • Set DPS1_Checker = (DPS1_Timer + 40)
      • Trigger - Turn on DPS Counter 1 <gen>


Trigger:
  • DPS Spell 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Casting unit) is in (Units owned by Player 1 (Red))) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in DPS1_UnitGrp) Equal to (==) False
        • Then - Actions
          • Unit Group - Add (Target unit of ability being cast) to DPS1_UnitGrp
          • Unit - Set the custom value of (Target unit of ability being cast) to (Integer((Life of (Target unit of ability being cast))))
          • Set DPS1_Health = (DPS1_Health + (Integer((Life of (Target unit of ability being cast)))))
        • Else - Actions
          • Do nothing
      • Game - Display to (All players) for 30.00 seconds the text: willy
      • Set DPS1_Order = (Current order of (Casting unit))
      • Wait 2.00 seconds
      • Set DPS1_Checker = (DPS1_Timer + 100)
      • Trigger - Turn on DPS Counter 1 <gen>


Trigger:
  • DPS Counter 1
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set DPS1_Timer = (DPS1_Timer + 1)
      • Unit Group - Pick every unit in DPS1_UnitGrp and do (Actions)
        • Loop - Actions
          • Set DPS1_damage = (DPS1_damage + ((Custom value of (Picked unit)) - (Integer((Life of (Picked unit))))))
          • Set DPS1_Dps = ((DPS1_Health - DPS1_damage) / (DPS1_Timer / 10))
          • Unit - Set the custom value of (Picked unit) to (Integer((Life of (Picked unit))))
      • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to DPS1_Dps
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • DPS1_Timer Equal to (==) DPS1_Checker
          • Then - Actions
            • Trigger - Turn off (This trigger)
            • Set DPS1_damage = 0
            • Set DPS1_Timer = 0
            • Set DPS1_Health = 0
            • Set DPS1_Checker = 0
            • Game - Display to Player Group - Player 1 (Red) for 5.00 seconds the text: Reset All
          • Else - Actions
            • Trigger - Turn on DPS Counter 1 <gen>

Not Initially on

Trigger:
  • Killed Unit DPS 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in DPS1_UnitGrp) Equal to (==) True
    • Actions
      • Unit Group - Remove (Dying unit) from DPS1_UnitGrp
      • Game - Display to (All players) for 5.00 seconds the text: (Number of units in DPS_Grp1 = + (String((Number of units in DPS1_UnitGrp))))


Trigger:
  • Multiboard
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 5 rows, titled Information
      • Set DELETETHIS = (Last created multiboard)
        • Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
          • Loop - Actions
            • Do Multiple ActionsFor each (Integer B) from 1 to 5, do (Actions)
              • Loop - Actions
                • Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row (Integer B) to 16.00% of the total screen width
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Group HP
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Total Damage
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to DPS
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to # units in Grp
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to Timer
      • Trigger - Turn on Multiboard Run <gen>


Trigger:
  • Multiboard Run
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Multiboard - Set the text for DELETETHIS item in column 2, row 1 to (String(DPS1_Health))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 2 to (String(DPS1_damage))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 3 to (String(DPS1_Dps))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 4 to (String((Number of units in DPS1_UnitGrp)))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 5 to (((String(DPS1_Timer)) + / ) + (String(DPS1_Checker)))


Where am i going wrong?

P.S I know its leaky
 

IronTrout

New Member
Reaction score
20
Hmm... did you notice the NewGen World Editor? NewGen Wc3 is for benchmarking :p.

Yeah, it didnt run anything before. I got it to work tho. I had to reinstall wc3 with patch from a while ago. I have online wc3 on other harddrive now.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
You don't register any damage with your triggers. Unit is attacked and Unit starts the effects of an ability are not triggers that register damage. Try using GDD and registering the damage properly, then saving that damage into a real variable. I don't know if you're timer works or not, but this should always show 0 as far as the trigger goes (or perhaps, an inaccurate value).
 

IronTrout

New Member
Reaction score
20
Thanks Nenad. Your a life saver. That was really annoying me :p

GDD worked surprisingly well +rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
  • 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
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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