Jump to content

Recommended Posts

Advanced Towing Released!

 

3d83c77.jpg

 


 


Adds support for towing vehicles using ropes. Works in both SP and MP.


 


Also check out my Advanced Sling Loading addon for more rope features!


 


Features:


  • Tow other vehicles behind Ships, Cars, Trucks and Tanks
  • The size of the vehicle impacts it's towing capability
  • Other players (including AI) can tow other players
  • Supports towing damaged / destroyed vehicles
  • Supports towing "trains" of vehicles (disabled by default - see below)

Installation:


  1. Subscrive via steam: http://steamcommunity.com/sharedfiles/filedetails/?id=639837898 or dowload latest release fromhttps://github.com/sethduda/AdvancedTowing/releases
  2. If installing this on a server, add the addon to the -serverMod command line option.
  3. Optionally, this can be installed directly in the mission PBO by calling the advanced towing script via initServer.sqf. You'll find the sqf script (fn_advancedTowingInit.sqf) in the addons directory inside the downloaded addon.

Default Towing Rules:


  • Tanks can tow tanks, cars, ships and air
  • Cars can tow cars, ships and air
  • Trucks can tow cars, ships and air
  • Ships can only tow ships
  • You can't tow locked vehicles (see settings below)
  • You can only tow one vehicle at a time (see settings below)

Notes for Mission Makers:


 


You can enable "trains" of vehicles by defining the SA_MAX_TOWED_CARGO varible in your init.sqf file. By default, this is set to 1. When set, vehicles can tow up to the max number of specified vehicles. If you try to tow more, your vehicle won't be able to move. Note, however, mass of all vehicles will be taken into account. It's going to be slower to two vehicles vs one.



SA_MAX_TOWED_CARGO = 3;

You can customize which classes of objects can "deploy" tow ropes by overriding the SA_TOW_SUPPORTED_VEHICLES_OVERRIDE variable in an init.sqf file.



SA_TOW_SUPPORTED_VEHICLES_OVERRIDE = [ "Air", "Ship" ];

This will only allow objects of class Air and Ship deploy tow ropes.


 


You can customize what can and can't be towed by defining the SA_TOW_RULES_OVERRIDE variable in the init.sqf file.



SA_TOW_RULES_OVERRIDE = [ ["Air", "CAN_TOW", "Ship"], ["Air", "CAN_TOW", "Air"], ["Ship", "CANT_TOW", "Air"], ["Ship", "CAN_TOW", "Ship"] ];

In this example, all objects of class Air can tow Ships and Air. However, Ships can only tow ships.


 


You can allow towing of locked vehicles by defining SA_TOW_LOCKED_VEHICLES_ENABLED in your init.sqf file. It defaults to false.



SA_TOW_LOCKED_VEHICLES_ENABLED = true;

You can allow towing in an Exile safe zone by defining SA_TOW_IN_EXILE_SAFEZONE_ENABLED in your init.sqf file. It default to false.



SA_TOW_IN_EXILE_SAFEZONE_ENABLED = true;

Not working on your server?


 


Make sure you have the mod listed in the -serverMod command line option. Only -serverMod is required for this addon. If still not working, check your server log to make sure the addon is found.


 


FAQ


 


This addon is only required on the server - is it going to slow down my server?


 


No - while this addon is server-side only, it installs itself on all clients without them downloading the addon. Most of the time, the towing code actually runs client-side, even though you installed the addon only on the server. Magic!


 


Why is the vehicle I'm towing jumpy/laggy?


 


If you're towing a vehicle that another player is driving, it's slower to transmit position updates for the towed vehicle. This will result in laggy looking towing. Have the player move to the passenger seat and then re-attach the tow ropes.


 


Also, when using this in MP, all other players watching someone tow something will also notice the towed vehicle isn't moving as smoothly. This is also due to network delay. Usually this isn't too noticeable unless moving very fast.


 


Issues & Feature Requests


 


https://github.com/sethduda/AdvancedTowing/issues


 


If anyone wants to help fix any of these, please let me know. You can fork the repo and create a pull request.


 


Special Thanks for Testing:


  • Stay Alive Tactical Team (http://sa.clanservers.com)
  • BI forum community: diesel tech jc, TeTeT, belbo
  • Crimson Gaming for testing on exile (http://crimsongamingau.com)
  • DirtySanchez & XLD (exilemod.com) for his great ideas & work to make this functional with Exile
  • Like 17

Share this post


Link to post
Share on other sites

Great job! Glad I could help out with the testing...this was really needed in the game!

 

 

Diesel

Share this post


Link to post
Share on other sites

Looks very promising, thanks for your work ;)

Share this post


Link to post
Share on other sites

Very nice, looking forward to using it. It might be possible to add winching capabilities, making the rope shorter over a period of time. Would be an awesome addition to get included in this mod.

Share this post


Link to post
Share on other sites

It shouldn't conflict with any other addon.

Great idea about winching! Do you think this is something that the player can start only when outside the vehicle?

E.g two actions available when standing next to a vehicle with ropes deployed: start winch, stop winch.

Share this post


Link to post
Share on other sites

Would be awesome if this is integrated into ACE3.

 

Good job.

  • Like 1

Share this post


Link to post
Share on other sites

Looks great!

 

Watching the vid, a wildwild idea just popped up: could it be tweaked to provide a solution for AI convoys?   :unsure:

Share this post


Link to post
Share on other sites

Looks great!

 

Watching the vid, a wildwild idea just popped up: could it be tweaked to provide a solution for AI convoys?   :unsure:

 

Absolutely!

 

The ropes are just there to please the eye. Could easily take the ropes out and it would look like the vehicles are following each other at a pre-defined distance.

 

However, tight corners might be problematic - the AI won't know to take a wide turn :)

Share this post


Link to post
Share on other sites

Great looking mod!

 

I haven't played with it yet but what about requiring an item, like a tool kit, to enable towing capability?

Share this post


Link to post
Share on other sites

Great looking mod!

 

I haven't played with it yet but what about requiring an item, like a tool kit, to enable towing capability?

hmmm... its just a rope, and a hook. thats hooked to hookie thingies... no wrench needed.

 

I believe  what you ask for is for a mission maker, or custom mod to do.

Share this post


Link to post
Share on other sites

hmmm... its just a rope, and a hook. thats hooked to hookie thingies... no wrench needed.

 

I believe  what you ask for is for a mission maker, or custom mod to do.

 

 

I agree - it's possible, but I'm not sure by default I want to require all players to carry something. However, if you want to do this, I can definitely add some hooks into the code base to assist. For instance, I could set it up to call some function (which the mission maker can override) to check if ropes can be deployed from a vehicle.

Share this post


Link to post
Share on other sites

Hadnt really noticed this before but in the first picture..what wheels do you have under that Boat?

Share this post


Link to post
Share on other sites

For the script version, how does one properly "Execute the source via init.sqf", since I noticed your source file states:

 

if(!isNil "SA_TOW_INIT") exitWith {};

 

Is there a variable or to to initalize first?

Share this post


Link to post
Share on other sites

For the script version, how does one properly "Execute the source via init.sqf", since I noticed your source file states:

 

if(!isNil "SA_TOW_INIT") exitWith {};

 

Is there a variable or to to initalize first?

 

 

Two ways:

 

You can copy everything here: https://github.com/sethduda/AdvancedTowing/blob/master/addons/SA_AdvancedTowing/functions/fn_advancedTowingInit.sqf

and just paste it into the end of your init.sqf file. Don't need to change or initialize anything.

 

-- or --

 

Save the contents of https://github.com/sethduda/AdvancedTowing/blob/master/addons/SA_AdvancedTowing/functions/fn_advancedTowingInit.sqf into another sqf file in your mission's directory (e.g. fn_advancedTowingInit.sqf), and then execute it from your init.sqf file:

 

[] execVM "fn_advancedTowingInit.sqf";

 

 

---------------------------------------------------------------------------------

 

Reguarding if(!isNil "SA_TOW_INIT") exitWith {};

 

This prevents the code from running twice. The first time the code runs, SA_TOW_INIT is nil because we haven't defined it yet. Right after that line, SA_TOW_INIT gets set. The next time the code tries to run, SA_TOW_INIT is no longer nil, so it hits the exitWith clause.

 

It's like this to support the addon's ability to be only installed on the server. When the server side executes the code, it ends up sending the code to all clients (plus JIP clients) who then execute the code locally. Since the clients don't have a copy of the code until the server sends it to them, SA_TOW_INIT is always nil the first time.

 

When using the script version, it's actually better to only run the code on the server only (e.g. putting the code in initServer.sqf, or wrapping the code in an if statement.. if(isServer) then { ...insert code.. } ). While it still works when running from init.sqf, that code will get executed by all clients plus the server. This results in the clients actually sending the code to all other clients. Won't really hurt anything, but isn't necessary.

Share this post


Link to post
Share on other sites

Hadnt really noticed this before but in the first picture..what wheels do you have under that Boat?

 

It's this: https://community.bistudio.com/wiki/File:Arma3_CfgVehicles_B_UGV_01_F.jpg

 

To do it, you have to create the vehicle B_UGV_01_F, and then attach (attachTo) the boat to the vehicle (and play around a little bit with the positioning to align it on the vehicle). Then, you can hook the tow ropes to the vehicle and the boat will follow along.

 

 

In a future update, it might be neat to have the wheels attach automatically when the boat is being pulled out of the water by a vehicle. Would also be nice to have a fixed tow bar so it supports backing stuff up into the water.

  • Like 1

Share this post


Link to post
Share on other sites

How complicated would it be to have the two ropes snap if exposed to too great a strain?

Share this post


Link to post
Share on other sites

How complicated would it be to have the two ropes snap if exposed to too great a strain?

 

You'd have to calculate the simulated force applied on the rope. It can get complicated. (e.g. the force is going to be less if the cargo is off to the side vs directly behind you)

 

Probably want to calculate the acceleration of the vehicle, and then take the mass of both vehicles into account plus the angle of the rope.

Share this post


Link to post
Share on other sites

New mod v0.9 available at withSIX. Download now by clicking:

banner-420x120.png

Hey duda , you can upload updates or new mods to withSIX yourself now!

Make your own promo page, get the power to release your work at your own point of choosing.

To learn more, follow this guide.

Share this post


Link to post
Share on other sites

Great add on. Been waiting for a standalone tow mod.

Is it possible to tow artillery pieces, eg from RHS?

I also agree it would be good if this could be integrated into ACE.

Share this post


Link to post
Share on other sites

Thank you for the clarification, works great!

 

@munger:

 

I tried towing the arty piece with a M113, Hemet, T-72 and M1a1 from RHS and it wouldn't let me attach, said to find a bigger vehicle  o.0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×