RimWorld

RimWorld

260 ratings
ApplyPressure
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5
File Size
Posted
Updated
3.211 MB
20 Jul @ 11:00pm
21 Aug @ 3:53pm
6 Change Notes ( view )

Subscribe to download
ApplyPressure

Description
Add a feature that allows pawns to hold on to their wound to reduce bleeding instead of crawling.


Applying Pressure
You can toggle the behavior of your pawn when downed. Instead of crawling all the way back to base and potentially opening doors for the enemy, they can either stay where they are and apply pressure to their wound.


When can a pawn apply pressure
Whenever a pawn can crawl.
Note that apply pressure will stop whenever a pawn is not in a crawling state (can walk again, being carried, etc)
*Only player-controlled pawns will do this. Technically is because of performance. Lore-wise, enemies know what will happens if they get captured so would rather bleed to death than stop crawling to escape

How much bleeding is stop
bleed rate reduced = (Most severe bleeding' BleedRate) * stopBleedFactor * max( (pawn Manipulation) , manipulationCap)
stopBleedFactor and manipulationCap are configurable.

Technical
The difference between "Apply Pressure Now" and "Apply Pressure when safe" is happening before or after
the Vanilla <li Class="JobGiver_FleeDanger" /> in the Downed ThinkTreeDef.
<!--============= Downed ============--> <ThinkTreeDef> <defName>Downed</defName> <thinkRoot Class="ThinkNode_ConditionalDowned"> <subNodes> <li Class="ThinkNode_ConditionalCanCrawl"> <subNodes> <!-- Interrupts the crawling pawn every few seconds --> <li Class="ThinkNode_CrawlInterrupt"> <subNodes> <li Class="JobGiver_FleeDanger" /> <li Class="ThinkNode_ConditionalPlayerControlledColonist"> <subNodes> <li Class="JobGiver_PatientGoToBed" /> </subNodes> </li> </subNodes> </li> </subNodes> </li> <!-- Do a queued job if possible --> <li Class="ThinkNode_QueuedJob"> <inBedOnly>true</inBedOnly> </li> <li Class="JobGiver_IdleForever"/> </subNodes> </thinkRoot> </ThinkTreeDef>


Source and bug report on Github[github.com]
72 Comments
Mitchel Vories 24 Aug @ 10:44am 
Cool, thanks for the tips. Thanks for your mod, too.
战地记者 射命丸  [author] 22 Aug @ 1:36pm 
Player Log is usually used when the bug crashes RimWorld before you get to F12
战地记者 射命丸  [author] 22 Aug @ 1:34pm 
@Mitchel Vories For small mods they are generally the same, they all capture most RimWorld and mod log printed. The HugLib Log is preferred because it automatically publishes it to GitHub for easy access. More nasty bugs in complex mods require all information available so some developers require all.
Mitchel Vories 22 Aug @ 12:54pm 
@战地记者 射命丸 When reporting an error what logs are most useful to authors? I'm aware of the Player Log, found in the LocalLow -> LudeonStudios directory, and the HugLib Log that is generated by pressing Ctrl+F12 in game.

How are they different? Which one is more useful?
Mitchel Vories 22 Aug @ 12:22pm 
@战地记者 射命丸 You're welcome. Much credit to you for the quick fix. I'll add Apply Pressure back to enabled mods that I use.
战地记者 射命丸  [author] 21 Aug @ 4:00pm 
@The Moose Added, you can now set it in the setting.

@Mitchel Vories Thank you for your detailed reporting. The issues have been fixed. Missed a return statement in the null check clause.
Mitchel Vories 21 Aug @ 1:12pm 
I used debug commands to deal damage to the pawn until it was downed and this error message popped up after clicking on 'apply pressure now':

Apply pressure hediff is add with no targetHediff, calculating most severe bleeding

hugs log:https://gist.github.com/HugsLibRecordKeeper/4f53e40982bf9f105cb0c90868c13abf
player log: https://pastebin.com/vQejSC5U
current mod list: https://pastebin.com/aL6e1czQ
The Moose 13 Aug @ 12:15am 
Is there a way to set a default setting?
Dioneh7818 9 Aug @ 7:45am 
ORGA NOOOOO
战地记者 射命丸  [author] 9 Aug @ 5:54am 
@Church.exe Not without modifying the C# code. This mod is designed to simulate pawn stopping blood on a single wound. Uncap the factor or use the total bleed rate doesn't make sense for this mod. But feel free to edit base on my code.