Neurok_ Posted March 7, 2017 Report Share Posted March 7, 2017 Hello, I am looking for a how to on fixing the thirst and hunger decrement as of now it is going down pretty quick. trying to slow it down a tad. Link to comment Share on other sites More sharing options...
0 Neurok_ Posted March 7, 2017 Author Report Share Posted March 7, 2017 Also getting this error now ErrorMessage: File z\addons\dayz_code\Configs\CfgVehicles\Animal.hpp, line 0: /CfgVehicles.Animal: Member already defined. Link to comment Share on other sites More sharing options...
0 icomrade Posted March 7, 2017 Report Share Posted March 7, 2017 Look for DZE nutrition divisor variable in configvariables.sqf, the comment should explain its function Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 9, 2017 Report Share Posted March 9, 2017 It seems that whenever you use a hatchet, for tree cutting or zombie cutting, the food and water use increases exponentially, no matter what you set the variable to. I think it even continues until you switch weapons, so it seems to have an effect just being equipped. This is on a new, fresh 1.0.6.1 server. Link to comment Share on other sites More sharing options...
0 icomrade Posted March 9, 2017 Report Share Posted March 9, 2017 there's actually an error which results in food and drink being used too fast. You can actually fix this yourself in your mission's init.sqf by placing this following block of code, immediately below the Line: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; dayz_NutritionSystem = { private ["_type","_baseRegen","_nutrition","_calorieCount","_hungerCount","_thirstCount","_tempCount","_Thirst","_Hunger","_bloodregen","_golbalNutrition"]; _type = _this select 0; _baseRegen = _this select 1; _nutrition = _this select 2; _calorieCount = ((_this select 2) select 0); _hungerCount = ((_this select 2) select 1); _thirstCount = ((_this select 2) select 2); _tempCount = ((_this select 2) select 3); if (_calorieCount > 0) then { _hungerCount = _hungerCount + (SleepFood * (((ln ((_calorieCount / 3610) * 100)) * (1 - (dayz_hunger / SleepFood))) / 100)); _thirstCount = _thirstCount + (SleepWater * (((ln ((_calorieCount / 3610) * 100)) * (1 - (dayz_thirst / SleepWater))) / 100)); }; switch (_type) do { case "FoodDrink": { if (_hungerCount > 0) then { if (dayz_hunger > _hungerCount) then { dayz_hunger = dayz_hunger - (_hungerCount); } else { dayz_hunger = 0; }; }; if (_thirstCount > 0) then { if (dayz_thirst > _thirstCount) then { dayz_thirst = dayz_thirst - _thirstCount; } else { dayz_thirst = 0; }; }; if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + _tempCount; }; if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition + _calorieCount; }; if (_baseRegen > 0) then { r_player_bloodregen = r_player_bloodregen + _baseRegen; }; }; case "Working": { if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - (_calorieCount / ((DZE_NutritionDivisor select 0) max 0.1)); }; if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + (_thirstCount / ((DZE_NutritionDivisor select 1) max 0.1)); }; if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + (_hungerCount / ((DZE_NutritionDivisor select 2) max 0.1)); }; if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + (_tempCount / ((DZE_NutritionDivisor select 3) max 0.1)); }; }; }; dayz_thirst = (dayz_thirst min SleepWater) max 0; dayz_hunger = (dayz_hunger min SleepFood) max 0; dayz_temperatur = (dayz_temperatur min dayz_temperaturmax) max dayz_temperaturmin; }; Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 9, 2017 Report Share Posted March 9, 2017 Thank you! Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 9, 2017 Report Share Posted March 9, 2017 Do you use this in conjunction with DZE_NutritionDivisor = [1, 1, 1, 1]; or does it replace it? Link to comment Share on other sites More sharing options...
0 salival Posted March 9, 2017 Report Share Posted March 9, 2017 It still uses that Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 9, 2017 Report Share Posted March 9, 2017 ok, Thanks guys. Link to comment Share on other sites More sharing options...
0 lwbuk Posted March 9, 2017 Report Share Posted March 9, 2017 Can you put that in a custom compiles thats called after the server one like so? Spoiler if (isServer) then { diag_log "Loading custom server compiles"; }; if (!isDedicated) then { diag_log "Loading custom client compiles"; fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf"; dayz_NutritionSystem = { private ["_type","_baseRegen","_nutrition","_calorieCount","_hungerCount","_thirstCount","_tempCount","_Thirst","_Hunger","_bloodregen","_golbalNutrition"]; _type = _this select 0; _baseRegen = _this select 1; _nutrition = _this select 2; _calorieCount = ((_this select 2) select 0); _hungerCount = ((_this select 2) select 1); _thirstCount = ((_this select 2) select 2); _tempCount = ((_this select 2) select 3); if (_calorieCount > 0) then { _hungerCount = _hungerCount + (SleepFood * (((ln ((_calorieCount / 3610) * 100)) * (1 - (dayz_hunger / SleepFood))) / 100)); _thirstCount = _thirstCount + (SleepWater * (((ln ((_calorieCount / 3610) * 100)) * (1 - (dayz_thirst / SleepWater))) / 100)); }; switch (_type) do { case "FoodDrink": { if (_hungerCount > 0) then { if (dayz_hunger > _hungerCount) then { dayz_hunger = dayz_hunger - (_hungerCount); } else { dayz_hunger = 0; }; }; if (_thirstCount > 0) then { if (dayz_thirst > _thirstCount) then { dayz_thirst = dayz_thirst - _thirstCount; } else { dayz_thirst = 0; }; }; if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + _tempCount; }; if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition + _calorieCount; }; if (_baseRegen > 0) then { r_player_bloodregen = r_player_bloodregen + _baseRegen; }; }; case "Working": { if (_calorieCount > 0) then { dayz_nutrition = dayz_nutrition - (_calorieCount / ((DZE_NutritionDivisor select 0) max 0.1)); }; if (_thirstCount > 0) then { dayz_thirst = dayz_thirst + (_thirstCount / ((DZE_NutritionDivisor select 1) max 0.1)); }; if (_hungerCount > 0) then { dayz_hunger = dayz_hunger + (_hungerCount / ((DZE_NutritionDivisor select 2) max 0.1)); }; if (_tempCount > 0) then { dayz_temperatur = dayz_temperatur + (_tempCount / ((DZE_NutritionDivisor select 3) max 0.1)); }; }; }; dayz_thirst = (dayz_thirst min SleepWater) max 0; dayz_hunger = (dayz_hunger min SleepFood) max 0; dayz_temperatur = (dayz_temperatur min dayz_temperaturmax) max dayz_temperaturmin; }; }; salival 1 Link to comment Share on other sites More sharing options...
0 salival Posted March 9, 2017 Report Share Posted March 9, 2017 Yes, that's exactly how I'm doing it Link to comment Share on other sites More sharing options...
0 lwbuk Posted March 9, 2017 Report Share Posted March 9, 2017 I got something right... finally salival 1 Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 10, 2017 Report Share Posted March 10, 2017 I added the code to my init file just like you said and while it does help with consumption during regular activity, I am still using up all of it whenever i perform an action like using a sledgehammer or working on cars. I am always working on cars and I look up and am almost dead. I have this code DZE_NutritionDivisor = [.1, .1, .1, .1]; placed in the config variables section of the init file, is that where it goes? Link to comment Share on other sites More sharing options...
0 salival Posted March 10, 2017 Report Share Posted March 10, 2017 It's a divisor so that means how you have it will use the most. Set all of them at 1 then work up, i.e 2 etc till you get it right. Link to comment Share on other sites More sharing options...
0 icomrade Posted March 10, 2017 Report Share Posted March 10, 2017 to add to @salival, a divisor is the bottom of the fraction. remember that if we have a fraction over a fraction i.e. 1/(1/10) we multiple by the reciprocal of the denominator i.e. 1/(1/10) is the same as 1 x 10 Link to comment Share on other sites More sharing options...
0 Birgitte Posted March 10, 2017 Report Share Posted March 10, 2017 Thanks guys. I was confused as the explanation stated that .1 was the lowest, now I see that meant the lowest increment, not the lowest useage. As always, you rock! Link to comment Share on other sites More sharing options...
Question
Neurok_
Hello, I am looking for a how to on fixing the thirst and hunger decrement as of now it is going down pretty quick. trying to slow it down a tad.
Link to comment
Share on other sites
15 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now