[HELP NEEDED] Scripting for my Epoch Taviana Server

Walrus

New Member
Yesterday I set up an Epoch Taviana (Epoch = 1.0.4.2a Taviana = 2.0) server for myself to play on. It is working and I have no problems. However I would like to add some scripts to it. I have been looking around all day and any that I have tried have not worked or they would tell me to open some file that I do not have (like server_monitor). I really want some addons on it to me it more fun.

These are the following scripts that I would like to have:
-Self Bloodbag
-Tow/Lift
-AI Missions (Something like DZAI aswell)

I would also like to add some weapons, building materials and vehicles to the traders but I would like to cover the scripting first. Any help would be greatly appreciated. Thanks!

- I have PBO Manager and Notepad ++ but my server is not in a .pbo it is in folders and files, this is partly what I get confused upon.
 
Last edited:
Little Update, I have managed to install Snapping! Somehow it worked but I have tried self bloodbag but that didn't work. And with AI scripts it tells me to use folders and files that I do not have in my server files. :/
 
Everyone always says they get confused because they dont have a pbo. A pbo is just a zipped up folder. So if you have a pbo you have to extract it before you do anything. So by NOT having a pbo you are saving two steps, Unpacking and Packing. Thats all there is to it, if you dont have a pbo, skip the part that says "extract your pbo". But your folder should have the same name as the pbo would (dayz_server, dayz_1.chernarus etc)

You are mistaken. You DO have all those files, you are just looking in the wrong place.

Have you moved your fn_selfactions.sqf file into your mission? You need that from your @dayz_epoch/dayz_code.pbo/compile folder

Have you moved your compiles.sqf file into your mission? You will need that so you can point redirect the self_actions to the file in your mission. Its also in the dayz_code.pbo (@dayz_epoch/dayz_code.pbo/addons/init folder)

In the @dayz_epoch folder there is an addons folder FILLED with pbo files. You will need to unpack the dayz_code.pbo so you can get the files you need (at least compiles.sqf and fn_selfactions.sqf). DO NOT EDIT THE FILES IN THE DAYZ_CODE.PBO You copy the files into your MISSION folder, preferably into a subfolder called fixes, and edit the copies. In your missions init.sqf file is a line that says
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
change that to this code so your clients will load the copy you are editing instead of the default one. Copy the compiles.sqf into your mission/fixes folder
Code:
call compile preprocessFileLineNumbers "fixes\compiles.sqf";

then open up your compiles.sqf (the one in your mission that will hold all the changes) and find this line.
Code:
    fnc_usec_selfActions =            compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";        //Checks which actions for self
and you are going to change that line so that all the actions (like give yourself a bloodbag) are read from your misisons selfactions file instead of the default. Copy the fn_selfactions.sqf from the dayz_code.pbo into your missions/fixes folder.
Code:
fnc_usec_selfActions =            compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";        //Checks which actions for self

Your server_monitor.sqf is in your @dayz_epoch_server/system folder . Any files you edit in the server folder can be edited in place, you don't have to copy them to the mission folder. BUT I suggest you make a backup copy of each file before you start editing it.
So in your @dayz_epoch_server/system folder you will have a server_monitor.sqf and server_monitor.sqf.bak ...
 
Last edited:
Someone should probably make a video on the basics of editing the servers and file locations etc. EVERYONE is confused the first time they try to do something with sqf files.
 
Ugh, Still cant do it tried two different self blood bag scripts. Can only get the Snapping script to work. :(
 
Last edited:
And what is the problem with bloodbag? No menu option?
If you aren't ever getting the option then its not the scripts (it never is anyways), its your fn_selfactions.sqf file.

Post your code for self_bloodbags from your selfactions.
 
Yeah it doesn't come up on the scroll menu and I have a bloodbag in my inventory.

This is the script : http://opendayz.net/threads/krixes-self-bloodbag-script.12288/

These are the folders:

fixes with compiles.sqf & fn_selfActions.sqf inside
&
Scripts with player_selfbloodbag.sqf inside

Here is fn_selfactions.sqf:

scriptName "Functions\misc\fn_selfActions.sqf";
/***********************************************************
ADD ACTIONS FOR SELF
- Function
- [] call fnc_usec_selfActions;
************************************************************/
private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE","_hasHotwireKit","_player_SurrenderedGear","_isSurrendered","_isModular","_ownerKeyName","_temp_keys_names","_hasAttached","_allowTow","_liftHeli","_found","_posL","_posC","_height","_liftHelis","_attached"];

if (DZE_ActionInProgress) exitWith {}; // Do not allow if any script is running.

_vehicle = vehicle player;
_isPZombie = player isKindOf "PZombie_VB";
_inVehicle = (_vehicle != player);

_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);

// ---------------------------------------Krixes Self Bloodbag Start------------------------------------
_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;
};
// ---------------------------------------Krixes Self Bloodbag End------------------------------------


_nearLight = nearestObject [player,"LitObject"];
_canPickLight = false;
if (!isNull _nearLight) then {
if (_nearLight distance player < 4) then {
_canPickLight = isNull (_nearLight getVariable ["owner",objNull]);
};
};

//Grab Flare
if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
if (s_player_grabflare < 0) then {
_text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName");
s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true, "", ""];
s_player_removeflare = player addAction [format[localize "str_actions_medical_17",_text], "\z\addons\dayz_code\actions\flare_remove.sqf",_nearLight, 1, false, true, "", ""];
};
} else {
player removeAction s_player_grabflare;
player removeAction s_player_removeflare;
s_player_grabflare = -1;
s_player_removeflare = -1;
};

if (DZE_HeliLift) then {
_hasAttached = _vehicle getVariable["hasAttached",false];
if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) < 30) and (speed _vehicle < 5) and (typeName _hasAttached == "OBJECT")) then {
if (s_player_heli_detach < 0) then {
dayz_myLiftVehicle = _vehicle;
s_player_heli_detach = dayz_myLiftVehicle addAction ["Detach Vehicle","\z\addons\dayz_code\actions\player_heliDetach.sqf",[dayz_myLiftVehicle,_hasAttached],2,false,true,"",""];
};
} else {
dayz_myLiftVehicle removeAction s_player_heli_detach;
s_player_heli_detach = -1;
};
};
 
It looks okay, but it ALWAYS looks okay at first :D
I am working and will be home in a few hours. Lets start at square one. You have your compiles.sqf and fn_selfactions.sqf in your mission folder.
Check and make sure in your missions init.sqf that the compiles.sqf is referenced
call compile preprocessFileLineNumbers "Scripts\compiles.sqf"; //Compile custom compiles
if you just added this line instead of changing the default compiles.sqf line, then make sure this line comes AFTER the original line.

open your scripts\compiles.sqf and make sure your fn_selfactions has been changed.
fnc_usec_selfActions = compile preprocessFileLineNumbers "Scripts\fn_selfActions.sqf"; // fnc_usec_selfActions - adds custom actions to dayz code

You said you don't have a pbo right? Check and make sure there is not pbo file in your mission folder. if there is, rename it to .bak

Everything still looks like it is correct?

Then lets change the conditions for the bloodbag script in your selfactions.sqf
First change this
Code:
// 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 {
to this
Code:
// Krixes Self Bloodbag
/*
if ("ItemBloodbag" in _mags) then {
hasBagItem = true;
} else { hasBagItem = false;};
if((speed player <= 1) && hasBagItem && _canDo) then {
*/
if (true) then {
if (s_player_selfBloodbag < 0) then {

This should force the bloodbag menu to show up. Now I am doing this on my phone so I may have missed a } or something and hosed this up, but it LOOKS good .. as it always does.
Then lets see if it actually does show up. If so, then we know the issue is in the conditions that we commented out using the /* */
BTW: this should show up even if you dont have a bloodbag, the main thing here is to see the menu.
 
Okay so I am about to have a go and should these files:
compiles.sqf
fn_selfActions.sqf
player_selfbloodbag.sqf

all be in Scripts? And are we just forgetting this 'fixes' folder?
 
Nope still doesn't come up. :( It also says that player_selectslot is missing from dayzcode compile.
 
Last edited:
I was just copy/pasting from the tutorial which uses scripts folder.
I will be home in a few hours. Why don't you post this pbo and we can get it fixed up.
 
Back
Top