This mod reworks hunger thirst and/or sleep with associated items to match real life needs (modifiable). Based on research and scientific articles. Don't mind the blood on the preview image!
Features
General features:
- Intuitive values that relate to real life.
- Most values an be changed in the MCM options menu.
- By default you need 2 l of water/day, 2100 kcal/day and 8 h of sleep per day. Values come from high sitting lifestyle.
- In addition to base needs you'll need more food and water depending on how much and how fast you move (walking, running, sprinting).
- Your game will be miserable with default settings (just like in real life).
- You can survive 6.25 days without water, 9.5 days without food when not moving and will pass out (for certain) after 3 days without sleep. Before max values were respectively at 28 h, 14 h and 31 h. However, if you sprint all day long you'll die after 6.9 h and 11.3 h without drink and food respectively.
- Resource caps are now higher (less wasted resources): 12.5 l of water, 20 000 kcal of food and 72 h of sleep (before they were respectively 1.1 l, 1000 kcal and 31 h). Gray indicator is now a reminder not start of penalties.
- Normal values apply only if you are otherwise healthy. Eg. if you don't sleep 8 h/day then you will use more water per day and without drinking or eating you will die from dehydration or hunger in less time. Note that everything is about in-game time. Anomaly 1.5.1 has 6x faster time than in real life.
- LTX values make more sense. Now 1 unit is 1 l of water (before was 0.336 units), 1 unit of sleep is 1 h awake (before was 3.09 h) and 1 unit of satiety is 20 000 kcal (sorry, scale is hardcoded in engine, before was 1000 kcal).
- You can walk (not run which is the default movement) with backpack full even when you are hungry, thirsty and tired. Before in some conditions you would be stuck.
- I didn't touch values that I knew nothing about (eg. drugs, medicine or smokes etc. although I did research and add some nuances). I just scaled those to the new scales.
- I didn't touch item costs. Those can be modified with game difficulty sliders anyways. And sometimes people make wrong judgements and think something is very good if it is in fact pointless in their situation (glucose).
- Non-DLTX version has associated comments with calculations and references in every file.
- I don't chase absolute realism. If I have to choose between fun and realism I choose fun.
Hunger:
- Adult outside of the Zone needs 2100 kcal per day with a sitting lifestyle but you'll need more because of exercise.
- Just being alive burns 100 kcal/h and walking, running and sprinting burn extra 170, 820 and 1670 kcal/h respectively. I didn't include energy loss from carrying weight since the game needs to be fun too.
- You will die after 9.5 days of no food even if you don't move. If you sleep more than 8 h/day you'll die later.
- You lose less calories while asleep so you can postpone death by starvation when sleeping extra. You lose 100 kcal/h while awake and standing still and 65 kcal/h while asleep.
- Maximum stamina (also referred to as max power or max strength) is 20% lower after 48 h without sleep (before it was about the same). Any sleep fully recovers max stamina.
- Milestones: gray icon = 2000 kcal, yellow icon = 6000 kcal, orange icon = 10 000 kcal, red icon = 16 000 kcal, 18 000 kcal energy deficit is the start of small amount of damage, 20 000 lost kcals = death.
- Hallucinations of fleshes when red indicator lights. Hallucinations get worse the more near you are to death.
- I modified everything that had satiety to match real world values according to its mass. Eg. mineral water doesn't give calories but chocolate gives a lot more.
- Modified cooked meats to be consistent with (vanilla) recipes and real life effects. Again everything is based on research.
- You have 3000 kcal fat reserve. Excess energy goes into that.
Thirst:
- Adult outside of the Zone needs 2 l of water per day with a sitting lifestyle (about 1.5 l without food intake) but you need more because of exercise.
- Walking increases water loss (relative to body weight) by 0.3 %/h (150 ml/h), running by 0.5 %/h (300 ml/h) and sprinting by 2 %/h (1.7 l/h). I didn't include water loss from carrying weight since the game needs to be fun too.
- You will die after 6.25 days of no water even if you don't move. If you sleep more than 8 h/day you'll die later.
- You lose less water while asleep so you can postpone death by dehydration when sleeping extra. You lose 100 ml of water per hour while awake (without exercise) and 42 ml/h while asleep.
- Now food contains water. In real life we get 25 % of needed water from food and even peanuts and chocolate have some water that our bodies absorb.
- Exponential damage function starting at red icon. The more thirsty you are the more damage you get. It becomes successively harder to stay alive.
- Milestones: gray icon = 1.5 l of water deficit, yellow icon and start of penalties = 3 l, orange icon = 5.5 l, red icon and damage start = 8 l, 10.5 l chance to pass out and if you do then chance to die, 12.5 l = death.
- Chance to hallucinate when red indicator. Chance rises at 11.5 l.
- I modified everything that had thirstiness value to match real world values according to its mass. Eg. 1 l water gives 1 l water equivalent of thirstiness reduction and 200 g of bread gives 70 ml water equivalent of thirstiness reduction.
- Took into account the diuretic effect of alcohol and caffeine.
- Diarrhea (water loss) from old meat, can of tuna and raw meats. Old meat isn't the best/cheapest thing anymore if you consider water loss. However, the character has a very strong immune system and diarrhea lasts only for a day (balance between engine coding and game fun).
- Cooking makes meat 33% lighter (water loss) and decreases satiety 1.05 times.
- You have 500 ml water reserve. Excess water goes into that but you'll pee the rest after 500 ml.
Sleep:
- You need 8 h of sleep per day.
- You will pass out after 72 h of being awake.
- Now passing out and sleeping that way actually reduces tiredness.
- Milestones: gray icon = 16 h of being awake, yellow icon and start of penalties = 20 h, orange icon = 30 h, red icon = 40 h, 48 h chance to pass out, 60 h more annoying effects, 72 h = pass out for certain.
- Chance to hallucinate when red indicator (40 h). Chance rises at 60 h.
- Added an empirical (not researched) rest function (rest effectiveness is log-norm function so rest gained is like slanted "S"). Sleep is most effective in the middle of the sleep but long sleeps are still more effective than short ones. I made it that way instead of decreasing exponent in order to prevent players from taking three 1 h naps to get their 8 h need fulfilled.
- Sleepiness has smaller impact on stamina. You are able to run when dead-tired and not carrying too much stuff.
- Tweaked energy drink, caffeine pills, Beard's tea and sleeping pills according to research findings.
- Fixed energy drink: now it removes 1 h of awake time (before it was 2x less potent than water).
- Buffed sleeping pills by 15%. Now 1 pill gives 1 h of awake time equivalent for convenience.
Stamina
- I had to tweak stamina values because of the new scale but stamina isn't based on research. I tried to leave things mostly as they were since I don't feel confident with stamina stats (too many variables in a convoluted form). I also tried not to be on the walking simulator side.
- Stamina regeneration is influenced by the 3 needs, movement style and inventory weight (overweight is extra bad). Sprinting with full backpack without drinking and eating will drain stamina quickly.
- It makes a huge difference whether your backpack is 1/3 full, half full, etc.
- You won't get stuck when almost dead due to hunger thirst and sleep (previously you would a long time before death). You will slowly gain stamina when standing still. with 75% full backpack you can sprint about 10 s or run about 15 s and recover in 40 s.
- When backpack is 75% full and all stats are half-way to the end then you can sprint about 10 s or run about 40 s and you will regain stamina in 15 s when standing still.
- When all needs are satisfied and backpack is 75% full then you can sprint about 25 s or run infinitely. If backpack is 50 % full then you can sprint for 60 s.
- Stamina might not be balanced if you use only one of the stats install. I calculated and somewhat tested only the "everything" version.
More fun facts (both in real life and in game)
Food:
- Cooking shrinks meat mass by 33%
- Considerable amount of ethanol remains with cooked food (after 30 min of cooking at least 10%).
- Cooking reduces kcals by 10% in birds and 5% in land-animals
- Cooking is good for plants because it makes them easier to digest (higher kcals) and for meat because it kills bacteria.
- Body uses about 5% of kcals to convert food into glucose therefore glucose gives about the same amount of energy as same mass of sugar.
- Primarily point of glucose injection is to get energy fast.
- Tobacco and marijuana smokers eat tiny amount more.
- Alcohol doesn't increase appetite and probably just leads to higher energy intake. However, there's no clear evidence for the latter.
Water:
- 1 ml of pure alcohol removes 10 ml of water.
- Low % alcohol (beer) actually hydrates. Sure you pee more but you still keep some extra water. Also beer has minerals in it so that improves its hydration in Stalker sense.
- With normal diet 25% of water intake comes from food.
- Food doesn't dehydrate. Your mouth may dry when you eat crackers but in your whole body nothing changes or you even gain water. Think about eating cucumbers and extrapolate to sausages.
- Diarrhea increases amount of shit (normal is 100 g) from 100 to 1500 g (excess water) depending on severity.
- You pee 1.25x more with energy drinks (400 mg of caffeine).
- Some poor lady did a painful suicide by dehydration. It took about 9 days.
- Adult has about 7% of his body mass as blood.
- 2% of blood volume loss per minute is heavy bleeding.
- Usually people die when they have lost 40-50% of their blood.
Sleep:
- 400 mg of caffeine = 1 h of extra awake time on average
- If you drink coffee in the morning about 20 % of caffeine is still in your body in the evening.
- People don't feel when they have sleep debt (they get used to it) but performance is lower.
- Alcohol consumption decreases sleep quality.
Similar mods
Those mods did similar thing with different values and goals. Check them out too!
- Tkcrits' Immersive sleep - It makes too much sleep impossible. My mod needs to overwrite Immersive sleep and patch needs to overwrite my mod.
- PossuM's FAMINE - Food Economy - it balances foods and makes game harder. Unfortunately attempts similar thing from different angle so files conflict. It would require a large joint effort to combine the features of both mods.
- PossuM's TRAUMA - Health Item Rebalance - it balances medical items. In strict sense that mod isn't compatible but the only problem is that hunger, thirst and sleep scales are different (well that and my calculations about caffeine and glucose). PossuM told me not to make a patch yet.
- Arszi's Thirst overhaul - Included in this mod and patrially taken over/modified.
- TheMrDemonized's Advanced Stamina System (ASS) - modifies stamina somewhat (apply the patch).
Conflicts
I'm willing to look into conflicts and make some patches but I need your input. I won't patch the whole Moddb on my own initiative just because maybe someone wants something someday.
- Soft conflict (no crash): everything that adds new items that have hunger, thirst or sleepiness values. They are probably using the vanilla scale so eating 2 cans of (new) chilli would drain (Vanilla behavior) approximately 2 l of water from you. Just need to multiply hunger, thirst and sleepiness with appropriate constant. By default the respective constants are 0.05, 0.11174 and 0.32323.
- Soft conflict: everything that tries to modify hunger, thirst and/or sleepiness values in item_*.ltx files and actor.ltx. Problem is with different scales and balance but why would you install my mod if you plan to overwrite it?
- Conflict: everything that tries to modify actor_status*.script (* is a wildcard character) files. In case of conflict with actor_status.script (without *) merge/overwrite my changes into the other mod.
Patches/merges/already contained
- HyperionSTG's Exact satiety, hydratation and sleepiness status. Overwrite with my mod and and apply the patch.
- Bvcx's Hunger, thirst, sleepiness bars. Overwrite with my mod and you have the functionality of both. As of v0.71+ you also need to apply my patch.
- Legapon's Patch Hunger, Thirst, Sleepiness Bars. Overwrite with my mod and you have the functionality of both.
- Tkcrits' Immersive sleep. Overwrite Immersive sleep with my mod and then apply the patch! Patch includes also Food drugs & drink animations patch for Immersive sleep.
- Artifax's Outfit Attatchment Overhaul's Github newest version 1.3 (2022.01.24): Github.com. Overwrite with my mod and apply the patch.
- Arszi's Dynamic Radiation Zones and Radiation Overhaul V2.1 thirst features are included (switch on through MCM). Bleeding and movement have been incorporated properly in v3.0.
- BudBone's Food Drug & Drink Visual Accuracy Tweaks v2. Apply the patch.
- Bazingarrey's Actor Rework V1.21 (default version's Actor Rework V1.21 version). Apply the patch. Didn't merge changes to stamina drain because that would mess up my stamina calculations.
- TheMrDemonized's Advanced Stamina System (ASS). Apply the patch)
- Bvcx's Cold System 0.6. Apply the patch.
Installation
Use mod manager or drop and merge gamedata folder to Anomaly main folder. Works with old saves but needs might be initially different (different scale). You could just satisfy your needs completely before installing but not strictly necessary.
- Choose type. Pick DLTX or non-DLTX version. DLTX version requires you to install DLTX (https://www.moddb.com/mods/stalker-anomaly/addons/dltx-differential-ltx-loading) but is compatible with mods that change other aspects of the LTX files (this version merges LTX files). Non-DLTX version is an ordinary mod, it simply overwrites the files.
- Choose sub-mod. Pick which part (hunger, thirst, sleep or everything) you want. If you don't pick the "everything" version then values are changed only for the picked characteristic (hunger, thirst or sleep) and everything else remains the same as in vanilla. Meant to be played with everything and otherwise stamina might not be balanced.
- Install. Drop the picked sub-mod's gamedata folder from into Anomaly's main folder or enable it from the Mod Organizer 2. If you don't set the priority to my mod then it's pointless to install (balance will be off if something overwrites my files).
- Install standalone addons. Drop the standalone's gamedata folder into Anomaly's main folder or enable it from the Mod Organizer 2. IMPORTANT!: if you install new items you probably can't uninstall them without starting a new game.
- Add patches. Add relevant patches depending on the mods you use.
- IMPORTANT!: when updating this mod from v2 to v3 redefine variables in MCM ("default" and then "apply"). If you don't do that then previous version values are used in the new system. Some things will break.
- Uninstall. Revert the files back to previous version or delete them to revert them back to vanilla. Or just disable the mod and patches from Mod Organizer 2. Again this might result in different needs (different scale).
How did I do it?
A month of article hunting, coding and calculating. It all began from the fact that I tried to make LTX values better understandable (1 unit = 1 l of water). Then I thought that while I'm at it I could scale the values more realistically. Then I had to recalculate everything in LTX files that touched hunger, thirst or sleepiness. That grew into higher resource caps and research and so on. Eventually the mod grew into this beast.
I also tried to make hunger more universal but after digging through engine code it became too big of a hassle. I could have done it only by intercepting all communications between LUA scripts and engine code. As of v2 some hunger features are editable through MCM. I made it possible by recalculating stamina and satiety periodically.
Possibilities for improvement
- Balance item costs? I really don't know whether I broke the generic balance or not. Definitely foods and drinks cost more per day now due to increased needs.
Final words
You can modify my changes or ideas in any way you want but if your mod bases largely on my mod then please give credit. If you find problems, bugs, conflicts or generally annoying things then write them in the comments! I haven't had much time to actually play Anomaly so it's possible some bugs slipped through my testing. Finally I did get some inspiration from mentioned mods, included Arszi's thirst features here and used some of Anomaly devs' code.
Used scientific articles
I made sure that everything is accessible with at least 1 click. Nothing is behind a paywall. In non-LTX version files have comments that have those references. It's easier to read comments from files than to read all the articles here. There's an article from which I calculated the kcals of snork hand (human meat). Go on, find it, its a dare!
Nutrition:
Water:
Rest:
Changelog
v1.0:
- First release for hunger, thirst and sleep
- Didn't touch radiation, alcohol sleepiness nor health
- Stamina isn't as good as I'd like but then again it also isn't worse than before.
v2.0
- Added MCM support with most values being editable. Input type options currently don't work in MCM so these are replaced with sliders. Russian speakers can enjoy the wonders of Google Translate.
- Less hardcoded variables and some extra variables for user comfort
- Tested only the biggest things in "everything" version
- Added a patch for Artifax's Outfit Attatchment Overhaul's Github newest version 1.3 (2022.01.24): Github.com. Apply the patch and overwrite with my mod.
- Included thirst features from Arszi's Dynamic Radiation Zones and Radiation Overhaul V2.1 in the files (by default switched off). If you want the features then switch it on from the MCM menu! You can merge the mods with DLTX (items and other features) but let my mod overwrite Arszi's!
- Added a patch for Swergdach's Artefact renovation.
v2.1
- Improved patch for HyperionSTG's Exact satiety, hydratation and sleepiness status
- Fixed MCM variables resetting on game load
v2.2
- Added Spanish translation. Spanish speakers can enjoy the wonders of Google Translate.
- Fixed some cooked foodstuffs that didn't inherit correct values
- Food kcal descriptions change with MCM multiplier for satiety
- Fixed the 3 MREs' descriptions for new kcals (for default values, the text is hardcoded and won't change with MCM multiplier)
- Added a patch for Tkcrits' Immersive sleep v1.2.1 (didn't change script logic). Overwrite Immersive sleep with my mod and then apply the patch!
- Added a patch for Fillable canteens 0.4.7 (weak diarrhea from dirty water)
- Added a patch for Arszi's Campfire roasting
- Couldn't test everything (v2.1 stays as a backup)
v2.3
- Fixed a comment typo (":" instead of ";") in LTX files. dltxify-ing the files (DLTX version) added an empty section which crashed the game.
- Changed my patch for Immersive sleep so that it includes also Food drugs & drink animations patch for Immersive sleep.
- Added a patch for BudBone's Food Drug & Drink Visual Accuracy Tweaks v2
- Added a patch for Bazingarrey's Actor Rework V1.21 (default version's Actor Rework V1.21 version). Didn't merge changes to stamina drain because that would mess up my stamina calculations.
v3.0
Just in case back up your save game before applying this mod! IMPORTANT!: you need to apply default values in MCM and tweak the settings again if you have used this mod before. I don't know how old savegames behave with mod updates but I didn't get any immediate crashes.
- Took movement into account for hunger and thirst. Base needs are lower (2100 kcal/day, 2 l water per day) but movement increases needs according to movement type (extra needs: walking - 170 kcal/h and 0.15 l/h, running - 820 kcal/h and 0.3 l/h or sprinting - 1670 kcal/h and 1.7 l/h).
- Introduced water (0.5 l) and food (3000 kcal) reserve. Eg. now you can build some fat reserves and still die when lacking 20 000 kcals. If you're fat it'll take longer to die.
- Researched bunch of stuff (satiety and sleepiness from alcohol, ethanol retention in cooking, water loss from movement, bleeding amount etc).
- There's speculation but no clear evidence for long-term energy gain from alcohol. Therefore, I divided alcohol satiety gains by 2 (except for 3rd tier meats since ethanol content is lower).
- Alcohol consumption decreases sleep quality but there aren't clear numbers. Calculated sleepiness increase to be 1 h per 75 g of ethanol (3 h from a bottle of 40% vodka).
- Previous estimate for ethanol retention with cooking wasn't far off so I didn't change LTX values.
- Heavy bleeding (hit from sniper round) drains 126 ml of water per minute. Max bleeding can be 420 ml/min (do not confuse with bandage bleeding reduction, it's a different thing).
- Changed Arszi's water loss from bleeding to be correlated with bleeding amount not game difficulty. Also added an MCM variable to tweak that value.
- Reworked hunger and thirst variables from hour-based to liter-based system (movement calculations are more transparent).
- Adjusted thirst damage function to take into account MCM value changes.
- Added optional install for new 4x bigger foodstuffs (essentially copy-paste from original foodstuffs). Those are 2 tiers more rare. You probably can't uninstall this during active save unless you are prepared to start a new game.
- Tested only very basic things. You can expect some bugs.
v3.1
- Fixed MCM values resetting on game load. Problem was that I had to read MCM variables during actor_on_first_update instead of load_state callback.
- Improved my patch for HyperionSTG's Exact satiety, hydratation and sleepiness status. Now thirst amount in item descriptions isn't hardcoded to default MCM values. Added also precise sleep amount in item descriptions.
- Removed a duplicate vodka from standalone bigger foodstuffs. If you have used the standalone before then don't update the standalone unless you want to start a new game!
v3.2
- Fixed tushonka's satiety value (2.4 times more nutritious). Mistake came from misunderstanding "corned beef" meaning in kcal calculator.
- Added a patch for TheMrDemonized's Advanced Stamina System (ASS) (update 8).
- Changed utils_ui.script into a monkeypatch which is loaded last in script load order. Patches for Ishmaeel's Nitpicker's modpack - StatsDisplay and Swergdach's Artefact renovation are now redundant.
v3.3
- Made eat_satiety magnitude (multiplier that modifies cosmetic kcals) be changed on first update and after a pause. Before it was overwritten by some mod that changed stats_table on first update.
v3.4
- Fixed a crash because stats_table wasn't initialized before monkeypatching it. Luki_Hofi helped to test and fix the bug.
v3.5
- Fixed dehydration regenerating health instead of draining it. The problem was a missing minus.
- Fixed hunger calculations acting weird on sleep. Also now there's more (but also correct) hunger drain with sleep. The problem was that I didn't update last_chk_2 on sleep and didn't account for hours slept.
- Fixed fat reserve calculations being off. The problem was that I didn't account for the satiety changes that take place in the engine.
v3.6
- Fixed satiety multiplier not changing kcals amount visually.
- Fixed patch for HyperionSTG's Exact satiety, hydratation and sleepiness status. Satiety multiplier doesn't modify its shown value anymore.
v3.7
- Updated for Anomaly v1.5.2 (status indicator fix).
- Updated patches if parent mod had updated. I advise to do a clean install for them, especially for OAO patch.
v3.8
- Fixed passing out every time you drank if you were deep in red indicator range.
- Added patch for Bvcx's Cold System 0.6.
- Added patch for Bvcx's Hunger, thirst, sleepiness bars 0.71. It's not for Legapon's "Patch Hunger, Thirst, Sleepiness Bars" (patch for that is included in the script already).
Updated to v2.1.
* I solved a potential crash with HyperionSTG's Exact satiety, hydratation and sleepiness status patch.
* I fixed MCM values resetting on game load (at least it seems it's fixed now)
Can you give me a rough estimate as to how many cans of Tushunka or Baked Beans I would need to eat in a in-game day to stay topped-up? How many sips from the canteen to stay topped up?
Basically, I want hunting and cooking to be important part of the game, and I want supplies to be scarce, food to be expensive. but I don't want to constantly have to eat and drink every few minutes. By increasing calories to 4000 per day, I am wondering if this would make it to where I have to constantly eat and drink way more than normal, cause that would be a deal breaker for me.
v2 introduced configurable settings with mod configuration menu (make sure you have updated the mod). So a short answer would be: however many you want.
Tushonka gives 247 kcal and beans give 195 kcal (calculated from its mass in LTX item file). 4000 kcals/day and food satiety together are hardcoded because of engine limitations and realistic mass-satiety values in LTX files. Therefore, in a day you would need to eat 17 tushonkas or 21 beans.
It's a lot yes, that's why you can adjust "max days without food" and "multiplier for satiety from food and drink" in the MCM menu. Max days makes satiety drain at a different speed so max days of 10 (default is 5) would require 2000 kcal/day. Multiplier multiplies food kcals with that value. Multiplier of 10 means tushonka gives 2470 kcals. I forgot to update the item descriptions with this multiplier (will do in a next mod update) but that's only cosmetic so math behind satiety should still give 10x more.
Sip of water from the flask gives 333 ml of H2O equivalent thirst reduction. Since default liters per day is 6 l then you'd need 18 sips from 6 full flasks in a day. Again you can change max days and multiplier but since thirst and sleep came from LUA script not the engine then you can also adjust how many liters of water per day you need.
The reason I didn't balance LTX values is that it defeats my primary purpose of having intuitive (real-life) values. Ideally I'd want to make (or that someone made) copy-paste new items that are simply heavier, cost more and give more satiety/hydration/sleep.
Thanks for your reply. I do not have MCM yet, I use JSGME. I am worried about messing with swapping to MCM right now because I don't want to mess anything up with my current playthrough.
Well it sounds like I can edit some of the values to make it suit a playstyle that I prefer, so that might actually be viable. I'll give it a go when I start using MCM.
By the way MCM is Mod Cofiguration Menu (a mod) not Mod Organizer 2 (a mod organizer like JSGME).
after i remove this mod (dltx) from mo ,when i use modern ui and this: Moddb.com , i get this crash :
! [LUA] ...lker anomaly/bin/..\gamedata\scripts\ui_inventory.script:1777: attempt to call field 'get_last_drink' (a nil value)
! [SCRIPT ERROR]: ...lker anomaly/bin/..\gamedata\scripts\ui_inventory.script:1777: attempt to call field 'get_last_drink' (a nil value)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: ...lker anomaly/bin/..\gamedata\scripts\ui_inventory.script:1777: attempt to call field 'get_last_drink' (a nil value)
stack trace:
Problem isn't related to my mod.
The problem is that "HungerThirstSleepUI ModernUI Patch" requires 2 mods (it doesn't contain the mods but simply patches one file that the mods share). You installed only Modern UI and not the other. The patch tries to call for a function that doesn't exist since the function is added with the other mod. My mod contains those functions and that's why you didn't get the crash with incorrect installation while also having my mod.
Solution: also install "Hunger, thirst, sleepiness bars".
thank you!
The plugin is excellent, but could you add a Spanish translation please, I'm good at reading English, but when using the game in Spanish the options in the MAC menu appear as commands that are difficult to read and configure.
Sure. I hadn't even thought about other languages besides eng and rus. What's the language folder name in gamedata/configs/text/ (eg. english is "eng")?
You managed to post the same thing 3 times. I deleted the rest.
the folder is "spa", sorry for the spam sometimes my cell phone betrays me and does not show me that the comment has already been sent, I will be very grateful for the translation :^)
Spanish is included in v2.2. If Google Translate is horrible then you can just copy-paste the ui_Banjaji.xml file from eng to spa and you'll have English text in the game.
Can you add kcal slider in hunger section? We can choose how much water to intake, but we can't choose how many calories per day we need.
Unfortunately no. Since hunger is hardcoded in the engine I can only do so much. I did already add the code that intercepts satiety calculations by giving more or less kcals from food and which modifies satiety drain speed (both are options in MCM). However, I didn't think of a way to modify daily intake amount so 4000 kcals/day with original satiety vs food weight is currently hardcoded.
Well actually in a way you can already modify daily intake by changing food satiety and how long it takes until max hunger. The only point is that then you get different amount of kcals per kg of food. Don't be afraid to change it if it's fun for you!
Not sure if this was on purpose or not, but in the DLTX version some items like Pseudodog chops (stewed) have 4760 kcal, which seems to be caused by the fact it uses the vanilla satiety value. It seems that at least two items are missing the corrected satiety value.
And some values for things like Metal bottle or Russian chocolate seem oddly large compared to the rest of the items, but that might be a deliberate design choice.
Thanks! I didn't know that mods don't work with inheritance (inherited values aren't updated). I'll modify the LTX files in the next mod update.
Chocolate just is that energy dense even in real life. The logic behing metal bottle is that it's distilled vodka (80%). It isn't directly written but it seems strong and bad to drink. Therefore, metal bottle has twice the calorie content (per kg) compared to other vodkas (40%). Stolichnaya is just a bigger container so one sip gives more.
Problem is fixed in v2.2.
DLTX only replaces and/or adds the lines you explicitly state to change, and every type of mutant meal has three separate items with separate stats. So if you want to change the stats of all Dog chops, you need to change the values in all three items separately. :)
EDIT: Oh yeah, same goes for LTX replacement, all DLTX does is it replaces specific parts of the file instead of the entire file, which helps with avoiding conflicts.
Hey. i have some tweak for you.
standard medkit should stop bleeding a little instead of cure radiation. (well, what kind of medkit didnt have bandage) i think it more balance and make more sense this way.
so i swap the line and give bleeding restore value 0.003
i take the value from Arszis Radiation Overhaul.
I agree with you but this isn't the thing for this mod. I have decided against touching health and radiation values since in my opinion they can't have realistic values while leaving the game fun.
I might research and add realism on the alcohol part (besides diuretic effect which is already implemented) in the future.
would love to see that mod in efp
Updated to v2.2.
The update contains some bugfixes and new patches. Also added spanish language due to a request. I couldn't properly test the new version so 2.1 stays as a backup.
Eh...
Is this addon compatible with Grok's BHS and FDDA's Immersive Sleep Patch?
It's compatible with Grok's BHS. FDDA's Immersive Sleep Patch changes 3 lines relative to my patch for Immersive Sleep. I'll add it in the next update (might take awhile) but you'll need to use my patch for Immersive sleep. In my patch add:
disable_info("sleep_active")
so that it's on the lines 119 and 134 (after adding). Also move:
give_info("sleep_active")
that's now on line 430 so that it is before sleep(). In other words the code (starting from line 428) should look:
if utils_obj.npc_in_zone(db.actor, v) then
give_info("sleep_active")
sleep()
break
end
FDDA's Immersive Sleep Patch is included in my patch for Immersive Sleep in v2.3.
Thank you, dude.
Greetings I had this error when trying to mount the plugin, I'm not sure what the cause is, I have too many plugins, could you help me detect the problem?
FATAL ERROR
[error]Expression : S && strlen(S)
[error]Function : CInifile::r_section
[error]File : Xr_ini.cpp
[error]Line : 894
[error]Description : assertion failed
stack trace:
I have no idea since the error comes from the engine. You could maybe find the culprit by checking the Anomaly logs (Anomaly_folder\appdata\logs\xray_username.log). Usually if there's a problem with a script there's something like:
! [LUA] SCRIPT SYNTAX ERROR
! [LUA] ...alker anomaly\gamedata\scripts\actor_status_sleep.script:61: unexpected symbol near '1'
! [SCRIPT ERROR]: ...alker anomaly\gamedata\scripts\actor_status_sleep.script:61: unexpected symbol near '1'
! [ERROR] --- Failed to load script actor_status_sleep
So in this example I did the calculation 1 / 0 in actor_status_sleep.script on the line 61. "Failed to load script" indicates that one script is out of the line and others that depend on it might throw errors.
In this example last relevant lines in the log are:
! [SCRIPT ERROR]: ...talker anomaly\gamedata\scripts\game_difficulties.script:194: attempt to index global 'actor_status_sleep' (a nil value)
FATAL ERROR
This means that the game crashed since line 194 in game_difficulties.script tried to access actor_status_sleep.script which wasn't loaded as seen before. Hope this helps.
Problem is fixed in v2.3. The problem was a typo in LTX files so that DLTX dltxify-d the files so that there was an empty section at the beginning.
Hmm. i found something interesting after played with 2.1
if you enable Arszi's thirst mechanic in MCM. you should set water needed per day to 4.
reason. if 4 liters of water is normal requirement per day and + 2 liters with high exercise/combat regime.
that extra 2 liters needed should come from Arszi's thirst mechanic. (water loss from sprinting and blood loss)
like, if we spend the day jocking around and dont do anything much. we should not need that extra 2 liters since we dont exercise much.
but if we sprinting around all day and loss bodily fluids via blood loss from combat. (high exercise/combat regime.) this extra water needed will combine with normal 4 liters requirement per day. and will make water intake per day more dynamic , natural and balance the more you active, the more water you need to drink.
I agree. Right now it's just a quick patch since it took same amount of work to include Arszi's thirst mechanics than to make a separate patch for it.
I have a plan to properly take into account the movement speed in the main mod. That way the (default) base requirements would be 2500 kcals/day and 3 l/day of water if you just stand in place for a day. Those needs would go up depending on whether you walk, run or sprint.
Version 2.2 crash my game :/
* loading script _G.script
FATAL ERROR
[error]Expression : S && strlen(S)
[error]Function : CInifile::r_section
[error]File : Xr_ini.cpp
[error]Line : 894
[error]Description : assertion failed
stack trace:
I know why it error you forgot to remove
[]
=
in mod_system_Banjajis_needs_everything.ltx
Hmm.. Yes thank you! It seems that DLTX dltxify-d the "everything" and "sleep" versions that way. At a glance I can't find a reason for it. I'll try to find the culprit. Anyway I approve deleting those 2 lines and will update the mod in a few days.
Problem is fixed in v2.3. The problem was a typo in LTX files (":" instead of ";"). Anomaly engine ignored that typo but DLTX didn't.
Oh wow thanks for the fix!
i'd happily translate it to german if you tell me how I can do it or send me the lines that need to be translated cause I got the whole game in german. Would be a blast.
I could batch run the whole thing through Google Translate if you tell me what is the German folder name (eg. English is "eng").
Otherwise if you want to help with a proper translation then gamedata/configs/text/eng/ui_Banjaji.xml contains the original text. Basically everything that is between "<text>" and "</text>" gets written by the game. The only exception is the formatting stings that are used in MREs' text (bulletpoints that appear in the description). You can look at what's the difference in the file between eng and rus folder. In case you want to help then register a user here so I can credit you!
Updated to v2.3. Update contains a bugfix for DLTX users and a few patches.
Hey man. if I want my character to eat more often per day. how do I set it? decrease max day without food or sumting?
Precisely. In v2.3 the only way to change the rate at which you need to eat are lowering "Max days without food" or lowering "Multiplier for satiety from food and drink". The first simply increases/decreases satiety drain (you'll need more filling food per day) and the second gives more/less satiety from any food/drink (you'll need larger amount of food per day).
However, if it's your first try at this mod then know that actually the food intake is rather high (4000 kcal/day). Since max hunger is also high then it might be that you simply haven't gotten to gray indicator range yet.
Also in v3.0 (uploaded a moment ago) I reworked variables from hour-based to kcal-based system so you'll need to tweak the settings again. In v3.0 you have 5 variables that you can tweak. "Base amount of kcals needed per day" sets the min amount you need regardless of activities. "Extra kcal loss while walking (kcal/h)" (same for "running" and "sprinting") sets the amount of extra energy lost from movement (base + extra). Finally, "Multiplier for satiety from food and drink" is the same as before.
Updated to v3.0.
IMPORTANT!: you need to apply default values in MCM and tweak the settings again if you have used this mod before. I don't know how old savegames behave with mod updates but I didn't get any immediate crashes. Just in case back up your save game before applying this mod!
This update reworks hunger and thirst since I added extra needs depending on movement type (standing, walking, running, sprinting). Also hunger and thirst have a small reserve so even less resources get wasted. I also researched new stuff and included Arszi's water loss from bleeding (with a small modification) in the main mod.
I also added an optional standalone addon which has copy-paste of foods and drinks but they are 4x bigger and 2 tiers more rare. Note that since it adds new items you probably can't uninstall the standalone from an existing savegame (probably would crash). In that case you'd need to start a new game or keep playing with the new items.
Finally this version is also only very-very little tested so expect some bugs (I didn't get any immediate crashes). This is becoming a tradition (the mod has gotten really big). If you do find some bugs then please write them here!
Hey man love your work, great research you did for this mod. With the newest version, I have the issue however, that some foods like Chili and Purified Chimera Meat has really high satiety values, chilies have 5800 and chimera has 12000kcal: I have the DLTX everything version and no other mod installed, that affects hunger/thirst/sleep. I did reset my MCM values. Any ideas on how to fix it?
I can't find an error in LTX files. Chili should be 240 kcal and (1st tier cooked) chimera meat should be 593 kcal. Also I tried the same version you use (v3.0 DLTX "everything") and kcals were normal.
I suspect that some other mod actually has a conflict. For example since you use DLTX then if another mod changes chili's satiety value and the other mod has a higher priority then the satiety would be drastically different. Basically the higher my mod is on the priority list (loaded later) the better. You can test for conflicts by temporarily switching off all other mods besides MCM and my mod and then looking at the values. With MO2 it's simple but otherwise temporarily rename your "gamedata" folder and install MCM and my mod into the new "gamedata" folder. You can easily look at the values by enabling the debug mode, loading the testing area from the main menu with "f2" (faster than a new game), then pressing "f7" and "1" to bring up item spawner.
Otherwise if it's not a conflict then could you try resetting the MCM values again? You have to press "default" and then also "apply" when "Banjaji's needs" tab is open. If it's not a conflict (even a sneaky one that doesn't have same name files conflicting) and not incorrect MCM values then I have no idea what to do.
Really like the addon, especially with 3.0. I noticed a weired behaviour with the mcm though, from load to load, the multiplier set to food satiey in practice gets reset to 1 while in mcm its still modified, running the DLTX version.
On the other hand, from what I experienced, the core issue with gameplay experience concerns the ingame time ratio,which is 1:6, breaking the economy and gaming experience completely with the default values. Simply not enough time for everything.
From what I think, a better solution than adding bigger food item would be making the default item bigger and heavier, avoid injecting new items to merchants and loot tables, which can lead to a lot of patches to mods that affect them.
The amount of time spent on consuming animation, in my opinion, should be closer to vanilla. Player eat 2 to 5 food items and drink 3 to 6 times, at most. Normal food is simple, just bigger and heavier package, price adjustments accordingly, but I think it should take into account how much ruble for a day. As for cooking, I can imgine a more realistic approach. For example you can study the realistic amount of meat human can harvest from a real boar, or what's doable with a hunting knife, do the calculation, give the item multiple uses if needed, then if turned into a stew, include the water used and less lose of kcal, you know, the oil gets trapped with the water. I think the cooking aspect of the game has much potential to be fun and useful, seriously, there is not even an actual potato ingame, except in vodka form. Of all the staple stuff humanity been eating, only bread exists ingame, and short supplied with just a loaf or two.
Sadly I know nothing about coding, I don't even know if it's doable. But here's hoping for the best.
I can confirm that the food/drink multiplier gets reset on game load. Will look into it but I think the problem lies with load_state function in actor_status_hunger_Banjaji.script. I added new variables in this update but I don't know how game load works behind the scenes. As a quick fix you can try deleting everything besides "on_option_change()" in that function (only noticable difference is that fat reserve is 0 at every game load).
I know that the game balance is broken with default values but I still want to keep the default values as they are right now just to keep the "realism" part (a core value of this mod). Maybe I'll look into making preset settings for MCM. That way default preset settings would be more balanced but there'd still be a realistic preset. That's assuming presets can be made for MCM.
I don't really want to change vanilla items because that will lead to gameplay conflicts with other mods that also modify those items. Lets say I scale everything 4x larger so that the item in question is 4x heavier, cost 4x more, fills stomach 4x more etc. But now when eg. a mod changes radiation value for the vanilla item then the other mod assumes the item to be 4x lighter and cost 4x less and will set the radiation value 4x too low for the actual item size. In that way we can't have simultaneous balance for both mods.
As for the standalone addon that has 4x bigger items, would it be better if I deleted all properties besides hunger, thirst and sleepiness from the items? That way in theory no other mod should have business with the new items (well except for price-changing mods).
The amount of food needed can be tweaked by for example "satiety from food/dring" setting in MCM. That way you get more kcals out of 1 kg but eating animation time is lower.
You mentioned economy and that I should take the cost of buying food for a day into account. If you have suggestions or comments about item prices then they are welcome. I've modded so much that I still haven't been able to properly play (and therefore test) my mod.
Hunting gains are big enough topic to be a mod of its own. That's out of the scope of this mod. Although I can say that I modified cooked meats so that they have realistic values for the input components. That means meat loses only 5% (that's only a tiny amount) of its satiety when cooking and if a recipe uses 2 chunks of meat then the result is 2x more filling. As for a potato there is at least one mod ( Moddb.com ) that adds a variety of new foods to the game but making a patch for it would be a nightmare due to tons of manual calculations.
Don't worry about not knowing about the inner workings of the game! I appreciate any feedback even if it's just concepts and ideas.
THX for the quick reply. I tried remove everything in function load_state(m_data) leaving on_option_change() alone, but the reset persists somehow.
Regarding vanilla items, I thought adding items would lead to patches for addons like b&s and trader overhaul, which can take much work to produce a patch than an addon that balance radiation for food. But perhaps dltx has made things super ez? Pardon my lack of knowledge on how items are added into the game to reach the player.
The balance issue revolves around the timescale of the game, which is 1:6, 10 min equals an ingame hour. With the default value, player have to eat 2 bread loaf and take one sip of canteen for 10 mins IRL of running on top of natural exhaust. I don't think this is really enjoyable nor very procurable ingame.
I believe realism, gameplay experience and balance can be unified here. The result of vanilla setting can be used as a reference.I guess its 1k kcal and 1 liter of water a day? Thats about 2.5 bread loaf and 3 sip of a canteen. Provide food item that is large enough to fill a day's need in 2 to 5 unit, canteen really is fine, make it go in one gulp instead of 3 sips can already make life much better.
This might make game easier than default value, cause enemy drop more kcal, but surely its more realistic, everyone needs to eat, no? How many boar must a chimera eat a day if each only grant 400 kcal of meat? Helps the immersion I say.
Economy balance wise, with famine, the base cost is about 5k rubles in total on paper, scaling with progression difficulty, sidorovich can sell a bloody can of beans at 4k rubles filling 200 kcal on survivalist, heart breaking, really, the jellyfish I picked up from tutorial sells about the same price of a can of beans. 3k to 5k in total on paper feels about right to me, as it scales automatically with progression difficulty. At the same time individual prices should be more consistant with kcal and water they provide. Different types of food could be balanced with their weight per unit, like dried meat, less weight for a unit since it's dried, but offer little to no water, tincans heavier but packed with more water.
I checked the mod you mentioned, it's not really what I thought of. What I think is lacking in game is something more basic, noodles, pasta, potatoes, things that are dense, easy to store and transport, but require a bit of cooking to eat. The zone is in locked down after all, neither the army nor smuggler would bring in all sorts of colorful pretty snacks right?
Resting and take pleasure playing is just as important, if not more so, as modding. Ultimately, the mod is for everyone, including yourself to better enjoy the game. Reflection helps with the most direct feedback as well as keeping up motivation. All the best wishes, and thank you wholeheartedly for your hard work.
I have an update on the bug. It seems to be caused by code being executed in the wrong order. It seems I have to read MCM variables during on_option_change and actor_on_first_update instead of load_state callbacks. I have no idea why the code worked and bug didn't show before.
Tweaking and applying new MCM settings will result in correct values and descriptions show correct values. While I'm debugging/updating the code you can change one variable, apply, then change the variable back and apply changes in MCM to bypass the bug.
Understood, thx for looking into it.
The MCM resetting bug is fixed in v3.1.