Page 1 of 2
Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 12:30 pm
by SFJake
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?
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 12:47 pm
by XutaWoo
Nope.
Although I think there can be multiple DEHACKED files; they just can't change the same thing.
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 1:02 pm
by SFJake
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.
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 1:50 pm
by Graf Zahl
It's either Dehacked or ACS's SetAmmoCapacity. Normally that's enough to make the change.
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 2:46 pm
by SFJake
Graf Zahl wrote:or ACS's SetAmmoCapacity. Normally that's enough to make the change.
I didn't know ACS could do that. Thanks!
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 6:04 pm
by NeuralStunner
Tested and successful in ZDoom r1806.
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)
Posted: Mon Sep 07, 2009 6:18 pm
by SFJake
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!
Re: Decorate Question (Ammo)
Posted: Mon Sep 07, 2009 6:46 pm
by NeuralStunner
SFJake wrote:Well.. thanks!

I knew in the back of my mind there just
had to be a way to do it.
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)
Posted: Mon Sep 07, 2009 7:35 pm
by Ceeb
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)
Posted: Mon Sep 07, 2009 11:33 pm
by SFJake
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.
Re: Decorate Question (Ammo)
Posted: Tue Sep 08, 2009 6:33 pm
by NeuralStunner
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)
Posted: Tue Sep 08, 2009 7:09 pm
by SFJake
Heh, it was worth a try

Re: Decorate Question (Ammo)
Posted: Wed Sep 09, 2009 3:00 am
by Gez
NeuralStunner wrote:except for the map-spawned Clips. I thought that's what SpawnID does?
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).
Re: Decorate Question (Ammo)
Posted: Wed Sep 09, 2009 9:41 am
by Xaser
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.

Re: Decorate Question (Ammo)
Posted: Wed Sep 09, 2009 9:51 am
by Project Shadowcat
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.