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.
[Minimod] SoM Universal(ish?) Kill Rewards
------------------------------------------
A simple mod that generates "Bits" when you kill monsters. Bits can restore
Health, Armor, or Ammo when picked up, currently for a single point in thier
respective types. Bits are just small colored orbs as follows:
Features List
-------------
-Monsters drop Bits on death to restore Health, Armor, and Ammo
-Universal, should work with almost any IWAD/PWAD
-Ability to modify most values to suit your needs
-Most things can be completely disabled with the right settings
-Bits can be set to disappear after a time, or stay indefinitely
-Two different modes to determine spawning
-Ability to fine tune Ammo Bits
Details
-------
I created this to aid in balancing certain combinations of mods, especially ones
that crank up the number of monsters or health fo monsters, often leaving me
with barely any ammo. This was originally done with ACS and Decorate, and was
only compatible with mods that used the vanilla Doom items, or replacements of
them, but I wanted to create a more generic version, so I delved into the world
of ZScript, and this is the result! In theory, this should work on almost any
IWAD or PWAD combination, hense "Universal(ish?)" in the title. The question of
completely compatibility lies in the Ammo Bits, since the Health and Armor Bits
are just simple classes inheriting from built in types ("Health" and
"BasicArmorBonus" specifically). Ammo on the other hand was a lot more
complicated, so there is a chance it won't play nice with some mods.
A note on mods that feature "Clips" and "Reloading":
I have tested a couple of mods now with these features, and with the correct
settings, Ammo Bits appear to work without major issues. It is mostly a matter
of determining how the mod segregates clip ammo vs total ammo, which is why
there are toggles for "AmmoType1" and "AmmoType2". I can't see there being major
issues so long as a mod is consistent in how it deals with clips. For example,
from my testing, "Brutal Doom" seems to have the main ammo pools in "AmmoType1",
and relies on "AmmoType2" for clips. Conversely, when I was trying out the mod
"Punkwild", it was the opposite (except the dual wielding pistols, where each
ammo type was for either handed clips). You can, if you really want, enable both
ammo types and have Ammo Bits add ammo directly to clips, as well as the total
ammo pool.
Feel free to use anything in this mod for yourself. It really isn't that
complicated of a mod, so I don't need credit, unless you wanted to.
Developed/Tested with LZDoom 3.86a, because I have a potato laptop with an
older OpenGL version. Will not work with Zandronum, 'cause Zscript.
Settings
--------
All settings can be modified in the Options Menu. I'll breifly go over them
here!
Spoiler:
Mode:
Overall, the mod has two main modes: Ranged and HP Ratio.
Ranged mode will spawn a number of bits between the selected Min and Max
values, with a few additional options that are detailed below in the
appropriate section.
HP Ratio mode will spawn a number of bits based on the "Spawn Health" of a
monster. This number is rounded, and will always be at least 1.
Defaults to Range Mode.
Base Drop Chance (%):
This is the percentage chance of an individual bit spawning, after the final
number of Bits to spawn is calculated. This is ignored if a monster has the
"Boss" flag enabled. Setting this to zero percent effectively disables Bits
from generating.
Note: Since the "Boss" flag overrides this setting, even at 0%, Boss
monsters will still generate Bits.
Defaults to 100%.
Boss Multiplier:
As you might guess, when a Boss is killed, the number of Bits spawned is
multiplied by this value. How this is applied depends on the mode. For
Range Mode, first off, percentage chance is ignored, and the multiplier is
applied to both the Min and Max values before a random quantity is rolled.
For HP Ratio Mode, the multiplier is applied to the monster's "Spawn Health"
value before being divided by the ratio. This value can also be set to zero,
if you wanted to for some reason.
Defaults to x3.
Bit Life:
This is split into two values, for simplification of fine tuning the time,
namely, Ticks and Multiplier. I did this to make it easier to select, say,
15 seconds, so you wouldn't have to math too hard to get a total number of
ticks. The total is as simple as Ticks x Multiplier, and when a Bit reaches
this value, it is rather simply removed from the map. If either, or both, of
these values are set to zero, Bits will instead remain on the map forever.
These values can be changed anytime and they will take effect immediately.
Defaults to 0 for both values.
Range Mode:
The following settings affect how the Range Mode works.
Min/Max Bits:
These values determine the range of Bits to be spawned.
Defaults to a range of 1 to 3.
Randomize Bit Quantity:
If enabled, Range Mode will spawn a random number of Bits between the Min
and Max values. If this is not turned on, the Max value will be used alone.
Enabled by default.
Spawn Chance (%):
This is the percentage chance that the Ranged spawn will happen in its
entirety, meaning if it fails, NOTHING will spawn, regardless of any other
settings.
Defaults to 100% (in other words, is disabled by default).
HP Ratio Mode:
The following settings affect how the HP Ratio Mode works.
HP Ratio:
This sets the value to divide the monster's Spawn Health by to determine the
number of Bits to generate. This number is then rounded off, and will
always be at least 1. This has both a slider option and text input option
to allow for fine tuning of the value.
Defaults to 10 Health/Bit.
Drop Ratios:
The three sliders determine the weight of spawning each respective Bit type.
These are relative to each other, so equal values have equal chance, but if
a value is relatively higher, it will spawn more often. Setting any value to
zero will disable spawns from that Bit type. Ratio Examples:
Health = 1
Armor = 1
Ammo = 3
Ammo will spawn three times more likely then health or armor.
Health = 5
Armor = 1
Ammo = 5
Health and armor have an equal chance to spawn, and very rarely armor bits
will spawn.
Health = 3
Armor = 2
Ammo = 1
Bits will spawn in descending likeliness from Health, to Armor, to Ammo.
Defaults to 1:1:1.
Ammo Bit Settings:
Since the Ammo Bits are a lot more complicated then the other two Bits, it
has its own section for settings, as follows.
Ammo Bit Mode:
Comes in two types: Current Weapon, or All Owned Weapons.
Current Weapon Mode will only grant Ammo for the weapon you currently have
ready, if it uses Ammo at all.
All Owned Weapons Mode will instead read all weapons you currently have in
your inventory, and randomly pick one out of the pool.
As a side note, if you do not have any weapons that use ammo in either mode,
Ammo Bits can still be collected, but will do nothing.
Include Ammo Type 1/2:
Toggles for including the ammotype1 and ammotype2 values in the ammo pool.
These toggles exist in order to fine tune the ammo pool, mostly to account
for mods that have reloading/clip based ammo systems, as mentioned above in
the Details section. If both of these options are disabled, there will be
nothing in the ammo pool, so Ammo Bits will act like described above.
Issues
------
-Clip/Reload based mods may have unusual side effects
-Bits just kind of disappear with no fanfare right now when they expire
-Ammo Bits can be collected and give you nothing
-Health bits will not be collected if you're at maximum health, unlike armor and ammo right now
-There is currently no option for Ammo Bits to give ammo from ALL weapons in a
mod, as opposed to all the ones you currently have
Todo
----
-Consolidate code for all three Bit types
-Add option to set the quantity given for Bit types
-Pretty up Bits visually
-Fix the Armor and Ammo Bits from being collected uselessly if you do not need them
Feedback
--------
Looking for any feedback about the mod, particularly since this not only my
first public mod, but also my first serious foray into Zscript. I'm certain
there are probably better ways to go about things (code consolidation aside), so
I'm happy to hear input from other coders about things I did wrong, or things
that can be done better.
Change Log
----------
Version 1.0:
-Initial Release
As useful and interesting as it is, but i have some questions:
- Why only the big bosses drop bits? I honestly think Barons and Archviles are hard to kill hence some of them have BOSS flag. Hence, it's still difficult to satisfy my needs of resupply. Or am i missing something at the option?
- Nice to see the health bits are ignored if your health is full. But Armor and Ammo bits are still obtainable, despite of having both armor and ammo completely full.
Thanks for replying! As to your questions, all enemies can drop Bits, it's just that enemies with the Boss flag are guaranteed to drop their full amount. There are just combinations of settings that would cause only Bosses to drop bits. With default settings, all enemies will drop bits. On a side note, I am thinking of having it set to "HP Ratio" mode by default, as that's the one I use most myself. For your second question, next time I sit down and look at this mod, I'm going to try to unify the code, and I'll look into fixing the Armor and Ammo bits being collectable if not needed.
A very good minimod in mods where the ammunition to give is quite low, although it was quite good that the player when approaching the bonuses they go to the player instead of collecting one by one,I say this because in certain maps the enemies from a place to a double jump which do not usually have all mod would be a pretty good help, Not to mention that if I do not grab them, they can cause performance problems because there are a lot of boss bonuses
Amazing mod that I searched like crazy and barely found! Thank you for this great mod, it instantly became one of my essential mods. After playing Eternal, It feels weird to play Doom without self-replenishment mechanics.
But I have only one gripe with this mod, how much ammo (or health/armor) the bits restore. Health and armor are not that much of a problem (Even if it remains as it is, it can be adjusted somehow)
But the situation with ammo is that the value of 1 is not the same in every ammo. 1 minigun bullet is not equal to 1 shotgun bullet. I wonder if you could make a setting for this? For example, how does something like giving 1% of the ammo capacity per bit sound? In this way, its compatibility increases, generally the value of the bullet is adjusted according to the maximum capacity in the mods.
Last edited by TolgaKerem07 on Fri Apr 05, 2024 1:35 am, edited 1 time in total.
TolgaKerem07 wrote: ↑Thu Apr 04, 2024 1:02 pm
Amazing mod that I searched like crazy and barely found! Thank you for this great mod, it instantly became one of my essential mods. After playing Eternal, It feels weird to play Doom without self-replenishment mechanics.
But I have only one gripe with this mod, how much ammo (or health/armor) the bits restore. Health and armor are not that much of a problem (Even if it remains as it is, it can be adjusted somehow)
But the situation with ammo is that the value of 1 is not the same in every ammo. 1 minigun bullet is not equal to 1 shogun bullet. I wonder if you could make a setting for this? For example, how does something like giving 1% of the ammo capacity per bit sound? In this way, its compatibility increases, generally the value of the bullet is adjusted according to the maximum capacity in the modes.
I've actually been working on polishing and releasing my entire mod catalog, and updating this one is on my todo list! I can't promise when I'll get to it, but I'll be adding a lot more options that should allow for customizing your experience to suit your needs!
I used Gunbonsai scavenge perks for a while, but I switched back to this when I saw that this mod is much more compatible, especially in ammo. I think this system is better in ammo. Do you have any thoughts on adding this system as an addon to gunbonsai (to use the leveling mechanic) or replacing the system there with this one?
how does something like giving 1% of the ammo capacity per bit sound
Edit: Thanks to chatgpt and a few helpful friends on discord I think I achieved what I wanted, here is the link
TolgaKerem07 wrote: ↑Sat May 04, 2024 4:07 am
I used Gunbonsai scavenge perks for a while, but I switched back to this when I saw that this mod is much more compatible, especially in ammo. I think this system is better in ammo. Do you have any thoughts on adding this system as an addon to gunbonsai (to use the leveling mechanic) or replacing the system there with this one?
how does something like giving 1% of the ammo capacity per bit sound
Edit: Thanks to chatgpt and a few helpful friends on discord I think I achieved what I wanted, here is the link
Giving this an overhaul is still on my todo list, and I'll take a look at the modifications you made for sure. I did also just release a new patch for Ammo Leech on my GunBonsai Addons page that may work a bit better then the old version. If you're able to give that one a whirl and let me know if it suits you as well, I'd appreciate it, as it would help me narrow down how I want to proceed with revamping Universal Kill Rewards.
AliciaPendragon wrote: ↑Mon Jul 08, 2024 10:11 pm
You think this will work with The False Angel or?
I'll test it for sure later, but at a glance, it looks like it should be fine. I would set the ammo part to only use ammo type 1 however, as it looks like Vice and Virtue use Type 2 for clips.
AliciaPendragon wrote: ↑Mon Jul 08, 2024 10:11 pm
You think this will work with The False Angel or?
I'll test it for sure later, but at a glance, it looks like it should be fine. I would set the ammo part to only use ammo type 1 however, as it looks like Vice and Virtue use Type 2 for clips.
Noted. Was just searching something to pair with it so I could keep a smallish stream of health and armor for me as I do not struggle with ammo
AliciaPendragon wrote: ↑Mon Jul 08, 2024 10:11 pm
You think this will work with The False Angel or?
I'll test it for sure later, but at a glance, it looks like it should be fine. I would set the ammo part to only use ammo type 1 however, as it looks like Vice and Virtue use Type 2 for clips.
Noted. Was just searching something to pair with it so I could keep a smallish stream of health and armor for me as I do not struggle with ammo
Just did a quick test, seems to be working fine for me. Didn't test the ammo part since you weren't too concerned about it.