Replacing berserk fist with another melee weapon

Do you have a question about making weapon mods, or do you just need some tutorials and resources? Ask about all of that here.

Moderator: wildweasel

Locked
User avatar
Rex Claussen
Developer
Developer
Posts: 2387
Joined: Tue Jul 11, 2006 18:36
Contact:

Replacing berserk fist with another melee weapon

Post by Rex Claussen » Fri Jan 09, 2009 16:10

I have been looking through the ZDooM Wiki and these forums for information that will help me with the following:
  • 1. I want to replace the fist with a melee weapon (such as a lead pipe, wrench, or crowbar).
    2. I want the new weapon to have the same power as a berserk fist.
I have read this thread but want to streamline the definition. I will only be using four animation frames - the equivalent of PUNGA0, PUNGB0, PUNGC0, PUNGD0 (I will change the sprite names, of course). Simply replacing the berserk pickup with my replacement weapon will not do, as I don't want the screen turning to the red color (i.e., Powerup.Color 255,0,0,0.5).

Please tell me if the following is the way to proceed:
  • 1. I will need to create a new powerup type [e.g., PowerStrength, but minus the Powerup.Color].
    2. I will need to create the CustomInventory for the new weapon [e.g., Berserk with the modified PowerStrength minus the HealThing (100, 0)].
    3. Create a Weapon definition for the new weapon that works like the fist.
Is there a simpler way? Furthermore, where does PowerupGiver figure in all this, and will I need to create a new definition under that?

Many thanks.

User avatar
wildweasel
Member, DRD Team
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel » Fri Jan 09, 2009 22:03

Perhaps using the Tome of Power as a Berserk replacement? By doing that, you could opt to only have the fist be affected (using Weapon.SisterWeapon and the POWERED_UP flag), then define your new alternate weapon with the new frames. The only issue with that, though, is that I don't think there's a way to make it permanent; it'll still end at the end of the level.

User avatar
Rex Claussen
Developer
Developer
Posts: 2387
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen » Fri Jan 09, 2009 22:43

I asked the same question in this thread in the ZDooM forums, and I got an answer that was consistent with what I had believed was necessary. However, I got an error message from GZDooM telling me that the native class that I defined is unknown.

Any suggestions for fixing the error?

User avatar
Rachael
Developer
Developer
Posts: 3606
Joined: Sat May 13, 2006 10:30

Post by Rachael » Sat Jan 10, 2009 1:16

Remove the "native".

You will never need to define a native class in GZDoom. What you will probably need to do is inherit from that class. If you're trying to create a custom PowerStrength, it should look like this:

Actor PowerStrengthTwo : PowerStrength { blah blah ... etc ... }
Spoiler: Zen Sarcasm

User avatar
Rex Claussen
Developer
Developer
Posts: 2387
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen » Sun Jan 11, 2009 5:27

Thanks for the advice.

I'm really new to DECORATE definitions, and because of the lack of coherent and comprehensive documentation I am stumbling along trying to pick up a piece here and a piece there.

Locked

Return to “Weapon Modding Help & Resources”

Who is online

Users browsing this forum: No registered users and 1 guest