I am attempting to create a complete weapon replacement for doom guy which involves overwriting the default weapon classes 'Fist', 'Shotgun', 'SuperShotgun' etc.
This is specifically meant for Zdoom 2.7.1 and newer, I have no intent of using the GZdoom and QZdoom forks.
I have defined a new "DoomPlayer" class as follows (Note: I am aware that I dont need to replace the entire DoomPlayer class, I am simply testing all available options to figure out a solution.)
Code: Select all
ACTOR TalviGuy : DoomPlayer replaces DoomPlayer
{
Speed 1
Health 250
Radius 16
Height 56
Mass 100
PainChance 255
Player.DisplayName "TalviGuy"
Player.ColorRange 112, 127
Player.CrouchSprite "PLYC"
Player.StartItem "TalvisotaChaingun"
Player.StartItem "PerkFist"
Player.StartItem "Clip", 200
Player.WeaponSlot 1, "TalvisotaChainsaw", "PerkFist"
Player.WeaponSlot 2, "TalvisotaChaingun"
Player.WeaponSlot 3, "TalvisotaSuperShotgun", "TalvisotaShotgun"
Player.WeaponSlot 4, "TalvisotaShotgunChaingun"
Player.WeaponSlot 5, "TalvisotaElectroMagneticGun"
Player.WeaponSlot 6, "TalvisotaExplosiveTipRifle"
Player.WeaponSlot 7, "TalvisotaBFGOmegaX"
}
States
{
Spawn:
PLAY A -1
Loop
See:
PLAY ABCD 4
Loop
Missile:
PLAY E 12
Goto Spawn
Melee:
PLAY F 6 BRIGHT
Goto Missile
Pain:
PLAY G 4
PLAY G 4 A_Pain
Goto Spawn
Death:
PLAY H 0 A_PlayerSkinCheck("AltSkinDeath")
Death1:
PLAY H 10
PLAY I 10 A_PlayerScream
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
XDeath:
PLAY O 0 A_PlayerSkinCheck("AltSkinXDeath")
XDeath1:
PLAY O 5
PLAY P 5 A_XScream
PLAY Q 5 A_NoBlocking
PLAY RSTUV 5
PLAY W -1
Stop
AltSkinDeath:
PLAY H 6
PLAY I 6 A_PlayerScream
PLAY JK 6
PLAY L 6 A_NoBlocking
PLAY MNO 6
PLAY P -1
Stop
AltSkinXDeath:
PLAY Q 5 A_PlayerScream
PLAY R 0 A_NoBlocking
PLAY R 5 A_SkullPop
PLAY STUVWX 5
PLAY Y -1
Stop
}
}
Code: Select all
ACTOR PerkFist : Fist replaces Fist
{
Game Doom
Weapon.SelectionOrder 3700
Weapon.Kickback 100
Weapon.SlotNumber 1
Inventory.PickupMessage "You Learned CQC!!!"
+WEAPON.MELEEWEAPON
Weapon.AmmoType "Stamina"
Weapon.AmmoGive 100
+AMMO_OPTIONAL
States
{
Spawn:
FIST P -1
Loop
Ready:
PUCH A 0 A_JumpIfInventory("StamGen",5,3)
PUCH A 0 A_GiveInventory("StamGen",2)
PUCH A 1 a_weaponready
loop
PUCH A 0 A_TakeInventory("StamGen",5)
PUCH A 0 A_JumpIfInventory("Stamina",100,2)
PUCH A 0 A_GiveInventory("Stamina",2)
PUCH A 1 a_weaponready
loop
Deselect:
PUCH A 1 A_Lower
loop
Select:
PUCH A 1 A_Raise
loop
Fire:
PUCH A 0 A_JumpIfInventory("Stamina",5,1)
goto Ready
PUCH A 0 A_JumpIfInventory("FistToken", 1, "LeftPunch")
PUCH A 3 A_Playsound ("FIST/SWING")
PUCH B 2
PUCH L 2 A_Punch
PUCH L 0 A_Punch
PUCH L 0 A_Punch
PUCH C 2
PUCH M 2
PUCH D 2
PUCH N 2
PUCH E 2
PUCH R 2
PUCH R 0 A_TakeInventory("Stamina",1)
PUCH K 0 A_GiveInventory("FistToken",1)
PUCH K 3 A_ReFire
goto Ready
LeftPunch:
PUCH F 3 A_Playsound ("FIST/SWING")
PUCH G 2
PUCH O 2 A_Punch
PUCH O 0 A_Punch
PUCH O 0 A_Punch
PUCH H 2
PUCH P 2
PUCH I 2
PUCH Q 2
PUCH J 2
PUCH K 0 A_TakeInventory("Stamina",1)
PUCH K 0 A_TakeInventory("FistToken",1)
PUCH K 3 A_ReFire
goto Ready
Altfire:
PUCH K 0 A_JumpIfInventory("Stamina",10,1)
goto Ready
PUCH K 2 A_Playsound ("FIST/SWING")
MLEG A 2
MLEG B 2
MLEG C 2 A_Punch
MLEG C 0 A_Punch
MLEG C 0 A_Punch
MLEG C 0 A_Punch
MLEG C 0 A_Punch
MLEG D 2
MLEG E 2
MLEG F 2
MLEG G 2
MLEG H 2
PUCH K 0 A_TakeInventory("Stamina",10)
PUCH K 4 A_ReFire
goto Ready
}
}
actor Stamina : Ammo
{
Inventory.MaxAmount 100
}
actor StamGen: Ammo
{
Inventory.MaxAmount 5
}
actor FistToken: Ammo
{
Inventory.MaxAmount 1
}
I've scoured Zdoom and Doomworld and so far my research has concluded that I need to define my new player class in a lump (which is now depreciated) entitled "KEYCONF" for my new player class that doesnt yield the original doom weapons.
What is the proper way to go about this for the engine Zdoom 2.7.1 and its newer deviations?
Any help is appreciated.
Thank you.