Jump to content

MF-Tow (a towing script for DayZ Epoch mod)


Recommended Posts

If any one need the array for Overpoch Origins, here's mine.

MF_Tow_Towable_Array =
{
    private ["_array","_towTruck"];
    _towTruck = _this select 0;
    _array = [];
    
    switch (typeOf _towTruck) do
    {
        case "TowingTractor":                     {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
        case "ATV_CZ_EP1":                         {_array = ["Motorcycle"];};
        case "ATV_US_EP1":                        {_array = ["Motorcycle"];};
        case "Old_bike_TK_INS_EP1":                {_array = ["Motorcycle"];};
        case "Old_moto_TK_Civ_EP1":                {_array = ["Motorcycle"];};
        case "TT650_Civ":                        {_array = ["Motorcycle"];};
        case "TT650_Ins":                        {_array = ["Motorcycle"];};
        case "TT650_TK_CIV_EP1":                {_array = ["Motorcycle"];};
        case "car_hatchback":                    {_array = ["Motorcycle","Car"];};
        case "car_sedan":                        {_array = ["Motorcycle","Car"];};
        case "GLT_M300_LT":                        {_array = ["Motorcycle","Car"];};
        case "GLT_M300_ST":                        {_array = ["Motorcycle","Car"];};
        case "S1203_ambulance_EP1":                {_array = ["Motorcycle","Car"];};
        case "S1203_TK_CIV_EP1":                {_array = ["Motorcycle","Car"];};
        case "Skoda":                            {_array = ["Motorcycle","Car"];};
        case "SkodaBlue":                        {_array = ["Motorcycle","Car"];};
        case "SkodaGreen":                        {_array = ["Motorcycle","Car"];};
        case "SkodaRed":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Blue":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Camo":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Charcoal":                    {_array = ["Motorcycle","Car"];};
        case "SUV_Green":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Orange":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Pink":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Red":                            {_array = ["Motorcycle","Car"];};
        case "SUV_Silver":                        {_array = ["Motorcycle","Car"];};
        case "SUV_TK_CIV_EP1":                    {_array = ["Motorcycle","Car"];};
        case "SUV_White":                        {_array = ["Motorcycle","Car"];};
        case "SUV_Yellow":                        {_array = ["Motorcycle","Car"];};
        case "Lada1":                            {_array = ["Motorcycle","Car"];};
        case "Lada1_TK_CIV_EP1":                {_array = ["Motorcycle","Car"];};
        case "Lada2":                            {_array = ["Motorcycle","Car"];};
        case "Lada2_TK_CIV_EP1":                {_array = ["Motorcycle","Car"];};
        case "LadaLM":                            {_array = ["Motorcycle","Car"];};
        case "UAZ_CDF":                            {_array = ["Motorcycle","Car"];};
        case "UAZ_INS":                            {_array = ["Motorcycle","Car"];};
        case "UAZ_MG_TK_EP1_DZE":                {_array = ["Motorcycle","Car"];};
        case "UAZ_RU":                            {_array = ["Motorcycle","Car"];};
        case "UAZ_Unarmed_TK_CIV_EP1":            {_array = ["Motorcycle","Car"];};
        case "UAZ_Unarmed_TK_EP1":                {_array = ["Motorcycle","Car"];};
        case "UAZ_Unarmed_UN_EP1":                {_array = ["Motorcycle","Car"];};
        case "VolhaLimo_TK_CIV_EP1":            {_array = ["Motorcycle","Car"];};
        case "Volha_1_TK_CIV_EP1":                {_array = ["Motorcycle","Car"];};
        case "Volha_2_TK_CIV_EP1":                {_array = ["Motorcycle","Car"];};
        case "VWGolf":                            {_array = ["Motorcycle","Car"];};
        case "ori_vil_lada_2105_rust":            {_array = ["Motorcycle","Car"];};
        case "ori_poldek":                        {_array = ["Motorcycle","Car"];};
        case "ori_poldek_black":                {_array = ["Motorcycle","Car"];};
        case "ori_ScrapBuggy":                    {_array = ["Motorcycle","Car"];};
        case "ori_scrapTank":                    {_array = ["Motorcycle","Car"];};
        case "ori_rth_originsmod_bathmobile":    {_array = ["Motorcycle","Car"];};
        case "datsun1_civil_1_open":            {_array = ["Motorcycle","Car","Truck"];};
        case "datsun1_civil_2_covered":            {_array = ["Motorcycle","Car","Truck"];};
        case "datsun1_civil_3_open":            {_array = ["Motorcycle","Car","Truck"];};
        case "hilux1_civil_1_open":                {_array = ["Motorcycle","Car","Truck"];};
        case "hilux1_civil_2_covered":            {_array = ["Motorcycle","Car","Truck"];};
        case "hilux1_civil_3_open_EP1":            {_array = ["Motorcycle","Car","Truck"];};
        case "Offroad_DSHKM_Gue_DZE":            {_array = ["Motorcycle","Car","Truck"];};
        case "Pickup_PK_GUE_DZE":                {_array = ["Motorcycle","Car","Truck"];};
        case "Pickup_PK_INS_DZE":                {_array = ["Motorcycle","Car","Truck"];};
        case "Pickup_PK_TK_GUE_EP1_DZE":        {_array = ["Motorcycle","Car","Truck"];};
        case "ori_originsmod_pickupoldfuel":    {_array = ["Motorcycle","Car","Truck"];};
        case "ori_originsmod_pickupold":        {_array = ["Motorcycle","Car","Truck"];};
        case "ori_p85_originsmod_CUCV":            {_array = ["Motorcycle","Car","Truck"];};
        case "ori_p85_originsmod_cucv_pickup":    {_array = ["Motorcycle","Car","Truck"];};
        case "ArmoredSUV_PMC":                    {_array = ["Motorcycle","Car"];};
        case "ArmoredSUV_PMC_DZ":                 {_array = ["Motorcycle","Car"];};
        case "ArmoredSUV_PMC_DZE":                 {_array = ["Motorcycle","Car"];};
        case "HMMWV_Ambulance":                    {_array = ["Motorcycle","Car","Truck"];};
        case "HMMWV_Ambulance_CZ_DES_EP1":        {_array = ["Motorcycle","Car","Truck"];};
        case "HMMWV_DES_EP1":                    {_array = ["Motorcycle","Car","Truck"];};
        case "HMMWV_DZ":                        {_array = ["Motorcycle","Car","Truck"];};
        case "LandRover_CZ_EP1":                {_array = ["Motorcycle","Car","Truck"];};
        case "LandRover_MG_TK_EP1_DZE":            {_array = ["Motorcycle","Car","Truck"];};
        case "LandRover_Special_CZ_EP1_DZE":    {_array = ["Motorcycle","Car","Truck"];};
        case "LandRover_TK_CIV_EP1":            {_array = ["Motorcycle","Car","Truck"];};
        case "Ikarus":                            {_array = ["Motorcycle","Car","Truck"];};
        case "Ikarus_TK_CIV_EP1":                {_array = ["Motorcycle","Car","Truck"];};
        case "Kamaz":                            {_array = ["Motorcycle","Car","Truck"];};
        case "KamazRefuel_DZ":                    {_array = ["Motorcycle","Car","Truck"];};
        case "MMT_Civ":                            {_array = ["Motorcycle","Car","Truck"];};
        case "MtvrRefuel_DES_EP1_DZ":            {_array = ["Motorcycle","Car","Truck"];};
        case "MTVR_DES_EP1":                    {_array = ["Motorcycle","Car","Truck"];};
        case "UralRefuel_TK_EP1_DZ":            {_array = ["Motorcycle","Car","Truck"];};
        case "Ural_CDF":                        {_array = ["Motorcycle","Car","Truck"];};
        case "Ural_TK_CIV_EP1":                    {_array = ["Motorcycle","Car","Truck"];};
        case "Ural_UN_EP1":                        {_array = ["Motorcycle","Car","Truck"];};
        case "V3S_Open_TK_CIV_EP1":                {_array = ["Motorcycle","Car","Truck"];};
        case "V3S_Open_TK_EP1":                    {_array = ["Motorcycle","Car","Truck"];};
        case "V3S_Refuel_TK_GUE_EP1_DZ":        {_array = ["Motorcycle","Car","Truck"];};
        case "ori_vil_originsmod_lublin_truck":    {_array = ["Motorcycle","Car","Truck"];};
        case "ori_transit":                        {_array = ["Motorcycle","Car","Truck"];};
        case "ori_excavator":                    {_array = ["Motorcycle","Car","Truck"];};
        case "ori_vil_originsmod_volvo_fl290":    {_array = ["Motorcycle","Car","Truck"];};
        case "ori_vil_originsmod_truck_civ":    {_array = ["Motorcycle","Car","Truck"];};
        case "ori_survivorBus":                    {_array = ["Motorcycle","Car","Truck"];};
        case "tractor":                            {_array = ["Motorcycle","Car","Truck"];};
        case "ori_titanic":                        {_array = ["Motorcycle","Car","Truck"];};        
    };
    
    _array
};

Link to comment
Share on other sites

  • 4 weeks later...

does this only work if you completely replace 

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

because im already using a custom compiles directly under it 

call compile preprocessFileLineNumbers "custom\compiles.sqf";

and i just changed it so that it look like this, where line 7 and 8 are for mf-tow

if (!isDedicated) then {
   player_build = compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
   snap_build = compile preprocessFileLineNumbers "custom\snap_pro\snap_build.sqf";
   player_switchModel = compile preprocessFileLineNumbers "custom\player_switchModel.sqf";
   dayz_spaceInterrupt = compile preprocessFileLineNumbers "custom\dayz_spaceInterrupt.sqf";
   player_selectSlot = compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";
   fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";
   local_lockUnlock = compile preprocessFileLineNumbers "custom\local_lockUnlock.sqf";
};

but im not seeing a tow option in the menu so i assume its not working

Link to comment
Share on other sites

I thought I would post the changes I made for my server since it doesn't appear matt seems to be doing much updating any more.. and there are still some bugs in his version remaining (though I have requested the github push)

 

Realistic class type towing

 

The class arrays have been revamped to be much smaller and easier to add/remove vehicles, towing must be done just like you would in real life by reversing up to the front of the vehicle you wish to tow, this will prevent being able to tow stuff out of walls if you face vehicles away from them, all the bugs that I am aware of have been updated, including global locking of towed vehicles so you can't glitch players inside walls

 

(and towing tractors can tow c130's now)

 

I'm trying to use this but having issues. I installed the files OP shared, they work. Except for a few bugs like being able to sit in the towed vehicles and the ability to tow vehicles through walls.

I've tried Jossy's fix (just replaced the files and edited the init file, it loads in, i try to tow and nothing happens. Then it no longer gives me the option and other options such as "manage pole" from plotmanagement stop appearing and so on.

Anyone know what is causing it so i can fix it?

Link to comment
Share on other sites

  • 4 weeks later...

Honestly has everyone given up on this? Im gonna be looking for another script. The "fix" for people glitching into bases was to lock the car... 2 seconds of testing and I found that I could just unlock the car and then get in it.. lol... has anyone gotten this script to actually function properly or should we all just move on?

Link to comment
Share on other sites

  • 2 months later...

by the way :

http://pastebin.com/L2n1mi38

all vehicles, except Tanks are in this file and they are able to tow vehicles which are reasonable/realistic instead of a one size fits all approach.

123kb have fun

 

I've installed this on my 3 servers I'm running now but I've noticed that although the hilux and datsun pickups are defined as to what they can tow, they are not included in the list of vehicles that CAN be towed, except for one. For example:

case "SUV_TK_CIV_EP1":          {_array = ["TowingTractor","GLT_M300_ST","GLT_M300_LT","LandRover_Base","UAZ_Base","ArmoredSUV_Base_PMC","SUV_Base_EP1","S1203_TK_CIV_EP1","Volha_TK_CIV_Base_EP1","VWGolf","tractor","SkodaBase","Pickup_PK_base","Offroad_DSHKM_base","Lada_base","HMMWV_Base","hilux1_civil_1_open","Truck"];};

Can I put "hilux_base" and "datsun_base" to cover all of those variances, including the upgraded versions?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...