header general

[Submission] Impaler Gauntlet

  • doomedarchviledemon
  • doomedarchviledemon's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
2 months 1 day ago - 6 days 17 hours ago #1 by doomedarchviledemon
[Submission] Impaler Gauntlet was created by doomedarchviledemon
Name: Impaler Gauntlet
Class: 1
Type: Melee
Palette: Hexen
Summon: ImpalerGauntlet
Ammo Type: None
Powered Mode: No
Added States: No

Submitted: TheDoomedArchvile
Code: TheDoomedArchvile, DeVloek, BlueShadow
GLDefs: None
Sounds: Hexen
Sprites: Hexen, Neoworm, Nash
Sprite Edit: TheDoomedArchvile, Gothic
Idea Base: Upgrade to the Spiked Gauntlets
ACS: No

Description: A metal gauntlet that has two large spikes that rip through the flesh of anyone who is unlucky enough to get punched. They deal more damage than the spiked gauntlets and the wielder can even preform an uppercut. Holding the alt-fire while preforming the uppercut will throw a follow-up punch that deals significant damage.
The uppercut also acts as a jump to get onto higher ledges or reach air-born foes. The follow-up punch will also push the person forward a bit, so they can use this attack as an extra movement option.

   

Download

Note: There are two current issues I am having with this weapon that keep this from being fully complete for my liking. Regardless, I hope it is still fun in its current state.

1. For some reason when using the AltFire's followup attack (mid-air punch after the uppercut), when using the AltFire again it will automatically enter its AltHold state instead of going to the AltFire state. The Goto at the end point to the Ready state, so I am not sure why it is skipping?

2. I'd like to make enemies who get hit by the uppercut attack, or at least are within a close proximity of the player when using this attack, that they also get thrust straight into the air so that the followup punch will better connect. I tried using A_Blast but that only appears to push enemies horizontally. Is there a way to make an enemy to be launched only vertically when hit by a melee attack or with another A_Blast-like effect?

As always, feedback is welcome! ^_^
Last edit: 6 days 17 hours ago by doomedarchviledemon. Reason: Updated sprites from Gothic

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
2 months 1 day ago #2 by DeVloek
Replied by DeVloek on topic [Submission] Impaler Gauntlet
Some issues with this weapon:
  • Several errors in the A_CustomPunch arguments. pufftype and armorbonustype both require a string, 0 won't work.
    The default pufftype in Hexen is "PunchPuff", you should use that or a custom puff derived from it. Since most attacks call A_CustomPunch three times in a row, you'd probably want only one of them to produce a puff, for the others you can pass "none".
    For the armorbonustype just pass "BasicArmorBonus".
  • The weapon sprites aren't wide screen friendly. Even at a standard 16:9 resolution some sprites are cut off at the sides. Might be fixable with some copy/pasting from other sprites that have the full arm.

 I'd like to make enemies who get hit by the uppercut attack, or at least are within a close proximity of the player when using this attack, that they also get thrust straight into the air so that the followup punch will better connect. I tried using A_Blast but that only appears to push enemies horizontally. Is there a way to make an enemy to be launched only vertically when hit by a melee attack or with another A_Blast-like effect?

You could use A_RadiusThrust with the RTF_THRUSTZ flag, but for some reason this only works in Doom, Strife and Heretic but not in Hexen. Might be an engine bug, not sure.
No idea if there's another way in Decorate. It would be really easy in Zscript, just make a custom puff and let SpecialMissileHit do ThrustThingZ on the victim.


 

Please Log in or Create an account to join the conversation.

  • doomedarchviledemon
  • doomedarchviledemon's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
2 months 13 hours ago #3 by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated
  • Switched to ZScript
  • Addressed A_CustomPunch issues
  • Fixed widescreen sprites (Just discovered how to see the full widescreen visual range in Slade3)
As for the SpecialMissileHit, I don't fully understand the example shown on the ZDoom wiki. At least, I don't understand where to actually put this in the actual code. I tried a few configurations with a custom puff actor but I couldn't figure out if I was suppose to put it in the Default section or somewhere in the actor's States or what.
If there is another weapon on this site that uses this function I could look at how/where it's used and go from there myself. If there is please let me know and I'll try to learn by example.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
1 month 4 weeks ago - 1 month 4 weeks ago #4 by DeVloek
Replied by DeVloek on topic [Submission] Impaler Gauntlet
Well it turns out the Zdoom wiki was wrong. I suggested SpecialMissileHit because the wiki said it works with puffs, but I tested SpecialMissileHit on a puff myself and it simply didn't work, at all. I thought it was a bug or something so asked in the Zdoom discord, and one of the GZdoom devs said that puffs do not use SpecialMissileHit.
So I reported this error to the wiki staff and they corrected it. In reality, Puffs use DoSpecialDamage instead of SpecialMissileHit, which works very similar.

At least, I don't understand where to actually put this in the actual code. I tried a few configurations with a custom puff actor but I couldn't figure out if I was suppose to put it in the Default section or somewhere in the actor's States or what.

The default block is just for defining default values, no actual code goes there. Both SpecialMissileHit and DoSpecialDamage are existing functions, so you could call them in an actor's state but they won't do anything on their own. To actually do something with them, you have to override them, and this is done outside of the default and state blocks. For example:
Code:
class IGPuff : PunchPuff {     Default     {         SeeSound "none";         AttackSound "none";         ActiveSound "none";     }     override int DoSpecialDamage (Actor victim, int damage, Name damagetype)     {         if (victim && victim.bSHOOTABLE && !victim.bDONTTHRUST)         {             victim.vel.z += 10;         }         return damage;     } }

Note that ThrustThingZ does not work in this context (which I just found out, and it doesn't work for SpecialMissileHit either, my bad), but you can easily change any actor's Z velocity with the vel.z field.
The only issue I see now is that the victim is also pushed away when punched (at least those with low mass), but if you look at the DoSpecialDamage wiki you can see some example code that pulls it towards you, maybe you can use that to keep the victim in range so the follow-up punch can actually connect.

Btw before the wiki situation cleared up I thought of some other ways to achieve what you want with Zscript.

One method is using the HITTRACER flag and manipulating the tracer (the actor that was hit) directly during the spawn state of the puff, no need to override any functions. Example:
Code:
class IGPuff : PunchPuff {     Default     {         SeeSound "none";         AttackSound "none";         ActiveSound "none";         +HITTRACER;     }     States     {     Spawn:         TNT1 A 0 Nodelay         {             if (tracer && tracer.bSHOOTABLE && !tracer.bDONTTHRUST)             {                 tracer.vel.z += 10;             }         }         FHFX STUVW 4;     Stop;     } }


Another method is writing a completely custom melee attack function (used instead of A_CustomPunch) that uses the  FTranslatedLineTarget struct together with  LineAttack . You can make a shortrange hitscan attack (which is what regular melee attacks are internally), and with help of that struct you can get a pointer to the actor that was hit, and manipulate it from there. I don't think any of the R667 weapons or monsters use this method though, but I can write an example function for you if you want to use this, I'd just have to figure it out first since I never used this myself.
Last edit: 1 month 4 weeks ago by DeVloek.

Please Log in or Create an account to join the conversation.

  • doomedarchviledemon
  • doomedarchviledemon's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
1 month 3 weeks ago #5 by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated!
  • Implemented the vel.z thrust using the HITTRACER flag.
  • Added A_Blast to the end of the follow-up mid-air punch to push enemy away after all hits land.
  • Further adjusted damage output.
The HITTRACER flag was the easiest for me to understand lol. The overriding DoSpecialDamage function also worked, but HITTRACER just seems easier for me personally. I adjusted the z thrust from 10 to 14 since that seems to be the best height for the mid-air punch to connect. I tested this with all Hexen enemies and was able to connect with all of them. I also added A_Blast to the end of the mid-air punch to push enemies backwards after all hits have landed. Makes sense to me that they would be pushed back after being hit. Weapon's damage has also been lowered slightly.

I didn't notice the issue where enemies were being pushed back when running Hexen though. On my end the enemies are thrust straight upwards. However, when playing on Doom, I do notice the issue. After some testing though I don't think it's too big of an issue since the thrust forward from the mid-air punch still reaches the majority of grounded enemies who are hit into the air. The lightest enemy that doesn't die outright from the initial uppercut is the Demon, which while still being pushed away still gets hit with the mid-air follow up. At least from my testing. Would this issue be something related to certain source ports maybe? I am using GZDoom 4.13.0.

The other remaining issue I have that I don't understand is when using the altfire attack after using the mid-air punch, it will skip to the althold state instead of the altfire. Is there a reason for this? Maybe I am missing something but I think I have all of the Goto functions pointing to the proper places. My understanding is that if fire or altfire is triggered, it should always go to those states from the Ready state unless something specific is written as an exception?

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
1 month 3 weeks ago - 1 month 3 weeks ago #6 by Blue Shadow
Replied by Blue Shadow on topic [Submission] Impaler Gauntlet
Regarding the thrust issue, Hexen player pawns have the NODAMAGETHRUST flag set, unlike the Doom player pawn. That's why you see monsters being knocked back from damage in Doom but not in Hexen.

As for the AltFire/AltHold issue, you need to use A_ClearReFire before jumping back to Ready from the mid-air punch sequence.
Last edit: 1 month 3 weeks ago by Blue Shadow.

Please Log in or Create an account to join the conversation.

  • doomedarchviledemon
  • doomedarchviledemon's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
1 month 3 weeks ago #7 by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated!
  • Implemented the A_ClearReFire function
I didn't know about this function. I'll keep this in mind for any future weapons I make that have multiple holds on their attacks.
With those issues fixed, I think this weapon is now fully functional as intended. Thank you both for your help on these!
Any further feedback points are welcome as always.

Please Log in or Create an account to join the conversation.

  • DeVloek
  • DeVloek's Avatar
  • Arachnotron
  • Arachnotron
More
1 month 3 weeks ago #8 by DeVloek
Replied by DeVloek on topic [Submission] Impaler Gauntlet
What do you think about putting the follow-up punch on the Fire button instead of AltFire? Maybe it's just me but it's a bit awkward for me to hold RMB, then release it to do the uppercut, then quickly press RMB again for the punch. Could be easier to pull off the combo if the followup punch was on LMB. Which ideally could then be held down to seamlessly go into the normal attack loop.

Please Log in or Create an account to join the conversation.

  • Gothic
  • Gothic's Avatar
  • Moderator
  • Moderator
More
1 month 3 weeks ago - 1 month 2 weeks ago #9 by Gothic
Replied by Gothic on topic [Submission] Impaler Gauntlet
I recommend using Nash's Widescreen sprites instead of Neoworm's, they're more ultra wide friendly.
Last edit: 1 month 2 weeks ago by Gothic.

Please Log in or Create an account to join the conversation.

  • doomedarchviledemon
  • doomedarchviledemon's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
1 month 2 weeks ago #10 by doomedarchviledemon
Replied by doomedarchviledemon on topic [Submission] Impaler Gauntlet
Updated, though not quite working.
I tried to implement the GetPlayerInput function to see if it could jump to the follow-up punch when pressing the Fire button, but I don't think I am doing it correctly lol. I looked at Gothic's updated Bow for reference and looked at the wiki page for some more info. It's not throwing any errors so far, but it's not triggering when I press the Fire button on the frames it's suppose to be listening for.
Maybe it's a difference between how this works in Decorate like how Gothic's Bow is on versus ZScript? Do I need another code entry for this to work properly? Or is it some incorrect calls/terms I am using in the code?

I recommend using Nash's Widescreen sprites instead of Neoworm's, they're more ultra wide friendly.

Ooooh, those are pretty nice! I'll work on updating the arms as well. Thank you for pointing these out!

Please Log in or Create an account to join the conversation.