Carry Capacity Question

Need help with your project? Ask here.
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Carry Capacity Question

Post by Herculine »

Does anyone know how to increase the maximum ammo carry capacity beyond the defaults in Doom, like when the backpack is picked up?

I'm guessing it would have to be done with DECORATE and modify the backpack item, but I'm still kind of a noob at that and have no clue what the code would be.

Thanx.
User avatar
Enjay
Developer
Developer
Posts: 4723
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Carry Capacity Question

Post by Enjay »

How much ammo a backpack gives and how much it increases the carrying capacity of an ammo type is set in the definition for the ammo, not the backpack. So, if you want to alter these values, you will have to change the DECORATE definition of the ammo, not the backpack.

[zwiki]Classes:Ammo[/zwiki]

[zwiki]Classes:BackpackItem[/zwiki]
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Re: Carry Capacity Question

Post by Herculine »

Got it. This info will be quite useful. Thanks!
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Re: Carry Capacity Question

Post by Herculine »

Okay. I've tried doing it like this:

actor NewClip : Clip
{
Inventory.Amount 10
Inventory.MaxAmount 600
}

...but it's not working. What am I doing wrong?
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Re: Carry Capacity Question

Post by Herculine »

I've also tried this:

actor NewClip : AMMO
{
+COUNTITEM
Inventory.PickupMessage "$GOTCLIP"
Inventory.Amount 10
Inventory.MaxAmount 200
Ammo.BackpackAmount 10
Ammo.BackpackMaxAmount 600
Inventory.Icon "CLIPA0"
States
{
Spawn:
CLIP A -1
Stop
}
}

Still it doesn't go beyond the vanilla defaults...
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Re: Carry Capacity Question

Post by Herculine »

I think I've figured out how to do this with a DeHackEd patch. It seems to be working.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Carry Capacity Question

Post by Gez »

For reference, max ammo amount always use the values for the top-most ammo type; so when you have an Actor Newclip : Clip, the Ammo.MaxAmount will be ignored since instead Clip's value will be used.

The other issue to note is that when you entirely replace the ammo without using inheritance (as in your second try), you then need to also change the weapon definitions to tell them to use the new types instead of the old. And you probably should have used the "replaces" keyword too so that these new ammos actually get spawned.

It is all around quite complicated. It's the one thing for which using a DEHACKED lump is still a better solution; even if one that only works with Doom (i.e., not in Heretic and other games).
User avatar
Herculine
Posts: 70
Joined: Mon Feb 22, 2010 3:44
Location: Ohio
Contact:

Re: Carry Capacity Question

Post by Herculine »

Yes, replacing the ammo types was quite a bugger. I finally decided (with some help from NeuralStunner over at the ZDoom Forums) to use the default ammo types and a DEHACKED patch. Now it seems to be working quite splendidly.

The only issues really holding me up now are trying to keep one from picking up a Soulsphere unless one needs it, and getting the Armor Bonuses to go beyond 200.

I'm using Ghastly_dragon's ArmorSphere and Infirnex's ArmorShards, so ideally I'd like the ArmorShards to be useable beyond the default 200. So far it's just not working out...
Post Reply

Return to “Editing Help”