Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
NoWits

Different source ports fire different numbers of ammo?

Recommended Posts

Hello world,
I'm making a mod with dehacked and the normal shotgun uses the super shotgun fire action. However, whereas in most source ports this will cause the shotgun to fire 2 shells, in ZDoom it fires only 1 shell. How do I fix this? Is there a ZDoom-specific lump I can include to instruct it to fire two shells? Thanks for any help.

Share this post


Link to post

ZDoom's implementation of dehacked has problems with ammo use, because the underlying implementation is very different (in ZDoom, it's a property of the weapon itself, not a property of the codepointer used).

I guess you could create a shotgun replacement in DECORATE that ZDoom would use instead of the dehacked weapon.

Share this post


Link to post

Oh, can you keep the correct weapon as defined in Dehacked, while just using DECORATE to change ammo consumption?

Share this post


Link to post

... and unfortunately this is probably unfixable.
ZDoom uses the 'uses x ammo' value in so many places that it can't work without it.
Changing the attack functions themselves would be easy but all the rest required to make it work is not.

Share this post


Link to post

Can I keep the DEHACKED lump active (in use), while also defining a "replaces" actor in DECORATE just for that weapon?

Share this post


Link to post

Of course. But you'll have to set the weapon somewhere so it can be used. The best place here would probably be KEYCONF.

I'm still looking into a way to fix this but the code is very dependent on the ammo use value so I have to find a way to derive it somehow from what DEHACKED does to a weapon.

Share this post


Link to post

Thanks for the suggestion of using Decorate! I used DECORATE to make the shotgun for Zdoom, so the DECORATE invoked shotgun that fires two shells will be used in Zdoom whilst the DEHACKED-invoked shotgun will be used in otyer source ports. Now it works! I just need to fix a couple of bugs now. Thanks again for your help.

Share this post


Link to post
Graf Zahl said:

Of course. But you'll have to set the weapon somewhere so it can be used. The best place here would probably be KEYCONF.

Not Weapon.SlotNumber 3?

Graf Zahl said:

I'm still looking into a way to fix this but the code is very dependent on the ammo use value so I have to find a way to derive it somehow from what DEHACKED does to a weapon.

It would also fix the biggest problem with Batman Doom.

Share this post


Link to post

Should work correctly with upcoming ZDoom versions.

Gez said:

Not Weapon.SlotNumber 3?



In cases like this I think Keyconf may be a better solution. Fortunately it's not needed anymore.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×