Mods / Bloody Story
Author: ProfCupcake
Side: Both
Created: Mar 28th 2024 at 9:46 PM
Last modified: 6 days ago
Downloads: 940
Follow Unfollow 44
Latest file for v1.20.1:
bloodystory_0.0.13.zip
1-click install
This mod replaces all combat damage to players with bleed. It also somewhat rebalances combat and healing generally: with default settings, things are generally deadlier but there's also more you can do to deal with them. Recovery is also much quicker than vanilla, but only if you manage to deal with your bleeding in time.
How to Die
Get hit. Wait. Observe how your health gradually reduces! Observe how your innards now paint the floor!
When hit by anything, instead of immediately taking damage, you will instead take an equivalent amount of bleed. This causes your health to reduce relative to your current bleed. Note that additional hits can keep stacking the bleed, up to some positively unreasonable levels (briefly).
To see how much you're bleeding, look down. If/when you bleed, you will see little blood particles coming out of your general torso region. These are synced in multiplayer, so you can see when your friends are bleeding too. :]
How to Not Die
Bleeding can be slowed temporarily by sneaking - while you're sneaking, your bleed rate is reduced. Note that this does not actually heal the bleeding though it can still save your life in a pinch!
Bleed slowly heals naturally, but also can be healed with poultices and bandages. A new kinda-poultice - the "improvised patch" - has been added as a super-early-game healing option, requiring only reeds.
Alternatively, you can heal bleed by taking fire damage. :]
How to Recover
Health regen can also be boosted in 3 ways:-
- Sitting: after a few seconds of uninterrupted sitting, you get a slight health regen bonus while you remain seated. Note that this only applies if you're not bleeding.
- Sleeping: lying in bed gives a big regen bonus. Note that this only applies if you're not bleeding. Time skipping from sleeping is taken into account.
- Eating: eating food grants a "regen boost", giving you a bit of constant health regen relative to the amount of saturation provided. Getting hit will reset your current regen boost to zero, so don't rely on it in combat! Unlike the other two options, this still works if you're bleeding.
Your health regen is tied to your hunger: the hungrier you are, the slower you will regen health, and vice-versa.
There is also a slight bonus to health regen relative to how much extra max health you have from nutrition.
Compatibility
Obviously, anything else that makes major changes to how the player takes damage may be incompatible with this.
Anything that adds new healing items may be affected by this: if it uses a vanilla-like method to apply the heal, this mod will intercept the healing and turn it into bleed reduction instead.
Anything that messes with player hunger - such as trollusk's Realistic Starvation - will most likely cause issues with the regen rates.
Compatible with Maltiez's fantastic Combat Overhaul.
Compatible with propaneko's Unconscious.
Commands
There are 6 server commands added by this mod:-
/bleed - Outputs your exact bleed level, effective bleed rate, regen rate, and regen boost to the chat.
/makemebleed <amount> - Adds bleed to the player who ran the command, for testing purposes. Admin only.
/preventbleedout - Stops you from bleeding out if bleed brings your health below zero. Admin only.
/togglebleeding - Pauses/resumes processing of bleeding. Note that it is only paused, not stopped, and bleed will still accumulate on hit. Admin only.
/togglebleedparticles - Toggles the bleed particles. Admin only.
Configuration
You can change quite a few options in the config file, which will be named BloodyStory.json in your ModConfig folder. Below is a formatted version with default settings, and below that is a brief explanation of what each variable does.
{
"baseRegen": 0.02,
"bonusRegen": 0.0016,
"regenBoostRate": 0.5,
"regenBoostQuotient": 100,
"regenBedMultiplier": 8,
"regenSitDelay": 5000,
"regenSitMultiplier": 3,
"bleedDamageMultiplier": 1.0,
"directDamageMultiplier": 0.0,
"bleedHealRate": 0.15,
"bleedQuotient": 12,
"sneakMultiplier": 8,
"bleedCautMultiplier": 1,
"bloodParticleMultiplier": 1,
"bloodParticleDelay": 0,
"bandageMultiplier": 1,
"maxSatietyMultiplier": 1.2,
"minSatietyMultiplier": 0,
"satietyConsumption": 50,
"timeDilation": 1
}
baseRegen is the base HP-per-second regen rate. bonusRegen is the amount added to this for each extra hitpoint of max health. With no other mods affecting it, you can get up to 12.5 points of extra max health from the nutrition boost, so multiply this by 12.5 to get the maximum bonus regen (0.2 with default settings).
regenBoostRate defines the constant rate at which the regen boost from food is applied and consumed, in HP-per-second. regenBoostQuotient affects the amount of regen boost added: the amount of satiety consumed is divided by regenBoostQuotient.
regenBedMultiplier is the multiplier for health regen when the player is lying in bed.
regenSitMultiplier is the multiplier for regen rate when the player is sat down. regenSitDelay is how long the player must be sat down before the sit multiplier applies, in milliseconds.
bleedHealRate is the rate at which bleed heals naturally.
bleedDamageMultiplier is a multiplier for how much bleed is added relative to the original damage of the attack. Note that if, for whatever reason, you want to set this to zero, it won't work: set it to some very small decimal instead (e.g. 0.0001).
directDamageMultiplier allows you to let some immediate damage through, instead of replacing it entirely with bleed. Note that this is in addition to bleed damage (e.g. setting both this and the above to 1 will deliver the full damage immediately and add the full damage as bleed).
bleedQuotient affects how much actual HP loss occurs from bleeding: current bleed level is divided by this to get the HP loss rate. sneakMultiplier is a multiplier applied to bleedQuotient when the player is sneaking (i.e. with default settings, sneaking makes HP loss from bleed 8 times slower).
bleedCautMultiplier is the multiplier for how much fire damage reduces bleed. Note that the player still takes normal fire damage.
bloodParticleMultiplier is a multiplier for how many blood particles are produced when the player is bleeding; players will produce an average of the bleed level multiplied by this value per tick they are bleeding. Probably worth changing if you alter the bleedQuotient since it provides important feedback for the player's condition.
bloodParticleDelay affects the time between blood particle spawns, in seconds. Zero by default, meaning it's a constant stream, spawning them every tick.
bandageMultiplier is a multiplier for how much healing items reduce the bleed level.
maxSatietyMultiplier and minSatietyMultiplier affect how much hunger affects regen rate. At max saturation, the max value applies; at zero saturation, the min value; and, between those, it scales linearly (e.g. at 50% saturation, it would be halfway between max and min, so regen rate would be mutliplied by 0.6 with default settings).
satietyConsumption is how much satiety is consumed per point of HP regenerated.
timeDilation affects how long a "second" is according to the mod. All of the mod's rates are affected by world time speed, so if you change that you may need to adjust this value to compensate.
Note that, due to the way computers work, some of these values initialise with slight rounding errors. Oh well.
Known Issues & Todos
While I did some modelling of the config values to land on the defaults (see this here graph), I haven't really had a chance to actually play with them yet. They might not work as well in actual play as they do on paper. If you have suggestions, or possibly just whole config files set up how you like, feel free to share.
Server admins can set their bleed level to a negative value using /makemebleed. Not fixing this; if you break things using an admin-only test command then that's on you. All you need to do to correct it is add bleed to make it positive again (which you can also do by getting hit a whole bunch, I guess).
While this mod does intercept the actual damage from attacks, the damage log will still show the health loss message (alongside this mod's bleed-added message). Additionally, if you've enabled direct damage, that message will appear twice. This is just a UI issue: it is functionally fine.
I'd like to add Config Lib support at some point.
I was originally planning to let the player lie in bed even when not sleepy, to allow recovery in beds. I should probably get back around to that.
I should probably add a method of applying direct healing.
I'd like to add the ability for players to bandage other players.
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v0.0.13 | 204 | 6 days ago | Show | bloodystory_0.0.13.zip | Install now | |
v0.0.12 | 234 | Jan 13th at 6:50 PM | Show | bloodystory_0.0.12.zip | Install now | |
v0.0.11 | 63 | Jan 12th at 12:43 PM | Show | bloodystory_0.0.11.zip | Install now | |
v0.0.10 | 80 | Jan 11th at 5:47 PM | Show | bloodystory_0.0.10.zip | Install now | |
v0.0.9 | 20 | Jan 11th at 5:30 PM | Show | bloodystory_0.0.9.zip | Install now | |
v0.0.8 | 30 | Jan 11th at 3:53 PM | Show | bloodystory_0.0.8.zip | Install now | |
v0.0.7 | 44 | Jan 10th at 11:54 PM | Show | bloodystory_0.0.7.zip | Install now | |
v0.0.6 | 37 | Jan 10th at 2:43 PM | Show | bloodystory_0.0.6.zip | Install now | |
v0.0.5 | 56 | Jan 8th at 8:29 AM | Show | bloodystory_0.0.5.zip | Install now | |
v0.0.4 | 66 | Jan 6th at 5:19 PM | Show | bloodystory_0.0.4.zip | Install now | |
v0.0.3 | 84 | Dec 23rd 2024 at 12:33 PM | Show | BloodyStory_0.0.3.zip | Install now | |
v0.0.1 | 22 | Mar 28th 2024 at 9:51 PM | Show | BloodyStory_0.0.1.zip | Install now |
Aeliaz
You're right, that would be cool. I'll add it to my todo list.
Les Naufragés Serious RP Community salutes you!
The team and I are wondering, if you're going to add the ability for one player to heal another player with bandages? That would be really cool!
Thanks for all your hard work!
It might be nice to see a Forum on the official Vintage Story Discord!
Thalius
Those are actually just rounding errors. Look in the description for the values they're "supposed" to be.
That said, the bleed heal rate can be a little sensitive. I'd suggest playing with the sliders on the graph first.
Given the way some of these numbers look, I'm a bit hesitant to adjust them:
{
"baseRegen": 0.019999999552965164,
"bonusRegen": 0.0015999999595806003,
"regenBoostRate": 0.5,
"regenBoostQuotient": 100.0,
"regenBedMultiplier": 8.0,
"regenSitDelay": 5000,
"regenSitMultiplier": 3.0,
"bleedDamageMultiplier": 1.0,
"directDamageMultiplier": 0.0,
"bleedHealRate": 0.15000000596046448,
"bleedQuotient": 12.0,
"sneakMultiplier": 8.0,
"bleedCautMultiplier": 1.0,
"bloodParticleMultiplier": 1.0,
"bloodParticleDelay": 0.05000000074505806,
"bandageMultiplier": 1.0,
"maxSatietyMultiplier": 1.2,
"minSatietyMultiplier": 0.0,
"satietyConsumption": 50.0,
"timeDilation": 1.0
}
How sensative are attributes like "baseRegen", with values 18 decimal places deep?
Do config setting sync between server and client?
ProfCupcake Sweet! Exactly what I needed. Thanks!
Thalius
Increase the "bleed quotient": that's what defines how much actual damage is dealt over time, relative to your current bleed level (bleed level / bleed quotient = damage). You might also want to reduce the "sneak multiplier", which multiplies the bleed quotient whenever the player is sneaking.
Note that this will result in less damage overall. To counteract that, you might want to reduce the "bleed heal rate", making bleed take longer to naturally heal.
If it helps, I've already got a neat graph set up for tweaking these values.
I was going to suggest what rhino did. More bleeding from slashing damage, mostly instadamage plus little bleed damage for blunt force damage, mix for piercing.
But also I wanted to ask- Is there a setting in the configs to reduce the bleed out speed? I don't want to reduce the damage at all, I just want to slow down the bleed-out a bit. Prolong the inevitable, so to speak, and give a bit more of a window of time for escaping and bandaging and such.
If so, which setting(s) would that be?
LunaGore
Not really; blood particles despawn after about 1 second.
Making trails using particles isn't really viable, as they'll soon hit the particle limit and start getting culled. There might be other ways to do it, idk.
rhino1998
Proper customisation of damagetypes is something I'd like to try to implement at some point. That's a bit lower priority, though.
Wondering if this mod leaves a blood trail, I'm currently using "Blood" by Xorberax in conjunction with this mod.
It would be cool if the ratio of bleed to direct damage would be affected by the damage type (if combat overhaul is installed)
Removed the mod from my server now because the food bar is always full and never goes down... You eating a lil makes it so food needs never decay, I think i've read something semilar here, and if you use unconious mod and you get picked up you start bleeding again faster and can't stop it untill you die again and again.
and yeah, splitting some damage to bleeding and instant damage would be nice too, i will check the mod out again later
Seeing this error. I think it is connected to Bloody Story:
21.1.2025 19:48:40 [Error] Exception: Cannot call this method outside the main thread. Not thread safe to do so. You can use the thread safe method .EnqueueMainThreadTask() to queue up the register on the main thread instead.
at Vintagestory.Client.NoObf.ClientEventAPI.RegisterCallback(Action`1 OnTimePassed, Int32 millisecondDelay) in VintagestoryLib\Client\API\ClientEventAPI.cs:line 546
at BloodyStory.Config.ConfigManager.Reload() in C:\Users\Professor Cupcake\source\repos\BloodyStory\BloodyStory\Config\ConfigManager.cs:line 80
at BloodyStory.Config.ConfigManager.get_modConfig() in C:\Users\Professor Cupcake\source\repos\BloodyStory\BloodyStory\Config\ConfigManager.cs:line 27
at BloodyStory.EntityBehaviorBleed.ServerTick(Single dt) in C:\Users\Professor Cupcake\source\repos\BloodyStory\BloodyStory\EntityBehaviorBleed.cs:line 111
at Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\Entity.cs:line 1051
at Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityAgent.cs:line 594
at Vintagestory.API.Common.EntityPlayer.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityPlayer.cs:line 645
at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 334
at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 143
at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 897
Bunuffin
Good shout, but I have an alternative idea: a cooldown after being hit, during which the sneak bleed reduction no longer applies.
I think I'll also look into adding options to customise how much damage becomes bleeding and how much damage is just directly applied.
For balance reasons you should make it so you take some damage on top of getting bleeding stacks while crouching if you get hit, you can become quite tanky if you crouch and fight...
ahh, yeah that makes a lot of sense now, thinking about it. that must've been causing the extended delay that prevents the hunger loss. looking forward to the fix !
I think I've figured it out. Turns out, even if the actual amount consumed is zero, calling the method to consume satiety delays the next hunger tick by 10 seconds.
Working on the fix for this for the next update.
Increased hunger consumption from regen is to be expected when the regen is so much faster, as it is with Bloody Story. Though, the amount of hunger consumed is - both in vanilla and BS - calculated per point of health regenerated, so it should be the same total hunger consumed for the same total amount healed. That said, this is assuming that the hunger loss is entirely linear, which it might not be (I haven't had a close look yet).
I'm not quite sure what's causing the weird behaviour you're describing: the way I've implemented the hunger consumption is functionally identical to vanilla.
I'll have to keep digging.
Windle
alright so before testing, i did a clean install of bloody story and cleared my mod cache. it seemed like the hunger rate worked as intended when i joined the test world, but once i started eating, the hunger rate started to act like before. i'm not sure, but i think the grace period where your satiety is not consumed after eating is not working as intended in bloody story - it extends that period far longer than it should, or it suspends it until you start taking damage. and as for the regen rate, turning it to 150 tends to make my hunger go to near zero when i'm trying to recover my health while sitting.
did a second test on a new world with commoner as a baseline (no hunger debuff) and i was able to replicate everything that i stated prior. my hunger loss was working fine as intended, and i also tested it with combat overhaul's armor due to the hunger debuff, and it seems like there's no issue there either. the hunger rate only starts breaking when i consume any form of food. i read on the forums that the grace period for cooked meals is about 30 secs per 100 sat, and a few seconds or so for raw ingredients / snacks like berries. though i'm not sure if the values have been changed, since it's been almost a year since this post was made.
i ate a puffball (80 sat) and it made me immune to hunger for about 10 minutes and counting. i was only able to lose hunger again when i took damage, and the regen rate (while sitting) caused my hunger to plummet. regeneration without sitting down works pretty well if the damage is minimal, but if i have to regenerate about a quarter of my health, my hunger rate increases too much.
if you want me to keep helping with testing you can hit me up on the official discord, my username is "pickledthoughts"
ProfCupcake
sure thing ! i'll test it out soon and report my findings.
ProfCupcake
Windle
I think I've figured out why this is affecting the hunger so. Turns out vanilla healing has a much greater effect on hunger than I realised.
Bloody Story, by default, consumes 1 point of satiety per hitpoint restored. The vanilla health behaviour consumes 150 satiety per 1 health.
Could you try setting the satietyConsumption in your Bloody Story config to 150 and see if it restores it to how you'd expect? If so, I may also change the default value.
hello, so far the compatibility patch is working great !! but i think the hunger issue is still persistent, though it seems to be only happening when i play multiplayer. the hunger rate works as normal in singleplayer, but in multiplayer i rarely lose any hunger. will do more extensive testing to see if it's a persistent issue
aw man huge props to you and propaneko for collaborating on compat between bloody story and unconscious !! thank you both for being receptive to feedback :DDDD
Success!! And they really do work so well to gether.
Anyone that did not know otherwise would think the bleeding and unconcious behavior came from the same mod.
Just an FYI though: I still have no config file showing up.
As of v1.8.2 of Unconscious, these mods are now fully compatible. :D
Thalius Windle rhino1998
Testing in single player only, not on a server. No config file is generating.
Thalius
Are you playing in multiplayer? The config file should only generate on the server side. This means you'll only have a config file on your machine if you run it in singleplayer. Also, the server's config file is the one that matters; client settings should have no effect.
I also noticed that the Config file is not generating. Tried recent update posted less than an hour ago, v_0.0.8.
The more I play with this, the more I like it, and especially alongside Unconcious. Just makes sense that if you are dying via bleeding out, you'd slip into unconciousness before you succombed to death, with a chance that a buddy nearby could patch you up before you faded completely.
But I could also see it working where you are aggressively terminated and just die. So I'm sort of torn on whether I could say the mods are not compatible even as they are working now.
Get seriously wounded and start bleeding out, try to run away and hope a buddy finds you after you go unconcious and saves you.
Get hit too hard or cornered with no escape, and you are simply dead with no chance at being rescued.
Thalius
Yup, still working on that.
No more freezing at the death/respawn screen, but still seeing an issue.
It seems that if I die from bleeding out, it skips the Unconcious phase and goes straight to respawn/rage quit. If I die from a blow from an entity with no time to bleed out, I go unconcious. Not sure how that works since all damage is converted to bleeding, but I tested it. If I stand in the midst of enemies and die quickly, I go unconcious. Whenever I run away and allow myself to die strictly from bleeding out, I get the respawn/rage quit screen.
Heya ProfCupcake just hit me on discord you can find me by the same nickname on VS official discord, would be easier to communicate :P
thank you for your hard work :DD
Welp, this serves me right for just throwing in a quick check without testing. I'll have another look at both mods, properly this time.
Tested Bloody Story and Unconcscious together and it seems like the unconscious state only triggers when you get attacked and you receive damage that supposedly finishes you off. If you let yourself bleed out, you go straight to being dead. I'm not sure if this is intended (since in my head, it does make a lot of sense considering how the timer in unconscious is referred to as "letting yourself bleed out") but that's what i've found so far in regards to compatibility.
I also noticed that it seems like the hunger rate is reduced to an incredibly slow pace when I have full health, and I didn't have to eat for about 4 days despite playing a blackguard. Will see if I can adjust this in the configs somehow, or if I have another mod left unchecked that messes with Bloody Story.
Overall, this mod is seriously amazing and I'm looking forward to more additions to the health system. Would be super fun to see more blood related debuffs or medicine, but I don't think that's within the scope of this mod. Excited to see where this goes, ProfCupcake !!
Just tried the latest version along with Unconcious. When I died, never saw the Unconcious screen. It went straght to Respawn/Rage Quit, but when I chose respawn, the game sort of froze. I could still select Rage Quit, but otherwise it just sat there with the "Respawn" button pressed but with no result.
Removed Unconcious and left BlodyStory on and tried logging back in, and was still stuck at the Respawn/Rage Quit screen when I pressed Respawn- Just sat there. Same happened when I turned Unconcious back on with BlodyStory turned off- Locked on the Respawn/Rage Quit screen.
Had to remove both BlodyStory and Unconcious to log back into the world.
Tried both mods alone and they work fine individually.
No crashing, nothing in the logs except some excessively long server timeout messages.
Enjoy the mechanics after some tweaking in the configs. Hope you can work out compatibility!!
Feels a LOT better than straight out dying once you are hit. It feels nice to know you are dying but also know that you might be able to do something about it if you can just get away and find a few safe moments to patch yourself up. But I also very much like the ability in a multiplayer setting where a friend has the chance to revive you once you are down.
Together, BlodyStory and Unconcious make for a very nice overhaul to the death/dying aspect of the game.
Hmm. I'm still dying from bleeding out even w/ the new version. I'm in multiplayer if that makes a difference.
Thank you for adding this so quickly!
thank you so much for the compatibility patch !! unconscious and bloody story add so much immersion and intensity while playing multiplayer
Well, that was easier than expected.
This should now be somewhat-compatible with Unconscious: all bleed calculations are paused while the player is unconscious. Note that, when revived, they will continue bleeding as much as they were when they were downed.
This is a pretty basic compatibility: I've added better compatibility as yet another todo item.
rhino1998
rhino1998
Yeah, it will be. Since they would probably go well together, I'll see about patching together some compatibility.
I think this is incompatible w/ Unconscious. After dying due to bleeding out, I die again in the unconscious state. The behavior I expected was to be downed but revivable after bleeding out.
Brady_The
Probably. I want to do a big ol' rewrite first, which should make it easier to do so.
Love the concept, and will do some testing. Very much hope you'll continue working with this!
Nice!
Is there any chance this bleeding mechanic could also be applied to entities (particularly animals)?