Author Topic: Is there a way to calculate DPS without fixed numbers?  (Read 1085 times)

For example, say you have X weapon, but you don't know the amount of damage it does and/or you don't know what the exact fire delay is, but you need a formula to figure out how much DPS you do with it.
Another way to put it is: Is there a way to calculate DPS through use of the weapon?

I also would like it to be done with VCE, would be nice.

There is no real good way to do this.

You could have a brick appear for a second and have a player shoot the brick as much as possible in that time, checking for the damage done. The hp that's been taken away is the dps roughly.

Or you could do the same thing just with a longer time to better represent the weapon's dps and limit user error.

Or you could do the same thing just with a longer time to better represent the weapon's dps and limit user error.
Noedit, you'd also need to divide by the time spent to get the actual dps in this scenario.

ProjectileData::onCollision, get the damage and add it as temp on the source object, reset it after a second.

Forgot this is not mod help. Not possible with events unless someone made them for it.

[0 delay] onprojectilehit > self > vce_modvariable [damaged]
  • [<that player bullet damage variable replacer>]
  • [10000 delay] onprojectilehit > self > vce_modvariable [damaged] [-] [<that player bullet damage variable replacer>]
    onactivate > self > vce_modvariable
[average] [set] [damaged]
onactivate > self > vce_modvariable [average] [/] [10]
onactivate > client > centerprint [<var:br:average> DPS]

something like that could work
pretty sure it's how most target dummies work (ie in terraria and dungeon defenders)

rip forgot to add nobbc tags

[0 delay] onprojectilehit > self > vce_modvariable [damaged] [+] [<that player bullet damage variable replacer>]
[10000 delay] onprojectilehit > self > vce_modvariable [damaged] [-] [<that player bullet damage variable replacer>]
onactivate > self > vce_modvariable [average] [set] [damaged]
onactivate > self > vce_modvariable [average] [/] [10]
onactivate > client > centerprint [<var:br:average> DPS]

something like that could work
pretty sure it's how most target dummies work (ie in terraria and dungeon defenders)

[0 delay] onprojectilehit > self > vce_modvariable [damaged]
  • [<that player bullet damage variable replacer>]
  • [10000 delay] onprojectilehit > self > vce_modvariable [damaged] [-] [<that player bullet damage variable replacer>]
    onactivate > self > vce_modvariable
[average] [set] [damaged]
onactivate > self > vce_modvariable [average] [/] [10]
onactivate > client > centerprint [<var:br:average> DPS]
i was in the process of being disappointed by the replies until i got this
ill try it

seems to do something, but would it be safe to replace the onActivate events with onProjectileHit events?

nevermind it works not sure why i didnt just try it in the first place