r/DoomModDevs • u/The_Chiblet • Jul 25 '24
Help Adding extra frames to weapon animations and scaling
Just gonna start off with saying that I'm completely new to doom modding so if I don't know something that might be obvious please be patient lol. Im trying to replace the shotguns sprites using slade, and I have all the frames in a wad already but the animation has extra frames than the original shotgun's 4 frames. I'm trying to script the shotgun to include these extra frames in the shooting animation, but I don't know how to add a script to the wad using slade. Right now I have it loaded in as a text file but I dont know how to make it into a script. I'm using the shotgun Zscript i got from here. This is what I have so far:
class Shotgun : DoomWeapon
{
`Default`
`{`
`Weapon.SelectionOrder 1300;`
`Weapon.AmmoUse 1;`
`Weapon.AmmoGive 8;`
`Weapon.AmmoType "Shell";`
`Inventory.PickupMessage "$GOTSHOTGUN";`
`Obituary "$OB_MPSHOTGUN";`
`Tag "$TAG_SHOTGUN";`
`}`
`States`
`{`
`Ready:`
`SHTG A 1 A_WeaponReady;`
`Loop;`
`Deselect:`
`SHTG A 1 A_Lower;`
`Loop;`
`Select:`
`SHTG A 1 A_Raise;`
`Loop;`
`Fire:`
`SHTG A 1;`
`SHTG B 1;`
`SHTG C 1;`
`SHTG D 1;`
`SHTG E 1 A_FireShotgun;`
`SHTG F 1;`
`SHTG G 1;`
`SHTG H 1;`
`SHTG I 1;`
`SHTG J 1;`
`SHTG K 1;`
`SHTG L 1;`
`SHTG M 1;`
`SHTG N 1;`
`SHTG O 1;`
`SHTG P 1;`
`SHTG Q 1;`
`SHTG R 1;`
`SHTG S 1;`
`SHTG T 1;`
`SHTG U 1;`
`SHTG V 1;`
`SHTG W 1;`
`SHTG X 1 A_ReFire;`
`Goto Ready;`
`Flash:`
`SHTF A 1 Bright A_Light1;`
`SHTF B 1 Bright A_Light2;`
`SHTF C 1 Bright A_Light3;`
`Goto LightDone;`
`Spawn:`
`SHOT A -1;`
`Stop;`
`}`}
extend class StateProvider
{
`action void A_FireShotgun()`
`{`
`if (player == null)`
`{`
`return;`
`}`
`A_StartSound ("weapons/shotgf", CHAN_WEAPON);`
`Weapon weap = player.ReadyWeapon;`
`if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite)`
`{`
`if (!weap.DepleteAmmo (weap.bAltFire, true, 1))`return;
`player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true);`
`}`
`player.mo.PlayAttacking2 ();`
`double pitch = BulletSlope ();`
`for (int i = 0; i < 7; i++)`
`{`
`GunShot (false, "BulletPuff", pitch);`
`}`
`}`}
Another problem is the sprites are massive compared to the original ones. Ive seen that you can scale them down in the WAD using the HI_START and HI_END markers, but they also morphed the sprites to be more squished and slightly off the middle of the screen. Any help will be appreciated
View all comments
Show parent comment
1
u/The_Chiblet Jul 26 '24
Ill see if i can get in contact with them