ironmanmine12 Posted September 12, 2021 For a custom WAD, I want to make one of the weapons an MP5SD (replaces the chaingun) and have it have a custom silenced sound, but it shares a sound with the pistol. Is there a way I can make it so the pistol and the chaingun have a different fire sound? 0 Quote Share this post Link to post
SMG_Man Posted September 12, 2021 If you're making a wad for (G)ZDoom, this is really easy to do via the Slade program with DECORATE and SNDINFO entries. Without modifying anything else about the chaingun's properties, you define a new actor in the DECORATE file for your wad like this: actor MP5SD : Chaingun replaces Chaingun { states: { Fire: CHGG A 0 A_PlaySound("weapons/MP5SD", CHAN_WEAPON) CHGG A 0 A_GunFlash CHGG A 4 A_FireBullets(5.6, 0, 1, 5, "BulletPuff") CHGG B 0 A_PlaySound("weapons/MP5SD", CHAN_WEAPON) CHGG B 0 A_GunFlash("Flash2") CHGG B 4 A_FireBullets(5.6, 0, 1, 5, "BulletPuff") CHGG B 0 A_ReFire Goto Ready } } Then you import your new chaingun sound and make a SNDINFO file for your WAD, and write something like this in it: weapons/MP5SD MP5FIRE where "MP5FIRE" is the name of the new sound effect you put in. 0 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 (edited) Do I need an editor for this? If so, where can I find the weapon file and do I need a specific text editor to use? 28 minutes ago, SMG_Man said: If you're making a wad for (G)ZDoom, this is really easy to do via the Slade program with DECORATE and SNDINFO entries. Without modifying anything else about the chaingun's properties, you define a new actor in the DECORATE file for your wad like this: actor MP5SD : Chaingun replaces Chaingun { states: { Fire: CHGG A 0 A_PlaySound("weapons/MP5SD", CHAN_WEAPON) CHGG A 0 A_GunFlash CHGG A 4 A_FireBullets(5.6, 0, 1, 5, "BulletPuff") CHGG B 0 A_PlaySound("weapons/MP5SD", CHAN_WEAPON) CHGG B 0 A_GunFlash("Flash2") CHGG B 4 A_FireBullets(5.6, 0, 1, 5, "BulletPuff") CHGG B 0 A_ReFire Goto Ready } } Then you import your new chaingun sound and make a SNDINFO file for your WAD, and write something like this in it: weapons/MP5SD MP5FIRE where "MP5FIRE" is the name of the new sound effect you put in. Edited September 12, 2021 by ironmanmine12 typo 0 Quote Share this post Link to post
Rifleman Posted September 12, 2021 Yes, you need an editor to edit the files - Slade3 is ideal. Download, run, set gzdoom.pk3 as a base resource and open your wad. And then, outside the markers or folders create a text file named DECORATE(New entry button > name > select type Text). The text editor is right there too. You can use the code SMG_Man posted, but that won't change the look of the gun(unless your new sprites have the same names as the old ones). If you haven't done this before, I'd check this, this or some tutorial on how to edit actors, there are YT videos and such. 2 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 (edited) The code that SMG_Man provides gives me an error. I'm not really making a custom weapon, I just want a separate sound for one weapon rather than the chaingun and pistol sharing a sound. (The MP5SD is just a reskin of the chaingun but with custom graphics and firing speed. I plan on adding a separate sound.) Edited September 12, 2021 by ironmanmine12 edit 0 Quote Share this post Link to post
Gez Posted September 12, 2021 The problem with the provided code is the colon after "states". It should be "states", not "states:". 1 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 1 minute ago, Gez said: The problem with the provided code is the colon after "states". It should be "states", not "states:". When I do that, the chaingun is unusable. 0 Quote Share this post Link to post
SMG_Man Posted September 12, 2021 5 minutes ago, Gez said: The problem with the provided code is the colon after "states". It should be "states", not "states:". whoops, my bad 4 minutes ago, ironmanmine12 said: When I do that, the chaingun is unusable. what exactly isn't working? Is the game not letting you select the gun? What happens if you use IDKFA or "give MP5SD" in the command line? 1 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 (edited) It won't let me select the weapon. When I do give MP5SD, it gives me the chaingun but it's dead silent. I also can do damage but can't select it after unequipping it. It also won't allow the custom sprites i used. Edited September 12, 2021 by ironmanmine12 0 Quote Share this post Link to post
Rifleman Posted September 12, 2021 This should allow you to select/deselect the weapon: 1 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 This fixes the issue, thanks, but there is still no sound. 0 Quote Share this post Link to post
SMG_Man Posted September 12, 2021 alright, so to the other issues: 4 minutes ago, ironmanmine12 said: it gives me the chaingun but it's dead silent. The DECORATE/SNDINFO stuff I mentioned assumes you have your sound in the lump as well, and that the sound effect name matches up with the lump name used in SNDINFO ("MP5FIRE" in this case). Either rename the sound effect or change the "MP5FIRE" thing in the SNDINFO to fix it. 6 minutes ago, ironmanmine12 said: It also won't allow the custom sprites i used. Similar in nature, your custom weapon sprites need to either be named the same as the default Chaingun ones to override them, or you need to further modify the weapon's DECORATE entry to use the new sprites if they don't use the same name as the Chaingun ones. 2 Quote Share this post Link to post
Rifleman Posted September 12, 2021 Do you have the SNDINFO lump as mentioned above? Should look like this: 3 Quote Share this post Link to post
ironmanmine12 Posted September 12, 2021 holy. hell. it actually works. i cannot thank you enough for your support :D 3 Quote Share this post Link to post
Xim Posted September 14, 2021 (edited) Another way to make new sounds in GZDoom is to redefine the names in SNDINFO. If you only want to change the sound, you do not need to make a new actor. You should be able to make a sndinfo lump and redefine existing sound names they will be replaced. weapons/chngun MP5FIRE And even replace the chaingun zombie's sound to match the new sounds too if you want too. chainguy/attack MP5FIRE The pistol and chaingun both technically use the same sound, but they have different names in the sound info lump so they can be replaced with different sounds from each other. I recommend consulting the predefined sounds on the wiki. But making a new actor will have it's advantages of allowing you to change how the weapon works, and even making something totally new, so it's a good thing to learn how to do if you want to make mods with new weapons. Edited September 14, 2021 by Xim more info, edit words 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.