A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Why? Aside from the math it's harmless! ;)
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Still confused about what some of the operators do, plus its annoying trying to follow a bunch of variables with two letter names. But I'll slog through ;)
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Well, thats better than sifting through VC's monolithic help system, thanks.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Wait... hold on a second... this new thingdef thingy supports new custom weapons now??? !!!! !!

Er... is the support not fully functional yet or can I add these files into Zdoom and get the custom weapons right now?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

The code's there. In theory, all you need to do is replace the existing code and compile it. Unfortanatly, that's easier said than done.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Hey Graf, can I have an example weapon definition? See, I couldn't work out what the hell you were supposed to do with the diff tool, so I merged the diff by hand. I just want to make sure I didnt balls it up...

And of course, I havent a clue how you are supposed to define them :D
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Hell... I remember doing the code for a Glass Shard Launcher a long time ago. I wonder where that went...
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Give me and I shall please you
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Hey wait a minute. Doesnt decorations.cpp need to be changed to support this extra stuff?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

No. Decorations.cpp jumps into thingdef.cpp when it encounters an ACTOR definition. All new code for the parser is inside thingdef.cpp.

And here's an example weapon (the one I tested it with so it's quite crappy):

Code: Select all


ACTOR IceBall : PlasmaBall
{
	DamageType Ice
}

ACTOR ChaingunTest : Weapon 2002
{
	+AMMO_OPTIONAL
	Weapon.SelectionOrder 700
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "You got the chaingun test!"
	Weapon.AmmoType "ClipTest"
	Weapon.AmmoGive 20
	Weapon.AmmoUse 1
	Weapon.Kickback 400
	Weapon.YAdjust 40
	AttackSound "weapons/chngun"
	Weapon.SisterWeapon ChaingunTestPowered
	States
	{
	Spawn:
		MGUN A -1
		Loop
	Ready:
		CHGG A 1 A_WeaponReady
		Loop
	Deselect:
		CHGG A 1 A_Lower
		Loop
	Select:
		CHGG A 1 A_Raise
		Loop
	Fire:
		CHGG A 0 A_JumpIfNoAmmo(8)
		CHGG A 0 A_JumpIfInventory("RedCard",1,4)
		CHGG A 0 A_GunFlash
		CHGG A 4 A_FireCustomMissile("IceBall")
		CHGG B 0 A_ReFire
		goto Ready
		CHGG A 0 A_GunFlash
		CHGG A 4 A_FireCustomMissile("Rocket")
		CHGG B 0 A_ReFire
		Goto Ready
		CHGG A 10 A_CustomPunch(5000, 1, 0, "Blood")
		Goto Ready
		
	Flash:
		CHGG A 0 A_JumpIfInventory("RedCard",1,3)
		CHGF A 5 BRIGHT A_Light1
		CHGF A 0 BRIGHT A_Light0
		Stop
		CHGF A 5 BRIGHT A_LightInverse
		CHGF A 0 BRIGHT A_Light0
		Stop
	}
}


ACTOR ChaingunTestPowered : ChaingunTest
{
	+POWERED_UP
	Weapon.AmmoGive 0
	Weapon.SisterWeapon ChaingunTest
	States
	{
	Fire:
		CHGG A 0 A_GunFlash
		CHGG A 0 A_FireCustomMissile("IceBall", -20, 0, -10, 10)
		CHGG A 0 A_FireCustomMissile("IceBall", -10, 1, -5, 5)
		CHGG A 0 A_FireCustomMissile("IceBall", 0, 0)
		CHGG A 0 A_FireCustomMissile("IceBall", 10, 1, 5, 5)
		CHGG A 4 A_FireCustomMissile("IceBall", 20, 0, 10, 10)
		CHGG B 0 A_ReFire
		Goto Ready
	}
}

User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Damn, thats why it broke. I was using the old weapon / ammo keywords. Thanks man :)

edit: this is awesome :D
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

As I said before: That new inventory system is really powerful.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

You're telling me. With this JumpIfInventory thing, I think I might just be able to pull off my returning throwing hammer :)

And... weapon upgrade pickups!
User avatar
Cutmanmike
Posts: 11355
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

cannot wait I most am now
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”