Jump to content

Dynamic Medevac Script


Recommended Posts

Just wanted to say thanks for this RagnarDa are you ok me using it with Mi-8 and making some missions based on your templates until I get to grips with MIST and general script usage?

 

Really enjoying your test missions and adding a radio broadcast for the ARK UD to the smoke marker or unit should allow precise navigation until the other ADF radio is implemented:thumbup:

i5 8600k@5.2Ghz, Asus Prime A Z370, 32Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I also notice that you use

 

"if (not status) then env.error(string.format("Error while handling message\n\n%s",err), true) end" to check the return value of pcall.

 

Where does the env.error output the string? Is there some sort of console interface that you use?

 

I'm learning how to script missions and looking for ways to debug in addition to doing trigger.action.outText()

 

Thanks.

314-я смешанная авиационная дивизия

314th Mixed Aviation Division: The "Fighting Lemmings"- Forums: http://314thsquadron.enjin.com/ - ED Forum Group: http://forums.eagle.ru/group.php?groupid=119

Link to comment
Share on other sites

Just wanted to say thanks for this RagnarDa are you ok me using it with Mi-8 and making some missions based on your templates until I get to grips with MIST and general script usage?

 

Really enjoying your test missions and adding a radio broadcast for the ARK UD to the smoke marker or unit should allow precise navigation until the other ADF radio is implemented:thumbup:

 

Ofcourse I'm ok with it! That is the reason I posted it on the forums. :) Also, feel free to modify it a you please.

 

About the radio, that is something I've been thinking about doing. I have no time ATM though so if anyone else want to step in... ;) Can't find the post with the frequencies for the ARK-UD, but I guess it would be more natural to use those instead of any other frequency.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Ofcourse I'm ok with it! That is the reason I posted it on the forums. :) Also, feel free to modify it a you please.

 

About the radio, that is something I've been thinking about doing. I have no time ATM though so if anyone else want to step in... ;) Can't find the post with the frequencies for the ARK-UD, but I guess it would be more natural to use those instead of any other frequency.

 

Thanks:thumbup:

Here is a link to ARK UD channel presets and elsewhere in the thread is a tutorial by Imp:)

http://forums.eagle.ru/showpost.php?p=1900984&postcount=17

i5 8600k@5.2Ghz, Asus Prime A Z370, 32Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I also notice that you use

 

"if (not status) then env.error(string.format("Error while handling message\n\n%s",err), true) end" to check the return value of pcall.

 

Where does the env.error output the string? Is there some sort of console interface that you use?

 

I'm learning how to script missions and looking for ways to debug in addition to doing trigger.action.outText()

 

Thanks.

 

%USERPROFILE%\Saved Games\DCS\Logs\dcs.log is where it's outputted to. I believe you can also start DCS with the -console switch. The functions you can use are env.error, env.info and env.warning.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

%USERPROFILE%\Saved Games\DCS\Logs\dcs.log is where it's outputted to. I believe you can also start DCS with the -console switch. The functions you can use are env.error, env.info and env.warning.

 

Thanks! :thumbup:

314-я смешанная авиационная дивизия

314th Mixed Aviation Division: The "Fighting Lemmings"- Forums: http://314thsquadron.enjin.com/ - ED Forum Group: http://forums.eagle.ru/group.php?groupid=119

Link to comment
Share on other sites

  • 2 months later...
  • ED Team

Thanks for the update RagnarDa

 

had a lot of fun using this script

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

Okay, she's brewing now. Basically it's a build into my Georgia Peach campaign. The idea is that 4 NATO patrols are working in the region (GOT Triangle, I call it... Gali, Ochamchira and TKV) and I have multiple ambush locations set up to ensure randomness. I'm trying to figure out the best way to ensure a good fight ensues- I think there will need to be about 10 minutes of immortal to get a real fireworks display going.

 

I have a roll of the dice at the beginning to figure out which units will spawn, and then there is only a 1/4 chance that the units will actually fire when the patrol goes past... and each time they go past the dice is rolled anew.

 

My ONLY issue so far is in giving the choppers tasks while they wait- but once the fighting starts, they'll be busy indeed!

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Okay, she's brewing now. Basically it's a build into my Georgia Peach campaign. The idea is that 4 NATO patrols are working in the region (GOT Triangle, I call it... Gali, Ochamchira and TKV) and I have multiple ambush locations set up to ensure randomness. I'm trying to figure out the best way to ensure a good fight ensues- I think there will need to be about 10 minutes of immortal to get a real fireworks display going.

 

I have a roll of the dice at the beginning to figure out which units will spawn, and then there is only a 1/4 chance that the units will actually fire when the patrol goes past... and each time they go past the dice is rolled anew.

 

My ONLY issue so far is in giving the choppers tasks while they wait- but once the fighting starts, they'll be busy indeed!

 

4 Patrols may be a bit too small. I build a mission with a similar approach (patrols driving around and running into one another etc.) and depending on the AI levels the outcome of a "random" firefight is usually not as balanced as expected. I tried to randomize a lot of moving patrols and insurgents that randomly run into one another on the roads so it is less predictable where a pickup occurs. Still you have certain "hot" areas where patrols often meet and get into a fight.

I tweaked the script a bit, so immortal crews are invisible (so enemy units don't shoot them forever) AND their ROE is WEAPONS HOLD (otherwise they kill all enemy).

I found when the troops get involved in a firefight they usually don't survive. One BRDM-2 that survives or a group of Soldiers witth AK-47 will quickly kill all survivors before you make it to the extraction point.

 

If you find a way to balance that with your triggers I would be happy to see it.

 

One tip from me: the landmines are pretty useful to place indiscriminative roadside IEDs... just adjust some routes on the road and spawn groups randomly.

 

Oh, by the way, if you're interested in trying my Mission, let me know...

 

@ RagnarDa - this script is awesome !:thumbup:

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Oooooooooooooooooooooooh IEDs are a GREAT idea! Thanks Shag.

 

On the note of 4 patrols not being enough... I did want to spread out the action enough that it wasn't just hit after hit after hit. But the IEDs is a PERFECT way to fill in the gaps. Brilliant. If I can rep you I will because I keep forgetting about those pesky little devices.

 

In this mission only 2-4 ambush sites are actually activated. I roll the dice each time a unit goes through their "engagement zone" between 0-10... and the only way invisibility is turned off is if the flag is more than 8. So 4 patrols, spread across the terrain they are...

 

Forces are pretty evenly matched... RPG troops, machine guns and some light APCs (BTR80 versus Stryker ICV) do face each other down well. The "immortal flag on both sides being set for just enough time to get the rescue unit in a slightly larger zone... keep in mind the idea is that the patrol will get wiped out... and there will be people to go in and evac. There are settings in the script which (blessedly) allow for those troops to be immortal- which adds some intensity to the firefight the huey's are getting in on. An addition of Mbots suppression script suddenly makes supporting units even more important.

 

So I will definitely let you know how it works and while I am certainly hearing you I think I have it dialed in loosely enough to keep things tense, but not boring and not over too quickly.

 

I'll let you know how it works!

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Ah, OK. Now I better understood what you plan. The idea using red ambush sites in conjunction with invisibility of the blue patrol is a nice addition.

Currently I rely on random vehicles with differing routes to get a bit of random actions. Actually it works pretty well. With two MP Hueys we have reasonable taskings for about three to three and a half hours and still good replayability.

I put in some two defined tasks and plan on expanding and randomizing them.

I'm just thinking if we combine the two concepts... random encounters by roadpatrols running into one another plus IEDs hitting Civilian trucks and patrols alike, and finally dug in insurgents that may attack or not attack a passing patrol or convoy.

Sounds really promising. I see if I can upload a first public version of what I did the last months this weekend.

If your scripts work we may throw them in as well...

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Here we go. Keep in mind this is still pretty much work in progress...

This mission requires 1.2.7.

 

It utilizes RagnarDa's script with some tweaks from me, feedback or ideas are welcome.

 

Best played with 2-4 players, at least 1-2 shoulöd take a Huey. The A-10Cs shift the balance in favor of the blue forces if they concentrate on supporting the Hueys, only. So try find the Artillery or the insurgent camp...:D

 

SearchDestroy_1_2_7-V0.5_Huey.miz


Edited by shagrat

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

I want to implement a sound when a medic call comes in, does anybody know how to do that? I opened the .lua but cant find something similar.

 

Add a sound to coalition action whenever the message is sent in the script:

function trigger.action.outSoundForCoalition(enum coalition.side coalition, string soundFile)

 

Details can be found here http://wiki.hoggit.us/view/Part_1#trigger

 

One important thing, the soundfile needs to be inside the miz file (which is just a zip archive) , after editing and saving with the ME you need to put it in again. Workaround, have the required sound in a trigger in the ME so it will be packed in the miz file every time you save it.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

  • 2 weeks later...

Co-op

 

I just used the script both in single player and then with a friend and loved it.

 

I fly in an Mi-8 as medevac, my friend flies a black shark as escort. Up until now we've basically made a randomly generated mission, dropped a point that is my imaginary pick up point, and off we go. This is obviously a LOT better.

 

We both start with helicopters off and we restart the mission if one of us dies. We've always done it that way, we enjoy the simulation aspects of it and it forces us to fly conservatively.

 

We had a lot of fun with it. Unfortunately I packed the first mission with too many units in too small a battle and it became a little chaotic, but we're planning to try a longer range lower combat generated mission next. Considering I have virtually no mission editing experience, it wasn't too bad to set up.

 

Really impressive stuff!!

Link to comment
Share on other sites

  • 2 weeks later...

Hey RagnarDa.

 

Just wanted to say thanks for your efforts on creating this script. I thought you might like to know that I used it (v3) on my latest mission Two-Pin Hedgehog.

 

The scripts used for the general dynamic CSAR, but also is a specific part of a fully featured CSAR side objective in the mission.

 

I made a few modifications you might find interesting, like basing the bleedout timer on an average speed and the distance the CSAR flight has to travel to the MASH. I think it should provide a relatively fair and fun challenge set up that way. I also added a function to inject CSAR tasks for existing units, and a little something for calculating a true direct distance between two points.

 

A few things that would be quite nice to have is tasks being added also for people who were not in a CSAR unit at the time the tasking was initially created, but being able to jump into a helo afterwards as well and having the task available. The second feature being radio beacons, which would help with and add a bunch to the homing in.

Link to comment
Share on other sites

Thats great! I am happy that you made that mission with it and that you improved the script! I will recommend that mission for my squad weekly flights, because it looks very good. Would you mind maybe posting your improved script too?

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

First- thank you thank you for this great script that is easy for guys like me to add dynamic content to a mission. We're really enjoying it!

 

Some feedback from one of my Georgia Peach missions last night:

 

Hey Eno,

 

I got a chance to play with the medevac system tonight on GP routine 3. We had two pilots shot down with a significant amount of time between the two. I hopped in one of the Huey's to go rescue the first pilot, and about halfway to his crash site, the second pilot was shot down and ejected. Oddly I received a "come get me" message from the second pilot instead of the first. Once I approached the second pilot everything went pretty smoothly. He popped smoke, I landed and he "got in", and then I got the timer and high tailed it back to the FOB where he exited as soon as I landed.

 

I never was able to pick up that first pilot though. I never received a "come get me" message when I went back for him, and when I landed next to him, he refused to budge (So I left him to improve relations with the locals :ar15: )

 

It may be that he bled out? Not sure.

 

Also any way to disable the need for a red mash? Is it just a matter of deleting that line?

 

Also trying to think of a way to handle ejected pilots. Because they are set to immortal in my options (if not they'd all be killed) they start receiving fire from ground units- tank cannons, anti tank missiles... Surviving of course. Any way to implement invisibility? Would it be practical and not affect other aspects of the script? Perhaps on a timer so they have so long to "hide" and be rescued if not the cloak is lifted and they perish which may help to unload the task for a new one? Now I'm thinking about it immortal off may be better... That encourages guys to nurse their aircraft out of the Hazard area... Hmmmm

 

Also... Again not to be "that guy" but I am excited at the potential and your openness to feedback. Any way to configure a "standby group" or several who would act as an enemy clean up crew dispatched to go pickup the pilot? Within a certain zone if the coordinate of the ejection is broadcast that point is used to act as a waypoint coordinate for an enemy vehicle group who will then move to that point?

 

My thought is you could have groups with a specific name created and spread around at whatever distance. Once the vector is announced I'm not sure if a measure of which unit is closest can occur? The unit then heads towards that pilot.

 

Reason I ask is I've set up air spots dedicated to the sar medevacs and would love for them to have something to work on.

 

It may not be practical but thought I'd ask.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Also trying to think of a way to handle ejected pilots. Because they are set to immortal in my options (if not they'd all be killed) they start receiving fire from ground units- tank cannons, anti tank missiles... Surviving of course. Any way to implement invisibility? Would it be practical and not affect other aspects of the script? Perhaps on a timer so they have so long to "hide" and be rescued if not the cloak is lifted and they perish which may help to unload the task for a new one? Now I'm thinking about it immortal off may be better... That encourages guys to nurse their aircraft out of the Hazard area... Hmmmm

 

I already added this, as well as I did set survivors immortal, invisible AND weapons hold. So they don't go killing tanks.

The script is integrated in the mission I posted a few posts before. If necessary I can provide the changes...:smilewink:

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

whoops! Okay, I'll go take a look. Is it just the mission... or do you have the actual code changes as well in a separate file?

Just the mission, but if you open it with 7zip or rename .miz to .zip you can open it and there is the script inside.

Look for shagrat in the code. I commented what I added.

 

If need more help, send me a PM.

  • Like 1

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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