Dismounts Script - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 07-06-2013, 01:50 PM   #1
MBot
Veteran
 
Join Date: Nov 2004
Posts: 3,162
Default Dismounts Script

This small script allows to add a dismounted element to any ground unit. When the designated carrier unit stops, it will disembark the assigned element. When it continues moving, the dismounts will embark again on the carrier. Available dismounts include: MANPADS team, mortar team, rifle squad and ZU-23 AAA (the gun would be towed actually rather than being mounted).

Rifle squads have an extra functionality. Once they dismount, they will move to a position 100m in front of their carrier. If the carrier starts moving again and stay below 20 kph, the dismounted rifle squad will keep trying to move in front of their carrier. Once the carrier breaks 20 kph, the dismounted rifle squad will embark again. Best results to keep the carrier behind its dismounts is achieved with about 10 kph moving speed.

Implementation is fairly easy. Run the script to initialize it, then run the following code line for each unit you want to assign a dismounted element:

Code:
AddDismounts("UnitName", "dm_type")
UnitName is the mission editor name of the unit (remember to take the unit name, not the group name; the name must be written with "").

dm_type is the dismounted element you want to add. Available options are: "MANPADS", "Mortar", "Rifle" or "ZU-23" (write it with "").


The script is quite simple. If a dismounted group is destroyed, it is not embarked again. But I did not track the individual dismounted units, so if a group looses some units, embarks and later disembarks again, it will be spawned in full strength again.

The MANPADS team is probably the most useful function of this script and in my opinion a quite cool addition A moving convoy can have MANPADS loaded as cargo in some units. When the convoy is attacked, disperses and comes to a halt, the MANPADS dismount to defend against air attack.

The script could also be expanded quite easily with new dismount types should they become available (ATGM teams, automatic grenade launcher teams, heavy MG teams, towed artillery etc.).
Attached Thumbnails
Click image for larger version

Name:	Screen_130706_152010.jpg
Views:	911
Size:	128.2 KB
ID:	84539   Click image for larger version

Name:	Screen_130706_152051.jpg
Views:	819
Size:	126.0 KB
ID:	84540   Click image for larger version

Name:	Screen_130706_152145.jpg
Views:	864
Size:	181.7 KB
ID:	84541  

Click image for larger version

Name:	Screen_130706_152233.jpg
Views:	862
Size:	162.6 KB
ID:	84542  
Attached Files
File Type: lua DismountsScript.lua (27.1 KB, 684 views)
File Type: miz DismountsDemo.miz (11.5 KB, 415 views)

Last edited by MBot; 07-07-2013 at 09:10 AM. Reason: Demo Mission added
MBot is offline   Reply With Quote
Old 07-06-2013, 08:36 PM   #2
shelt
Member
 
shelt's Avatar
 
Join Date: Mar 2011
Posts: 154
Default

Another fantastic idea to the scripts available. I will give this a try, looks like it will be very helpful in some missions.
Thanks, Mbot
__________________
Spoiler:
Intel i7-3770K,Windows 10 64,Noctua NH-U12S ,ASRock Z77 Extreme4 ,Corsair 16GB DDR3 1600,7970 3GBx2 Crossfire,ADATA XPG900x2 RAID 0, CM HAF XB Case,Thrustmaster Warthog,Combat Rudder Pedals,Logitech G930 with wireless TrackIR 5, 39" Insignia LED 120Hz Monitor, Oculus Rift
shelt is offline   Reply With Quote
Old 07-06-2013, 10:14 PM   #3
Paco
Veteran
 
Paco's Avatar
 
Join Date: Jun 2009
Location: Chicago
Posts: 204
Default

Awesome!!! I have got to learn LUA!!
__________________
Paco
Paco is offline   Reply With Quote
Old 07-06-2013, 10:38 PM   #4
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,268
Default

Fantastic work, Mbot!

One question:

If I kill the dismounted unit from a vehicle, than the vehicle moves and embark the remaining part of the dismounted unit, and then slow down again... what would happen? it will disembark everithing once again or it will disembark only the alive part of the original embarked units?
__________________

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Last edited by chromium; 07-06-2013 at 10:41 PM.
chromium is offline   Reply With Quote
Old 07-06-2013, 11:09 PM   #5
gunterlund21
Member
 
Join Date: Mar 2012
Location: Napa, Ca
Posts: 652
Default

great work mbot. Can you provide a test mission?

edit

I got this to work and I must say this is one of the best script ever for dcs. I had a platoon of truck with mortars go against an apc that dismounts inf. This worked with Combined arms so when I took control of the vehicle and kept my speed under 10, the inf advanced in front of me whereever I went. Great!

edit

After playing with this script for about 2 hours now I have to say that it has truly changed the face of this game. Now you can bring in all sorts of infantry elements into missions. I played with a full company of infantry backed by transports and attacked several towns. It was a bit tricky to get the vehicle formations to behave correctly with all the inf spawning in front and behind them but once you get the hang of it is you can have significant sized infantry attacks taking place. Now weapons that were once static can now be moved, placed and brought into the fight, in particular mortars. I hope you will consider adding more unit level formations including 3 and 4 man tank crews that could bail out when vehicles are hit. ED we also need more infantry types including javelin or at least light nato anti-tank weapons. We definitely need downed pilots!!

Last edited by gunterlund21; 07-07-2013 at 06:06 AM.
gunterlund21 is offline   Reply With Quote
Old 07-07-2013, 12:47 AM   #6
Paco
Veteran
 
Paco's Avatar
 
Join Date: Jun 2009
Location: Chicago
Posts: 204
Default

Where do you enter the code line?
__________________
Paco
Paco is offline   Reply With Quote
Old 07-07-2013, 01:11 AM   #7
Paco
Veteran
 
Paco's Avatar
 
Join Date: Jun 2009
Location: Chicago
Posts: 204
Default

Disregard last post, figured it out....awesome script!!!


Edit
I'm up early this morning adding this script to my missions.
__________________
Paco

Last edited by Paco; 07-07-2013 at 12:16 PM.
Paco is offline   Reply With Quote
Old 07-07-2013, 09:11 AM   #8
MBot
Veteran
 
Join Date: Nov 2004
Posts: 3,162
Default

Thank you for your kind comments. I added a demo mission for the script to the initial post.
MBot is offline   Reply With Quote
Old 07-07-2013, 09:16 AM   #9
MBot
Veteran
 
Join Date: Nov 2004
Posts: 3,162
Default

Quote:
Originally Posted by chromium View Post
If I kill the dismounted unit from a vehicle, than the vehicle moves and embark the remaining part of the dismounted unit, and then slow down again... what would happen? it will disembark everithing once again or it will disembark only the alive part of the original embarked units?
It will disembark everything again. It would be possible to track the status of every unit individually, but that would be quite a lot of work. Frankly I do not think it is worth the effort, especially considering how infantry in DCS is represented in a highly abstracted form anyway. If infantry gets fleshed out further in the future, that would be an enhancement to look into.
MBot is offline   Reply With Quote
Old 07-07-2013, 10:03 AM   #10
Silver_Dragon
ED Translator
 
Silver_Dragon's Avatar
 
Join Date: Apr 2005
Location: Arafo, Tenerife, Canary Islands, Spain
Posts: 5,584
Send a message via MSN to Silver_Dragon
Default

That very interesting if can combine with realistic units templates (and show the lack of some served crew weapons missing on DCS:W), but them make a boost to CA inmersion.

Very good if combine with others Scripts (Artillery Enhancement Script, etc)
__________________
More news to the front
Wishlist: ED / 3rd Party Campaings
My Rig: Intel I-5 750 2.67Ghz / Packard Bell FMP55 / 16 GB DDR3 RAM / GTX-1080 8 GB RAM / HD 1Tb/2Tb / Warthog / 2 MDF / TFPR

DCS: Roadmap (unofficial):https://forums.eagle.ru/showthread.php?t=116893
DCS: List of Vacant models: https://forums.eagle.ru/showthread.php?t=104115
21Squad DCS: World News: https://www.facebook.com/21Squad-219508958071000/
Silver_Dragon Youtube
Spanish 4Th Perrus Squadon Member: http://www.4thperrus.com
Silver_Dragon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:36 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.