[HELP] A better way to alter the capacity of existing ammo?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

[HELP] A better way to alter the capacity of existing ammo?

Post by RockstarRaccoon »

Hey, so, for this ZHexen thing I've been poking at, I'm interested in changing the Maximum amount of mana at start from 200 to 100 and making it upgradeable. The only effective method I can find for this is to make a new ammo type and go write DECORATE for every weapon and override it to use that new ammo type.

Does anyone know a better way to do that? I feel like this should be a common functionality, but with the native ammo decorate, I have to do this large-scale workaround...
User avatar
Zhs2
Posts: 1301
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: [HELP] A better way to alter the capacity of existing am

Post by Zhs2 »

[wiki]SetAmmoCapacity[/wiki]?
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: [HELP] A better way to alter the capacity of existing am

Post by RockstarRaccoon »

That's one way to do it. Not sure I want to, because it's a bit hard to figure out when it should happen in the game, and it's another workaround, but I'm aware of this...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [HELP] A better way to alter the capacity of existing am

Post by Graf Zahl »

That's the ONLY way to do it. Of course you can also pull out ZScript, where you do not even need a function for that and you can modify the item's MaxAmount value directly.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: [HELP] A better way to alter the capacity of existing am

Post by RockstarRaccoon »

Graf Zahl wrote:That's the ONLY way to do it. Of course you can also pull out ZScript, where you do not even need a function for that and you can modify the item's MaxAmount value directly.
Well then, I guess it's time to delve into ZScript!

Thanks for putting that feature in there. :3
Locked

Return to “Editing (Archive)”