Jump to content
  • 0

How to change the firerate and accuracy of a weapon using DeHacked?


mxrgan

Question

Ive been wanting to edit the pistol to have more accuracy and modify the Chaingun to have a slower rate of fire. But Im just a little confused on which states of each weapon I should change to make it work properly. I would also just want to know if modifying the accuracy is possible in DeHacked. A push in the right direction will help a ton, thanks in advance. FYI: I also use WhackEd4 as my DH editor.

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 1

You can change rate of fire by modifying duration of Fire states(states that have "FireCGun" in case of Chaingun).

 

As for accuracy, it's possible to remove spread, but I don't know how to do that(maybe by removing "ReFire", but I really don't know).

 

It would be useful to write for what format is this for. Boom has upgrades in Dehacked compared to vanilla.

Share this post


Link to post
  • 1

I swear I saw a post that said how you can remove spread from the pistol but I cannot find it anymore and it frustrates me. I think, and don't quote me on that, you have to set the ReFire before it calls the FirePistol action, or, set the tick duration to 0 for the ReFire. As for the chaingun, this nice man above me said it already, just set the tick duration for the FireCG action to a value you want.

Share this post


Link to post
  • 1

Yes, remove the refire action and a weapon such as the pistol or chaingun will be 100% accurate.

Share this post


Link to post
  • 1

The codepointers FirePistol and FireChaingun in conjunction with ReFire cause the inaccuracy. Specifically, the first shot is always accurate, but when ReFire is called and the player is still holding the fire key, the weapon jumps back to the beginning of the firing state but this time with some added spread. So to remove inaccuracy, you just need to remove the ReFire codepointer (as mentioned by others). The added spread is hardcoded, so you can't really modify it in the chosen format, only remove it.

 

The pistol ReFire (state 16) is 5 tics long and contains a unique sprite (as opposed to the 0 tic ReFire state in the chaingun firing animation), so if you just remove the ReFire codepointer from the state, the pistol shoots slower when holding down the fire key as there are 5 tics added to the animation that previously would've been ignored. This can be remedied by adjusting the frame durations across the entire animation so that the total duration matches that of the vanilla pistol. However, just speeding it up might make the animation look janky, so you might need to look into some better/additional frames (Vanilla Smooth weapons could help you here.)

Share this post


Link to post
  • 0
On 2/5/2022 at 1:25 PM, Kain D. said:

You can change rate of fire by modifying duration of Fire states(states that have "FireCGun" in case of Chaingun).

 

As for accuracy, it's possible to remove spread, but I don't know how to do that(maybe by removing "ReFire", but I really don't know).

 

It would be useful to write for what format is this for. Boom has upgrades in Dehacked compared to vanilla.

Thanks for the info, and I am currently mapping in Boom(Doom 2) format. That could give you a bit more info :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...