Opinions on randomized damage

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Dortold
Posts: 52
Joined: Sun Jan 27, 2013 9:57 am
Contact:

Re: Opinions on randomized damage

Post by Dortold »

Maybe I exaggerated a bit when I compared non-randomized damage to a spreadsheet. I have no doubt that Doom would still be fun with constant damage, but I have become accustomed to some treachery of the dice rolls when counting my shots.
Vaecrius wrote:Having the enemy health be random instead of weapon damage would be an interesting idea if it could be made to matter - facing 5 goons of equal threat, hit the one that has the least health first, 4 goons after the first shot instead of 5, but you'd have to be able to tell that somehow. (little health bars over the head?)
That's an interesting idea. Maybe they could be larger if they had more health. It might cause some problem with clipping into ceilings, but as long as it was kept subtle it probably wouldn't be too severe.

Slightly off-topic: But on the topic of health manifesting visually, I've always felt that Doom could benefit from damage skins. Something similar to what we see on Doomguy's mug the bottom of the default hub. I've seen videos of this done on 3D mobs' textures (ick, IMHO), but never for the sprites.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: Opinions on randomized damage

Post by cypherphage »

I just tested, when a projectile hit 0 health from DamageThing it dies. I should note, you can't actually damage a missile with DamageThing() unless you set it shootable...so here is my revised way to do this.

Code: Select all

actor testBall : DoomImpBall
{
	health 60 // max damage here
	damage 0
    States
	{
	Spawn:
		BAL1 A 4 Bright A_GiveInventory(testScoreItem,2) // damage fall off
		BAL1 A 0 Bright A_LogInt(health-score)
		BAL1 B 4 Bright A_GiveInventory(testScoreItem,2)
		BAL1 B 0 Bright A_LogInt(health-score) // so you can see that its working
		
		BAL1 B 0 Bright A_JumpIf(health-score<1,"Death") //so we don't have a 0 dam projectile
		loop
	Death:
		BAL1 C 0 Bright A_Explode(health-score,32,0,1)
		BAL1 CDE 6 Bright
		Stop
}}
Dortold wrote:Maybe I exaggerated a bit when I compared non-randomized damage to a spreadsheet. I have no doubt that Doom would still be fun with constant damage, but I have become accustomed to some treachery of the dice rolls when counting my shots.
Vaecrius wrote:Having the enemy health be random instead of weapon damage would be an interesting idea if it could be made to matter - facing 5 goons of equal threat, hit the one that has the least health first, 4 goons after the first shot instead of 5, but you'd have to be able to tell that somehow. (little health bars over the head?)
That's an interesting idea. Maybe they could be larger if they had more health. It might cause some problem with clipping into ceilings, but as long as it was kept subtle it probably wouldn't be too severe.

Slightly off-topic: But on the topic of health manifesting visually, I've always felt that Doom could benefit from damage skins. Something similar to what we see on Doomguy's mug the bottom of the default hub. I've seen videos of this done on 3D mobs' textures (ick, IMHO), but never for the sprites.
I wish there was some equivalent of weapon flashes for regular sprites, as being able to have a blood overlay on a monster would be cool.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Opinions on randomized damage

Post by InsanityBringer »

I think you're forgetting that uservars exist. You don't need to do tricks with counter items or adjusting the health property of the actor, and explosions. You can define a uservar like user_damage, use [wiki]A_SetUserVar[/wiki] to change the damage value. You can even restrict it so that it's within a certain range, like TF2. As for doing the damage, explosions are silly. Use () in your damage statement like this:

Code: Select all

Damage (user_damagefalloff)
Only downside to this is that there is no randomization, but you can add your own formula:

Code: Select all

Damage (user_damagefalloff) + random(-8, 8))
Or whatever. Whatever is in those parenthesis is a proper expression, so you can do anything you can normally do in a DECORATE expression.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: Opinions on randomized damage

Post by cypherphage »

Err...the question was how to have a falloff on damage, so that say a doomimpball does less damage at 80 feet than it does at 5 feet. A_explode is the easiest way to achieve that (at least that I am aware of.) If there is a way to change Damage during a frame, could you post the actual format because I'm not aware of it. Further, I dislike random damage when you are using a better mechanic to vary damage output (falloff). I tend to avoid using user_vars as I find they act less predictably than inventory items (especially in weapons.)
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Opinions on randomized damage

Post by InsanityBringer »

cypherphage wrote:Err...the question was how to have a falloff on damage, so that say a doomimpball does less damage at 80 feet than it does at 5 feet.
This is exactly what I'm discussing.
cypherphage wrote:If there is a way to change Damage during a frame, could you post the actual format because I'm not aware of it.
I did. Use the damage property with parenthesis

Code: Select all

Damage (expression)
cypherphage wrote: Further, I dislike random damage when you are using a better mechanic to vary damage output (falloff).
I added this, just to demonstrate that damage is an expression and you can add randomness if you want.
cypherphage wrote: I tend to avoid using user_vars as I find they act less predictably than inventory items (especially in weapons.)
Yeah, they're a bit bad for weapons, but they should be completely reliable for projectiles.

If they aren't, why don't you report it as a bug? If something clearly isn't working reliably, it's a bug. Report it!
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Opinions on randomized damage

Post by Matt »

InsanityBringer wrote:uservars exist...
[wiki]A_SetUserVar[/wiki]...
change the damage value...
A_SetUserVar
A_
hot damn :shock:
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: Opinions on randomized damage

Post by cypherphage »

Well...am I the only one who never knew that the damage property is actually computed when its used as opposed to upon actor initialization? Maybe its just me, but why isn't this made obvious on the wiki when it seems so useful? Well, anyways...here is an example in case anyone wants one...
Spoiler:
I still might prefer using inventory to user_vars though.
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Opinions on randomized damage

Post by Xtyfe »

Wow, I didn't expect it to be such a simple thing. I was expecting hacks and loads of scripting to get around it. Unfortunately thats been my experience with the current project i'm doing :(
User avatar
SFJake
Posts: 531
Joined: Sat Nov 03, 2007 11:28 am

Re: Opinions on randomized damage

Post by SFJake »

InsanityBringer wrote:*snip about uservars*
The hell, since when did decorate have this ability?

I am shocked. You brought me insanity.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Opinions on randomized damage

Post by Matt »

cypherphage wrote:Well...am I the only one who never knew that the damage property is actually computed when its used as opposed to upon actor initialization?
you certainly were not, even notwithstanding the other people who commented between your post and mine now. o_O

(although in retrospect it makes perfect sense, given inherent damage properties that get repeated by the same actor (e.g. monster attack damage) don't have the same particular value for that actor for the rest of its life.)
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: Opinions on randomized damage

Post by DoomRater »

W-hat?! w h a t
Post Reply

Return to “General”