Strip vehicles for parts

most of the pbo's posted here are corrupted - can't open them with Pbo Viewer, only Jaimbo's dayz_1.tavi.pbo can be opened. GaryG's or Glowpowners file's doesnt work for example. Cant open them with Pbo View.
 
most of the pbo's posted here are corrupted - can't open them with Pbo Viewer, only Jaimbo's dayz_1.tavi.pbo can be opened. GaryG's or Glowpowners file's doesnt work for example. Cant open them with Pbo View.

I do not pack with PBO view and that may be why. I am unfamiliar with that program. I use a different PBO manager. I deleted all my folders with this script out of frustration, lol, but am going to start over now. I will upload the unpacked breakdown here if it either works or has an issue. Thank you guys again for all your help!
 
Ah okay that explains it then thanks for clarification. I'm gonna try today get the salvage working on my team dayztaviana2.0 server ...
 
Ah okay that explains it then thanks for clarification. I'm gonna try today get the salvage working on my team dayztaviana2.0 server ...

Terrific! I too am working on it in between work stuff. Ill update as soon as i know something.
 
Here is my init.sqf. I added a call line from page one but am not sure if it is the correct one or not and if i is in the correct location or not. All info: Tavi 2.0, Lift and Tow, and AI that all work. I download the folder from page 1 here and set it into my mission folder. Finally I packed it into PBO and uploaded to my server. Upon login I received "Script z\addons\dayz_code\init\loot_init.sqf not found". i was able to click "OK" and join into the server but the Harvest was not working. Any thoughts?
 

Attachments

  • init.sqf
    4.8 KB · Views: 16
Manatee hunter, follow this tutorial and it will work perfectly:

1. Using the PBO tool of your choice (cPBO, PBOView, PBOManager etc.) extract the "dayz_code.pbo" from the "@dayz" folder.
2. Copy the "compiles.sqf" from "dayz_code\init" into your mission.pbo.
3. In the init.sqf in the mission.pbo edit:

Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

to

Code:
call compile preprocessFileLineNumbers "compiles.sqf";

You can use the compiles.sqf to override majority of the files in "dayz_code\compile" folder. We are going to use it to override the function "fn_selfAction.sqf" so:

4. Copy the "fn_selfAction.sqf" in "dayz_code\compile" to your mission.pbo

5. Open the compiles.sqf and find:

Code:
    fnc_usec_selfActions =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";        //Checks which actions for self

(Should be on line 17)

and edit it so it looks like this

Code:
    fnc_usec_selfActions =        compile preprocessFileLineNumbers "fn_selfActions.sqf";        //Checks which actions for self

Now we can edit the fn_selfActions.sqf and the changes will work in our server!

6. Now open the "fn_SelfActions" in the mission.pbo and find
Code:
//Sleep
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_sleep < 0) and (player distance cursorTarget < 3)) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_sleep;
s_player_sleep = -1;
};

And right underneath it, we add

Code:
// Remove Parts from Vehicles - By SilverShot.
if( !_isMan and _canDo and _hasToolbox and (silver_myCursorTarget != cursorTarget) and cursorTarget isKindOf "AllVehicles" and (getDammage cursorTarget < 0.95) ) then {
_vehicle = cursorTarget;
_invalidVehicle = (_vehicle isKindOf "Motorcycle") or (_vehicle isKindOf "Tractor"); //or (_vehicle isKindOf "ATV_US_EP1") or (_vehicle isKindOf "ATV_CZ_EP1");
if( !_invalidVehicle ) then {
{silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
s_player_removeActions = [];
silver_myCursorTarget = _vehicle;
 
_hitpoints = _vehicle call vehicle_getHitpoints;
 
{
_damage = [_vehicle,_x] call object_getHit;
 
if( _damage < 0.15 ) then {
 
//change "HitPart" to " - Part" rather than complicated string replace
_cmpt = toArray (_x);
_cmpt set [0,20];
_cmpt set [1,toArray ("-") select 0];
_cmpt set [2,20];
_cmpt = toString _cmpt;
 
_skip = true;
if( _skip and _x == "HitFuel" ) then { _skip = false; _part = "PartFueltank"; _cmpt = _cmpt + "tank"};
if( _skip and _x == "HitEngine" ) then { _skip = false; _part = "PartEngine"; };
if( _skip and _x == "HitLFWheel" ) then { _skip = false; _part = "PartWheel"; };
if( _skip and _x == "HitRFWheel" ) then { _skip = false; _part = "PartWheel"; };
if( _skip and _x == "HitLBWheel" ) then { _skip = false; _part = "PartWheel"; };
if( _skip and _x == "HitRBWheel" ) then { _skip = false; _part = "PartWheel"; };
if( _skip and _x == "HitGlass1" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitGlass2" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitGlass3" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitGlass4" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitGlass5" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitGlass6" ) then { _skip = false; _part = "PartGlass"; };
if( _skip and _x == "HitHRotor" ) then { _skip = false; _part = "PartVRotor"; };
 
if (!_skip ) then {
_string = format["<t color='#0096ff'>Remove%1</t>",_cmpt,_color]; //Remove - Part
_handle = silver_myCursorTarget addAction [_string, "ss_remove.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
s_player_removeActions set [count s_player_removeActions,_handle];
};
};
 
} forEach _hitpoints;
};
};

This gives us the options on the scroll wheel menu when looking at vehicles!

7. Now find

Code:
 //Engineering
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = objNull;
//Others
player removeAction s_player_forceSave;
s_player_forceSave = -1;
player removeAction s_player_flipveh;
s_player_flipveh = -1;
player removeAction s_player_sleep;
s_player_sleep = -1;
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
player removeAction s_player_butcher;
s_player_butcher = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
s_player_boil = -1;
player removeAction s_player_fireout;
s_player_fireout = -1;
player removeAction s_player_packtent;
s_player_packtent = -1;
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
player removeAction s_player_studybody;
s_player_studybody = -1;
//Dog
player removeAction s_player_tamedog;
s_player_tamedog = -1;
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
};

And right above it add
Code:
//Extras
//Remove Parts
{silver_myCursorTarget removeAction _x} forEach s_player_removeActions;s_player_removeActions = [];
silver_myCursorTarget = objNull;

This makes sure we don't have the option unless we are looking at vehicles!

8. Last but CERTAINLY not least, download the attached ss_remove.sqf and place it into your mission!

Job done!!!

I now followed this one to the "T" and again, the server runs fine, but no remove options.
 
Attached are my modified files when following manatee hunter's description. If someone would review for errors I'd greatly appreciate it!
When I open my extracted dayz_mission folder I have as follows:
=BTC=_Logistics (Lift folder)
=BTC=_Logistics Tow (tow folder)
scripts (AI folder)
compiles.sqf
description.ext
fn_selfActions.sqf
init.sqf
kh_actions.sqf
kh_vehicle_refuel.sqf
mission.sqm
settings.sqf
ss_remove.sqf

attached is the actual PBO set up like this if someone is able to open it. Thanks!
 

Attachments

  • compiles.sqf
    21.9 KB · Views: 8
  • fn_selfActions.sqf
    11.4 KB · Views: 10
  • init.sqf
    4.5 KB · Views: 15
  • dayz_missionLTAI.pbo
    166.6 KB · Views: 13
I did it same for dayztaviana2.0 but I can't get the option to strip car parts from vehicles. Vehicles are full green so that should not be issue. Is there any way to debug this thing?
 
I did it same for dayztaviana2.0 but I can't get the option to strip car parts from vehicles. Vehicles are full green so that should not be issue. Is there any way to debug this thing?
Same here. Server operates as normal but no option to take off parts :(
 
For me, everything has been working fine for some time now. Today, it just stopped working.
When I try to take of a part, it stays on but I get one in my gear and when I put it on a vehicle, it disappears, but it won't repair.
 
Am going from the instructions on Page 2 so apologies if these have been fixed..

I can remove fuel tank parts and still have fuel, so added:
Code:
if(_hitpoint == "HitFuel" ) then {
                    _vehicle setFuel 0;
                    };

directly below
Code:
if( _hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
in ss_remove.sqf, am happy with that, i haven't tried refueling it from a gerry can but pretty sure it will take fuel, would be interesting to find the point of damage where fuel leaks out from the vehicle..

Wheel / glass removal works perfectly, although the animation before the removal would be nice :)

The only thing bugging me is the 'removal of the engine' and still being able to drive, technically it is engine parts so driving after is feasible, maybe rename remove engine to remove engine parts ?

I tried setting the damage of the hitparts for engine and fueltank to a full 1 after removal, oddly the first time it worked, after that the vehicle just catches fire after removal, the reason for the 0.89 damage I guess..

All in all a very nice script, adding now after spending hours thinking it wasn't working only to realise that i needed a toolbox :oops:
 
I've also, already before i add this script, the issue on my reality lingor skaronator 2.1 Server and my reality chernarus 1.7.6.1, that you can only repair and refuel vehicles correctly if you enter the vehicle as driver before. After that you can repair and refuel. If you don't do that your actions don't take effect, only waste the part or empties the can.
Found no fix yet, but it's not an issue of the removal script.
 
Two questions,

When I added this to my server, the ability to press "insert" to have a look at the debug window to see your humanity and all that is gone.

Can somone point my to the direction where that is dissable with this? Or should I just add an other debug monitor instead?
 
Well I have only added Auto refuel and this. Before I added this the normal debug window worked just fine.

Going to test Urbanskaters debug window and see if that works, if not I'll go back to default and starts over.
 
Same here. Server operates as normal but no option to take off parts :(

Finally got it working! I checked out your init.sqf too GaryG and noticed that
You still have this
// (Taviana) Instead, call a copy of the DayZ 1.7.4.4 compiles:
call compile preprocessFileLineNumbers "\kh\dayztaviana\init\compiles.sqf"; //Compile regular functions

since it needs to be just compiles.sqf

DayzTaviana 2.0 uses 1.7.4.4 code so just to be sure i downloaded that old version and unpacked it and copied compiles.sqf from there + fn_selfAction.sqf

Then I just followed Jaimbos tutorial and now I get options to strip wheels and stuff :)
Gonna adjust it to not allow engine parts being taken etc...
Next is syphon fuel script though I don't have any clue where to begin :D
 
Thank you! I was able to get this working 100% through the DayZ Code. One thing I would like (not a "deal breaker") is the vehicle to become disabled if the engine and fuel parts are removed. Any Ideas?

Also, what do you guys think about the siphon fuel? Maybe you have to siphon fuel from the vehicle into a jerry before removing the fuel tank parts?

Of course this is dependent on getting a siphon fuel to work :D


Many props to Silvershot!
 
I have noticed some issues with this.

First off, some vehicles allow you to take 3 of the same wheels or parts.

Secondly, When i remove one to add to another car, it will not repair the car but it still uses up my wheel.

EDIT: Nvm i saw that other were having the issue and that having the latest 1.7.6.1 sqf files may help fix it.

is there any way to tell which version of the files I have w/o redownloading or re-doing all the code i have?
 
Can anyone tell me why i dont have a compiles? I download the default Mission.PBO of my server and it didnt have it? Doesnt it normally have it or is it just me
 
Can anyone tell me why i dont have a compiles? I download the default Mission.PBO of my server and it didnt have it? Doesnt it normally have it or is it just me

Read the Jaimbos tutorial on page 2:
Those files are in the dayz_code.pbo on mod folder (clientside) you need to override them and Jaimbos tutorial tell you how.
 
Back
Top