Jump to content

[HowTo] use Journal


jOoPs

Recommended Posts

Its not really hard to add/use journal in epoch, since most files are still integerated in dayz_communityassets. You only need a custom-compiles. How this is done can be read in forum more then one time, so search for it und use your brain! All necessary files are included in the rar-archive
 
first a list of modified files (which are not part of rar-archive!)
 
- description.ext
- dayz_code/actions/dayz_spaceInterrupt.sqf
- dayz_code/init/compiles.sqf

 
added folder and files (content of rar-archive)
 
- dayz_code/actions/playerstats/
  - determine_humanity_fnc.sqf
  - epeen_setText_humanity.sqf
  - epeen_setText_journal.sqf
  - epeen_setText_stats.sqf
  - fill_page_fnc.sqf
  - show_humanity_fnc.sqf
 
- dayz_code/config/CfgPlayerStats/
  - defines.hpp
  - p__cover.hpp
  - p_bandits_killed.hpp
  - p_headshots.hpp
  - p_humanity_art.hpp
  - p_journal_humanity.hpp
  - p_murders.hpp
  - p_zombies_killed.hpp
  - sound.hpp

 
------------------

 

download the given rar-archive and extract into your missionfolder. If you use other folderstructures/filenames, change the given paths.

 

------------------

in description.ext add at top
 
class RscIGUIShortcutButton;
#include "dayz_code\config\CfgPlayerStats\defines.hpp"
#include "dayz_code\config\CfgPlayerStats\p__cover.hpp"
#include "dayz_code\config\CfgPlayerStats\p_journal_humanity.hpp"
#include "dayz_code\config\CfgPlayerStats\p_humanity_art.hpp"
#include "dayz_code\config\CfgPlayerStats\p_zombies_killed.hpp"
#include "dayz_code\config\CfgPlayerStats\p_bandits_killed.hpp"
#include "dayz_code\config\CfgPlayerStats\p_headshots.hpp"
#include "dayz_code\config\CfgPlayerStats\p_murders.hpp"
#include "dayz_code\config\CfgPlayerStats\sound.hpp"

 

in dayz_code/actions/dayz_spaceInterrupt.sqf search for User20 (line 138)
replace _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; (line 140)
with createDialog "horde_journal_front_cover";

 

 

in dayz_code/init/compiles.sqf search for dayz_spaceInterrupt (line 26)

replace dayz_spaceInterrupt =            compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\dayz_spaceInterrupt.sqf"; (line 26)

with dayz_spaceInterrupt =            compile preprocessFileLineNumbers "dayz_code\actions\dayz_spaceInterrupt.sqf";

 

 

in dayz_code/init/compiles.sqf search for //System (line 122) above insert ...

    //playerstats
    horde_epeen_fnc_fill_page = compile preProcessFile "dayz_code\actions\playerstats\fill_page_fnc.sqf";
    horde_epeen_determine_humanity_fnc = compile preProcessFile "dayz_code\actions\playerstats\determine_humanity_fnc.sqf";
    horde_epeen_setText_journal_fnc = compile preProcessFile "dayz_code\actions\playerstats\epeen_setText_journal.sqf";
    horde_epeen_setText_humanity_fnc = compile preProcessFile "dayz_code\actions\playerstats\epeen_setText_humanity.sqf";
    horde_epeen_setText_stats_fnc = compile preProcessFile "dayz_code\actions\playerstats\epeen_setText_stats.sqf";
    horde_epeen_show_humanity_fnc = compile preProcessFile "dayz_code\actions\playerstats\show_humanity_fnc.sqf";

 

 

thats all

 

note: craftpage was removed

Link to comment
Share on other sites

  • 4 months later...
  • 3 weeks later...
  • 1 month later...

str_playerstats_journal_1 = "My name is %1.  I woke up %2 somewhere in %3; an area of the infected hell hole also known as %4.";
str_playerstats_journal_2 = "The date is %5, and %6";

str_playerstats_journal_1_a = "tonight";
str_playerstats_journal_1_b = "this evening";
str_playerstats_journal_1_c = "this afternoon";
str_playerstats_journal_1_d = "this morning";
str_playerstats_journal_1_e = "last night";
str_playerstats_journal_1_f = "yesterday evening";
str_playerstats_journal_1_g = "yesterday afternoon";
str_playerstats_journal_1_h = "early yesterday";
str_playerstats_journal_1_i = "a while ago";

str_playerstats_journal_month_1 = "January";
str_playerstats_journal_month_2 = "February";
str_playerstats_journal_month_3 = "March";
str_playerstats_journal_month_4 = "April";
str_playerstats_journal_month_5 = "May";
str_playerstats_journal_month_6 = "June";
str_playerstats_journal_month_7 = "July";
str_playerstats_journal_month_8 = "August";
str_playerstats_journal_month_9 = "September";
str_playerstats_journal_month_10 = "October";
str_playerstats_journal_month_11 = "November";
str_playerstats_journal_month_12 = "December";

str_playerstats_journal_2_date = "%2 %1, %3";
str_playerstats_journal_2_info_1 = "it's my first day here since waking up on the shore.";
str_playerstats_journal_2_info_2 = "I've only been here a day, so still getting used to what's going on.";
str_playerstats_journal_2_info_3 = "I've been here %1 days and counting.";

str_playerstats_journal_3_1 = "At least I haven't got any broken bones";
str_playerstats_journal_3_2 = "The situation looks dire.  I've got multiple broken bones";
str_playerstats_journal_3_3 = "Things could be better. My leg is broken";
str_playerstats_journal_3_4 = "Things aren't so good.  My arm is broken";
 
str_playerstats_journal_4_1 = ", although I do feel really sick";
str_playerstats_journal_4_2 = ", I feel really feverish";

str_playerstats_journal_5_1 = " and I'm fading fast from lack of blood.";
str_playerstats_journal_5_2 = " and I've lost a lot of blood.";
str_playerstats_journal_5_3 = " and I've lost some blood.";
str_playerstats_journal_5_4 = " and I've got some minor wounds.";
str_playerstats_journal_5_5 = " but somehow I don't appear have lost any blood.  Strange.";
str_playerstats_journal_5_6 = " but I'm physically pale from loss of blood.";
str_playerstats_journal_5_7 = " but I've lost a lot of blood.";
str_playerstats_journal_5_8 = " but I've lost some blood.";
str_playerstats_journal_5_9 = " but apart from some minor wounds that need tending to, I'm in pretty good shape.";
str_playerstats_journal_5_10 = " but quite strangely the sickness hasn't affected my wellbeing.";
str_playerstats_journal_5_11 = " and I'm in full health.";

str_playerstats_journal_6_1 = "Good thing I've got a blood bag on me.  Now if only there was someone who could hook me up...";
str_playerstats_journal_6_2 = "Good thing I've got a blood bag in my backpack.  Now if only there was someone who could hook me up...";
str_playerstats_journal_6_3 = "I really need to get a transfusion from somewhere.  If only I had a blood bag.";

str_playerstats_journal_7_1 = "Good news is I've got my trusty %1 to defend myself with.";
str_playerstats_journal_7_2 = "I've got a %1 but it won't be much use in this daylight.";
str_playerstats_journal_7_3 = "I've got a %1 which is perfect for seeing in this dark.  I guess other survivors can see me flashing it about though.  Not sure if that's a good thing or not given the circumstances.";
str_playerstats_journal_7_4 = "I've got a damn %1 so people better watch out.";
str_playerstats_journal_7_5 = "Good news is I'm packing a %1 and I've got some ammo for it.";
str_playerstats_journal_7_6 = "Good news is I'm packing a %1 and I've got some ammo for it.  I should probably reload it though seeing as it's empty.";
str_playerstats_journal_7_7 = "Good news is I've found a %1 but I haven't got any ammo for it.";
str_playerstats_journal_7_8 = "For some reason I think it's a good idea to wander about without arming myself.  Maybe I should try and find a weapon.";

private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config"];

_str_left_text = "<t size = '1.4' font = 'Zeppelin33' color = '#000000' shadow = 'false' align = 'left'>"
			+str_playerstats_journal_1+
			"<br /><br />"
			+str_playerstats_journal_2+
			"<br /><br />%7%8%9  %10<br /><br />%11</t>";

_1 = name player;
/*
if (player hasWeapon "ItemWatch") then
{
	if (dayz_Survived == Dayz_logonDate) then // only interested if the same - assume server will only run over one day before restart
	{
		switch (true) do
		{
			case (Dayz_logonTime > 20): {_2 = str_playerstats_journal_1_a};
			case (Dayz_logonTime > 17): {_2 = str_playerstats_journal_1_b};
			case (Dayz_logonTime > 12): {_2 = str_playerstats_journal_1_c};
			default {_2 = str_playerstats_journal_1_d};
		};
	} else
	{
		switch (true) do
		{
			case (Dayz_logonTime > 20): {_2 = str_playerstats_journal_1_e};
			case (Dayz_logonTime > 17): {_2 = str_playerstats_journal_1_f};
			case (Dayz_logonTime > 12): {_2 = str_playerstats_journal_1_g};
			default {_2 = str_playerstats_journal_1_h};
		};
	};
} else
{
	_2 = str_playerstats_journal_1_i;
};

_3 = Dayz_logonTown;

_4 = worldName;

_ys = str (date select 0);
_ms = "";
_ds = str (date select 2);

switch (true) do
{
	case (date select 1 == 1):{_ms = str_playerstats_journal_month_1};
	case (date select 1 == 2):{_ms = str_playerstats_journal_month_2};
	case (date select 1 == 3):{_ms = str_playerstats_journal_month_3};
	case (date select 1 == 4):{_ms = str_playerstats_journal_month_4};
	case (date select 1 == 5):{_ms = str_playerstats_journal_month_5};
	case (date select 1 == 6):{_ms = str_playerstats_journal_month_6};
	case (date select 1 == 7):{_ms = str_playerstats_journal_month_7};
	case (date select 1 == 8):{_ms = str_playerstats_journal_month_8};
	case (date select 1 == 9):{_ms = str_playerstats_journal_month_9};
	case (date select 1 == 10):{_ms =str_playerstats_journal_month_10};
	case (date select 1 == 11):{_ms =str_playerstats_journal_month_11};
	case (date select 1 == 12):{_ms =str_playerstats_journal_month_12};
};

_5 = format[str_playerstats_journal_2_date, _ds, _ms, _ys];

// can't test dayz_Survived at home

switch (true) do
{
	case (dayz_Survived == 0): {_6 = str_playerstats_journal_2_info_1};
	case (dayz_Survived == 1): {_6 = str_playerstats_journal_2_info_2};
	case (dayz_Survived > 1): {_6 = format [str_playerstats_journal_2_info_3, dayz_Survived]};
	default {};
};

switch (true) do
{
	case (!r_fracture_legs && !r_fracture_arms): {_7 = str_playerstats_journal_3_1};
	case (r_fracture_legs && r_fracture_arms): {_7 = str_playerstats_journal_3_2};
	case (r_fracture_legs): {_7 = str_playerstats_journal_3_3};
	case (r_fracture_arms): {_7 = str_playerstats_journal_3_4};
	default {};
};

switch (true) do
{
	case (r_player_infected):
	{
		if (!r_fracture_legs && !r_fracture_arms) then
		{
			_8 = str_playerstats_journal_4_1;
		} else
		{
			_8 = str_playerstats_journal_4_2;
		};
	};
	default {_8 = ""};
};

if (r_fracture_legs || r_fracture_arms) then
{
	switch (true) do
	{
		case (r_player_blood < 3000): {_9 = str_playerstats_journal_5_1};
		case (r_player_blood < 6000): {_9 = str_playerstats_journal_5_2};
		case (r_player_blood < 9000): {_9 = str_playerstats_journal_5_3};
		case (r_player_blood < 11000): {_9 = str_playerstats_journal_5_4};
		case (r_player_blood == 12000): {_9 = str_playerstats_journal_5_5};
		default {_9 = "."};
	};
}else
{
	switch (true) do
	{
		case (r_player_blood < 3000): {_9 = str_playerstats_journal_5_6};
		case (r_player_blood < 6000): {_9 = str_playerstats_journal_5_7};
		case (r_player_blood < 9000): {_9 = str_playerstats_journal_5_8};
		case (r_player_blood < 11000): {_9 = str_playerstats_journal_5_9};
		case (r_player_blood == 12000):
		{
			if (r_player_infected) then
			{
				_9 = str_playerstats_journal_5_10;
			} else
			{
				_9 = str_playerstats_journal_5_11;
			};
		};
		default {_9 = "."};
	};
};

_blood_in_pack = false;
_backpack = unitBackpack player;

if (!isNull _backpack) then
{
	_mag_arr = getMagazineCargo _backpack;
	if ("ItemBloodbag" in (_mag_arr select 0)) then
	{
		_blood_in_pack = true;
	};
};
_blood_in_inv = false;

if ("ItemBloodbag" in (magazines player)) then
{
	_blood_in_inv = true;
};

_10 = "";

if (r_player_blood < 9000 && (_blood_in_inv || _blood_in_pack)) then
{
	if (_blood_in_inv) then
	{
		_10 = str_playerstats_journal_6_1;
	} else
	{
		_10 = str_playerstats_journal_6_2;
	};
};
if (r_player_blood < 9000 && ! _blood_in_inv && ! _blood_in_pack) then
{
	_10 = str_playerstats_journal_6_3;
};

_11 = "";

_weapon = currentWeapon player;
_config = configFile >> "CfgWeapons";

// possibly filter out torch and the dayz_throwweapon thingy too.  Need to get feedback..

if (_weapon != "" && _weapon != "Throw" && _weapon != "Put" && _weapon != "Flare") then
{
	switch (true) do
	{
		case (getText (_config >> _weapon >> "melee") == "true"): // used getText as config entry had "" marks around it.
		{
			_11 = format [str_playerstats_journal_7_1, getText (_config >> _weapon >> "displayName")];
		};
        case (_weapon == "ItemFlashlight" || _weapon == "ItemFlashlightRed"):
		{
			if (sunOrMoon == 1) then
			{
				_11 = format [str_playerstats_journal_7_2, getText (_config >> _weapon >> "displayName")];
			} else
			{
				_11 = format [str_playerstats_journal_7_3, getText (_config >> _weapon >> "displayName")];
			};
		};
		case (_weapon == "Makarov"):
		{
			_11 = format [str_playerstats_journal_7_4, getText (_config >> _weapon >> "displayName")];
		};
		default
		{
			_mags_for_weap = getArray (_config >> _weapon >> "magazines");

			_mssv_cnt = false;
			{
				if (_x in _mags_for_weap) then
				{
					_mssv_cnt = true;
				};
			} forEach (magazines player);

			if (_mssv_cnt) then
			{
				if (player ammo _weapon > 0) then
				{
					_11 = format [str_playerstats_journal_7_5, getText (configFile >> "CfgWeapons" >> _weapon >> "displayName")];
				} else
				{
					_11 = format [str_playerstats_journal_7_6, getText (configFile >> "CfgWeapons" >> _weapon >> "displayName")];
				};
			} else
			{
				_11 = format [str_playerstats_journal_7_7, getText (_config >> _weapon >> "displayName")];
			};
		};
	};
} else
{
	_11 = str_playerstats_journal_7_8;
};

// left page
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1800) ctrlSetStructuredText parseText format [_str_left_text, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11];
*/

private["_moon","_spawnselection","_survivors","_players","_y","_x"];
_moon = switch (dayz_fullMoonNights) do {
	case "true": { "Yes" };
	case "false": { "No" };
};

if(isNil "dayz_spawnselection") then {
		dayz_spawnselection = false;
	};

_spawnselection = switch (dayz_spawnselection) do {
	case "0": { "Yes" };
	case "1": { "No" };
};

_players = [];
{
	_y = _x;
	if (isPlayer _y) then
	{
		{_players = _players + [_x];} forEach (crew _y);
	};
} forEach ([0,0,0] nearEntities ['AllVehicles', 10000000]);
_survivors = {isPlayer _x} count _players;

	// left page
	((uiNamespace getVariable "horde_myDisplay") displayCtrl 1800) ctrlSetStructuredText parseText format ["
					<br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Health: 	 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%1</t><br/>
					<br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Hunger: 			 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%2%</t><br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Thirst: 		 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%3%</t><br/>
					<br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Temp: 			 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%5</t><br/>
					<br />
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Humanity: 		 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%6</t><br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Zombies: 		 </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%7</t><br/>
					<br />
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>SpawnSelection: 	     </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%4</t><br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='left'>Full Moon: 	     </t><t size='2' font='Zeppelin33' align='right' color='#FF0033'>%12</t><br/>
					<br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='center'>Survived: %8 Day(s)</t><br/>
					<br />
					<t size='2' font='Zeppelin33' color = '#000000' align='center'>Survivors:%9</t><br/>
					<br/>
					<t size='2' font='Zeppelin33' color = '#000000' align='center'>FPS:%10, FPSMin:%11</t><br/>
					",
					(round(r_player_blood)),
					//(player getVariable['USEC_BloodQty', r_player_blood]),
					//(r_player_bloodpersec),
					//(r_player_foodstack),
					//(r_player_bloodregen),
					(round(dayz_hunger)),
					(round(dayz_thirst)),
					(_spawnselection),
					(round(dayz_temperatur)),
					(player getVariable['humanity', 0]),
					({alive _x} count entities "zZombie_Base"),
					(dayz_Survived),
					(_survivors),
					(round diag_fps),
					(round diag_fpsmin),
					(_moon)
				];

// right page - blank until humanity is checked

_b = "<img size = '5' image = '\z\addons\dayz_communityassets\pictures\playerstats\tally\0.paa'/>";

((uiNamespace getVariable "horde_myDisplay") displayCtrl 1801) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1802) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1803) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1804) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1805) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1806) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1807) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1808) ctrlSetStructuredText parseText format ["%1", _b];
((uiNamespace getVariable "horde_myDisplay") displayCtrl 1809) ctrlSetStructuredText parseText format ["%1", _b];

replace content of epeen_setText_journal.sqf file with this...

 

cheers

Link to comment
Share on other sites

  • 2 weeks later...

Quick question as it's eluding me presently, but what default button is this supposed to be brought up with ?  I had assumed "J" for diary, but that brings nothing up. 

 

 

If anyone is looking for this ,

 

it's in options, controls, custom controls, and user action 20, then bind a key for it. I used "J"... 

Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...
  • 1 year later...
30 minutes ago, Alexander9822 said:

bump

 

 

try open your keys configs into the game.. the journal its seted for use with "user20" key through space_interrupt.sqf  so in key configs ... put the "J" into the field for key 20.

Now press the "J" key and you will see the journal.

Link to comment
Share on other sites

2 hours ago, Alexander9822 said:

Is there anyway to bind it to that key automatically or make it use the insert key?

mmm try it...

First DONT! do it this step:

in dayz_code/actions/dayz_spaceInterrupt.sqf search for User20 (line 138)
replace _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; (line 140)
with createDialog "horde_journal_front_cover";

Second:

in dayz_spaceInterrupt.sqf  find:   (Note if ure using snap_pro mod.. you have this file into this mod folder):

Find:

if (_dikCode in (actionKeys "GetOver")) then {
	
	if (player isKindOf  "PZombie_VB") then {
		_handled = true;
		DZE_PZATTACK = true;
	} else {
		_nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8];
		if (count _nearbyObjects > 0) then {
			if((diag_tickTime - dayz_lastCheckBit > 4)) then {
				[objNull, player, rSwitchMove,"GetOver"] call RE;
				player playActionNow "GetOver";
				dayz_lastCheckBit = diag_tickTime;
			} else {
				_handled = true;
			};
		};
	};
};

add this bellow :

//Cutom Journal Menu
if (_dikCode == 0xD2) then {  
	
createDialog "horde_journal_front_cover";

};

**Note: 0xD2 its insert key on arrow keypad-

Find others Key codes here:

https://community.bistudio.com/wiki/DIK_KeyCodes

and also you can check it to make your own journal:

Spoiler

 

 

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
  • Discord

×
×
  • Create New...