• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

DPS Meter 2.11

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...
Level 37
Joined
Jul 22, 2015
Messages
3,485
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
 
Top