Decorate Question (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.
Decorate Question (Ammo)
I need some help again, with some annoyances...
Is it possible to change the maximum amount of ammo you can carry of an original ammo type - Clip,Shell,Cell,RocketAmmo, without resorting to Dehacked? I need a decorate way of doing it.
With an actor like this:
ACTOR Clip2 : Clip replaces Clip
Even if you change Inventory.MaxAmount and Ammo.BackpackMaxAmount, the values are ignored. I just can't seem to change that.
I simply don't want to use Dehacked, especially because of Skulltag but even ZDoom, they can't handle multiple dehacked files in wads and it creates other problems I want to avoid.
So, is it possible?
Is it possible to change the maximum amount of ammo you can carry of an original ammo type - Clip,Shell,Cell,RocketAmmo, without resorting to Dehacked? I need a decorate way of doing it.
With an actor like this:
ACTOR Clip2 : Clip replaces Clip
Even if you change Inventory.MaxAmount and Ammo.BackpackMaxAmount, the values are ignored. I just can't seem to change that.
I simply don't want to use Dehacked, especially because of Skulltag but even ZDoom, they can't handle multiple dehacked files in wads and it creates other problems I want to avoid.
So, is it possible?
- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: Decorate Question (Ammo)
Nope.
Although I think there can be multiple DEHACKED files; they just can't change the same thing.
Although I think there can be multiple DEHACKED files; they just can't change the same thing.
Re: Decorate Question (Ammo)
Damn.
I tried, and it doesn't seem to work. If I, say, load a dehacked file that is not inside a wad, WITH another dehacked in a .wad, it'll work. If 2 wads have a dehacked, only the last (I think its the last) will load.
This wouldn't be a problem so much if Skulltag online handled loading .deh files. You must have them in .wads files and load the wad. *sigh*.
I just have no idea how to get around this.
I tried, and it doesn't seem to work. If I, say, load a dehacked file that is not inside a wad, WITH another dehacked in a .wad, it'll work. If 2 wads have a dehacked, only the last (I think its the last) will load.
This wouldn't be a problem so much if Skulltag online handled loading .deh files. You must have them in .wads files and load the wad. *sigh*.
I just have no idea how to get around this.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49245
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Decorate Question (Ammo)
It's either Dehacked or ACS's SetAmmoCapacity. Normally that's enough to make the change.
Re: Decorate Question (Ammo)
Graf Zahl wrote:or ACS's SetAmmoCapacity. Normally that's enough to make the change.
I didn't know ACS could do that. Thanks!
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Decorate Question (Ammo)
Tested and successful in ZDoom r1806.
I simply redefined the Clip ammo type altogether, derived from Ammo like the original.

I simply redefined the Clip ammo type altogether, derived from Ammo like the original.
Code: Select all
Actor Clip : Ammo Replaces Clip
{
Game Doom
SpawnID 11
Inventory.PickupMessage "$GOTCLIP"
Inventory.Amount 10
Inventory.MaxAmount 400 // Twice the usual
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 800 // Twice the usual
Inventory.Icon "CLIPA0"
States
{
Spawn:
CLIP A -1
Stop
}
}
Re: Decorate Question (Ammo)
EDIT: Nevermind. It works... thats weird. If you call the new one CLIP, exactly like the original, it works..!
If you call it anything else, it doesn't.
...weird.
Well.. thanks!
If you call it anything else, it doesn't.
...weird.
Well.. thanks!
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Decorate Question (Ammo)
SFJake wrote:Well.. thanks!

Please correct me if I'm wrong, but it seems there's about nothing left for DehackEd to do that can't be done with some other ZDoom lump. (Which is just as well. DECORATE is so much more intuitive for me.)
Re: Decorate Question (Ammo)
DeHackEd is the shiz.
I use it for what I can and then resort to DECORATE. And no one can stop me! 


Re: Decorate Question (Ammo)
Well I thought this was nice and all.
But it doesn't work.
Rather, there is a problem. A big one. The pickups become totally irreplaceable. How is this a problem? Well, they don't give off any ammo. -At all-. The box does, but not the clip. Since I can't replace them, there is no way around it.
This was totally useless.
But it doesn't work.
Rather, there is a problem. A big one. The pickups become totally irreplaceable. How is this a problem? Well, they don't give off any ammo. -At all-. The box does, but not the clip. Since I can't replace them, there is no way around it.
This was totally useless.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Decorate Question (Ammo)

I should have known. It's never so simple...
Apparently replacing a standard ammo type confuses the crap out of ZDoom. If I redefined every instance of Clip (Item drops, AmmoType for the weapons, etc.) with a new ammo type (ClipPlus), it worked fine - Except for the "BULL" entry on the HUD. (Because it tracks Clip, and not anything that replaces it.)
If I redefine "Clip", derived from Ammo, it should replace the originally defined Clip, but it doesn't. Through a little tweaking I managed to get everything working, except for the map-spawned Clips. I thought that's what SpawnID does? Adding a new actor with the same ID should replace the old one, right?

If the code involved is not "fixable", then it seems DehackEd is indeed your only choice. Sorry about that, guys.

Re: Decorate Question (Ammo)
Heh, it was worth a try 

Re: Decorate Question (Ammo)
No. SpawnID is only used for spawning or counting things with [wiki=Action_specials#Things]some action specials[/wiki] and for things like the Hexen potteries and decorative suit of armor. Map-spawned items are created according to their editor number (aka doomednum).NeuralStunner wrote:except for the map-spawned Clips. I thought that's what SpawnID does?
Re: Decorate Question (Ammo)
Most of the time, I wind up resorting to the DEHACKED method since it's just a few lines that don't conflict with anything else, rather than creating all new ammo types -- though with SBARINFO now, even the latter is easily fixable.
Still, I'd like to see *some* way of changing the default ammo maximums without DEHACKED... not that it matters, really, but it's amusing how the lump STILL isn't obsolete yet.
Still, I'd like to see *some* way of changing the default ammo maximums without DEHACKED... not that it matters, really, but it's amusing how the lump STILL isn't obsolete yet.

- Project Shadowcat
- Posts: 9369
- Joined: Thu Jul 14, 2005 8:33 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Blacksburg, SC USA
- Contact:
Re: Decorate Question (Ammo)
I use a combination of both the DEHACKED method and the ACS method. DEHACKED lets me set the base values (which are lower than normal), and ACS through Custom Inventory items lets me increase each ammo type separately and stackably.