Uro Posted June 26, 2014 Report Share Posted June 26, 2014 TUTORIAL/HOW-TO: CUSTOM SELF-BLOODBAG for EPOCH 1.0.5+ For people using maca134's right click options and wanting to run their own Self Tranfuse / Bloodbag scripts within Epoch 1.0.5 without having "Self Transfuse" & "Self Bloodbag" right click options on Bloodbags. Why did I make this guide? Some of us use custom self blood scripts with features other than in the default one. Call it OCD but I don't like having duplicate Self Blood options in right click menus! And also because setting DZE_SelfTransfuse = false; variable in the mission init file disables all right click options on bloodbags. The following guide lets you use your own self bloodbag script utilising the existing self-transfuse code within Epoch 1.0.5+ Difficulty:Easy/Moderate Required: Notepad++ PBO Manager / PBO tools. Epoch 1.0.5 dayz_code.pbo A working custom compiles.sqf in your mission file. A working self-bloodbag script in your mission file. Dont have a custom compiles? The forum search function and Google are your friends. NB: For the benefit of this guide I'm using a folder called \custom\ in my mission file, yours may be different, change the appropriate lines below. Step 1 In your mission file open up your custom compiles.sqf Add the following: player_useMeds = compile preprocessFileLineNumbers "custom\player_useMeds.sqf"; Save the file.Step 2 Open up your dayz_code.pbo Copy this file \dayz_code\actions\player_useMeds.sqf Paste it in the \custom\ folder in your mission file.Step 3 Open the player_useMeds.sqf that you just put in your mission file. Look for the line: case "ItemBloodbag": { _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\self_transfusion.sqf"; Change it to this: (or whatever your self-bloodbag script is called!) case "ItemBloodbag": { _id = [0,0,0,[player]] execVM "custom\self_bloodbag.sqf"; Save the file. Step 4 Open the init.sqf in your Mission file. Scroll down to your DZE_ variables. Add this line: DZE_SelfTransfuse = true; Save the file.Repack your mission file into a PBO. Optional: If you use maca134's right click menu http://epochservers.com/viewtopic.php?f=14&t=13 You can remove the options for Bloodbags. Open your extra_rc.hpp in Notepad++ Remove these lines: class ItemBloodbag { class UseBB { text = "Use Bloodbag"; script = "execVM 'custom\SelfBB.sqf'"; }; }; Save the file.Repack your mission file into a PBO. Your self-bloodbag script now uses the built-in Epoch code to run!! adg 1 Link to comment Share on other sites More sharing options...
Logan Posted June 27, 2014 Report Share Posted June 27, 2014 I think you have an extra " in there, din't work until I changed it from case "ItemBloodbag": { _id = [0,0,0,[player]] execVM ""custom\self_bloodbag.sqf"; to case "ItemBloodbag": { _id = [0,0,0,[player]] execVM "custom\self_bloodbag.sqf"; Uro 1 Link to comment Share on other sites More sharing options...
Gr8 Posted June 27, 2014 Report Share Posted June 27, 2014 maca right click doent work on 1.0.5. Can you share your ui_selectSlot for 1.0.5? Link to comment Share on other sites More sharing options...
Uro Posted June 27, 2014 Author Report Share Posted June 27, 2014 I think you have an extra " in there, din't work until I changed it from case "ItemBloodbag": { _id = [0,0,0,[player]] execVM ""custom\self_bloodbag.sqf"; to case "ItemBloodbag": { _id = [0,0,0,[player]] execVM "custom\self_bloodbag.sqf"; Thanks fixed! Must have typo'd an error between posting this on a couple of forums :D maca right click doent work on 1.0.5. Can you share your ui_selectSlot for 1.0.5? what exactly doesn't work? I'm using the ui_selectSlot.sqf from \dayz_code\compile\ui_selectSlot.sqf modded with maca's right click menu's. The only thing different between the old file and the new file is line 9 Above this line: if (_button == 1) then { Add this: if (!DZE_SelfTransfuse && ((gearSlotData _control) == "ItemBloodBag")) exitWith {}; You really should compare your old and new files when you update incase any have changed, instead of expecting them to be the same. :) Logan 1 Link to comment Share on other sites More sharing options...
Logan Posted June 27, 2014 Report Share Posted June 27, 2014 maca right click doent work on 1.0.5. Can you share your ui_selectSlot for 1.0.5? Works fine. Follow this http://epochservers.com/viewtopic.php?f=14&t=13 Link to comment Share on other sites More sharing options...
Gr8 Posted June 27, 2014 Report Share Posted June 27, 2014 Yes, i saw that new line in the file. I think i added maca's code at the wrong spot. Thanks Link to comment Share on other sites More sharing options...
FoRcE72 Posted June 29, 2014 Report Share Posted June 29, 2014 Thanks great add, I have this working but after adding this I can not bandage/ or tale morphine or painkillers myself, I can bandage anyone else and the rest, did I miss something in here? anyone else having this issue? Link to comment Share on other sites More sharing options...
Uro Posted June 29, 2014 Author Report Share Posted June 29, 2014 When I tested this I had a zombies maul me, bandaged and bloodbagged etc fine. Had other players shoot me, bandaged, bloodbagged etc fine All this does is change the source of the bloodbag script using Epoch's own code. Link to comment Share on other sites More sharing options...
FoRcE72 Posted June 29, 2014 Report Share Posted June 29, 2014 When I tested this I had a zombies maul me, bandaged and bloodbagged etc fine. Had other players shoot me, bandaged, bloodbagged etc fine All this does is change the source of the bloodbag script using Epoch's own code. mine was this case "ItemBloodbag": {_id = [0,0,0,[player]] execVM ""custom\self_bloodbag.sqf"; <---the extra " before custom, once removed it works great Link to comment Share on other sites More sharing options...
Uro Posted June 29, 2014 Author Report Share Posted June 29, 2014 Already edited first post ;) Link to comment Share on other sites More sharing options...
calamity Posted July 5, 2014 Report Share Posted July 5, 2014 thankz for this fix....... Link to comment Share on other sites More sharing options...
Diesel Weasel Posted August 9, 2014 Report Share Posted August 9, 2014 I followed your instructions to a T, went back and checked everything twice. I still have BOTH Self Transfuse and Self Bloodbag options available. I thought this replaced the Self Transfuse option so we only had one? I use the configurable Bloodbag script that gives bonuses if you are next to ambulances or hospitals. Link to comment Share on other sites More sharing options...
pekass Posted October 21, 2014 Report Share Posted October 21, 2014 hello I put the script but I get a mesaje saying I have to wait a while to get blood there any way to remove that time to put the blood?. thx all. Link to comment Share on other sites More sharing options...
jahangir13 Posted October 21, 2014 Report Share Posted October 21, 2014 I did it so. You need these 2 if conditions to check for the ItemBloodBag item. private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType","_key_colors","_ownerKeyId","_itemsPlayer","_hasKey","_objects","_ownerID","_i"]; disableSerialization; _control = _this select 0; _button = _this select 1; _parent = findDisplay 106; //if ((time - dayzClickTime) < 1) exitWith {}; // jahan - self transfusion mit check variable ausschalten /////if (!DZE_SelfTransfuse && ((gearSlotData _control) == "ItemBloodBag")) exitWith {}; if (_button == 1) then { //dayzClickTime = time; _group = _parent displayCtrl 6902; _pos = ctrlPosition _group; _pos set [0,((_this select 2) + 0.48)]; _pos set [1,((_this select 3) + 0.07)]; _item = gearSlotData _control; _conf = configFile >> "cfgMagazines" >> _item; if (!isClass _conf) then { _conf = configFile >> "cfgWeapons" >> _item; }; _name = getText(_conf >> "displayName"); _cfgActions = _conf >> "ItemActions"; ///// jahan - if selfbloodpack, sonst geht das menu nicht if !((gearSlotData _control) == "ItemBloodBag") then { _numActions = (count _cfgActions); } else { _numActions = 0; }; _height = 0; ///// jahan - selfbloodpack if !((gearSlotData _control) == "ItemBloodBag") then { //Populate Menu for "_i" from 0 to (_numActions - 1) do { _menu = _parent displayCtrl (1600 + _i); _menu ctrlShow true; _config = (_cfgActions select _i); _type = getText (_config >> "text"); _script = getText (_config >> "script"); _outputOriented = getNumber (_config >> "outputOriented") == 1; _height = _height + (0.025 * safezoneH); _compile = format["_id = '%2' %1;",_script,_item]; uiNamespace setVariable ['uiControl', _control]; if (_outputOriented) then { /* This flag means that the action is output oriented the output class will then be transferred to the script && the type used for the name */ _array = getArray (_config >> "output"); _outputClass = _array select 0; _outputType = _array select 1; _name = getText (configFile >> _outputType >> _outputClass >> "displayName"); _compile = format["_id = ['%2',%3] %1;",_script,_item,_array]; }; _menu ctrlSetText format[_type,_name]; _menu ctrlSetEventHandler ["ButtonClick",_compile]; }; }; Link to comment Share on other sites More sharing options...
pekass Posted October 22, 2014 Report Share Posted October 22, 2014 thanks, but where is the line and you have to put in the init.sqf?. Link to comment Share on other sites More sharing options...
pekass Posted October 22, 2014 Report Share Posted October 22, 2014 thanks, but where is the line and you have to put in the init.sqf?. Link to comment Share on other sites More sharing options...
satansof2 Posted October 23, 2014 Report Share Posted October 23, 2014 is there a way to change it form saying self transfuse to something else when you right click without messing up the internal coding for epoch? Link to comment Share on other sites More sharing options...
satansof2 Posted October 23, 2014 Report Share Posted October 23, 2014 also was curious how to make it to where you can blood bag in combat (and if possible have a longer time if you do so, not important though)? Link to comment Share on other sites More sharing options...
jahangir13 Posted October 23, 2014 Report Share Posted October 23, 2014 To make these settings easier I use the old selfBB script. Link to comment Share on other sites More sharing options...
MoosePP Posted January 23, 2015 Report Share Posted January 23, 2015 How can I change the option title from Self transfusion to Self Bloodbag. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now