NoWits Posted April 5, 2012 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. 0 Share this post Link to post
Gez Posted April 5, 2012 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. 0 Share this post Link to post
printz Posted April 5, 2012 Oh, can you keep the correct weapon as defined in Dehacked, while just using DECORATE to change ammo consumption? 0 Share this post Link to post
Graf Zahl Posted April 6, 2012 ... 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. 0 Share this post Link to post
printz Posted April 6, 2012 Can I keep the DEHACKED lump active (in use), while also defining a "replaces" actor in DECORATE just for that weapon? 0 Share this post Link to post
Graf Zahl Posted April 6, 2012 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. 0 Share this post Link to post
NoWits Posted April 6, 2012 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. 0 Share this post Link to post
Gez Posted April 6, 2012 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. 0 Share this post Link to post
Graf Zahl Posted April 7, 2012 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. 0 Share this post Link to post