As a (belated) Christmas gift to the ZDoom community, I'm releasing this mod/resource wad. It's something I've wanted to do for a while, but never had the knowledge on how to do it properly.
Have you even come across an unavoidable large ammo or health pickup in a narrow hallway or right in front of a switch, and were forced to pick it up, even though you were only a few rounds short of maxed out, or just a tad below 100 health? Ever kicked yourself later for having done that when you came face-to-face with some mean S.O.B that wanted to eat your face off, and you just didn't have enough ammo or the health to survive the enounters after? With Smart Scavenger, those large pickups now break down into smaller pickups if you have more ammo or health than the amount that the pickup would normally refill, leaving the odd clip, handful of shells, rocket, cell or Stimpack on the ground to pick up when you need it. Smart Scavenger also comes in versions for Heretic, Strife, and Chex Quest.
Smart Scavenger works through a combination of ACS, MAPINFO, and DECORATE:
-MAPINFO assigns a value to each skill through the ACSReturn property.
-An ACS script retrieves this value and gives a ResultValue that can be used in DECORATE expressions.
-The actors that replace the large ammo pickups check this value to determine whether the current difficulty is one with a 2x ammofactor, along with the presence or abscence of a Backpack, to aid in properly determining whether the player's ammo stores for the applicable type are depleted enough to give a large ammo pickup, and if not, drop several small ones.
-Doom's Medikit now has a Smart Scavenger equivalent; if you have over seventy-five health, it will spawn a MiniStim (+5 health), then two Stimpacks.
-Similar to the above, Chex Quest's Vegetable Bowl is now a fruit & veggie bowl; if you have more than seventy-five health, it will spawn a random fruit or veggie restoring 5 health, then two fruit bowls. The PickupMessage for the item has been changed to reflect its new usage; it wouldn't make sense to get fruit from a bowl of veggies, right?
-When you run over one of these pickups, the screen will flash as if you acquired something, even if your ammo for that type is full.
-Any small ammo or health pickups will spawn at your feet, rather than at the spot of the large pickup.
-In Strife, ammo you buy won't split into small ammo pickups.
Download Smart Scavenger - Version 2