Jump to content

Dismounts Script


Recommended Posts

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:

 

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.).

DismountsScript.lua

Screen_130706_152010.thumb.jpg.daba31dfdf65c0ea11fceae0a4b572b6.jpg

Screen_130706_152051.thumb.jpg.8832cfaa8d37338d5508ee7891381120.jpg

Screen_130706_152145.thumb.jpg.29d45c811a31e8fd1417da6f3ef48406.jpg

Screen_130706_152233.thumb.jpg.d10fb83c435ae87d119421a7b38eafd0.jpg

DismountsDemo.miz


Edited by MBot
Demo Mission added
  • Like 3
Link to comment
Share on other sites

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

Intel i7-3770K,Windows 10 64,Noctua NH-U12S ,ASRock Z77 Extreme4 ,G.Skill 32GB DDR3 2400,EVGA GTX 1080,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

Link to comment
Share on other sites

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? :)


Edited by chromium

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

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.

Link to comment
Share on other sites

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!!


Edited by gunterlund21

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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?p=4076891#post4076891

Silver_Dragon Youtube

Link to comment
Share on other sites

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.

 

Sct has a function to capture the group table of a group, ie. what kind of units it has and how many. Damaged units would be at full health at next respawn but dead ones at least would stay dead. All you need to do is copy the current group table to some variable before despawning and use that table to respawn the group next time.

 

Anyway, great script. I will definitely try it at some point.


Edited by Bushmanni
Added compliments

DCS Finland: Suomalainen DCS yhteisö -- Finnish DCS community

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

SF Squadron

Link to comment
Share on other sites

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.

 

one way to possibly deal with this is look at the health of the vehicle. If it has 50% of its health you spawn 50% of the infantry. Just a thought. Right now we have unlimited infantry until the vehicle gets taken out.


Edited by gunterlund21

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

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)

 

Man if only that arty script worked (broken due to ED wanting to have arty with a line of site of 10km).

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

so it will dismount units, direct when the carrier stops? Is it possible to add a"key" to dismount on the position of your choice? - not on the end of the path....?

Waiting for: DCS: Mi-24 Hind, and AH 64D Apache

Intel i5-7600K @4.1GHz, 32GB DDR4 @2400MHz, GTX 1070 Gigabyte Gaming OC 8GB DDR5, WIN 10 64Bit Prof.

Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh

Ghost0815

Link to comment
Share on other sites

so it will dismount units, direct when the carrier stops? Is it possible to add a"key" to dismount on the position of your choice? - not on the end of the path....?

 

I don't have it planned currently. Of course you can stop units at any waypoint for a varying duration using the hold task. The dismounts will disembark for the duration of the halt. My premise is that carrier and dismounts fight together and will not get separated (and I wanted to keep the script as simple as possible). A dedicated transport script for ground units might be a better solution for your request.

Link to comment
Share on other sites

okay, i see your point.

 

I would like to use this in a MP Session, where both sides can spawn troops from troop carriers, but not before the unit is in the right position (POV of the GC) - so by order not at the last WP...

Waiting for: DCS: Mi-24 Hind, and AH 64D Apache

Intel i5-7600K @4.1GHz, 32GB DDR4 @2400MHz, GTX 1070 Gigabyte Gaming OC 8GB DDR5, WIN 10 64Bit Prof.

Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh

Ghost0815

Link to comment
Share on other sites

okay, i see your point.

 

I would like to use this in a MP Session, where both sides can spawn troops from troop carriers, but not before the unit is in the right position (POV of the GC) - so by order not at the last WP...

 

The question is => is F10 menu available for CA players ? If yes, just do a menu to pick-up/drop off your soldiers.

Link to comment
Share on other sites

  • 1 month later...

works perfectly here on 1.2.6 :)

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

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.

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

Hey MBot,

 

many thanks for creating and sharing this script. I like it so much that I just played Public Transport Provider for half an hour, ferrying people around my current mission project :)

Special mention for the ease of use in both the mission editing process and in the game!

 

 

Best regards,

Supersheep

 

 

(and a big BUMP for the thread :) )


Edited by Supersheep
Link to comment
Share on other sites

  • 11 months later...

Where did you guys paste the text in the dismount .lua file? I can't get it to work aside from using the demo mission MBot was kind enough to provide. I copied his format exactly in the demo mission, but when I try the same set up on a new game i made, it freezes up? Please advise guys because this is an awesome script. Thank you

Link to comment
Share on other sites

  • 1 year later...

This scrip works fine with the demo, but causes all sorts of errors when I copy and paste the script into a new mission.

 

Any ideas? Thanks!

P-51D | Fw 190D-9 | Bf 109K-4 | Spitfire Mk IX | P-47D | WW2 assets pack | F-86 | Mig-15 | Mig-21 | Mirage 2000C | A-10C II | F-5E | F-16 | F/A-18 | Ka-50 | Combined Arms | FC3 | Nevada | Normandy | Straight of Hormuz | Syria

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...