Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
StevenC21

DeHackEd Pistol edit.

Question

So, I don't like the Doom Pistol. It annoys me, due to the fact that it (imo) shoots too quickly and doesn't deal as much damage as I believe it should. So I simply want to created a .deh patch with WhackEd 4 so that it does so. I have no prior experience, so a step-by-step would be nice. Thanks. 

Share this post


Link to post

15 answers to this question

Recommended Posts

  • 4

As far as I know, you can't adjust the damage value for hitscan (5, 10, or 15 damage), so making it deal more damage isn't an option in the conventional way. An alternative would be to simply have it shoot multiple times on the same tic, so that it deals ~double the damage. You can compensate by making it shoot a few tics slower. I'll show you how to do exactly that to help you get started, then you can adjust and play around from there.

 

----- STEP BY STEP -----

  1. Open up whacked4.
  2. Choose your engine and set your iwad + any pwads.
    • Boom has a major advantage over regular Doom 1.9 in the ability to change the action of any state, which is huge if you're actually editing them (like you are now). You can also edit par times in Boom. If that didn't make sense to you, choose Boom. Otherwise, stick with Doom 1.9.
      • You can change the engine by saving and using "File -> Open as" and reopening your file. Of course, engine-specific changes will probably be lost, if it even lets you change it by that point.
    • The pwads will allow you to see your custom sprites and stuff in whacked4 itself, which is a massive help when doing heavy state editing, especially when you add additional frames to existing spritesheets.
  3. Since you're only touching the pistol, you can just jump right into "States" on the left-hand side of the window.
  4. Click "filter" at the top and scroll all the way to the bottom and click on "Pistol".
  5. Here's your pistol! You'll notice that each little row has a bunch of information, but you can ignore most of it. The most important columns are "Dur" (duration of a state in tics) and "Action" (the specific action for a state).
    • Another bit that may be of use is "Lit", which refers to the sprite having the always fullbright flag turned on, as denoted by an X.
      • You'll notice that state 17, "PISFA" (more on that name later), is lit. Clicking it on reveals that it's actually the muzzle flash for the pistol.
  6. After checking out the different states that the pistol uses, you should notice some important information on the left:
    1. Sprite - The determines the specific spritesheet used for this state. The pistol uses PISG. Clicking on the little dots to the right will pop up a window showing the various spritesheets you can select.
    2. Frame - This denotes the actual frame from your selected spritesheet that will be used for this state. This one has little arrows you can use, so you can actually scroll through each frame of the spritesheet to pick the one you want.
      • You can also see the selected frame for each state under "Frm".
        • The exact name for each is listed under "Name".
      • Next to this is a radio button for the fullbright flag.
    3. Next state - Very important! This denotes what state is going to be called after this one is finished! Set this to 0 if you want the state to stop updating when it reaches it. You'll be using this one soon!
    4. Duration - How long the state lasts, in tics. For reference, 30 35 doom tics = 1 second (I think). For further reference, the delay after you stop firing a plasma rifle is 20 tics.
    5. Action - Also quite important! This tells the state what to actually do when it's called!
    6. Restore - This will reset a state to its defaults, in case you wanna go crazy messing around with each state, which I strongly advise you to do, in order to get a feel for everything! We'll talk more about some of the actions later.
      • The unused sections above don't seem to do anything, as you might guess.
  7. Once you're done messing around with the different pistol states and frames and actions and whatnot, its time to get to business. To make it shoot multiple times on the same tic, you'll have to give another state a FirePistol action. You have two options:
    1. Give it to an existing pistol state and adjust the rest of the states to make it blend in. I don't recommend doing this immediately if you're inexperienced because it's a little more work.
    2. Take a pre-existing state and add it to the pistol's collection. This is what we'll do.
  8. Thankfully, Doom comes fresh out of the box with 5 totally unused states. Little gimmes to get started without worrying about the consequences!
    • To find these states, click "Filter" at the top, and scroll all the way up. It's the very first option, "Unused".
      • These are states that never get called by an initialized state, so they have no ties or connections to anything else in the game, making them super safe and easy to use! Always check back here if you lose track of your states or cut some off of another thing.
        • An "initialized state" is a term I just made up. Each thing and weapon in the game has certain states that it defaults to when it spawns, it initializes them if you will. You'll notice that 45 actually calls upon 46, but is still unused, because it isn't tied back to an initialized state or a hardcoded state, such as state 266, which is hardcoded to be used by the archvile when resurrecting stuff.
          • Examples of initialized states for monsters would be what state to call it spawns, flinches, dies, or when it's gibbed, resurrected, etc. Examples for weapons would be what state to call when you pull out the weapon, put it away, when the player presses fire, etc.
  9. Here, we have 5 choices. To make things simpler on ourselves, we'll just pick the very first one, state 45, sprite name "SHT2B". Remember that number!
  10. Now go BACK to the pistol filter. Since we're gonna make it shoot multiple times at once, lets just add onto the current firing state, state 14, sprite name "PISGB".
  11. Lets go through what you're gonna do for these states, step-by-step:
    1. Select state 14, and take note of the "Next state" number! Now change it to 45, the number of our unused state.
    2. Change "Duration" to 0. This will make it perform an action and instantly update. This will allow us to perform multiple FirePistol actions on the same tic.
    3. We're done with state 14. Up at the top of the States window, next to "Filter", press the red refresh button. This will refresh the pistol filter.
    4. You'll notice a slight change. It appears another state has been added to our filter.
      • However, the change is a bit more complicated. What happened is that 14 now calls 45 instead of 15, which is then supposed to call 16. So now 15 and 16 have become unused states! State 45 actually calls 46, which then calls 33. So you lost 2 states and gained 3.
        • But where did 33 come from? That wasn't an unused state, in fact... it's an initialized state! The reason this state appears and why 45 and 46 are still unused is because 33 is called by 46, which is called by 45... but nothing actually calls 45. 45 and 46 can never be reached, so they remained unused until now.
    5. Because we've lost our previous unused state, we'll have to bring it back. Select state 45 down at the bottom (it's sorted by number) and change "Next state" to 15, state 14's old next-state. Refresh.
    6. Time to fix up the rest of state 45! As you can see, it uses the SSG's spritesheet. Change the spritesheet next to "Sprite" to 3, the pistol spritesheet. Again, this can be seen by selecting the three dots next to "Sprite" and scrolling around.
    7. Well now it uses the right spritesheet, and coincidentally, it uses the correct frame number as well! You won't have to adjust it. You can verify by checking the sprite used by state 14 if needed.
    8. For the duration, it depends on how exactly you want the gun to be slowed. If you want the pistol to just fire slower altogether, try editing various states throughout the firing process, such as states 13, 14, or 15.
      • Careful though! The pistol uses a muzzle flash on state 17. Muzzle flashes are drawn on top of the actual weapon, so keep that in mind.
        • The pistol's muzzle flash is 7 tics long by default, while its firing state is only 6 tics long by default.
      • Alternatively, you can use the pistol's ReFire state (state 16). This is the state weapons use when you've let go of your fire button. Some weapons have short ReFire states that allow you tap fire effectively, while others such as the plasma rifle induce longer delays when you let go of fire. This won't have any impact on firing rates if you're just holding down fire though.
      • Be sure to not change state 14's duration! That needs to be 0. Only change the duration of your final firing state.
    9. It's time to talk about the action. You may notice that this state has no action. If you're using Boom, this doesn't matter. But if you're using Doom 1.9, you won't be able to do much with this state! Try to find another state that you can pull out that already has an action tied to it.
      • Some info on actions themselves:
        • Most actions are self-explanatory. If you're confused about one, check it out here: http://doom.wikia.com/wiki/Codepointer#Code_pointers
          • You'll find some pretty cool and interesting actions here, such as BrainExplode.
        • Player attack actions and enemy attack actions differ. Player attacks start with "Fire" while others don't. The only exception to this is BFGSpray, which I believe can be used by all things.
          • Cyberdemons use CyberAttack to fire their rockets, which are indeed identical to your own.
        • I don't know about zdoom, but normally, trying to mix and match player and demon attack actions will result in crashes. My guess is that it's because there's certain information tied to the attacks, such as the attack target for demons, which can't be provided by a player, which then confuses and crashes the game.
      • Anyways, take state 45 and in this case, set the action to "FirePistol".
    10. Repeat as needed using additional states if you wish to make the pistol shoot even more per tic.
  12. Hooray!!! You did it!!!!!! Save your patch and run it with all your wads. It should be able to actually work hand-in-hand with other dehacked patches, if they're small and only edit strings and such.
    • Obviously there are some issues with doing this, especially concerning the increased ammo consumption. Your recoil will also be a little wonky after the first shot, since, while on the first shot both bullets will be perfectly accurate, they'll have separate recoils, but that shouldn't be a problem. In fact, that can actually almost be like pseudo-balancing, making the pistol much more effective at short ranges. It will however introduce more variance on the damage output as well, making it range from (if you hit both bullets) 10-30 damage, which could be good or bad depending on your point of view.

    • If the ammo is truly a problem, you can adjust the ammo you receive from pickups in the "Ammo" section on the left. The number under "Pickup" represents the base pickup amount, i.e. a small ammo pickup one backpack, a dropped weapon (except for dropped clips which give half). Placed weapons will give you twice this amount, and big pickups like boxes of bullets/shells/rockets will give you five times this amount.


And that's it! I'm sorry this was so long, I tried to make it moderately detailed and wanted to include some extra tidbits that might help you if you decide to branch out into more advanced patches. This is actually super easy to do, despite what my guide might tell you. If you perhaps want a tl;dr that cuts out all the extra stuff and explanations and whatnot, I will most certainly provide. Also I don't know what the other guy was talking about with SLADE. He might have been talking about using DECORATE or something instead.

 

EDIT: Please note: Doom doesn't check your ammo before firing, so if you have only 1 bullet and attempt to shoot (which is impossible to avoid since zombiemen drop 1/2 your base ammo pickup amount, making an odd number of bullets inevitable), you'll go to -1 bullets. Literally. Doom even has a graphic for this. FireCGun, the action for shooting the chaingun, appears to be identical to FirePistol except that it also checks ammo before firing. Unfortunately however, it completely breaks the pistol when you try using it on it. So if you bring yourself to -1 bullets, your gun will act like it's out of ammo, but will literally say "-1" under ammo on the left, while on the right however, it will replace the number for your shells with the negative graphic. To remedy this, change your screen size (- and +). It goes away completely once you're back in the positives. (P.S. this doesn't affect you if you don't use the big ol' default status bar)

 

Anyways, If you have any questions, comments concerns, corrections, or want me to include screenshots for certain steps or something, let me know.

Love, bonnie.

Edited by bonnie

Share this post


Link to post
  • 1
7 minutes ago, StevenC21 said:

Jk jk of course. Thanks!

 

I FORGOT TO TELL YOU SOMETHING SUPER IMPORTANT: you wouldn't believe the frickin heart attack i just had over this because i completely forgot about something extremely crucial to this whole thing:
 

doom doesn't check your ammo count before shooting. since you're shooting the pistol twice in the same attack, that means if you shoot with 1 bullet, you go to... -1 bullets. this scenario is unavoidable since zombiemen drop clips at half the base ammo pickup amount, which means having an odd number of bullets is inevitable.

 

"but wait a minute bonnie, the chaingun fires two shots per attack, and that works, you frickin liar!!!"

this is true. the chaingun uses a special action, FireCGun, which appears to be identical to FirePistol except for the fact that it checks ammo before firing, but for whatever reason, it completely breaks the pistol if you try to use it on it.


the good news? this doesn't really matter (i think)!!! there's actually a graphic for negatives in doom, so in your ammo count on the left, it'll literally say "-1", but on the right, it will replace the number for your shells with the big ol' negative graphic. the way to fix this appears to simply be resizing your hud, so just hit - and + real quick to fix it. it'll go away completely once you pick up ammo to bring yourself back into the positives. c:

 

please note that this only even affects the default doom status bar, so if you use boom's advanced hud or some other fullscreen thingy, you won't even be impacted by this

but holy heck my wee little heart was so panicked because i thought everything was gonna be horribly broken forever ;~;

Share this post


Link to post
  • 0

I can't help you with WhackEd, but I can give some help if it's in SLADE 3.

 

I just want to check if it absolutely NEEDS so be a .deh patch before I begin giving advice.

Share this post


Link to post
  • 0

Well, Bonnie definitely did a better job explaining than I could ever hope to do. And yeah, I meant DECORATE. I think he could give you more help than I can.

Share this post


Link to post
  • 0

@bonnie Whoa! That is a lot of info. I'll definitely be looking at that later today. Will update this post, and feel free to respond to this so I remember.

Share this post


Link to post
  • 0
On 2/27/2018 at 5:25 PM, StevenC21 said:

@bonnie Whoa! That is a lot of info. I'll definitely be looking at that later today. Will update this post, and feel free to respond to this so I remember.

pls do not be spooked by the wall of text, it's really just me super duper babying you to guide you through the process, explaining what everything is

and also adding some extra info in case you want to branch out into more dehacked thingies ever sometime yes :c

Share this post


Link to post
  • 0

@bonnie Thanks! I kinda got lost anyways, because after I made sprite 46 go to 15, 15 still didn't reappear in the pistol list, but it's ok, I'll figure this all out eventually.

Share this post


Link to post
  • 0
1 minute ago, StevenC21 said:

@bonnie Thanks! I kinda got lost anyways, because after I made sprite 46 go to 15, 15 still didn't reappear in the pistol list, but it's ok, I'll figure this all out eventually.

did you remember to refresh the pistol filter?

Share this post


Link to post
  • 0
1 minute ago, StevenC21 said:

@bonnie Also, I just realized, now the pistol is taking up more than one piece of ammo per shot? Is there a way to rectify this?

yes, the horrible plot twist is that by making the pistol shoot twice per shot, you're literally using 2 bullets per shot ;~;

 

i address this slightly at the end of the post, but basically, you can either leave it in as a pseudo-nerf to counter the increased dps, increase your starting ammo (in "miscellaneous", near the bottom), or increase the amount of bullets you get from ammo pickups in "ammo", but please note that ammo pickups in doom work like this:

 

the number you put in is the base pickup amount. picking up placed weapons gives you twice the base, while picking up dropped weapons/small ammo pickups/backpacks give you exactly the base. large pickups give you 5x the base. the only exception to this is clips dropped by zombiemen, which give 1/2 the base (so i recommend you pick an even number for your base!!).

 

i'm sorry for tricking you so horribly friend ;~;

Share this post


Link to post
  • 0

I'm trying to make a "Plasma Pistol" It worked perfectly fine on zdoom, but it won't work for some reason on boom and crispy.

I keep getting the shotgun image, and the pistol stops shooting randomly. Yet this didn't happen on zdoom.

This is only a dehacked. Should I have saved it to boom rather than doom1.9?

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
×