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...
[HELP] A better way to alter the capacity of existing ammo?
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.
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.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
- 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
[wiki]SetAmmoCapacity[/wiki]?
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: [HELP] A better way to alter the capacity of existing am
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...
- Graf Zahl
- 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
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.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: [HELP] A better way to alter the capacity of existing am
Well then, I guess it's time to delve into ZScript!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.
Thanks for putting that feature in there. :3