1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  5. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  8. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

DPS Meter 2.11

Submitted by Shunpomaster
This bundle is marked as approved. It works and satisfies the submission rules.
DPS Meter: A system to check the Damage Per Seconds of your units.

Features:
  • DPS of one or multiple units of the same player.
  • Save the highest DPS, and can be reset to 0.
This is mui so multiple units with summons can damage at the same time.
This system is good to test the dps and make balancing easier.




Triggers:

  • DPS Set
  • DPS Set
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Set DPS_Counter[(Player number of (Owner of DamageEventSource))] = 10
      • Set DPS_TotalDamage[(Player number of (Owner of DamageEventSource))] = (DPS_TotalDamage[(Player number of (Owner of DamageEventSource))] + DamageEventAmount)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_RunningCheck[(Player number of (Owner of DamageEventSource))] Equal to False
        • Then - Actions
          • Set DPS_RunningCheck[(Player number of (Owner of DamageEventSource))] = True
          • Set DPS_Index = (DPS_Index + 1)
          • Set DPS_Unit[DPS_Index] = DamageEventSource
          • Set DPS_Player[DPS_Index] = (Owner of DPS_Unit[DPS_Index])
          • Unit Group - Add DPS_Unit[DPS_Index] to DPS_Group
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DPS_Index Equal to 1
            • Then - Actions
              • Trigger - Turn on DPS Timer <gen>
            • Else - Actions
        • Else - Actions




  • DPS Timer
  • DPS Timer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------ --------
      • For each (Integer DPS_Loop) from 1 to DPS_Index, do (Actions)
        • Loop - Actions
          • -------- ------------------------ --------
          • -------- Check if still damaging or not --------
          • Set DPS_Timer3[DPS_Loop] = (DPS_Timer3[DPS_Loop] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DPS_Counter[(Player number of DPS_Player[DPS_Loop])] Equal to 10
            • Then - Actions
              • Set DPS_Timer1[DPS_Loop] = (DPS_Timer1[DPS_Loop] + 1)
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: (|c006969FFTimer (Seconds)|r : + (String(DPS_Timer3[DPS_Loop])))
            • Else - Actions
              • Set DPS_Timer2[DPS_Loop] = (DPS_Timer2[DPS_Loop] + 1)
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: (|c00FF0000Timer (Seconds)|r : + (String(DPS_Timer3[DPS_Loop])))
          • -------- ------------------------ --------
          • Set DPS_Counter[(Player number of DPS_Player[DPS_Loop])] = (DPS_Counter[(Player number of DPS_Player[DPS_Loop])] - 1)
          • -------- If stopped than damaged again before time out --------
          • -------- ------------------------ --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DPS_Timer2[DPS_Loop] Greater than 0
              • DPS_Counter[(Player number of DPS_Player[DPS_Loop])] Greater than or equal to 9
            • Then - Actions
              • Set DPS_Timer1[DPS_Loop] = (DPS_Timer1[DPS_Loop] + DPS_Timer2[DPS_Loop])
              • Set DPS_Timer2[DPS_Loop] = 0
            • Else - Actions
          • -------- DPS End --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DPS_Counter[(Player number of DPS_Player[DPS_Loop])] Less than or equal to 0
            • Then - Actions
              • -------- ------------------------ --------
              • -------- Check if that is the highest DPS for owner of unit --------
              • -------- For somereason it worked when i made this integer even tho it is useless like this --------
              • Set DPS_Current[DPS_Loop] = (DPS_TotalDamage[(Player number of DPS_Player[DPS_Loop])] / (Real(DPS_Timer1[DPS_Loop])))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DPS_Current[DPS_Loop] Greater than or equal to DPS_Highest[(Player number of DPS_Player[DPS_Loop])]
                • Then - Actions
                  • Set DPS_HighestTimer[(Player number of DPS_Player[DPS_Loop])] = DPS_Timer1[DPS_Loop]
                  • Set DPS_Highest[(Player number of DPS_Player[DPS_Loop])] = DPS_Current[DPS_Loop]
                • Else - Actions
                  • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
                  • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
                  • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) for 25.00 seconds the text: (|c0000FF00Your Highest DPS|r : + (String(DPS_Highest[(Player number of DPS_Player[DPS_Loop])])))
                  • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) for 25.00 seconds the text: (|c0000FF00Your Highest DPS Timer|r : + (String(DPS_HighestTimer[(Player number of DPS_Player[DPS_Loop])])))
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) for 25.00 seconds the text: (|c0096FF96Current DPS|r : + (String(DPS_Current[DPS_Loop])))
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) for 25.00 seconds the text: (|c00FF7F00Total Damage|r : + (String((Integer(DPS_TotalDamage[(Player number of DPS_Player[DPS_Loop])])))))
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) for 25.00 seconds the text: (|c006969FFTotal Time|r : + (String(DPS_Timer1[DPS_Loop])))
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • Game - Display to (All players matching (DPS_Player[DPS_Loop] Equal to (Matching player))) the text: -------------------...
              • -------- End --------
              • Set DPS_Timer1[DPS_Loop] = 0
              • Set DPS_Timer2[DPS_Loop] = 0
              • Set DPS_Timer3[DPS_Loop] = 0
              • Set DPS_Timer1[DPS_Loop] = DPS_Timer1[DPS_Index]
              • Set DPS_Timer2[DPS_Loop] = DPS_Timer2[DPS_Index]
              • Set DPS_Timer3[DPS_Loop] = DPS_Timer3[DPS_Index]
              • Set DPS_Timer1[DPS_Index] = 0
              • Set DPS_Timer2[DPS_Index] = 0
              • Set DPS_Timer3[DPS_Index] = 0
              • Set DPS_TotalDamage[(Player number of DPS_Player[DPS_Loop])] = 0.00
              • Unit Group - Remove DPS_Unit[DPS_Loop] from DPS_Group
              • Set DPS_RunningCheck[(Player number of DPS_Player[DPS_Loop])] = False
              • Set DPS_Unit[DPS_Loop] = DPS_Unit[DPS_Index]
              • Set DPS_Player[DPS_Loop] = DPS_Player[DPS_Index]
              • Set DPS_Index = (DPS_Index - 1)
              • Set DPS_Loop = (DPS_Loop - 1)
              • -------- ------------------------ --------
              • -------- Trigger off --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DPS_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions




Changes:

DPS Meter 1.00
  • Fixed some explanation in the map.
  • Added Timer 3 which will be for the texts, and made it to change color when countdown start. Now it look much better and easier to understand.
DPS Meter 1.10
  • Changed the DPS to show as Real numbers instead of Integer because it was not accurate as integer.
  • Fixed the damage accumulated to show all reduced damage from any type of damage reduction. It was not calculating Real numbers very well.
DPS Meter 1.20
  • Changed Highest DPS to show as Real Numbers instead of Integer.
  • Added Highest Timer to save the timer for the highest DPS.
  • Fixed some text.

DPS Meter 2.00
  • Fixed timers problem that prevent this system from being Mui.

DPS Meter 2.10

  • Reduced Count time to 5 sec (10 sec was too long)
  • Using new damage engine in the map which require wc3 1.31 but the system it self can work with older version of wc3 if olden version of damage engine is available
  • Added 2 new commands
  1. -ton Turn DPS count text on
  2. -toff Turn DPS count text off
DPS Meter 2.11

  • Reverted back to older version of damage engine for now since it work fine either way. If already got latest version of damage engine just copy DPS Meter and (Optional) Commands.









How to copy:



  • Turn On "automaticly create unknown variables".
  • Copy Damage Engine to your map.
  • Copy DPS Meter to your map.
  • Copy Commands (Optional).
Here is a list of the commands and what for:

  • -reset dps : Reset highest DPS. Some times DPS end after 1 hit, then that one hit will be the highest dps, and it will be impossible to out dps one hit unless unit damage increase a lot. this command reset it to 0.
  • -ton Turn DPS count text on
  • -toff Turn DPS Count text off
  • -stop dps : When no longer dealing damage there is a 10 seconds count down, with this command it will end immediately to get your result and/or start again.
  • -dps : show the highest dps.
  • -clear : clear all texts.

Credits:

Thanks to Bribe's Damage Engine System I managed to make this.


Keywords:

dps, dps system, system, damage per second
Previews
Contents

DPS Meter 2.00 (Map)

Reviews
KILLCIDE
Given this is meant more for the map developer, I can see some functionality with this in RPGs where players can test out their damage with weapons or whatever. For that reason, I won't be too picky with the system. You also have a lot of...
  1. Sverkerman

    Sverkerman

    Joined:
    Feb 28, 2010
    Messages:
    1,283
    Resources:
    5
    Maps:
    5
    Resources:
    5
    I've decided to use this system in Bosses of Warcraft [24 Player ORPG]
    Great DPS system, you can alter it easily if you know a bit of GUI to do exactly what you want it to do. I'm also using this system as a combat-check. Very handy +4 rep 5/5 well done!
     
  2. Shunpomaster

    Shunpomaster

    Joined:
    Jun 13, 2017
    Messages:
    83
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Thank you for using it. I will update it whenever I have time :)
     
  3. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,497
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Given this is meant more for the map developer, I can see some functionality with this in RPGs where players can test out their damage with weapons or whatever. For that reason, I won't be too picky with the system. You also have a lot of documentation in the triggers, so its easy to modify if need be.

    Needs Fixed

    • Nothing

    Suggestions

    • Make the 1.00 periodic timer configurable.
    • Make the display timer for messages configurable.
    • Having the messages display locally to the player would be better imo.
    • Make it so that the player can turn the DPS meter on/off ingame. Maybe you should also consider making it so that players can turn the meter on/off locally?
    • Hashtables would have been a better approach. Alternatively, you could have used the custom values as an index rather than using a custom index system.

    Status


    Approved
     
  4. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,093
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Is it just me or this is just obsolete now since we got new natives, we can easily figure out the DPS?