Accurate Pistol: the most minuscule Dehacked patch ever

Here's a small "mod," if you can even call it that, that I've been using for a day or two. It makes it so that the pistol fires with perfect accuracy even when you hold the fire button down. Despite such a small change I find it makes the pistol a lot more useful and I kind of like playing with it.

https://www.mediafire.com/?1uckr539beforo5

Feel free to use this for whatever purpose suits you, if you want.

edit: Made more compatible with Chocolate Doom.
edit2: now pistol fires slightly faster too

Share this post


Link to post

Indeed a simple change, which however can find its usefullness. Possibly in combination with increasing pistol fire speed, and also...

Did you know that vanilla DEHACKED also allows to disable "chaingun tapping" trick, so the shots of a weapon will always be randomized? Normally, the first shot is always accurate. I've found there's a way to avoid that, using pretty much the opposite technique than it is used for this accurate pistol.

Share this post


Link to post

That's pretty cool, how do you do that? Start with Refire on the first frame?

I had an idea for a "slightly tweaked weapons" mod, maybe I'll try it out later.

Share this post


Link to post
plums said:

That's pretty cool, how do you do that? Start with Refire on the first frame?

You almost got it. Starting with Refire frame actually seems to crash vanilla or some less advanced ports. What you need to do is: Instead of looping the weapon bobbing frame with Ready codepointer, make it jump to a frame with zero duration and with Refire. Then from this one, let it jump back to the standard Ready frame (should have duration of 1). Good thing is, when the player presses a fire button, it will ALWAYS be detected by the Refire frame first, resulting in jumping to a Shoot state with immediate randomization.

In the Weapon definition section, weapon's bobbing state should be set on the frame with Ready action. On the other hand, the attack sequence of the weapon needs to end in the same Refire frame used for the randomization.

Share this post


Link to post

I like the accuracy, if you could make the pistol have more of a higher damaging power to it, that would be even better.

Share this post


Link to post

I like these sort of ideas that buff the pretty worthless pistol (especially for DM wads). I'll have to try this wad sometime in a DM round.

I always felt hacx had the right idea in doing a double shot; it would probably be OP to combine perfect accuracy, a faster firing rate, and a double shot, but it might be worth mixing the three factors a bit.

Share this post


Link to post
cq75 said:

it would probably be OP to combine perfect accuracy, a faster firing rate, and a double shot

In my opinion, the pistol would be fine if it combined perfect accuracy, faster firing rate and a quadruple shot.

Share this post


Link to post
scifista42 said:

In my opinion, the pistol would be fine if it combined perfect accuracy, faster firing rate and a quadruple shot.


Full auto aimhack shortstop?

You mean like this?

http://www.ifocserv.net/ftp/Random/Quadpistol.bex

Pretty much destroys every kind of zombie in one or two shots

Share this post


Link to post

^The bex patch above doesn't work for me. No wonder, when all states 13-15 have set zero duration, that leads to a crash. Also there would need to be CheckReload states set in between every of the FirePistol frames to prevent going below 0 ammo.

I thought that something like quadpistol would by well used to create pistol + SSG balanced gameplay, even on maps with high-tier enemies.

Share this post


Link to post

it works in prboom and zandronum, in chocolate doom it uses up all of your bullets at once (which is kind of funny)

haven't found any crashes... haven't tried it with DOS doom though.

It does go to -2 ammo though. This was sort of a quick experiment, probably a better way to do it would be something like what you said above, but I think I'd have to borrow frames from other actors? I don't really do a lot of dehacked, sorry.


EDIT: in DOS Doom it doesn't seem to do much of anything

how did you get this to crash?

Share this post


Link to post

First, when I click your link, I just see an unformatted text written all in one line. I've copied the text to a .bex file and properly added ends of lines. Until I did so, the patch didn't work at all.

Then I've tested in PrBoom-plus. All bullets have been fired at once. I typed IDKFA and shot again. PrBoom-plus crashed.

I think the right firing sequence should go something like this:

Sprite  Sub.  Duration  Codepointer

PISG    A     4
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     6         FirePistol
PISG    C     4
PISG    B     5         Refire
You would need to steal some states from other parts of the state list in order to gain the extra states needed. CheckReload codepointers prevent from going below 0 ammo. Durations define how fast the pistol will shoot - zero durations everywhere are a bad idea, there must be at least some duration in the sequence. And lastly, .bex format is Boom only, not vanilla Doom compatible. It's Boom EXtended format.

Share this post


Link to post
scifista42 said:

In my opinion, the pistol would be fine if it combined perfect accuracy, faster firing rate and a quadruple shot.


That would make it a comparable weapon to the Chaingun though - which is OK if that's what you want, but the pistol is supposed to be a wimpy weapon. Giving it accurate shots only just makes it a little less useless. I agree that speeding it up a bit could be good though.

Share this post


Link to post

Chaingun could use speed-up or double-shots too. In fact, I did it (chaingun with double shots), and the result wasn't that OP weapon. It was well comparable to a plasma gun. But drained bullet ammo fast as hell.

Share this post


Link to post
scifista42 said:

First, when I click your link, I just see an unformatted text written all in one line. I've copied the text to a .bex file and properly added ends of lines. Until I did so, the patch didn't work at all.

Then I've tested in PrBoom-plus. All bullets have been fired at once. I typed IDKFA and shot again. PrBoom-plus crashed.

I think the right firing sequence should go something like this:

Sprite  Sub.  Duration  Codepointer

PISG    A     4
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     0         FirePistol
PISG    B     0         CheckReload
PISG    B     6         FirePistol
PISG    C     4
PISG    B     5         Refire
You would need to steal some states from other parts of the state list in order to gain the extra states needed. CheckReload codepointers prevent from going below 0 ammo. Durations define how fast the pistol will shoot - zero durations everywhere are a bad idea, there must be at least some duration in the sequence. And lastly, .bex format is Boom only, not vanilla Doom compatible. It's Boom EXtended format.


Thanks for the advice, I'll keep that in mind, I've done a lot of DECORATE so I know the basics like duration and such; I'm not sure which states would be good to steal since I wouldn't want to mess up a torch or something to make the pistol look good.

as for it opening as a single line text file, that's odd... what happens if you right click -> save target as / save file as / save target as in your browser?

People have run into the same thing when I upload .map files for duke, unfortunately firefox (at least) likes to preview small files (even small binary files) instead of downloading them for some reason. I'm not sure if there's something I can set on the server side to stop that from happening, but if there's a way to do that I would definitely fix that.

Share this post


Link to post
cq75 said:

as for it opening as a single line text file, that's odd... what happens if you right click -> save target as / save file as / save target as in your browser?

If I do so, it downloads a .html file. Can't download the text. Also I use Internet Explorer - that might be it.

Probably the most OK states to steal are Pain Elemental's respawn states (states 720-725), item respawn fog states (142-148),

Spoiler

and also Zombieman's, Shotgunner's and SSNazi's exploding states can be unified into the same states since they look (almost) the same anyway. If you decide to steal PE's respawn states, don't forget to alter thing Pain Elemental and nullify its respawn. If you steal item respawn fog states, you should set the thing to classic teleport flash states too.

(beware, spoiler contains advices about more intricate trickery)

Share this post


Link to post

Thanks again for the dehacked advice.

As for IE downloading it as a html file, that's very strange. I can't imagine why IE would think it's a HTML file.

more "why does IE think it's a HTML file?" below

Spoiler

It doesn't start with <!DOCTYPE html>, it doesn't have the .htm/.html extension, etc...

If you change the downloaded file's extension to bex everything's ok, though. It doesn't modify the contents of the file, it just gives it the wrong extension.

I've been hoping I don't have to zip these little files because it's sort of silly and more often than not actually increases the file size but considering the trouble you're having with it I might have to to avoid confusing people who use IE.

The last time I used Internet Explorer more often than absolutely necessary was IE6; I had no idea it tried to always assume any small file was a html file (!) regardless of the extension I gave it on the ftp; I'll keep that in mind from now on, thanks for pointing that out.

Share this post


Link to post
plums said:

Here's a small "mod," if you can even call it that, that I've been using for a day or two. It makes it so that the pistol fires with perfect accuracy even when you hold the fire button down. Despite such a small change I find it makes the pistol a lot more useful and I kind of like playing with it.

https://www.mediafire.com/?aakov7kbm19j31u

If it's so small, why don't you post it inline and spare us the mediafire link + download + Explorer + unzip + paste/doubleclick sequence?

Share this post


Link to post
printz said:

If it's so small, why don't you post it inline and spare us the mediafire link + download + Explorer + unzip + paste/doubleclick sequence?


Not zipped in mediafire. What do you mean inline? I can't attach files to this post, I could post the contents in code tags but I really fail to see how that's easier.

Patch File for DeHackEd v3.0
# Created with WhackEd4 1.0.2
# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Frame 15
Next frame = 10

Frame 16
Duration = 0

Pointer 10 (Frame 16)
Codep Frame = 2

Share this post


Link to post

This is simply perfect for deathmatches on large maps. Thanks, plums!

Share this post


Link to post
scifista42 said:

Good thing is, when the player presses a fire button, it will ALWAYS be detected by the Refire frame first, resulting in jumping to a Shoot state with immediate randomization.

Not quite. If you press and hold the fire button before the chaingun fully raises, the first two shots will be precise as usual.

Still, "chaingun tapping" is impossible, so the aformentioned quirk doesn't spoil anything. Neat trick, thanks.

Share this post


Link to post
cq75 said:

it would probably be OP to combine perfect accuracy and a faster firing rate.

I agree with that and that's what the pistol really needs to make it better and more useful.

Share this post


Link to post
scifista42 said:

Chaingun could use speed-up or double-shots too.

Sure thing but also i think it should deal 2x more damage than the pistol, because the chaingun is heavy not only because of its barrels but also of its ammo which can pierce through armor i think.

Share this post


Link to post

The Blessed Engine has the best chaingun deh (uses all available bullets in one shot).

Share this post


Link to post

microupdate: speed up firing rate a bit. Done a while ago but I never updated the link, oops.

https://www.mediafire.com/?1uckr539beforo5

Patch File for DeHackEd v3.0
# Created with WhackEd4 1.0.2
# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Frame 15
Duration = 1
Next frame = 10

Frame 16
Duration = 0

Pointer 10 (Frame 16)
Codep Frame = 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now