Note: This mod has now been officially released and discussion has therefore been locked. Thanks for testing, folks!
Ludeon thread: https://ludeon.com/forums/index.php?topic=29503.msg462493#msg462493
Steam workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1823138604
Preface:This mod is virtually complete, but the reason I published it on this Unfinished thread before fully releasing it is because I woud like balance feedback and additional suggestions. If you're willing to provide said feedback, that would be very much appreciated!
(https://i.imgur.com/SsfvsBM.png)
Overview:This mod adds, as the name suggests, adrenaline to the game. Pawns gain a burst of adrenaline when they see anything that they perceive as a threat, or whenever they take any damage. In terms of what is perceived as a threat, humanlike pawns will consider other pawns and turrets, with the level of perceived threat being based on 'combat power' ratings and baseline market value respectively; animals only consider other pawns, with the perceived threat being based on the animal's body size compared to the threat's.
(https://i.imgur.com/wF5wmn3.png) (https://i.imgur.com/NlN1l72.png)
Adrenaline in RimWorld primarily affects how much pain a pawn feels as well as their blood pumping, though it also affects their breathing, consciousness, movement and damage dealt in melee combat. Due to RimWorld's time scale, adrenaline will generally be prevalent for around a couple or so in-game hours depending on the duration and intensity of a battle.
Adrenaline can also be gained through the use of adrenaline syringes which can either be purchased or made from neutroamine once Penoxycyline has been researched. You can also have pawns pocket adrenaline syringes via drug policies (or Smart Medicine's 'Stock Up'/Combat Extended's loadouts) so that if they go down, you can make them inject any adrenaline syringes directly next to them which could potentially get them back into/away from the fight.
(https://i.imgur.com/jyRtBt0.png)
Additionally, two new traits are added which relate to adrenaline rushes:
- Adrenaline Junkie - Pawns with this trait get a mood boost from adrenaline rushes, with the strength of the mood boost depending on the intensity of the adrenaline rush
- Cool-headed - Pawns with this trait will never get adrenaline rushes from being in danger or from taking damage
A pawn cannot be an adrenaline junkie and cool-headed at the same time. Pawns that can't gain adrenaline of any form also won't generate with any adrenaline-related traits.
(https://i.imgur.com/X08lHv1.png) (https://i.imgur.com/pMi3HDQ.png)
There are currently four distinct stages of adrenaline rush. The following table details each stage and its effects on a pawn:
Stage | Pain | Blood Pumping | Breathing | Consciousness | Moving | Sight | Melee Damage | Mood Bonus | Other Effects |
Slight | x90% | +10% | +10% | +5% | +5% | +5% | 1.05x | +4 | - |
Moderate | x83% | +20% | +15% | +10% | +10% | +10% | 1.125x | +8 | - |
Intense | x75% | +30% | +20% | +15% | +15% | +15% | 1.2x | +12 | - |
Extreme | x65% | +50% | +25% | +20% | +20% | +20% | 1.3x | +18 | Heart attack risk |
Beware though, because adrenaline rushes can lead to 'adrenaline crashes' where affected pawns become lethargic, nauseous and more prone to having mental breaks! The severity, duration and symptom onset speed of an adrenaline crash depends on the intensity and duration of the accompanying adrenaline rush, with severe cases potentially lasting for a few in-game days. Symptoms typically start becoming apparent a few hours after the adrenaline rush starts, though short and mild rushes may not even result in an adrenaline crash.
The following table details each stage of an adrenaline crash:
Stage | Tiredness | Consciousness | Mental Break Threshold | Vomiting (average) |
Minor | +30% | x90% | +2% | Once per 5 days |
Moderate | +50% | x80% | +4% | Once per 3 days |
Severe | +70% | x70% | +6% | Once per 2 days |
Extreme | +100% | x50% | +8% | Once per day |
Credits so far:
- Brrainz - Harmony
- Ryflamer - Adrenaline syringe sprite
- Mehni - Rubberducking
- VintageNuke - Idea discussion
- Ashen and noodlebox - Providing saves for testing purposes
Compatibility Notes:Mods:
- Fully compatible with Combat Extended
- Should work with all other mods too
If you are a modder and wish to make animals or alien races have different adrenaline characteristics, you might be interested in checking out this mod's GitHub wiki: https://github.com/XeoNovaDan/Adrenaline/wiki
Saves:
- Can be added to existing saves
Links:Download: https://github.com/XeoNovaDan/Adrenaline/releases
Source Code: https://github.com/XeoNovaDan/Adrenaline
Pushed a second release candidate
Shortened Changelog (full changelog on GitHub releases):
Balance:
- Increased pain reduction
- Adrenaline now affects sight
- Tweaked adrenaline severity requirements
- Adrenaline gain rate reduced
- Slight adrenaline now affects breathing (+10%)
- Severely outmatched characters gain adrenaline over time quicker than normal (at least 2:1)
- Downed characters now only gain adrenaline at half rate instead of full rate
The objective of these balance changes is to reduce the amount of 'extreme' adrenaline occurences
New:
- Added adrenaline syringes
Another ebic mod by the legend :-) Thank you XND
Amazing idea!!!
Does this affect aiming etc?
It could be a great suppression mod too
@Trunken - Thanks! And you're welcome :P
@Sonsalt - This doesn't affect aiming speed, no. However, accuracy does improve due to the minor sight bonuses. Regarding suppression, that's out of this mod's scope but IIRC there's a standalone suppresson mod out there already, and CE also has suppression mechanics.
I think there should be some small penalties towards skilled work (smithing, tailoring, construction, art etc) research and possibly even social, increasing with the adrenaline level for both balance and realism. I have a hard time keeping my hands steady or mind focused when I've just had an adrenaline pumping event inreal life. As it is rn, it seems like just a free stat boost with No resources cost, risk or any negatives.
@creepyguyinblack - Thanks! Yeah, I've fiddled with adrenaline balancing a bit more in the next version and will also add an 'adrenaline crash' hediff that starts after the initial hediff finishes.
This is a really fantastic idea. Thanks for making this! Few ideas / suggestions.
Blood Pumping Only --- blood pumping already affects speed, so perhaps only this (or just speed) should be used. Since a blood pumping boost could theoretically result in a pain-numb pawn only staying alive due to adrenaline (e.g. their blood pumping would be 0% without it due to heart damage etc) and dying once that wore off, by choosing blood pumping you'd have to decide if you'd want that to be a feature ("he survived long enough to defend the colony") or if that'd just be annoying from a user perspective ("wait why did they suddenly die?!?).
Not manipulation or breathing --- I agree with creepyguy in that adrenaline should have immediate negatives (not just a post-fight hediff as you're planning). A medic or sniper or recruiter doing their job better because they are hurt or afraid, doesn't sound realistic. But raising manipulation and breathing (via consciousness) actually makes these skilled jobs easier. Perhaps do away with the health stats and just stick to specific skill impacts when under adrenaline? [i.e. skilled work efficiencies down, social down, shoot accuracy down, shoot speed up, etc] Or heck, actually make it lower manipulation, so even freaked out fighters miss a little more.
Cool Headed Trait --- With the above idea in mind. It'd be interesting to have a "cool headed" trait where adrenaline mechanic doesn't affect the pawn at all. Imagine picking a combat medic based on knowing that they won't screw up tend jobs by being shot at. Or giving the best weapon to the gunner who will always aim well under fire. Or if going the lower-manipulation-for-all route, have your cool-headed melee fighter be the one who makes the hits when it counts.
@Brightsideguy - Cheers! In the next version of the mod, the way that adrenaline accumulates has been completely reworked and has had its bonuses nerfed, as well as an 'adrenaline crash' hediff which will affect the pawn negatively (faster tiredness gain, lowered consciousness etc.) for a longer period of time. Cool headed trait would be a good idea too, I'll get that in before the next release of the mod.
Alright, just pushed the fourth release candidate! This is a major update which incorporates many of the changes suggested here as well as suggestions I received via Discord.
You may receive a few errors if loading an ongoing save with the newest version of this mod if you were also using an older version, but the errors should be harmless.
Full change log:Balance:Completely reworked how adrenaline is gained over time to be more realistic
- Pawns now gain a burst of adrenaline at the start of a battle
- The amount gained and the rate of gain depends on the perceived significance of the threat
- Adrenaline gradually drops off after reaching its peak severity
- The rate at which it drops off also depends on the perceived significance of the threat
Tweaked adrenaline stage bonuses
Slight
- Consciousness: 0% -> 5%
- Melee Damage: 1.0x -> 1.05x
Moderate
- Blood Pumping: 30% -> 20%
- Consciousness: 0% -> 10%
- Manipulation: 10% -> 0%
Intense
- Blood Pumping: 50% -> 30%
- Consciousness: 0% -> 15%
- Manipulation: 15% -> 0%
- Melee Damage: 1.2x -> 1.15x
Extreme
- Blood Pumping: 80% -> 50%
- Consciousness: 0% -> 20%
- Manipulation: 20% -> 0%
- Sight: 15% -> 20%
- Melee Damage: 1.3x -> 1.2x
Adrenaline Syringe:
- Adrenaline severity offset: 0.3 -> 0.9
- Now prevents adrenaline severity loss for 1 in-game hour per injection
New:'Adrenaline Crash' hediff - happens alongside adrenaline rushes but has delayed symptom onset
- Five stages: Trivial (initially hidden, asymptomatic), Minor, Moderate, Severe and Extreme
- Increases tiredness rate, reduces consciousness, increases mental break threshold and causes vomiting
- Severity, onset speed and duration depends on how long and how intense the accompanying adrenaline rush was
'Cool-headed' trait - Never gains adrenaline from perceived threats or taking damage. They can still receive adrenaline rushes from injections though
Misc:This mod finally has a thumbnail!
Just a note that with the current release from a few hours ago.
With Combat Extended active.
I can get a pawn to go down from punches without adrenaline ever going beyond slight. Aka punched unconscious isn't that frightening to the pawn.
I can stab a pawn twice in the torso for 10 damage (out of total 50 torso health) with heavy bleeding and its just slight adrenaline, that goes away pretty quickly.
Oh and that test is with breathing, consciousness, and sight changes disabled. If that matters at all?
(I sort of edited a version for myself that instead implements the medical / shooting etc negative buffs when adrenaline kicks in).
@Brightsideguy - Ah, this seems to be because the code that checks for perceived threats only checks attacking pawns in the case that the other pawn wouldn't normally be hostile. This wouldn't be a problem in most cases since in realistic combat scenarios, both pawns would pass a hostility check and thus both receive adrenaline, but if you have two colonists and order one to attack the other while the other stays still, only the attacking pawn gains adrenaline. I guess this is a potential cheese tactic, but OTOH it could be worth changing just for the sake of completeness and hey, who am I to limit what one wants to do to give their pawns a rush?
Ooooh, my apologies, I had assumed the pain was the main calculator. Eh, I feel like forcing your own colonists to attack another is already a weird scenario, and not worth you changing your system to account for.
....unless there's something like, an explosion near the pawn that causes massive damage to the pawn. If that doesn't get their adrenaline pumping, maybe that'd seem weird? But again, I'm not inclined to say its worth dealing with. Combat seems like the main reason for adrenaline to have importance anyways.
@Brightsideguy - Yeah, the main calculator's actually just the total 'significance' of a threat that a pawn faces, with damage being supplementary. Either way, I'm already working on trying to implement a solution to account for the melee case since that's bugging me now ;D
Alright, I've made a new commit to the development branch which addresses the melee attacking thing. I'm also working on opening more stuff up to XML via new DefModExtensions such as adrenaline's severity characteristics, but for now, I've only opened up melee damage multipliers.
Too tired to do a proper release, but a technically updated version does exist. Link for convenience: https://github.com/XeoNovaDan/Adrenaline/tree/development
Just pushed yet another new update. This one's just minor balance tweaks, bug fixes and internal changes
Change log:Balance: Increased melee damage modifiers for adrenaline:
- Moderate: 1.1x -> 1.125x
- Intense: 1.15x -> 1.2x
- Extreme: 1.2x -> 1.3x
Adrenaline gain from taking damage is now scaled by the injury's pain caused instead of by its severity and a constant
Increased tiredness penalties for adrenaline crash:
- Minor: +10% -> +30%
- Moderate: +30% -> +50%
- Severe: +60% -> +70%
Bug fixes:
- Fixed bug where if one pawn attacks another and the victim doesn't fight back, the victim didn't gain adrenaline over time
- Adrenaline from taking damage now correctly factors the pawn's current adrenaline production multiplier
- Fixed bug where adrenaline accumulated much slower than it should
Technical:
- Moved all adrenaline rush and adrenaline crash hediff parameters from hardcoded constants to XML
- Changed private access modifiers in Hediff_AdrenalineRush and Hediff_AdrenalineCrash to protected
Pushed another update today, another fairly minor one
Changes:
* Fixed bug where when a colonist hunts, neither the colonist or their target gains any adrenaline
* Animals now also consider their health and their target's health when determining threat significance
* Colonists now also consider age's body size multiplier when determining threat significance
* Slightly reduced the maximum duration of adrenaline crash
Been playing with the mod for a bit now. After a specific fight I had, I feel like adrenaline crash length may need to be toned down and I think being behind cover /having no injuries / being in your own base should factor into how high the adrenaline rush could get to begin with.
Its weird to have had a group of 5 fight against a single tough wild animal (barbslinger via a mod), shoot from the comfort of a killbox, win without a single injury, and then be crashing for several hours afterwards. On top of that, an older gent (who wasn't firing anything) and a baby animal had a heart attack after fight and everyone had a severe crash after. It felt like way too many consequences. Especially considering one is fast asleep for maybe 4 hours and still at a severe level.
Woops. Missed the update. So above statement is only for the version before my comment a day or so ago.
@Brightsideguy - A very good point with cover actually! I'll try to get that one in at some point. Injuries are already effectively factored in since part of the formula in determining a threat's 'significance' is each pawn's 'SummaryHealthPercent', and I'll consider a map's owning faction check but that might not get in.
Yeah, adrenaline crash isn't as harsh now. It stays at peak severity for about 30% less time (maximum of 42000 ticks/16.8 hours -> maximum of 30000/12 hours) and drops in severity 25% faster than previously (0.4 per day to 0.5). I did also actually reduce the chances of heart attacks by about 30% with extreme adrenaline rushes (MTBDays from 1.2 to 1.7) but forgot to mention that in the change log.
Thanks!
Updated to Release Candidate 8
Change Log:
* Reworked adrenaline gain from taking damage; target severity and severity gain rate now spike upwards for a very short period of time (half an ingame hour or about 20 seconds per hit) instead of adrenaline being applied instantly
* Pawns that are hunting or otherwise attacking other pawns that aren't fighting back view their victims as only 1/3 as significant of a threat - mainly to reduce extreme adrenaline crashes for hunters
* Manned turrets and pawns manning turrets are each viewed as 1/2 of a threat (for 1 threat collectively instead of 2)
Updated to Release Candidate 9. This just fixes an issue with Prepare Carefully
Alright, things are looking pretty good here. I'm probably going to go for an official release either later today or some time tomorrow - thanks for the feedback people!
This mod has now been officially released. Thanks for the testing and feedback everybody!
Ludeon thread: https://ludeon.com/forums/index.php?topic=29503.msg462493#msg462493
Steam workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1823138604