[Release] Fred's Dead Player Journal (Study Body Replacement)

Freaking Fred

OpenDayZ Rockstar!
Fred's Dead Player Journal
Created By Freaking Fred
Info
This script replaces the original study body script. When you choose "Study Body" on a dead player's corpse, you will receive text on the screen saying "You have found a journal on the survivor's corpse." and then the dead's player's statistics, from that life, will be displayed in the upper right corner of your screen. The current statistics given by the journal are:
- Player Name
- Zombies Killed
- Murders
- Bandits Killed
- Headshots
- Humanity
Installation
Step 1: You will need a custom compiles.sqf and fn_selfActions.sqf for this script. Open the spoiler below for a tutorial. If you already have them, skip to Step 2.
Step 1:Go to your arma 2 operation arrowhead installation folder on your PC and find your @DayZ folder.

Step 2: In your @DayZ folder, go into the addons folder and find the dayz_code.pbo. Make a copy of dayz_code.pbo on your desktop.

Step 3: Unpack the dayz_code.pbo that you have placed on your desktop. Inside the dayz_code folder find the compile folder.

Step 4: Inside the compile folder you will find the fn_selfActions.sqf. Make a copy of that and place it on your desktop.

Step 5: Back out to the main dayz_code folder and find the init folder. Inside the init folder you will find compiles.sqf. Make a copy of that and place it on your desktop.

Step 6: In your server's mission folder, create a fixes folder, if you don't already have one. Move the fn_selfActions.sqf and compiles.sqf from your desktop into this folder.

Step 7: In your compiles.sqf find the following line.
Code:
fnc_usec_selfActions =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";        //Checks which actions for self
Change it to
Code:
fnc_usec_selfActions =      compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";        //Checks which actions for self


Step 8: In your init.sqf find the following line.
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";              //Compile regular functions
Change it to
Code:
call compile preprocessFileLineNumbers "fixes\compiles.sqf";              //Compile regular functions

Step 2: In your server's mission folder, create a fixes folder, if you don't already have one. Inside the fixes folder, create a new text document and name it study_body.sqf.

Step 3: Copy and paste the following code into study_body.sqf.
Code:
private ["_body", "_name", "_kills", "_killsH", "_killsB", "_headShots", "_humanity"];
 
titleText ["You have found a journal on the survivor's corpse.","PLAIN DOWN"]; titleFadeOut 5;
sleep 2;
 
_body = _this select 3;
_name = _body getVariable ["bodyName","unknown"];
_kills = _body getVariable ["zombieKills",0];
_killsH = _body getVariable ["humanKills",0];
_killsB = _body getVariable ["banditKills",0];
_headShots = _body getVariable ["headShots",0];
_humanity = _body getVariable ["humanity",0];
 
hint parseText format["
<t size='1.5' font='Bitstream' color='#5882FA'>%1's Journal</t><br/><br/>
<t size='1.25' font='Bitstream' align='left'>Zombies Killed: </t><t size='1.25' font='Bitstream' align='right'>%2</t><br/>
<t size='1.25' font='Bitstream' align='left'>Murders: </t><t size='1.25' font='Bitstream' align='right'>%3</t><br/>
<t size='1.25' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.25' font='Bitstream' align='right'>%4</t><br/>
<t size='1.25' font='Bitstream' align='left'>Headshots: </t><t size='1.25' font='Bitstream' align='right'>%5</t><br/>
<t size='1.25' font='Bitstream' align='left'>Humanity: </t><t size='1.25' font='Bitstream' align='right'>%6</t><br/>",
_name,_kills,_killsH,_killsB,_headShots,_humanity];


Step 4: Open your fn_selfActions.sqf and find the following line of code.
Code:
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""];
Replace it with
Code:
s_player_studybody = player addAction [localize "str_action_studybody", "fixes\study_body.sqf",cursorTarget, 0, false, true, "",""];
 
Back
Top