wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-10-2008, 04:53 PM   #1
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default Calculating a unit's DPS

I think I'm doing this right, so please correct me if I'm wrong. Also let me know if I'm calculating the damage w/ dice incorrectly. I have a feeling what I'm doing is wrong, so let me know if this:

Damage / Cooldown = DPS

would be the proper method.


I'll use 4 examples.

Unit A: 1.25 attack cooldown, 18 base damage, 2 dice with 3 sides.
Damage: 20-26.
Calculation: Multiply the min/max attack damage by .25 (it's over 1) and subtract it from each, respectively.
Becomes: 15-19.5

Unit B: .75 attack cooldown, 12 base damage, 1 dice with 5 sides.
Damage: 13-18.
Calculation: Multiply the min/max damage by .25 (how much it's under 1) and add to each, respectively.
Becomes: 16.25-22.5

(I think this one is completely wrong)
Unit C: 2.6 cooldown, 40 base damage, 3 dice with 3 sides.
Damage: 43-52.
Calculation: Divide each by 1.6 (it's at least a full second over 1) and subtract respectively.
Becomes: 16.125-19.5

Unit D 1 cooldown, 34 base damage, 3 dice with 2 sides.
Damage: 37-43.
Calculation: None (it's 1 second)
Becomes: 37-43 DPS


Sorry if my calculations are completely wrong. I was just guessing, really. Unit C's calculation looks completely off, so any help would be great.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-10-2008, 05:04 PM   #2
TheSecretArts
Galaxy Scripter
 
TheSecretArts's Avatar
 
Join Date: Mar 2007
Posts: 1,077

Submissions (2)

TheSecretArts will become famous soon enough (38)TheSecretArts will become famous soon enough (38)

Send a message via AIM to TheSecretArts Send a message via MSN to TheSecretArts Send a message via Yahoo to TheSecretArts
Default

DPS range is
(Lower DPS / Cooldown) - (Higher DPS / Cooldown)
I dont care if its a decimal or a fraction or whatever.
Unit A = (20/1.25) - (26/1.25) = 16 - 20.8 (you multiply by .8 becauses the recipricol is 1/1.25 = 8)
B = (13/.75) - (18/.75) = 17.333333333333333333333333333333 - 24 (multiply by the recipricol... again)
C = (43/2.6 (not 1.6)) - (52/2.6) = 16.538461538461538461538461538462 - 20
D = same

Don't play with the numbers, just keep them as is.
__________________
I have officially moved exclusively to Starcraft 2 mapmaking.
Project: Escape Velocity: Nova Reloaded
Don't expect me to finish this project lol...

Last edited by TheSecretArts : 05-10-2008 at 05:11 PM.
TheSecretArts is offline   Reply With Quote
Old 05-10-2008, 05:14 PM   #3
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Ooohh, thanks. +rep
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 05-10-2008, 05:34 PM   #4
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

imo DPS =
attack interval MUST BE NOT 0 !
((min+max dmg) / attack interval)/2 O_o ?

so... in fact (according to this formula ("my"))

4-6 dmg =

((4+6)/1)/2 = 5
imo it's obvious.
__________________
Toadcop is offline   Reply With Quote
Old 05-10-2008, 06:28 PM   #5
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Uhh... Toad, that's finding the average. And that's not really DPS anyways. SecretArts has the right formula.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 05-10-2008, 06:48 PM   #6
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Wulf, TC has the right idea though. Damage per second should be a single weighted average value, not a range. His method is how it should be done, and TSA's is sketchy at best.
Code:
[(Min+Max)/Cooldown]/2
Hence...
[(4+6)/1.25]/2 = 4 DPS

Let's take one of your examples and see what we can concoct.
[(20+26)/1.25]/2 = 18.4 DPS

That should make perfect sense, your DPS goes down by a weighted factor of your attack speed. What you could do to test this is just have a damage tracker in your map and see what the thing spits out. In the trigger, you'd actually calculate the damage per second a very similar way.

Code:
(Damage dealt to current time)/(Current time - Start time)
Hey, that looks like an average, doesn't it? :)
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-10-2008, 07:45 PM   #7
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Ohh, I see what TC was doing now (I didn't realize he was getting the average of the two). I can do that no problem.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 11-13-2009, 02:17 AM   #8
mystafox
User
 
Join Date: Jun 2009
Posts: 23

mystafox has little to show at this moment (5)

Default

Hi,
I also want to know how we calculate the dps of a unit - a tower like in TD maps. I'm totaly new with all the modding, world editor etc... I'm just learning...
The answer given in this threat are "too" obvious for me, and i wanted to ask if the following unit fiels play a role in the calculation:

Combat - Attack x - Cooldown Time (Real)
Combat - Attack x - Damage Base (Integer)
Combat - Attack x - Damage Number of Dice (Integer)
Combat - Attack x - Damage Sides per Die (Integer)
Combat - Attack x - Animation Backswing Point (Real)
Combat - Attack x - Animation Damage Point (Real)
Combat - Acquisition Range (Real)
*Combat - Attack x - Projectile Arc (Real)
Combat - Attack x - Projectile Speed (Integer)
Combat - Attack x - Range (Integer)
Combat - Attack x - Range Motion Buffer (Real)
*Art - Projectile Impact - Z (Real)
*Art - Projectile Impact - Z (Swimming) (Real)
*Art - Projectile Launch - X (Real)
*Art - Projectile Launch - Y (Real)

*Art - Projectile Launch - Z (Real)
*Art - Projectile Launch - Z (Swimming) (Real)


CASE 1
Lets say the unit is in sight of the tower and doesnt move, furthemore we dont count the initial hit. How does :Combat - Attack x - Animation Backswing Point and Combat - Attack x - Animation Damage Point affect the DPS?
a) it doesnt influence the cooldown at all thus the DPS is still what has been said in the previous posts (DPS = (Damage Base + 1/2 * Damage Number of Dice * (1+ Damage Sides per Die) / Cooldown Time)
b) cooldown = Combat - Attack x - Cooldown Time + Combat - Attack x - Animation Backswing Point + Combat - Attack x - Animation Damage Point
c) cooldown = max[Combat - Attack x - Cooldown Time , Combat - Attack x - Animation Backswing Point + Combat - Attack x - Animation Damage Point]
c) cooldown = min[Combat - Attack x - Cooldown Time , Combat - Attack x - Animation Backswing Point + Combat - Attack x - Animation Damage Point]

CASE 2
Now to make things more complicate and more realistic for TD maps, suppose we have a wave of creeps spawning at point A going to point B and a tower partially protecting the path by shooting a those creeps. There is no spash or special effects. The interval between 2 creeps is x second and each creep take y second to cross the guarded path. How do we calculate the DPS -_-' ?
I suppose the range fields determines when and how long a creep enter/stay in the guarded path.
We must take into account that the tower switches targets => we must now take into account the first shoot, thus :
the distance between the creep and the tower & Combat - Attack x - Projectile Speed (Integer)
The distance being calculate with all the files with[*]
To count the DPS in this case we must calculate how many times the tower switches target in average and take into account the first hit delay ? If i do that, and i dont take into account the first creep entering the range, the tower will switch from creep to creep every x sec. The tower first shot will take n sec to reach the creep (n is calculate by knowing the distance and projectile speed) then the previous DPS (the dps from case 1) applies during the (x-n) seconds before the tower change target. Thus the new DPS is in this case ((x-n)*DPS)/x

Am i right or is this totally wrong?
mystafox is offline   Reply With Quote
Old 11-13-2009, 03:38 AM   #9
67chrome
I never say Ni
 
67chrome's Avatar
 
Join Date: Sep 2006
Posts: 72

Submissions (4)

67chrome has a spectacular aura about (78)67chrome has a spectacular aura about (78)67chrome has a spectacular aura about (78)

Race-Building Contest #2 Winner

Default

Combat - Attack x - Cooldown Time (Real)
Combat - Attack x - Damage Base (Integer)
Combat - Attack x - Damage Number of Dice (Integer)
Combat - Attack x - Damage Sides per Die (Integer)

The above values have all been gone over in just about every post on this thread.

Combat - Attack x - Range Motion Buffer (Real)
*Art - Projectile Impact - Z (Real)
*Art - Projectile Impact - Z (Swimming) (Real)
*Art - Projectile Launch - X (Real)
*Art - Projectile Launch - Y (Real)
*Art - Projectile Launch - Z (Real)
*Art - Projectile Launch - Z (Swimming) (Real)

Most of the above just have to do with on what point of the model the projectiles are launched from, and would really have nothing to do with the actual dps, unless they are launched from a position much further away from the tower, in which the concerns would be more easily approached by looking at things such as projectile speed and attack range.

Attack Range would most certainly effect the damage a tower is able to contribute to a maze, this would be due to the amount of time it could damage targets. This contribution could vary greatly depending on how the map is laid out, if the tower was placed on an inner corner, outer corner, or middle lane. Also, how far apart the units are from the tower and for how many seconds the tower could attack units would effect the amount of time a tower's range could allow it to damage units, and the target's movement speed would effect this as well.

Acquisition range is essentially the same thing as attack range, and only really matters for mobile units that have a shorter attack range than an acquisition range. However, if a unit's acquisition range is lower than their attack range, the unit's attack range will become their acquisition range. This is only really useful for making creeps ignore you unless you come within melee range, almost duplicating the "yellow" aggravation type of WoW creeps, though units modified in this way will still call for help when attacked.

Projectile speed could play a role in dps, if the projectile speed is low enough for the tower to keep attacking a unit after it has launched enough projectiles to kill it, essentially lowering it's dps with lower projectile speed values. If the projectile speed is to low for any of the tower's missiles to hit a target before it reaches the end of the maze it's dps would essentially be 0. I don't believe missile arc effects projectile speed at all, only the aesthetics of the missile traveling through the air.

I think range motion buffer is how far a unit can move out of the line of fire before receiving half damage from moving out of the way, though I could be wrong here.

Attack types of Missile Splash, Missile Line, Artillery, Artillery Line, Missile Bounce all effect dps as well, due to the added bonus that attacks can hit multiple targets. Missile Bounce would be the easiest to calculate in a TD situation, given the bounce radius was high enough to consistently hit another unit, and the bonus damage caused from bouncing projectiles could be easily factored in.

Artillery and Splash missiles would depend on the splash radius, as well as how far apart the units are spaced and how many targets on average could be hit with each attack, as well as what damage % the units would take based on the splash damage. Missile and artillery line can hit additional units that the projectile passes to it's destination, though units often target the closest target, and from testing with these attack types I'm suspicious they are a little buggy.

Most of these would be hard to find the average value of effects upon damage output to calculate, though abilities such as critical strike, poison damage, and so on would be much easier to immediately add to dps :)
__________________
67chrome is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 08:15 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services