Jump to content

[UPDATE July2017]-[RELEASE]DP Real Health System v0.6


DirtySanchez

Recommended Posts

10 to 15 to establish per restart is very extreme,  my tests resulted in only a few drinks and 1 or 2 foods.

Im not sure but do you have two different scripts running that utilize debug stats for realism? 

I know there is another script for just hunger and thirst by any chance are you running that one as well?

Link to comment
Share on other sites

Yeah, it is definitely very extreme lol. I don't think I have anything else that would effect it. Haven't added any other mods like that. Really all we have installed are attach explosives, earplugs, status bar, and an AI missions mod.

Do you know what it might say that I could look for? To check other files I have to see if any adjustments to the thirst rate are in there. Tried to google it, but came up empty.

Also running infiSTAR if that effects it?

Edited by blue00
Link to comment
Share on other sites

  • 1 year later...
16 hours ago, lesvieuxcrevards said:

Hi, Anyone know if this script working with Epoch 0.5 ?

Another question : does differents status have impact on health of player ? Or it's just visual tag ?

Regards.

Can confirm, it works very well on my little server a3 1.70 and epoch 0.5

Visual tag, No Just a systemchat message local to the player to inform them.

NOTE: edited heavily from the original posted scripts

I did try adding EPOCH_playerTemp to increase EPOCH_playerBloodP but it didn't end well....lol

my settings are harsh

here's what I use,

DP_Real_Health.sqf

Spoiler

/*
	DonkeyPunch Epoch Realism Script Alpha
	DP_Real_Health.sqf
	By =RAV=MusTanG
	For DonkeyPunch EpochMod Servers
*/
dpReal_Health = {
	_hunger = EPOCH_playerHunger;
	_thirst = EPOCH_playerThirst;
	_wet = EPOCH_playerWet;
	_soiled = EPOCH_playerSoiled;
	_immune = EPOCH_playerImmunity;
	_tox = EPOCH_playerToxicity;
	_bloodP = EPOCH_playerBloodP;
	_ptemp = EPOCH_playerTemp;
	_stamina = EPOCH_playerStamina;
	_pdamage = damage player;
	
	if(_hunger < 450) then
	{
		_damage = _pdamage + 0.005;
		systemchat("YOU ARE HUNGRY! EAT SOMETHING SOON");
		player setDamage _damage;
		sleep 25;
		_ate = EPOCH_playerHunger;
		if(_ate < 450) then {call dpReal_Health;};
	};
	
	if(_thirst < 200) then
	{
		_damage = _pdamage + 0.002;
		systemchat("YOU ARE THIRSTY! DRINK SOMETHING SOON!");
		player setDamage _damage;
		sleep 25;
		_drank = EPOCH_playerThirst;
		if(_drank < 200) then {call dpReal_Health;};
	};
	
	if(_wet > 90) then
	{
		EPOCH_playerTemp = EPOCH_playerTemp + 0.2;
		systemchat("YOU ARE SOAKED! GET DRY OR YOU COULD GET SICK");
		sleep 45;		
		if(_wet > 90) then {call dpReal_Health;};
	};
	
	if(_soiled > 20) then 
	{
		_toxic = EPOCH_playerToxicity + 0.4;
		systemchat("YOU ARE FILTHY! USE A TOWELETTE OR YOU WILL BECOME TOXIC");
		EPOCH_playerToxicity = _toxic;
		sleep 30;
		if(_soiled > 21) then {call dpReal_Health;};
	};
	
	if(_tox > 35) then 
	{
		_immunity = EPOCH_playerImmunity - 1;
		systemchat("YOU ARE TOXIC! CONSUME GOLDENSEAL ROOT OR YOU WILL GET VERY SICK");
		EPOCH_playerImmunity = _immunity;
		sleep 30;
		if(_tox > 35) then {call dpReal_Health;};
	};
	
	if(_immune < -50)then
	{
		EPOCH_playerTemp = EPOCH_playerTemp + 0.5;
		Epoch_playerToxicity=Epoch_playerToxicity+2;
		EPOCH_playerStamina=EPOCH_playerStamina-5;
		_damage = _pdamage + 0.15;
		player setDamage _damage;
		systemchat("IMMUNE DEFICIENCY! YOU ARE DYING, YOU ARE SO FUCKED ");
		sleep 30;
		if(_immune < -50)then{call dpReal_Health;};
	};
	
	if(_bloodP > 110) then 
	{
		systemchat("YOU ARE FUCKED UP! CONSUME POPPIES OR YOU WILL QUICKLY DIE");
		EPOCH_playerStamina = EPOCH_playerStamina -50;
		EPOCH_playerTemp = EPOCH_playerTemp + 0.5;
		_damage = _pdamage + 0.35;
		player setDamage _damage;
		sleep 30;
		if(_bloodP > 110) then {call dpReal_Health;};
	};	
};

DP_Real_Health_check.sqf

Spoiler


/*
	DonkeyPunch Epoch Realism Script Alpha
	DP_Real_Health_Checks.sqf
	By =RAV=MusTanG
	For DonkeyPunch EpochMod Servers
*/ 
while {true} do { 
	_wet = EPOCH_playerWet;
	_hunger = EPOCH_playerHunger;
	_thirst = EPOCH_playerThirst;
	_soiled = EPOCH_playerSoiled;
	_tox = EPOCH_playerToxicity;
	_bloodP = EPOCH_playerBloodP;
	_immune = EPOCH_playerImmunity;
	
	if(_hunger < 450)then{call dpReal_Health;}else{EPOCH_playerHunger+EPOCH_playerHunger-5;};
	if(_thirst < 200)then{call dpReal_Health;}else{EPOCH_playerThirst=EPOCH_playerThirst-2;};
	if(_wet > 100)then{call dpReal_Health;};
	if(_soiled > 21)then{call dpReal_Health;};
	if(_tox > 35)then{call dpReal_Health;};
	if(_bloodP > 100)then{call dpReal_Health;};
	if(_immune < -50)then{call dpReal_Health;};
	sleep 60;
};

 

 

 

cheers

natoed

Link to comment
Share on other sites

  • 2 weeks later...
3 hours ago, DirtySanchez said:

Cheers on the continued usage of this script guys WOW.

Was there something you wanted upgraded for this @natoed

I would be more than willing to help / upgrade it.

Hi DirtySanchez

Yes please kind Sir, if we/you could adding EPOCH_playerTemp to increase EPOCH_playerBloodP

I did this some time ago, I noted that players temp didn't increase at all but all I can remember sry (still so so much I don't know)

If some sort of Visual cue could be added for each effect or tried in with epoch's visual cue's would even better, as i did slow the system-chat messages due to the spamming

ideally (if possible) Some Positive effects for being a healthy well feed and watered player

heals player a very small amount, increase in immunity and or stamina

what do you think!

 

cheers

natoed

 

 

 

Link to comment
Share on other sites

@natoed

I had some spare time tonight and did a work over of the whole thing.
Most of the work was adding settings for the msg's, hunger/thrist drops and the rest of the variable changes.
I also added in a message type toggle and handler.
You will be able to use systemChat, titleText or hints.

I also added in a change for BloodPressure on High Temp for ya as requested.
If you would like to test it out let me know

Link to comment
Share on other sites

@natoed

Hey bud, 

After some hours of testing today many changes went into this script.
Everything is working without need to modify.
Settings file has been added for editing warning messages and value changes.
Warning messaging handler added to allow option for systemChat, titleText or hints.
Fixed some issues that have persisted since 0.4 with value changes in the wrong direction.
Tweaked some of the changes and how the script loads up and runs.
v0.6 is live on the github now

ENJOY
-sTanG

Link to comment
Share on other sites

Hey DirtySanchez

thx and it does work but was just throwing an error in the server rpt file.

16:29:10 Error in expression <"VirtualMan_EPOCH") && (diag_tickTime > DPRH_CurrentLoopTime))then
{
_time = dia>
16:29:10   Error position: <DPRH_CurrentLoopTime))then
{
_time = dia>
16:29:10   Error Undefined variable in expression: dprh_currentlooptime
16:29:10 File mpmissions\__cur_mp.Altis\2dmin\addons\DPRealHealth\DP_Real_Health_check.sqf, line 9

server rpt's

https://pastebin.com/VJZMpGui

https://pastebin.com/5uiP4AZ3

So i moved whats in the onPlayerRespawn.sqf in to the initPlayerLocal.sqf and the error is now gone with everything works great 

if (!isDedicated and hasInterface) then 
{
	waitUntil {alive vehicle player};	
	waitUntil {typeOF player != "VirtualMan_EPOCH"};

	[] execVM "2dmin\addons\DPRealHealth\DP_Real_Health_check.sqf";			//	Thx =RAV=MusTanG
};

Also I have noted that one message will be displayed at a time even if say 2 or 3 should be like soiled message will display til its sort then it will roll thought to the one say Temp, make sense!

btw the settings.sqf very nice, now to tweak the shit out of this thanks again

cheers

natoed


 

 

Link to comment
Share on other sites

OnPlayerRespawn was suppose to be removed when I syncd the github....

Remove all need for the code in that file and it is not necessary in the initPlayerLocal either.

Thank you for pointing the github issue out. It has been updated to master with that removed

 

Yes tons of setting for complete modification. The different messages types are nice. TitleText gets it back on screen in the center bottom.

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...
  • 2 weeks later...

11:44:28 Error in expression <e))then
{
_time = diag_tickTime;
_wet = EPOCH_playerWet;
_hunger = EPOCH_playerH>
11:44:28   Error position: <EPOCH_playerWet;
_hunger = EPOCH_playerH>
11:44:28   Error Undefined variable in expression: epoch_playerwet
11:44:28 File mpmissions\__CUR_MP.Tanoa\addons\DPRealHealth\DP_Real_Health_check.sqf, line 13

 

Link to comment
Share on other sites

On 4/1/2018 at 1:44 AM, Sneer said:

Are these settings for the last version or the previous?

@Sneer

Yes the last version but I get no rpt errors thou I do run it from

init.sqf

Spoiler

if(hasInterface) then{
[] spawn {																												
        waituntil {!isNull player};
        waituntil {time > 25};
        waituntil {isPlayer player};
        waituntil {alive player};
        waituntil {getPlayerUID player != ''};
        waitUntil {!isNull (findDisplay 46)};
        waituntil {typeof player in ["Epoch_Male_F","Epoch_Female_F"]};
        waituntil {!isNil "Epoch_my_GroupUID"};
        uisleep 2;
		[] execVM "2dmin\addons\DPRealHealth\settings.sqf";																
		call compile preProcessFileLineNumbers "2dmin\addons\DPRealHealth\DP_Real_Health.sqf";						
		call compile preProcessFileLineNumbers "2dmin\addons\DPRealHealth\DP_Real_Health_Messaging.sqf";
  		};
};	

 

initPlayerLocal.sqf

Spoiler

if (!isDedicated and hasInterface) then 
{ 
	waitUntil {alive vehicle player};	
	waitUntil {typeOF player != "VirtualMan_EPOCH"};
	uisleep 15;	
	[] execVM "2dmin\addons\DPRealHealth\DP_Real_Health_check.sqf";
};

 

if i remember right it was the only way i could get this to run properly, just grab my mission file and help yourself mate.

cheers

natoed

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...