Thrifty Ammo: now with Thrifty Health [V 1.1]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
zrrion the insect
Posts: 2408
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Thrifty Ammo: now with Thrifty Health [V 1.1]

Post by zrrion the insect »

Thrifty ammo is a little mod that prevents wasteful ammo pickup. Now you don't have to worry about wasting an entire shell box if you only have room for one more shell.

If you don't have enough room in your inventory for the full amount of a pickup it simply won't get picked up. If you can't pick up a large pickup all at once but could pickup a small pickup the large pickup will be "opened" and a bunch of small pickups will get dumped out and you can get as many as you can hold.
Download Thrifty Ammo now and start saving today!

Thrifty Health too if you want.

This is part of an ongoing zscript rewrite of an older mod of mine that I figured folks could get some use out of. Given the nature of the mod I can't really show off what it does with a screenshot, and a screenshot would be larger than the mod itself anyway.
Last edited by zrrion the insect on Fri Apr 23, 2021 8:35 pm, edited 3 times in total.
dmslr
Posts: 74
Joined: Tue Aug 06, 2019 2:11 am

Re: Thrifty Ammo: make every bullet count

Post by dmslr »

Works perfectly if there are no changes of ammo from dehacked mods. I tried the mod with Antaresian Reliquary, clips give you standard 10 bullets instead of AR's 12.
But I'll autoload the mod from now. Thanks!
Do you consider expanding your mod on medikits?
Last edited by dmslr on Sun Feb 07, 2021 5:20 am, edited 1 time in total.
User avatar
ZDL_800
Posts: 448
Joined: Wed May 15, 2019 3:06 am

Re: Thrifty Ammo: make every bullet count

Post by ZDL_800 »

This sounds brilliant, going to test on coop mode because this would be an awesome edition for any coop survival type of game.

Outstanding!
User avatar
AstartesCitizen
Posts: 49
Joined: Tue Mar 10, 2020 8:43 am
Graphics Processor: Intel (Legacy GZDoom)
Location: The Phalanx

Re: Thrifty Ammo: make every bullet count

Post by AstartesCitizen »

This reminds of a addon for Brutal Doom years ago, was quite popular, was named smart scavenger, the concept behind it is just like this one, really helpful but this is more universal for what I gathered, going to test with weapons mods to see how it works
User avatar
zrrion the insect
Posts: 2408
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: Thrifty Ammo: make every bullet count

Post by zrrion the insect »

dmslr wrote:Works perfectly if there are no changes of ammo from dehacked mods. I tried the mod with Antaresian Reliquary, clips give you standard 10 bullets instead of AR's 12... Do you consider expanding your mod on medikits?
I think I know why it didn't change the pickup amount of the clip for that mod and I likely could fix that if there is enough call for it. If the ammo capacity is expanded by dehacked it should be fine though.

If there's enough call for it I'll I'm pretty sure I could make this work for health but it wouldn't be completely waste a free as 10 health is 10% of max health and that could be life-or-death in some situations. Maybe making it pickup if you can hold at least half of a stimpack would work for health? I'll mess around with it and if I like how it goes I'll make a 2nd mod for that as well.

Best I could do for armor would be to make the player drop damaged armor as if they were taking off the old armor and putting on new armor when they pick up armor that they can't carry all of but representing the armor as damaged would involve new graphics which are outside the scope of this simple mutator.
AstartesCitizen wrote:...smart scavenger, ...but this is more universal for what I gathered
this isn't necessarily more universal, it only works on the standard ammo present in doom already. If you take a peek at the zscript though it would be very easy to make compatibility patches to make this compatible with new ammo types in other mods. And yeah, this is directly inspired by smart scavenger. I initially made my own decorate based implementation of this mechanic that had a few limitations no one ever caught but existed nonetheless, this zscript version should be a lot cleaner implementation of the same behaviour with way less quirks/edge cases.

EDIT: It was possible before for a large ammo pickup to not evenly break into small ammo pickups, meaning that you would loose the difference when opening vs picking up the entire thing. Nothing is vanilla doom has a remainder so it is fine to use there, but if a custom difficulty had an amo factor that changed things, or you planned to adapt this to your own project then it might be an issue. I've changed it to account for possible remainders and to spawn a small pickup with whatever that remainder would be when opened (and if you can't pick up a full small pickup, but could pickup the remainder it will still open) I'm still testing it to make sure it all works, expect this to be fixed whenever I add thrifty health.
dmslr
Posts: 74
Joined: Tue Aug 06, 2019 2:11 am

Re: Thrifty Ammo: make every bullet count

Post by dmslr »

zrrion the insect wrote:If there's enough call for it I'll I'm pretty sure I could make this work for health but it wouldn't be completely waste a free as 10 health is 10% of max health and that could be life-or-death in some situations. Maybe making it pickup if you can hold at least half of a stimpack would work for health? I'll mess around with it and if I like how it goes I'll make a 2nd mod for that as well.
No need to make the medikit ungrabbable if you have >90HP. The better choice would be to make it leave a stimpack if you are wasting 10-19 HPs or 2 stimpacks if the wasted HPs are 20-24. So, the result would look like this:

Better than wasting 10-24HP.
zrrion the insect wrote:Best I could do for armor would be to make the player drop damaged armor as if they were taking off the old armor and putting on new armor when they pick up armor that they can't carry all of but representing the armor as damaged would involve new graphics which are outside the scope of this simple mutator.
Agree. Both blue and green armor suits are pretty rare and don't mess underfoot like ammo or medikits. The best solution here is leaving them unchaged.
zrrion the insect wrote:I'll mess around with it and if I like how it goes I'll make a 2nd mod for that as well.
Why to make a 2nd mod though? Players who would love to use this mod would also love the other one and vice versa.
JohnnyTheWolf
Posts: 1144
Joined: Mon Oct 05, 2015 8:37 am

Re: Thrifty Ammo: make every bullet count

Post by JohnnyTheWolf »

AstartesCitizen wrote:This reminds of a addon for Brutal Doom years ago, was quite popular, was named smart scavenger, the concept behind it is just like this one, really helpful but this is more universal for what I gathered, going to test with weapons mods to see how it works
It works with vanilla Doom, Heretic and even Freedoom, but alas, it seems to be a bit out of date, especially since Freedoom changed the sprites of some of the items.
User avatar
zrrion the insect
Posts: 2408
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: Thrifty Ammo: make every bullet count

Post by zrrion the insect »

dmslr wrote:Why to make a 2nd mod though? Players who would love to use this mod would also love the other one and vice versa.
If I make 2 mods people can load what they want.

as for the health thing, since the system now lets me spawn partial pickups I should be able to make something that can at least reduce wasted health on health pickups. The best solution would be to add a new pickup smaller than a stimpack that a stimpack would get dropped when opening a stimpack but like the damaged armor is beyond the scope of a simple mutator. Honestly though I might just expand the scope of the armor/health mod since they kinda need it to work the way I would like.
User avatar
zrrion the insect
Posts: 2408
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: Thrifty Ammo: make every bullet count

Post by zrrion the insect »

Okay, while working on the thrifty health I reworked how picking up ammo works. Now when a large pickup is opened it will try and drop ammo in 3 stages. The first stage checks if you need less than the default amount for a small pickup, and if you do it drops one with a lower amount. the second stage checks to see if the remaining amount in the large pickup is evenly divisible by the amount in the small pickup, if it isn't it drops a partial. The final stage drops the remaining amount as a bunch of small pickups.

This means that unless you have max ammo you can always pick up ammo from a large pickup, regardless of how much ammo you actually need. Small pickups aren't changed. Thrifty Health works the same way, with the stimpack and medikit both opening up to drop out mini stimpacks. This means that you can always get back to 100 without wasting any health. Check the OP for downloads to Thrifty Health and the updated version of Thrifty Ammo.
User avatar
zrrion the insect
Posts: 2408
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: Thrifty Ammo: now with Thrifty Health

Post by zrrion the insect »

Updated to v1.1, there's bugs that got removed, no one reported them here but they should still be gone.

Return to “Gameplay Mods”