CaptainManiac Posted March 22, 2018 Is there a way to alter the ammo like in Brutal Doom?For example,a pistol which can use 9mm or 10mm for ammo and fires projectiles wjth different damage.Is there a way to make it using custominventories and acs? 0 Quote Share this post Link to post
1 DynamiteKaitorn Posted March 25, 2018 To produce a gun with different ammo is very simple. There are a few things you need to know first though. First, what ammo do you wanna use? 9mm? 10mm? .45 cal? etc... Once you got what you want, make a sprite of that ammo so that you have a visible "object" you pick up. I will use this mana as an example. Okay now you have your ammo, next you will need to make an actor property that inherits from "Ammo". Now the following part uses SLADE3 so if you utilise a different WAD editor, I'm not sure I'd be able to assist. This is all done inside a DECORATE script. Okay so I'm going to assume for now you know how to make a gun but no idea how to implement custom ammo. Let's just say you have a gun (even if it's the doom pistol XD) and you want it to fire with mana rather than bullets. Below me is a few important steps. WEAPON ORDER = Allows you to organize guns if multiple ones are in the same slot. (Fairly useless in my experience but some may find a use for it) WEAPON.AMMOUSE = Does firing your gun cost 1 bullet, 1 shell, 10 mana, 25 rockets, etc...? How much you use for every time you fire is defined here WEAPON.AMMOGIVE = Picking up this gun gives you this much ammo. In the example, you gain 100 mana. WEAPON.AMMOTYPE "Mana" = The name of the ammo you wish to use. It says Mana down below since that's this gun's custom ammo. I'll show custom ammo a wee bit later INVENTORY.PICKUPMESSAGE = Literally type whatever you want here but make sure it makes sense when you pick up the gun TAG = Weirdly enough I don't know what this means so I just name it identical to the gun. Helps reduce confusion :) This actor is the name of the ammo. When you do Weapon.AmmoType remember to USE THE SAME NAME AS THIS ACTOR!!! Also inherit from Ammo so that the game knows it is an ammo type. The ID on the end just helps you find it in whatever editor you use. Okay so the next few bits will break down this text block INVENTORY.AMOUNT 100 = How much ammo you gain for every ammo item you pick up. In the example, 1 mana cube = 100 mana INVENTORY.MAXAMOUNT 1000 = The maximum ammo your gun will hold BEFORE you pick up a backpack AMMO.BACKPACKAMOUNT 350 = How much will a backpack fill your ammo supply? In the example it only gives 350 AMMO.BACKPACKMAXAMOUNT 2000 = The maximum ammo your gun will hold AFTER you pick up a backpack INVENTORY.PICKUPSOUND "misc/i_pkup" = This is the default DooM pickup sound effect INVENTORY.PICKUPMESSAGE "Absorbed some mana." = What will be displayed every time you pick up ammo INVENTORY.ICON "MANAA0" = The icon of your gun's ammo on the HUD. Do bare in mind this is for the fancy hud in GZDooM. For the regular HUD... It's complicated... >_> And the state at the end is just an animation for your ammo if your ammo has an animation to it (For example if you want it to pulsate) Okay so if you need anymore help, call me. I'll happily share any other details if you need more assistance. :) 0 Quote Share this post Link to post
0 CaptainManiac Posted March 26, 2018 14 hours ago, DynamiteKaitorn said: To produce a gun with different ammo is very simple. There are a few things you need to know first though. First, what ammo do you wanna use? 9mm? 10mm? .45 cal? etc... Once you got what you want, make a sprite of that ammo so that you have a visible "object" you pick up. I will use this mana as an example. Okay now you have your ammo, next you will need to make an actor property that inherits from "Ammo". Now the following part uses SLADE3 so if you utilise a different WAD editor, I'm not sure I'd be able to assist. This is all done inside a DECORATE script. Okay so I'm going to assume for now you know how to make a gun but no idea how to implement custom ammo. Let's just say you have a gun (even if it's the doom pistol XD) and you want it to fire with mana rather than bullets. Below me is a few important steps. WEAPON ORDER = Allows you to organize guns if multiple ones are in the same slot. (Fairly useless in my experience but some may find a use for it) WEAPON.AMMOUSE = Does firing your gun cost 1 bullet, 1 shell, 10 mana, 25 rockets, etc...? How much you use for every time you fire is defined here WEAPON.AMMOGIVE = Picking up this gun gives you this much ammo. In the example, you gain 100 mana. WEAPON.AMMOTYPE "Mana" = The name of the ammo you wish to use. It says Mana down below since that's this gun's custom ammo. I'll show custom ammo a wee bit later INVENTORY.PICKUPMESSAGE = Literally type whatever you want here but make sure it makes sense when you pick up the gun TAG = Weirdly enough I don't know what this means so I just name it identical to the gun. Helps reduce confusion :) This actor is the name of the ammo. When you do Weapon.AmmoType remember to USE THE SAME NAME AS THIS ACTOR!!! Also inherit from Ammo so that the game knows it is an ammo type. The ID on the end just helps you find it in whatever editor you use. Okay so the next few bits will break down this text block INVENTORY.AMOUNT 100 = How much ammo you gain for every ammo item you pick up. In the example, 1 mana cube = 100 mana INVENTORY.MAXAMOUNT 1000 = The maximum ammo your gun will hold BEFORE you pick up a backpack AMMO.BACKPACKAMOUNT 350 = How much will a backpack fill your ammo supply? In the example it only gives 350 AMMO.BACKPACKMAXAMOUNT 2000 = The maximum ammo your gun will hold AFTER you pick up a backpack INVENTORY.PICKUPSOUND "misc/i_pkup" = This is the default DooM pickup sound effect INVENTORY.PICKUPMESSAGE "Absorbed some mana." = What will be displayed every time you pick up ammo INVENTORY.ICON "MANAA0" = The icon of your gun's ammo on the HUD. Do bare in mind this is for the fancy hud in GZDooM. For the regular HUD... It's complicated... >_> And the state at the end is just an animation for your ammo if your ammo has an animation to it (For example if you want it to pulsate) Okay so if you need anymore help, call me. I'll happily share any other details if you need more assistance. :) 14 hours ago, DynamiteKaitorn said: So,i need to make a weapin change its ammo in real time,so if i use your example,to change the weapon's ammo,for example,this weapon can use mana and also can use souls ammo.So,i need to know: does the ammotype property accepts string array values,for example to be str ammo[2] = {"Mana","Souls"} and via function similar to A_ChangeFlags that works for properties to change the ammotype property in the corresponding state as well as fire different projectiles.is that possible? 0 Quote Share this post Link to post
0 Empyre Posted March 26, 2018 I've never done it, so I don't know all the details, but the solution to your problem might involve switching to a sister weapon using this: https://zdoom.org/wiki/Classes:PowerWeaponLevel2 0 Quote Share this post Link to post
0 DynamiteKaitorn Posted March 26, 2018 To produce multiple ammo usage is beyond my expertise HOWEVER you CAN add an alt-fire which uses a different ammo type all together. 0 Quote Share this post Link to post
0 CaptainManiac Posted March 28, 2018 On 3/27/2018 at 12:49 AM, Empyre said: I've never done it, so I don't know all the details, but the solution to your problem might involve switching to a sister weapon using this: https://zdoom.org/wiki/Classes:PowerWeaponLevel2 Well,if i can make chain of powerings up but is it constant or not? 0 Quote Share this post Link to post
Question
CaptainManiac
Is there a way to alter the ammo like in Brutal Doom?For example,a pistol which can use 9mm or 10mm for ammo and fires projectiles wjth different damage.Is there a way to make it using custominventories and acs?
Share this post
Link to post
5 answers to this question
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.