Possible to determine how much damage a player did?
Possible to determine how much damage a player did?
When a player fires a weapon, is it possible to determine how much damage was done?
Or, even not specific to a particular weapon or shot, is there any way to figure out how much damage was done by a particular player, like in coop?
Thanks.
Edit: To be clear, I don't want to just know this out of curiosity. Is there some bit of ACS code that can tell me how much damage was done with the most recent player shot, for example?
Or, even not specific to a particular weapon or shot, is there any way to figure out how much damage was done by a particular player, like in coop?
Thanks.
Edit: To be clear, I don't want to just know this out of curiosity. Is there some bit of ACS code that can tell me how much damage was done with the most recent player shot, for example?
Last edited by t3hplayer on Thu Dec 05, 2013 7:21 am, edited 1 time in total.
RE: Possible to determine how much damage a player did?
Well, look in the decorate file of the weapon, and at its damage, put random(100,200) for example.
RE: Possible to determine how much damage a player did?
I probably wasn't clear in my post. Suppose a player fires a shotgun, for example. If all the bullets hit a wall, that shot did 0 damage. If a couple of the bullets hit an enemy, then some damage was done. If all the bullets hit an enemy, then more damage was done. Is there any way to know what amount of damage was done?Mr.Man wrote: Well, look in the decorate file of the weapon, and at its damage, put random(100,200) for example.
RE: Possible to determine how much damage a player did?
I guess each pellet does the same damage, and the more pellets hit an enemy, the more it deals. If it does 25, 4 shots kill a player.
You can look this up i guess? I dont know if this is even right, it might be.
You can look this up i guess? I dont know if this is even right, it might be.
RE: Possible to determine how much damage a player did?
Hit scan weapons do the random(5,10,15) damage per pellet.
Usually players calculate for the one in the middle with how many pellets they hit.
Usually players calculate for the one in the middle with how many pellets they hit.
THE ROMANIAN POWER

Code: Select all
<+Dastan> edd
<+Dastan> boxxy skin when
<+Shift> dastan you really want to fap at it this much and now you are going crazy and shredding your hair into a million tiny pieces for this boxxy skin to come out that way you can cum out
<+Dastan> Shift, yes
--------------------------------------------------------------------
21:53:26 <@Estar> well, if i'd be a girl, i would say ideidoom has ok looks
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: Possible to determine how much damage a player did?
If you know the player/enemy he is shooting then yes, if you do not know what or who he will be shooting, then this becomes much harder and I am not sure if it is possible to do reliably yet using ACS.t3hplayer wrote: Edit: To be clear, I don't want to just know this out of curiosity. Is there some bit of ACS code that can tell me how much damage was done with the most recent player shot, for example?
RE: Possible to determine how much damage a player did?
It´s possible via ACS (but very very hard to implement). There is an example of that in WrathOfCronos 1.6 b I think.
I dont care about how bad your maps are. Everything can be improved.
Banned for cheating at DoomBuilder.
Banned for cheating at DoomBuilder.
-
- Frequent Poster Miles card holder
- Posts: 901
- Joined: Mon Jun 04, 2012 5:07 am
RE: Possible to determine how much damage a player did?
since monsters don't necessarily target or have any reference to who shot them, and no way to determine at all where the damage came from, there is no reliable way to do this
RE: Possible to determine how much damage a player did?
The "award damage dealt not kills" DMFLAG tracks damage, but it's hard-coded. :/
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
- Retired Staff / Community Team Member
- Posts: 2568
- Joined: Sat Jun 02, 2012 2:44 am
RE: Possible to determine how much damage a player did?
Yeah, there's no way you can calculate through ACS on how much player-damage you've done. The main problem is that if two people shoot you at the same time in the same tic then it'll fuck up.
RE: Possible to determine how much damage a player did?
Yeah, that's what I was thinking. Unfortunately, there are likely to be many monsters on-screen at any given time. I suspect it's doable with instant attacks, like melee or bullets, but I suspect it's not really doable for missiles.Hypnotoad wrote:If you know the player/enemy he is shooting then yes, if you do not know what or who he will be shooting, then this becomes much harder and I am not sure if it is possible to do reliably yet using ACS.t3hplayer wrote: Edit: To be clear, I don't want to just know this out of curiosity. Is there some bit of ACS code that can tell me how much damage was done with the most recent player shot, for example?
Is the source available for WoC? I poked around a bit on the WoC threads both here and on the Zdoom forums, but I didn't see a download for it.Guardsoul wrote: It´s possible via ACS (but very very hard to implement). There is an example of that in WrathOfCronos 1.6 b I think.
That might be good enough, actually. I can probably be happy with just a looped script that recalculates based on score change since the last iteration. Shouldn't be too much of a hack.Ænima wrote: The "award damage dealt not kills" DMFLAG tracks damage, but it's hard-coded. :/
That's sorta what I was figuring, but I wasn't certain if there was or wasn't a way for monsters to know who attacked them / players to know what they hit. All I knew is that if there is a way, it wasn't obvious to me.Ijon Tichy wrote: since monsters don't necessarily target or have any reference to who shot them, and no way to determine at all where the damage came from, there is no reliable way to do this
Thanks for all the input, guys. I'll look into the DMFLAG Ænima mentioned. I don't need to know the exact damage done, rather I just want some kinda metric I can use to award points to players based on damage done (as opposed to based on enemies killed). That DMFLAG might be the ticket.
RE: Possible to determine how much damage a player did?
Well uhhh ... The problem is that it's hard-coded. Yes you can see the points on the scoreboard (which is your total damage done divided by 100, i think), but there's no way to access that number through an ACS script.t3hplayer wrote:That might be good enough, actually. I can probably be happy with just a looped script that recalculates based on score change since the last iteration. Shouldn't be too much of a hack.Ænima wrote: The "award damage dealt not kills" DMFLAG tracks damage, but it's hard-coded. :/
Thanks for all the input, guys. I'll look into the DMFLAG Ænima mentioned. I don't need to know the exact damage done, rather I just want some kinda metric I can use to award points to players based on damage done (as opposed to based on enemies killed). That DMFLAG might be the ticket.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

RE: Possible to determine how much damage a player did?
Oh...lame. I was thinking that number was gettable through PlayerFrags().Ænima wrote:Well uhhh ... The problem is that it's hard-coded. Yes you can see the points on the scoreboard (which is your total damage done divided by 100, i think), but there's no way to access that number through an ACS script.t3hplayer wrote:That might be good enough, actually. I can probably be happy with just a looped script that recalculates based on score change since the last iteration. Shouldn't be too much of a hack.Ænima wrote: The "award damage dealt not kills" DMFLAG tracks damage, but it's hard-coded. :/
Thanks for all the input, guys. I'll look into the DMFLAG Ænima mentioned. I don't need to know the exact damage done, rather I just want some kinda metric I can use to award points to players based on damage done (as opposed to based on enemies killed). That DMFLAG might be the ticket.
Edit: I may put in a feature request for a PlayerScore() function to be added in the future. I suspect I'm not the only one for whom such a function would be useful.
Last edited by t3hplayer on Fri Dec 06, 2013 3:07 am, edited 1 time in total.
RE: Possible to determine how much damage a player did?
Nope. IIRC, using PlayerFrags in a non-PvP gamemode will just return 0.t3hplayer wrote:Oh...lame. I was thinking that number was gettable through PlayerFrags().Ænima wrote:Well uhhh ... The problem is that it's hard-coded. Yes you can see the points on the scoreboard (which is your total damage done divided by 100, i think), but there's no way to access that number through an ACS script.t3hplayer wrote:That might be good enough, actually. I can probably be happy with just a looped script that recalculates based on score change since the last iteration. Shouldn't be too much of a hack.Ænima wrote: The "award damage dealt not kills" DMFLAG tracks damage, but it's hard-coded. :/
Thanks for all the input, guys. I'll look into the DMFLAG Ænima mentioned. I don't need to know the exact damage done, rather I just want some kinda metric I can use to award points to players based on damage done (as opposed to based on enemies killed). That DMFLAG might be the ticket.
That would be nice, yes. Even better if it had a dual functionality (return a player's caps if used in CTF, or a player's kills/damage if used in coop).t3hplayer wrote: Edit: I may put in a feature request for a PlayerScore() function to be added in the future. I suspect I'm not the only one for whom such a function would be useful.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Possible to determine how much damage a player did?
Would it hurt to read what someone says for once? Just once. I don't bother people who misread posts cause I do it myself, but every single time I read a post by you, it's like you pick 2 (random) words out of a post and comment on something way off topic/something that doesn't help.Mr.Man wrote: Well, look in the decorate file of the weapon, and at its damage, put random(100,200) for example.
On topic:
It is possible if you give each player their own weapon (requiring 64 weapons with 64 puffs and so on) and then writing that to ACS.
IMO it's not worth it unless you're going to be doing something epic.
RE: Possible to determine how much damage a player did?
That actually hadn't occurred to me, so thanks for that. I probably wouldn't be entirely opposed to that approach, but I'd need something that would work with projectiles as well as bullets, and I don't think this would, since I don't think there's any trivial way to determine how much damage an explosion did.Watermelon wrote: It is possible if you give each player their own weapon (requiring 64 weapons with 64 puffs and so on) and then writing that to ACS.
IMO it's not worth it unless you're going to be doing something epic.
Looks like it's a dead-end for now, at least for what I had in mind. Ahh well, not too big of deal. Thanks to everyone for the input.
RE: Possible to determine how much damage a player did?
I think there can be concept of how to get damage:
Pseudocode:
new = GetActorHealth;
damage = old-new;
old = GetActorHealth;
TheLoop;
But it cannot be utilised really well practically, because it checks damage taken, not dealt.
Pseudocode:
new = GetActorHealth;
damage = old-new;
old = GetActorHealth;
TheLoop;
But it cannot be utilised really well practically, because it checks damage taken, not dealt.
Last edited by Klofkac on Fri Dec 06, 2013 2:29 pm, edited 1 time in total.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
RE: Possible to determine how much damage a player did?
Yeah, I thought about this, but one other problem is that I don't know which actors might be getting damaged. I'm doing this with coop, and there could be 50 (or many more) monsters. With bullets it could probably be managed, but then I think about projectiles and BFG tendrils and I'm pretty sure it's nearly impossible to do without some kinda input from the engine side.Klofkac wrote: I think there can be concept of how to get damage:
Pseudocode:
new = GetActorHealth;
damage = old-new;
old = GetActorHealth;
TheLoop;
But it cannot be utilised really well practically, because it checks damage taken, not dealt.