Jump to content
  • 0

Changing Aspects of Pre-existing Weapons


reefer

Question

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

  • 0
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!

Share this post


Link to post
  • 0

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 by reefer

Share this post


Link to post
  • 0

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;
	}
}

 

Share this post


Link to post
  • 0
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";

 

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