[RESOLVED] Self Bloodbagging with DayZMod 1.8.0.3 (DCC 5.9.4.1)

Strollo

Member
Good Evening Everyone!

I am having trouble following Krixes's self-bloodbag tutorial (http://opendayz.net/threads/krixes-self-bloodbag-script.12288/). I am a complete noob when it comes to this kind of stuff, so I do apologize in advance, but I would really really like to get this self-bloodbag script working on my DCC server. When I open my init.sqf file (to make the necessary changes), I discovered that my init.sqf file looks nothing like the one in the tutorial. Therefore, I cannot make the changes stated in the tutorial. Am I trying to open the wrong file? Has something changed since the tutorial was written? What am I doing wrong?

Below is my init.sqf file (from C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\MPMissions\dayz_1.chernarus\):

Code:
// MPMissions/dayz_1.chernarus/init.sqf

startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];

//Server Settings
dayZ_instance = 1; // The instance
dayZ_serverName = ""; // Servername (country code + server number)
dayz_antihack = 1; // DayZ Antihack / 1 = enabled // 0 = disabled
dayz_REsec = 1; // DayZ RE Security / 1 = enabled // 0 = disabled
//enableRadio false;

//Game Settings
dayz_spawnselection = 0; // DayZ Spawnselection / 1 = enabled // 0 = disabled, No current spawn limits.
dayz_spawnCrashSite_clutterCutter = 0; // Helicrash Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the Helicrash
dayz_spawnInfectedSite_clutterCutter = 0; // Infected Base Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the infected base

#include "\z\addons\dayz_code\system\mission\init.sqf"

if (!isDedicated) then {
#include "gcam\gcam_config.hpp"
#include "gcam\gcam_functions.sqf"

#ifdef GCAM
waitUntil { alive Player };
waituntil { !(IsNull (findDisplay 46)) };

if (serverCommandAvailable "#kick") then { (findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_keyDown"]; };
#endif
};

Hopefully somebody out there knows what I'm doing wrong... I've got a feeling that it's something really, really simple, and I'm just an idiot -- not picking up on it.

Any comments, advice, or suggestions would be greatly appreciated!

Strollo
 
I think you may have grabbed the wrong init.sqf from perhaps a different MPmissions folder? Did you install the DAYZ server files directly into your ArmaOA directory?
 
Hi Chad! Thanks for the reply...

I used DayZ Control Center 5.9.4.1 to install the game/server, and the everything (vanilla) appears to be working flawlessly.

The only MPMissions folder that I can see is the one located in my C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\MPMissions\. When I open up that \MPMissions\ folder, there is a subfolder called \dayz_1.chernarus\. Contained within that \dayz_1.chernarus\ folder, there are (3) files and (1) folder. There is an init.sqf, a description.ext, a mission.sqm, and some folder called gcam.

My Arma 2 Operation Arrowhead folder appears to have the following sub-folders:

.../Arma 2 Operation Arrowhead/
@Dayz
@dayzcc
@dayzcc_config
AddOns
BAF
BEsetup
Common
DirectX
DLCsetup
dll
Expansion
Keys
Missions
MPMissions
PMC

I am a noob when it comes to all this dayz modding and scripting stuff, but my guess is that the server files are installed in the @dayzcc folder, but I could be wrong... Any insight(s) here would be greatly appreciated. Thanks!
 
I'm sorry i don't have much experience with the standard DayZ mod, I'm running Overwatch mainly and the mission file is quite different than yours. I would venture a guess by looking at my init.sqf that the compiles call should come right before //Game Settings
 
Check your thread on our forum or here. I have explained why your init.sqf looks like that, it's not the wrong init.sqf, I have also explained that I don't recommend you to just change init.sqf since it contains some functions added by me.
 
Hoo-rah!!! I finally got it successfully installed... Here's what I did:

STEP 1.) MODIFY THE INIT.SQF FILE
The first thing I did was modify the init.sqf file that resides in my ../MPMissions/ folder. I opened it up and added in the required //LOAD IN COMPILE FUNCTIONS. I placed them right after the include function (#include "\z\addons\dayz_code\system\mission\init.sqf").

// LOAD IN COMPILED FUNCTIONS
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "custom\compiles.sqf";
fnc_usec_selfActions = compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";
progressLoadingScreen 1.0;

* Be sure to note the items in red and pay close attention to the folder names.


STEP 2.) CREATE THE NECESSARY FOLDERS
Go into your /MPMissions/ folder and create (2) subfolders; one called 'custom' and another called 'scripts'. Make them all lowercase!!! Do not capitalize the first letter or it will not work...


STEP 3.) CREATE A SIMPLE COMPILES.SQF FILE
Open up notepad, and then copy and pasted the following:

fnc_usec_selfActions = compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";
// fnc_usec_selfActions - adds custom actions to the dayz code

Save it as compiles.sqf, and then put it in the /custom/ folder you just created.


STEP 4.) EXTRACT THE FN_SELFACTIONS.SQF FILE

NOTE: You will need a .PBO manager to do this step. I used CPBO from Arma Tools. It doesn't have a GUI or anything fancy but it worked great for me...
a.) Using CPBO, go ahead and unpack the dayz_code.pbo.
b.) Copy the fn_selfActions.sqf file that resides in the /dayz_code/compile/ folder
c.) Paste it into the /scripts/ folder you just created.


STEP 5.) MODIFY THE FN_SELFACTIONS.SQF FILE
Using notepad, open up the fn_selfActions.sqf file (the one that is in your /scripts/ folder), and then copy and paste the following lines of code:

// -----------Beginning of Krixes Self Bloodbag-------------------------
_mags = magazines player;

// Krixes Self Bloodbag
if ("ItemBloodbag" in _mags) then {
hasBagItem = true;
} else { hasBagItem = false;};
if((speed player <= 1) && hasBagItem && _canDo) then {
if (s_player_selfBloodbag < 0) then {
s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"scripts\player_selfbloodbag.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_selfBloodbag;
s_player_selfBloodbag = -1;
};
// -----------End of Krixes Self Bloodbag-------------------------------

Paste it immediately after the line that reads:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);


STEP 6.) DOWNLOAD THE PLAYER_SELFBLOODBAG.SQF FILE
Go here: http://opendayz.net/threads/krixes-self-bloodbag-script.12288/
and download the player_selfbloodbag.sqf file (the link to download it is located at the bottom of the page). Once the file has been downloaded, copy and paste it directly into your /scripts/ folder.


STEP 7.) CUSTOMIZE YOUR SELF-BLOODBAG EXPERIENCE (OPTIONAL)

Using notepad, open up the player_selfbloodbag.sqf file (the one that is now in your /scripts/ folder), and customize the options however you like.
 
Back
Top