[1.0] [RELEASED] Adrenaline!

Started by XeoNovaDan, July 18, 2019, 12:32:49 PM

Previous topic - Next topic

XeoNovaDan

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!



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.



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.



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.



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

XeoNovaDan

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

Trunken

Another ebic mod by the legend :-) Thank you XND

Sonsalt

Amazing idea!!!

Does this affect aiming etc?
It could be a great suppression mod too

XeoNovaDan

#4
@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.

creepyguyinblack

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.

XeoNovaDan

@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.

Brightsideguy

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.
My main mod: Gerzee Race

XeoNovaDan

@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.

XeoNovaDan

#9
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!

Brightsideguy

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.
My main mod: Gerzee Race

Brightsideguy

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).
My main mod: Gerzee Race

XeoNovaDan

#12
@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?

Brightsideguy

#13
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.
My main mod: Gerzee Race

XeoNovaDan

#14
@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