reefer Posted June 26, 2023 How would I go about changing the perimeters of weapons that already exist in DooM 2 such as the fire rate, damage, etc? 0 Quote Share this post Link to post
0 Burgish Posted June 26, 2023 26 minutes ago, reefer said: How would I go about changing the perimeters of weapons that already exist in DooM 2 such as the fire rate, damage, etc? First thing, you wanna install a wad editor like SLADE. https://slade.mancubus.net/index.php?page=downloads Then head to the zdoom wiki and look up the weapon you want to change. Read up on action functions (how to make stuff do stuff) and states (how to organize when and how stuff is done). https://zdoom.org/wiki/Main_Page Make a script in SLADE that alters the weapon you want changed. Because of Inheritance, you only need to code the part that you are altering. Read about Inheritance on the zdoom wiki as well, its an important concept. In the editor, launch your wad with the 1 script - see if it worked. You might get some error messages when you run it telling you where the problem is, or it might not work how you really want. Go back into your script, fiddle until it works, and repeat until its ready. Save your 1 script wad file - now it loads like any other wad, with your weapon edits! 1 Quote Share this post Link to post
0 reefer Posted June 26, 2023 (edited) I've run into an issue, I created a blank .wad using slade, then made an entry titled ZSCRIPT and set the language to zdoom zscript gzdoom is definitely running the wad, but for whatever reason the changes are not taking place heres my code: class QPistol : Pistol { States { Fire: PISG A 2; PISG B 3 A_FirePistol; PISG C 2; PISG B 2 A_ReFire; Goto Ready; Flash: PISF A 4 Bright A_Light1; Goto LightDone; PISF A 4 Bright A_Light1; Goto LightDone; } } Edited June 26, 2023 by reefer 0 Quote Share this post Link to post
0 tomas7777 Posted June 27, 2023 You've created a new weapon, but the player is still using the original "Pistol". You have to tell it to use the new one. A way of doing it is creating a new player class, and then setting the slot 2 weapon to QPistol. In addition, because the pistol is a starting weapon, you'll probably have to redefine the starting items as well. 0 Quote Share this post Link to post
0 reefer Posted June 27, 2023 okay I thought it was something along those lines... thanks I changed it like you said and now I'm getting an actual error in the console, and google isn't helping me out its saying something along the lines of "QPistol is an invalid global identifier at like 45" Class QPistol : Pistol { default { Weapon.SelectionOrder 1900; Weapon.AmmoUse 1; Weapon.AmmoGive 20; Weapon.AmmoType "Clip"; Obituary "$OB_MPPISTOL"; +WEAPON.WIMPY_WEAPON; Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"; Tag "$TAG_PISTOL"; } States { Ready: PISG A 1 A_WeaponReady; Loop; Deselect: PISG A 1 A_Lower; Loop; Select: PISG A 1 A_Raise; Loop; Fire: PISG A 2; PISG B 3 A_FirePistol; PISG B 3 A_FirePistol; PISG C 2; PISG B 2 A_ReFire; Goto Ready; Flash: PISF A 4 Bright A_Light1; Goto LightDone; PISF A 4 Bright A_Light1; Goto LightDone; Spawn: PIST A -1; Stop; } } Class NewPlayer : DoomPlayer { default { Player.StartItem "QPistol"; Player.WeaponSlot 2, QPistol; } } 0 Quote Share this post Link to post
0 tomas7777 Posted June 27, 2023 6 hours ago, reefer said: its saying something along the lines of "QPistol is an invalid global identifier at like 45" Try adding quotes around QPistol on the Player.WeaponSlot part, like this: Player.WeaponSlot 2, "QPistol"; 1 Quote Share this post Link to post
0 ramon.dexter Posted June 29, 2023 When you enter a string in zscript, it is always required to be placed inside "xx". If not using ", interpeter understands it as a function. 2 Quote Share this post Link to post
Question
reefer
How would I go about changing the perimeters of weapons that already exist in DooM 2 such as the fire rate, damage, etc?
Share this post
Link to post
8 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.