Jump to content

Dynamic Medevac Script


Recommended Posts

I don't mind if someone else implements radio beacons for the rescuees, if you feel like coding. Right now it may be a bit until I will be getting around to them with my current workload.

 

Basically there would be an option where each group would put up a radio location beacon the Huey at least can home in on, when the group is spawned. It could even be randomized wether the groups would report coordinates, put up a beacon, do both or something else.

Link to comment
Share on other sites

Good idea...

@ Audax - schau mal in das CTTS script unter github Ciribob/DCS-CTTS.

Da gibt es eine RadioBeacon function, bzw. im Detail ab Zeile 1877: AM beacon: localizer loop in AM und ab Zeile 1903 dasselbe für FM beacon... Dann hast du die DCS trigger gleich parat ;)

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

Any more feature requests? ;)

It was fun to build that feature and I want to improve my newly aquired skills.

I tried this script with Mi-8 Red site, really wonderful!!!!! (of course I have adjusted some parameters :music_whistling: )

Only one request: can the woundeds wait in defensive position (not standing) and then moving normally once the helicopter is landed? Thanks in advance.

antonio.

Link to comment
Share on other sites

Any more feature requests? ;)

It was fun to build that feature and I want to improve my newly aquired skills.

 

I am trying to do something... I open a post also. http://forums.eagle.ru/showthread.php?t=142807

 

I use the CTTS script, that it is used for load and unload troops. Problem is it generates a new unit with unknown name (for me) so I cannot make what I want.

 

My goal is to have an script that ask for evacuation when "unit is less alive than 25%". it means that for an 8 infantry men group, when they are 3 or 2 they will call for evacuation sending a message, and also creating a smoke Orange marker.

 

I think it would be great if we can put togeth both your script and CTTS.

 

What do you think?

Link to comment
Share on other sites

Why merge CTTS with Medevac? Better add the Infantry group to the event monitoring and add them as an injected group to the beacon/smokemarker and evacuation functions?

CTTS is about spawning groups, and cargo and transporting them. Goal is simulation of Air Mobile missions insertion/extraction.

Medevac script focus on if a unit gets destroyed request and manage medevac, locating and rescue timer.

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

You answer yourself!

 

I want to make an air assault... and if any group is seriously damaged i want to evacuate them. I fly missions with up to 8-10 human UH so there is a lot of roles that can be done.

 

I dont mind if there are two diferent scripts, what i want is to be able to do what I said.

 

Cheers!

Link to comment
Share on other sites

Separating the scripts keeps trouble shooting a bit easier and from my point of view it is easier for mission building to decide if you need to add air assault options e.g. load/unload troops or cargo.

 

Yet, with a little tweak you could even build a civil medical ambulance with civil cars hitting mines or "crashing" into other cars (moving trigger zone) simulating road accidents with the medevac script...

 

Separate scripts work fine if you load them with a few seconds spread at mission start. I do it with some of our missions for quite a while.

Only thing that's important is to verify you have no similar global variables in two separate scripts. :D

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

You answer yourself!

 

I want to make an air assault... and if any group is seriously damaged i want to evacuate them. I fly missions with up to 8-10 human UH so there is a lot of roles that can be done.

 

I dont mind if there are two diferent scripts, what i want is to be able to do what I said.

 

Cheers!

 

You could have either mission triggers or a small secondary script that would monitor the health status of the groups in question. Then once they fell below a certain percentage, have the trigger/script call the medevac inject function on that group. This is definitely the kind of a thing I had intended it for :)

 

If these are randomly generated groups, a small secondary script iterating the groups world probably work better. Not sure if there is an event handler for this directly to be able to do it without polling. Maybe something like checking the status of a group when the handler for something having been destroyed is called.


Edited by DragonShadow
Link to comment
Share on other sites

You could have either mission triggers or a small secondary script that would monitor the health status of the groups in question. Then once they fell below a certain percentage, have the trigger/script call the medevac inject function on that group. This is definitely the kind of a thing I had intended it for :)

 

If these are randomly generated groups, a small secondary script iterating the groups world probably work better. Not sure if there is an event handler for this directly to be able to do it without polling. Maybe something like checking the status of a group when the handler for something having been destroyed is called.

 

My only problem is that with the script I use for transport troops (CTTS) the units transported keeps their name, but internally, the software does not recognize them as their group name. So... I cannot do anything.

 

with this "Group alive lessMist" (http://wiki.hoggit.us/view/Group_alive_lessMist) you could check the status, in fact, I have done it already, for units that has not being transported. It is a simplest way to do a Medevac script.

 

I mean, unit damaged x% triggers a message and unitsmoke... it is easy. but you need to know the name of the generated unit, and with the CTTS I dont.

 

If I could I would do a checkstatus or something like that for generated units using a table of generated units from CTTS.lua file. But I do not know how to.


Edited by ESAc_matador
Link to comment
Share on other sites

The problem is, if you would just hook into the group create function after an infantry group gets below a certain percentage, you would create another infantry group.... that infantry group would spawn the next medevac group if getting hit below that percentage and so on... Possibly a lot of groups spawn quickly in a hot zone.

 

It is a better approach to hook into the medevac script after the group spawning and just add the decimated infantry group to the table/list of woundedGroups.

 

We wouldn't need to spawn a new "survivor group", just mark the existing infantry group as wounded so if a heli gets near them it triggers the same functions as with a regular wounded group... Not that I have any idea how we can do this, at the moment.

We would need the group names or better a pattern for group names in CTTS, like "casualtyGroupXXX", to monitor health on that particular group names in the Medevac script.

Then if the condition is met, add this group to wounded group tables...

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

Radio beacons implemented and troops only inform you every x meters how far they are away. Pull requests are following soon :D

 

Sounds good! Curious to see it in action. Though what do you mean about them informing how far they are?

 

What kind of a system did you device for the radio frequency allocation?

Link to comment
Share on other sites

Distance during pick up....the message that says "we are 178 meters away..." and then "We are 173 meters away..." a second later. Now it should only fire a message every 50m, 100m, or what you define as medevac.checkinDistance...

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

Sounds good! Curious to see it in action. Though what do you mean about them informing how far they are?

 

What kind of a system did you device for the radio frequency allocation?

Distance stuff is like shagrat said. The radio stuff is from the CTTS script and I use the frequencies (x*2 mod 58) + 30 for VHF where x the group number. If there are too many groups, there will conflicts and if that really is a problem, I'll switch the offset to 31 or so.

See https://github.com/shagratdcs/DCS-Medevac/commit/65eb3c336dee6a95b947080771c11a9b908f5c8f


Edited by audax
Link to comment
Share on other sites

Audax, nice work! Make sure you test in multiplayer though as last time I checked, radio beacons didn't function properly. It might be a simple fix like just recreating all the radio beacons when someone spawns.

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

I am bad with forks. Also, the 2 pull requests are sent.

 

@Multiplayer: Last time I checked (an February I think), radio beacons worked in MP again, but I didn't test the script in MP yet. You may hold off on merging the pull request until I tested in MP.

Link to comment
Share on other sites

My only problem is that with the script I use for transport troops (CTTS) the units transported keeps their name, but internally, the software does not recognize them as their group name. So... I cannot do anything.

 

with this "Group alive lessMist" (http://wiki.hoggit.us/view/Group_alive_lessMist) you could check the status, in fact, I have done it already, for units that has not being transported. It is a simplest way to do a Medevac script.

 

I mean, unit damaged x% triggers a message and unitsmoke... it is easy. but you need to know the name of the generated unit, and with the CTTS I dont.

 

If I could I would do a checkstatus or something like that for generated units using a table of generated units from CTTS.lua file. But I do not know how to.

Hi, one question. Do you/can you use the defined "extractionGroups" in CTTS (where it says Extract1, Extract2 etc.)?

I guess I have a plan how to monitor health of these groups in CTTS and use the medevac.injectGroup to trigger the evacuation for the groups listed as ExtractionGroups.

The randomly created groups from the pickupzone function is a bit more difficult... No guarantee I can make this work, but I'll try.

What would definitely be a bad idea, is to monitor all infantry groups and inject them, as it could quickly flood the table with duplicate wounded groups from the medevac script! We need to be sure infantry spawned as survivors by the medevac script won't get monitored here.

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

Hi, one question. Do you/can you use the defined "extractionGroups" in CTTS (where it says Extract1, Extract2 etc.)?

I guess I have a plan how to monitor health of these groups in CTTS and use the medevac.injectGroup to trigger the evacuation for the groups listed as ExtractionGroups.

The randomly created groups from the pickupzone function is a bit more difficult... No guarantee I can make this work, but I'll try.

What would definitely be a bad idea, is to monitor all infantry groups and inject them, as it could quickly flood the table with duplicate wounded groups from the medevac script! We need to be sure infantry spawned as survivors by the medevac script won't get monitored here.

 

Sorry for the delay.

 

Yes, we play with "extract1", "extract2" names... My problem was that, they cannot activate anytrigger from the ME once the have been deployed it is somehing related to the ID I think.

 

But the approach you told me, seems to be a good idea. Also, allow a couple of extractions would be interesting too.

Link to comment
Share on other sites

Yeah, I tried to inject the Groups from CTTS, but it didn't really work.

So I got back to square one and refined my original idea. :)

Actually, you don't need to care "how" other infantry groups are named, as long as you take care you don't add the wounded groups from the medevac script... :smartass:

That concept made it possible to keep it all in the medevac script.

When I've finished dinner etc. I'll try to fix that damn attributes... Was a nasty surprise, when the decimated enemy infantry was also set to "immortal" and "invisible" while you go in with a Huey :D

I need to either make an exception for the red troops or better find a way not to set the attributes for normal infantry... ;)

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

Done!

 

@ESAc_matador you got a PM.

 

I simply added a variable to exclude setting the parameters to infantry groups.

Not perfect, yet, but it works and actually it is quite realistic, as a group in contact won't stop fighting to wait for the CASEVAC Huey :D

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

Done!

 

@ESAc_matador you got a PM.

 

I simply added a variable to exclude setting the parameters to infantry groups.

Not perfect, yet, but it works and actually it is quite realistic, as a group in contact won't stop fighting to wait for the CASEVAC Huey :D

 

 

Thank you! i do prefer them to keep figthing indeed!!! So i will tell you our feed back, in single player and Mp:thumbup::thumbup::thumbup:

Link to comment
Share on other sites

Ok, I'll have a look in the evening...

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

Ok, there was a BLueMASH#1 #001 misnomer, that caused that error.

 

Also, balancing infantry is tricky. I added two red groups and made the blue group without(!) M249 heavy Machineguns. They devastate the red troops in seconds!

 

Bad thing is the AI results are quite unpredictable in a fight. Sometimes blue wipes out both red troops, more often some blue troops survive, but also red wipes out blue if blue has a bad start...

 

This won't matter much in a firefight, yet you need to balance troops and compostion, as it might happen that blue survivors are dead if you arrive... the realities of war! Sometimes you loose, sometimes the enemy wins! :D

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