Not sure where to stick this but I'll put it here seeing as the feature suggestion section is locked.
How about adding something like HITBOX_RADIUS and HITBOX_HEIGHT for THINGS ? If present, it won't affect the creatures height and width but only its actual hitbox (where you need to hit it to make a dent). If it is omitted, the RADIUS and HEIGHT will be used in its place instead, like normal.
This would open up a few possibilities, such as large armored creatures with small weak spots. Also, for Wolf3D this would allow enemies to be 64x64 in size (keeping the "blocky" nature of the original game) but with more appropiate hitboxes.
Just a thought.
Feature Suggestion: Hitbox
Re: Feature Suggestion: Hitbox
I've thought from time to time that it would be nice if you could set up weak-spots. Mostly just so you could do head-shots, maybe "limbs" and "torso" regions too. It would be great if it responded to angles too, so you could have enemies with shields.
It would be a more complicated system, but if you were to go down this path, why not set that up instead? You could define "hit-regions" and then establish the effects they have with various weapons.
The way I see this working is you define a hit-region for the game to check. You define that hit-region's height, radius, height from the ground, and the angles where it is viable. Then specify the effects that region has according to what kind of weapons. (So so can have headshots or weakpoints only work with certain kinds of weapons, eg, can't get a headshot with an explosion.) You could list multiple hit-regions for the game to check for (I would assume the game would check them in the sequence you give them, so if there is any overlap you can make sure that certain things are checked first. The game would go through each of the character's hit-regions in sequence until it finds something it actually connects with.)
At the end of the list there would be a "default" region. (This would be assumed so if nothing is listed it doesn't cause an error.) The default region doesn't specify any radius or height or angles, but you can add it to just override the default reaction to getting hit with a weapon. So for example if they are armored except for that weak spot the default section could be set to deflect all shots. Although as I think about it further, that might be superfluous because you could just set up another hit-region at the end of the list that covers all angles and sizes if you wanted to do that. Eh, either way.
You'd want to be able to make (certain) weapons deal a damage modifier, or a set amount of damage, play a particular sound effect, (possibly have a generic "deflect" option that automatically deals no damage and plays a deflect sound,) pass through as if nothing was there, or trigger something in an external script within the character or the weapon. Ideally you should be able to set all of those to happen at once, so you can stack effects if needed. Oh and maybe have the weapon react as if it hit a wall, so if you have a grenade it can bounce off.
It's a more complicated system to be sure, but it would add a lot of flexibility. It would be fantastic for boss battles.
It would be a more complicated system, but if you were to go down this path, why not set that up instead? You could define "hit-regions" and then establish the effects they have with various weapons.
The way I see this working is you define a hit-region for the game to check. You define that hit-region's height, radius, height from the ground, and the angles where it is viable. Then specify the effects that region has according to what kind of weapons. (So so can have headshots or weakpoints only work with certain kinds of weapons, eg, can't get a headshot with an explosion.) You could list multiple hit-regions for the game to check for (I would assume the game would check them in the sequence you give them, so if there is any overlap you can make sure that certain things are checked first. The game would go through each of the character's hit-regions in sequence until it finds something it actually connects with.)
At the end of the list there would be a "default" region. (This would be assumed so if nothing is listed it doesn't cause an error.) The default region doesn't specify any radius or height or angles, but you can add it to just override the default reaction to getting hit with a weapon. So for example if they are armored except for that weak spot the default section could be set to deflect all shots. Although as I think about it further, that might be superfluous because you could just set up another hit-region at the end of the list that covers all angles and sizes if you wanted to do that. Eh, either way.
You'd want to be able to make (certain) weapons deal a damage modifier, or a set amount of damage, play a particular sound effect, (possibly have a generic "deflect" option that automatically deals no damage and plays a deflect sound,) pass through as if nothing was there, or trigger something in an external script within the character or the weapon. Ideally you should be able to set all of those to happen at once, so you can stack effects if needed. Oh and maybe have the weapon react as if it hit a wall, so if you have a grenade it can bounce off.
It's a more complicated system to be sure, but it would add a lot of flexibility. It would be fantastic for boss battles.
Re: Feature Suggestion: Hitbox
There is a WEAKNESS feature that is similar:
I have used this before in Hypertension to make headshots blow off heads, low blasts to blow off legs, etc. Seems its not in the DDF docs currently - I will add it soon.WEAKNESS feature allows a monster to receive more damage from certain attacks than others. You can also specify a zone where the monster must be hit (when hit in other places, the weakness does not apply). The weakness zone can be a height range (in percentages) and/or an angle range (in degrees).
The weakness feature requires 'WEAKNESS.CLASS' to be present,
specifying what attack classes the monster is weak against.
Note that it will also _override_ any IMMUNITY or RESISTANCE
that the monster has (except for the INVULNERABLE special).
The following example shows all the commands. Everything
except 'WEAKNESS.CLASS' is optional.
WEAKNESS.CLASS=ABC;
WEAKNESS.HEIGHTS=75%:100%;
WEAKNESS.ANGLES=150:210;
WEAKNESS.MULTIPLY=3.0;
WEAKNESS.PAINCHANCE=100%;
When a thing is hurt via the weakness feature, it will try to
enter 'WEAKPAIN' states, but if it doesn't have them then the
normal PAIN states are used.
When a thing is killed, it will try to enter 'WEAKDEATH' states,
but if they don't exist then it will try OVERKILL states, and
finally it falls back to the normal DEATH states.
\(סּںסּَ` )/ۜ
Re: Feature Suggestion: Hitbox
Yes, I know about the WEAKNESS feature.
What I am talking about is different. You have the height and width of the creature which could be anything, with what I am suggesting you make the creature's damage area independant from the height/width of the creature (normally it is the same) with the new command.
What I am talking about is different. You have the height and width of the creature which could be anything, with what I am suggesting you make the creature's damage area independant from the height/width of the creature (normally it is the same) with the new command.
Re: Feature Suggestion: Hitbox
Oh! That's pretty useful!Coraline wrote:There is a WEAKNESS feature that is similar:
The only thing that seems to be missing is an ability to let a shot pass through the object like it wasn't there, and an ability to specify a smaller radius.
The latter I would think is fairly important. Otherwise you could score a headshot if you fire past someone's shoulder. Plus it seems reasonable that a game playing like doom should count accuracy according to how close to the centerline of the object you hit.