Jump to content
leshrack

Lesh's Towing Mod 1.0 (2018-06-16)

Recommended Posts

 

 

Introduction

Lesh's Towing mod allows for towing of vehicles by other vehicles.

The goal is to provide a framework for towing so that various mod makers can allow their users to use their vehicles with towing without having to bundle your own towing solution with the mod. Much like what ASDG Joint Rails does for weapons and attachments.

 

I have been hacking away at many different methods to achieve smooth and believable towing. And after a year of working on the project on and off I have finally reached a solution that satisfies me.

The functions are written completely from scratch. However i'd like to aknowledge Rundll's excelent work on the original goto towing script for providing me with insight to the problem and a place to start from.

 

 

How does it work

Very simply you grab a vehicle that is capable of towing and drive it in front of a vehicle that is capable of being towed. By pressing Shift+B the towing commences and your good to go. To stop the towing just hit Shift+B again.

If you are not quite in position to tow but close 2 spheres will appear for guidance for several seconds. When the spheres are lined up pressing Shift+B should initiate towing.

The mod doesn't require any setup in the mission. Just running the mod is enough to enable towing in scenarios.

More information about using and special cases in the readme accompanying the mod files.

 

 

Additional Information:

The mod is designed to work in multiplayer and dedicated environments. The tow functions are run on the clients doing the actual towing so there is minimal performance hit on the server beyond the network updates caused by updating the vehicles directions and velocities. There are a few functions that rely on remoteExec which relates to transferring locality of objects and starting/stopping towing on remote objects. If remoteExec is disabled on the server/mission you can transfer locality of the target vehicle by getting into it as pilot.

 

There is still a lot I'd like to do with the mod feature wise but for now I'm going to sit back after putting in many many hours and seeing many an explosion and focus on fixing any bugs / issues that are reported. If you find any issues or have an idea on how to extend this mod please don't hesitate to post a reply or send me a pm.

 

If you wish to change the Shift+B keybind you can do so in the game options keybind options after clicking "Configure addons"

 

 

Requirements:

This mod requires Community Based Addons:

https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3/

 

 

Download:

https://steamcommunity.com/sharedfiles/filedetails/?id=1413218487

http://leshrack.com/towing/lesh_tow.zip

Armaholic : http://www.armaholic.com/page.php?id=29737

PWS : 

This mod is released under the Arma Public License - Share Alike (https://www.bistudio.com/community/licenses/arma-public-license-share-alike)

 

 

Disclaimer:

This is the first public release of still a mostly untested piece of software. Things will get fixed and tweaked in future releases.

I also hereby take no responsibility for any potential bad things that might happen while using this mod.

If you think you can help improve the mod go to https://bitbucket.org/Leshrack/leshtowing and make a pull request!

 

Changelist:

 

 

Changelist:
1.0
    - Added Arma 3 DLC vehicles to the configurations
    - Added ability to tow vehicles that are manned by other players or AI
    - Added debug function to determine locations of tow points ([vehicle] call LESH_towing_fnc_debug and [vehicle] call LESH_towing_fnc_removeDebug)
    - Added ability to define tow points on runtime for specific vehicles (this will override config values if those exists) which can be used to add the ability to tow something that doesn't have configs or override something where it is slightly off
    - Added custom setDirection function to allow rotation around any point of the vehicle instead of [0,0] in model space (makes bigger planes work better)
    - Improved the towing function to use a slightly better speed calculation
    - Removed the optionals (most were already integrated and they don't really play nice with the workshop)

0.4

   - Removed mode setting for remoteExecCfg. Was causing compatibility issues with mods and scripts that haven't defined whitelists for remoteExec calls yet.
0.3

    - Changed modelToWorld to ModelToWorldVisual in tow function which seems to be better when driving without the speed limiter which is now a lot safer.
    - Fixed another nil variable script fail (thanks again TeTeT)
    - Fixed a bug in which caused the towed vehicle to get a negative speed while driving forwards resulting in a jump backward. Should result in a somewhat smoother tow experience
    - Fixed requiredAddons in cfgPatches for all the patch pbo's which seems to have fixed them getting added in the requirements for missions
    - Fixed vanilla configs having wrong base class for the transport choppers
    - Fixed Perals tractor optional configs had wrong base class
    - Added F/A-18X Black Wasp optional config patch
    - Added a short explanation for the various config values to the readme.txt
    - Added a simple example mission to quickly allow testing of the mod

0.2
    - Fixed vanilla config patch to not get autoadded to the addons and addonsAuto when placing a vanilla vehicle in the editor
    - Fixed script error that occured when calling certain functions manually (thanks TeTeT)
    - Reworked some of the scripts to allow multiple instances of towing by the same player/client. (Untested in multiplayer)
    - Towing now allows "trains" if you have a vehicle that can both tow and be towed.
    - Added keybind to disable the speed limiter default: Shift+Ctrl+B (use at own risk)
    - Added optional config for Chairbornes Harriers
    - Added new config parameter to alter direction if the model forward/backward don't line up with the modelspace coordinate axis'
    - Replaced placeholder mod icon with the proper one (thanks Autumn)

0.1
    - Initial release

 

 

Happy towing!
-Lesh

  • Like 16

Share this post


Link to post
Share on other sites

There was a problem with slopes in Rundll tow mod. In most cases both vehicles get damage or explode when moving up/down/along the slope. Is this problem persist in this mod?

Share this post


Link to post
Share on other sites

Slopes still cause ugliness and weirdness. but explosions should be more rare. 1 way to find out right? ;)

Share this post


Link to post
Share on other sites

New mod v0.1-alpha available at withSIX. Download now by clicking:

banner-420x120.png

Hey leshrack , 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

Wow. 2 towing mods in one week. This one looks amazing! Exactly what I was looking for. But as the other one there doesn't seem to be a chance to add additional vehicles via script in a mission file. I dont think all of the big important mods will be willing to add this mod to their package :(

 

There are some vehicles I would like to tow... like the C-RAM, the RHS/CUP Airforce, the SU-22, static field-howitzers (CUP), aso... Is there any chance you can provide us with some kind of script to add vehicles on the fly? (Maybe with a try-and-error-phase to find the right "attachpoints"?)

Share this post


Link to post
Share on other sites

Hello,

Just that you know it, the BlueFor has a Hemtt TOW (the stock without cargo).

Share this post


Link to post
Share on other sites

Great mod!

I found that your mod writes itself into the addons- and addonsAuto-arrays in the mission.sqm as soon as a towable vehicle is placed. Is there any way to avoid that? (Our clan has strict rules on addon dependencies for our basic modset, so we can't use the mod as long as it makes itself dependant without actually being needed.)

Share this post


Link to post
Share on other sites

OMG this is Soo NOICE!!

 

Just a headsup. With a quick copy and pase of the f_18 pbo ... and a small edit. I was able to make a config for the F18x.. works perfectly!!

Share this post


Link to post
Share on other sites

Can this be made to tow any car?  Then it will be an amazing combat support vehicle!

 

If it could show up on Ctab,and if it could auto-add a new aircraft into available aircraft in mission for commanders,there will finally be a reason to stay behind,manning the LPD.

 

Could this be done?

Share this post


Link to post
Share on other sites

There was a problem with slopes in Rundll tow mod. In most cases both vehicles get damage or explode when moving up/down/along the slope. Is this problem persist in this mod?

Cheked it. Great improvements in slope handling! Not ideal, but much better! Thank you for your work.

Share this post


Link to post
Share on other sites

Wow. 2 towing mods in one week. This one looks amazing! Exactly what I was looking for. But as the other one there doesn't seem to be a chance to add additional vehicles via script in a mission file. I dont think all of the big important mods will be willing to add this mod to their package :(

 

There are some vehicles I would like to tow... like the C-RAM, the RHS/CUP Airforce, the SU-22, static field-howitzers (CUP), aso... Is there any chance you can provide us with some kind of script to add vehicles on the fly? (Maybe with a try-and-error-phase to find the right "attachpoints"?)

 

Unfortunately there isn't a way to add new vehicles through scripting. Originally ( a long long time ago) it worked like that but in order to facilitate expanding the pool of towing and towable vehicles i decided to use a config based solution. If you wish to use other vehicles in towing you can either ask their respective creators to support this mod natively by adding the config values or write your own patch config for these vehicles. 

 

 

Hello,

Just that you know it, the BlueFor has a Hemtt TOW (the stock without cargo).

 

Thanks for letting me know :) I was aware of it but wanted to take it easy first. I will be expanding the vanilla config pool slowly to allow more things to pull things once i know the underlying code itself is working fine in most scenarios.

 

 

Great mod!

I found that your mod writes itself into the addons- and addonsAuto-arrays in the mission.sqm as soon as a towable vehicle is placed. Is there any way to avoid that? (Our clan has strict rules on addon dependencies for our basic modset, so we can't use the mod as long as it makes itself dependant without actually being needed.)

 

This is unfortunately unavoidable with its current implementation (EDIT: I'll look into some tweaks in the class structure of the patch file to see if it helps). I know that each optional config pbo also writes itself into the addons and addonsAuto and was considering not even releasing them because it will inevitably cause someone not being able to open their mission when other mod makers get around to incorporate the config values into their mods. I would like to mention though that this mod has exactly 0 negative effect on performance when loaded and nobody is towing. There is no scanning or loops or anything until someone actually starts towing something.

 

 

Can this be made to tow any car?  Then it will be an amazing combat support vehicle!

 

If it could show up on Ctab,and if it could auto-add a new aircraft into available aircraft in mission for commanders,there will finally be a reason to stay behind,manning the LPD.

 

Could this be done?

 

Technically any object can be configured to be towable or something that can tow (or both). Even trains are possible however due to attaching and detaching being on the same keybinding it is for now disabled. Like i mentioned above i'll be expanding the vanilla configs to cover more vehicles gradually as the functions get some testing.

Share this post


Link to post
Share on other sites

Hello,

Just that you know it, the BlueFor has a Hemtt TOW (the stock without cargo).

and the CRV bobcat should be able to tow, too. and both should be able to tow wrecks; if you have a crashed plane laying on a runnway, or something.

btw great idea, lesh!

Share this post


Link to post
Share on other sites

Update 0.2 released!

 

http://leshrack.com/towing/lesh_tow.zip

 

changelist:

    - Fixed vanilla config patch to not get autoadded to the addons and addonsAuto when placing a vanilla vehicle in the editor
    - Fixed script error that occured when calling certain functions manually (thanks TeTeT)
    - Reworked some of the scripts to allow multiple instances of towing by the same player/client. (Untested in multiplayer)
    - Towing now allows "trains" if you have a vehicle that can both tow and be towed.
    - Added keybind to disable the speed limiter default: Shift+Ctrl+B (use at own risk)
    - Added optional config for Chairbornes Harriers
    - Added new config parameter to alter direction if the model forward/backward don't line up with the modelspace coordinate axis'
    - Replaced placeholder mod icon with the proper one (thanks Autumn)

Share this post


Link to post
Share on other sites

and the CRV bobcat should be able to tow, too. and both should be able to tow wrecks; if you have a crashed plane laying on a runnway, or something.

btw great idea, lesh!

 

I'll think about the destroyed objects thing and the bobcat. Currently there is a requirement that the thing you are trying to tow isn't a wreck.

 

Also this was hardly my idea :) as far as i can tell rundll was the first to implement something like this in Arma2

Share this post


Link to post
Share on other sites

I curious as to why you made the config for the f-18 and not the f-18x as well.. anywho i guess ill just continue to use the one i made. (which is a copy and paste of the f-18 with just the classname changed.)

 

 

I am not looking a gift horse in the mouth mearly suggesting.. !! 

 

thanks again for this mod!! its been working brilliantly on my dedicated server. as i have been testing the latest alpha for tetet

Share this post


Link to post
Share on other sites

I curious as to why you made the config for the f-18 and not the f-18x as well.. anywho i guess ill just continue to use the one i made. (which is a copy and paste of the f-18 with just the classname changed.)

 

 

I am not looking a gift horse in the mouth mearly suggesting.. !! 

 

thanks again for this mod!! its been working brilliantly on my dedicated server. as i have been testing the latest alpha for tetet

 

The goal has always been to offer a framework for the community, where authors include the configs into their respective mods providing compatibility without people having to worry about seperate patch files and the likes. I provided a few patch files mainly as an example and used assets that get featured in our own communities modpack. I could obviously make a new config for every vehicle that comes along, but that will in the long run become cumbersome to keep up to date.

 

Now that I have fixed most of the issues that I can think of I am going to focus on providing clear documentation to the authors and community alike to configure their vehicles properly. And start campaigning for authors to actually include the configs as part of their mods. Including the configs doesn't result in a dependancy so having them there will not hurt anyone. But will make the lifes of those that use the towing mod a lot easier.

 

My dream one day is that the only 2 pbo's you will need are the one that includes the functions and the one that has the configurations for the vanilla assets. And I fear getting there will take way too long if I just make patch files for all the assets :)

 

 

In other news i have been running tests on the mobile landing platform to make that towable and as such have even succeeded. Now I just need to figure out how to keep anything thats parked ontop of it in place as the platform beneath moves. Also "trains" of upto 6 pickups have been working nicely at least when driving forward, backing up seems impossible.

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

×