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.
Carry Capacity Question
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
- Enjay
- Developer
- Posts: 4723
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
Re: Carry Capacity Question
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]
[zwiki]Classes:Ammo[/zwiki]
[zwiki]Classes:BackpackItem[/zwiki]
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
Re: Carry Capacity Question
Got it. This info will be quite useful. Thanks!
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
Re: Carry Capacity Question
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?
actor NewClip : Clip
{
Inventory.Amount 10
Inventory.MaxAmount 600
}
...but it's not working. What am I doing wrong?
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
Re: Carry Capacity Question
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...
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...
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
Re: Carry Capacity Question
I think I've figured out how to do this with a DeHackEd patch. It seems to be working.
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: Carry Capacity Question
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).
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).
- Herculine
- Posts: 70
- Joined: Mon Feb 22, 2010 3:44
- Location: Ohio
- Contact:
Re: Carry Capacity Question
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...
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...