Jump to content
  • 0

Putting new weapons in a WAD


0o0[ULTIM4TE]L1FE[F0RM]0o0

Question

Hello, I'm pretty new to modding and I don't really know everything about it, I started doing some things in Ultimate Doom Builder like one or two months ago and I've done some things like importing new textures into a WAD with Slade and I edited the default weapons from the base game using WhackEd before but that's all I've really done so far.

 

However since I'm working on a WAD right now I was thinking about something, and it's basically like an auto-shotgun for Doom 2, I mean I could edit the chain gun that's already in the game but that would replace the chain gun that is already in the game and that would kind of suck because I find the chain gun to be a very good weapon for "sniping" enemies(if you just press left-click over and over again instead of just constantly holding down the left mouse button, the first 2 shots are always accurate) and if that's not inside anymore, taking out hitscanners fast would be just so much harder which would create a pretty unfair and overly hard game play.

 

I'm not sure if this new additional weapon is going to be compatible with vanilla, however this is not really important to me since I just use GZDoom anyway.

 

It should fire as fast as the regular chain gun, but have the same type of projectile and precision as the regular shotgun, and it should use shells but since this would need a bit more ammo I'd increse the maximum amount of Ammo you can hold with DeHacked, I know how to do that. While being able to hold that much shotgun ammo would be a problem, the WAD this will be in will be one that's generally pretty short on ammo, it got that kind of gameplay so you can't just stand behind coverage all the time and spam until everyone is dead, it's more like about either getting em to infight so it's easier or to lure the monsters somewhere so the way to the nice pickup is easy to reach, while you're OP in the moment you have it, picking up the ammo will summon some new enemies through triggers, however the WAD is mostly pretty open and wide so it's doable to take everyone down as long as you just keep moving.

 

And that's where I thought how awesome it would be to have some sections that have a lot of tanky and pretty evil enemies like a room with - just as an example - 5 mancubi and maybe together with 5 revenants and 2 barons of hell, something like an autoshotgun would be super fun because taking down those bit and evil guys with your overly OP gun is fun while you have to dodge 5 revenants, all of it will of course take place in a more open and wider area. Of course the first few levels will be easy and you're gonna use the standard doom weapons but the really OP stuff comes a bit later. Like after 2 or 3 levels maybe.

 

Now you could say that for a room like that, you could just use the rocket launcher, but the rocket launcher is gonna be short on ammo since it kind of also has a different role, I always use it to shoot tanky and slow enemies that are far away, too far to get a good shot with the standard shotgun and for mid-range fights, I think this auto-shotgun idea would be super awesome and fun to take out a whole army of evil tanky demons who are far stronger than the regular imps and other lesser demons. Or what about 15 pinkies chasing you while you have to take care about a few cacos and maybe a few arachnotrons?

 

Well, spamming them with the SSG would take pretty long and it wouldn't be that much fun but with the auto-shotgun this might work pretty well, while being more challenging than dodging little imp balls.

 

An example of why this works well is Doom Eternal with its auto-shotgun weapon mod, which is where my idea came from and since I have been messing around and making regular weapons way too OP with WhackEd because I thought it was funny, the thought of that weapon has never ceased to regularly come back and bother me and right now I even think about a fight against the cyberdemon with this auto-shotgun.

 

Well, if anyone has something about that for me I'd be really happy to learn it because I know this is possible to do, there are mods that add completely new weapons like the Project Brutality mod which has something similar, however since my WAD is more like a vanilla-styled one the idea of having to reload wouldn't really fit into it.

Share this post


Link to post

13 answers to this question

Recommended Posts

  • 0

You can create your custom map using SLADE3 and a function called inheritance. This allows you to modify some aspects of a weapon leaving everything else unchanged.

 

I've created a simple map that uses an automatic shotgun for you. If you open it via slade you will see an entry named "decorate".

That entry contains your new shotgun.

If you want more details I will put a short comment of the code in the spoiler below.

Spoiler

Actor AutoShotgun : Shotgun 10001

 

This line is used to name the new object "AutoShotgun", tell the game that every property of that object that is not modified has to be taken from the actor "Shotgun" and gives to the new actor an editor number of 10001 (used by the editors to identify every actor. It has to be unique so I've chosen an arbitrary high number to be sure that it is not used).

 

 

Weapon.slotnumber 8

 

This is simply the button that you have to press to select your weapon

 

 

Inventory.pickupmessage "You got the auto shotgun!"

 

This is the message that is displayed when you pick it up.

 

 

Everything inside the States section is used to modify the way this weapon fires.

Usually a shotgun has to go through a reaload animation before he can fire again. If you look at the code you can see that after the "A_FireShotgun" function there is another function called "A_Refire". This latter function controls if the player is still holding the fire button. If this is the case than another shot is fired.

Everything else are simply the sprites that you have to use for the reload animation at the end of the shot animation.

 

Please note that of course I haven't changed the sprites of the shotgun. If you want to do so you have to create your new sprites, give them a name and change the sprites name in the code with the ones that you have created. Be warned that if you plan to do it you also have to change every other sprite of the shotgun (not only the ones in the Fire state).


However, if you copy/paste the decorate file in your wad you can find the weapon under the Decorate folder in the thing tab.

Format: GZDoom UDMF

IWAD: DOOM2

AutoShotgun.zip

Share this post


Link to post
  • 0

Wow, that's really awesome dude! And yeah, that's pretty close to the thing I wanted to do! I was about to just have the same fire rate as the chain gun though but this is really awesome dude! Is there any way to change the fire rate to make it as fast as the chain gun is? Because that'd be exactly how I'd like to do it. And I'm currently making some sprites, it's gonna a black edited chain gun that only has 3 big large shot tubes(I don't know what the correct english term for that is). Is there a way to do that?

Share this post


Link to post
  • 0

I am mostly arguing now, but I think that the problems is that when the chaigun shot it actually fires 2 bullets in a row. This is because the corresponding function of "A_FireShotgun" inside the chaingun code is hardcoded to shot 2 bullets.

If you want your shotgun to shot twice as fast I think that you have to "breake" the "A_FireShotgun" function in its basic components and then modify them in order to make it shot 2 times in a row.

 

I will link what it's inside that function so you can experiment with it (by replacing the line of the code with the "A_FireShotgun" function with your new code).

Probably a good way to start is to just copypaste that code two times and see what happens and then starting to delete useless frames/sounds.

 

https://zdoom.org/wiki/A_FireShotgun

 

I'm also linking the chaingun fire function so that you can have an idea of how it actually works.

 

https://zdoom.org/wiki/A_FireCGun

 

Share this post


Link to post
  • 0

I know that it does fire 2 shots and that's exactly what I want the auto shotgun to do. I'm also creating sprites right now. I would just have to copy the chaingun so I have 2 different chainguns in the wad, except the second chain gun has my sprites and has the Fireshotgun action plus it uses shotgun ammo and I'm gonna higher the maximum amount of ammo you can hold with Dehacked for the wad.

Share this post


Link to post
  • 0
3 minutes ago, 0o0[ULTIM4TE]L1FE[F0RM]0o0 said:

I know that it does fire 2 shots and that's exactly what I want the auto shotgun to do. I'm also creating sprites right now. I would just have to copy the chaingun so I have 2 different chainguns in the wad, except the second chain gun has my sprites and has the Fireshotgun action plus it uses shotgun ammo and I'm gonna higher the maximum amount of ammo you can hold with Dehacked for the wad.

If your idea is to have two chainguns and not 2 shotguns then you can try to inherit to the chaingun instead of the shotgun (just replace "shotgun" in my code with chaingun).

After that you have to delete the Fire section of that code and replace it with the one that is inside this link

 

https://zdoom.org/wiki/Classes:Chaingun

 

and once again replace the A_FireCGun function with this code

 

https://zdoom.org/wiki/A_FireCGun

 

Now you will have a new actor that inherit from the chaingun and that has its fire function break in its "basic" components.

If you look at the link of the A_FireCGun function you will see that there are 2 further functions called A_FireBullets. These are used to spawn the bullets. If you replace the 1 inside them with a 7 (the number of shots that the shotgun fires) you will have a chaingun that fires 7 bullets every time.

Share this post


Link to post
  • 0

Sorry, there is no entry in this text called "A_FireCGun"... I don't really know what to do. I want a chaingun that sounds like the regular shotgun and also shoots shells and that has a bit of imprecise shooting as the shotgun is. It's basically a shotgun with the chaingun fire rate.

Share this post


Link to post
  • 0

Sorry, I don't understand even one single word of this text. Okay, I'll just describe what it's gonna be: It should be a WAD with a new weapon on the slot 8, which functions like the chaingun except for it uses shells as ammo and it fires shells and it also has the normal shotgun sound, plus it has that imprecision that will make it good for near until mid-range. I don't really know what any of those commands mean, every single word about it really confuses me.

Share this post


Link to post
  • 0

When you will have all of your sprites completed I'm sure that someone will teach you how to use them on your weapon. Unfortunately I know almost nothing about sprites other than the fact that they have names and that you have to replace them inside the code, but the correct way to create them to give the illusion of a somewhat smooth animation, and the exact order to place them inside the code is quite obscure to me. 

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...