Jump to content

Alternative CSAR Script


Ciribob

Recommended Posts

*** FOR 1.5 or 2.0: Make sure all CSAR players are in separate groups / flights ***

 

I wanted to do a simple script that just focussed on pilot search and rescue so i've put together another script.

 

It's based off the rewrite of the MEDEVAC script (which does support CSAR as well) http://forums.eagle.ru/showthread.php?t=107303 but adds some more CSAR specific features.

 

Features:

  • Ability to rescue downed pilots
  • Ability to disable downed planes until their pilot is rescued
  • Working Radio beacons
  • Ablity to disable a plane entirely if the pilot is killed in the crash
  • Simulated Winch - You can hover over a downed pilot to pick them up
  • Works at night - Pilot can be asked to pop a flare using the radio menu
  • Ability to DISABLE MULTIPLAYER SLOT until pilot is rescued - See below to enable

 

There are a whole bunch of configuration options at the top of the script. By default you can only rescue downed players and if a pilot isn't rescued within 20 minutes the plane is reactivated.

 

By default you can also pickup more than one pilot without RTB.

 

Note: The pilot won't move to you, unlike in the MEDEVAC script so you need to land very close or pick the pilot up by hovering over him.

 

Script Config options:


csar.csarMode = 0

   --      0 - No Limit - NO Aircraft disabling
   --      1 - Disable Aircraft when its down - Timeout to reenable aircraft
   --      2 - Disable Aircraft for Pilot when he's shot down -- timeout to reenable pilot for aircraft
   --      3 - Pilot Life Limit - No Aircraft Disabling -- timeout to reset lives?

csar.maxLives = 8 -- Maximum pilot lives

csar.countCSARCrash = false -- If you set to true, pilot lives count for CSAR and CSAR aircraft will count.

csar.reenableIfCSARCrashes = true -- If a CSAR heli crashes, the pilots are counted as rescued anyway. Set to false to Stop this

-- - I recommend you leave the option on below IF USING MODE 1 otherwise the
-- aircraft will be disabled for the duration of the mission
csar.disableAircraftTimeout = true -- Allow aircraft to be used after 20 minutes if the pilot isnt rescued
csar.disableTimeoutTime = 20 -- Time in minutes for TIMEOUT

csar.destructionHeight = 150 -- height in meters an aircraft will be destroyed at if the aircraft is disabled

csar.enableForAI = false -- set to false to disable AI units from being rescued.

csar.enableForRED = true -- enable for red side

csar.enableForBLUE = true  -- enable for blue side

csar.enableSlotBlocking = true -- if set to true, you need to put the csarSlotBlockGameGUI.lua
-- in C:/Users/<YOUR USERNAME>/DCS/Scripts for 1.5 or C:/Users/<YOUR USERNAME>/DCS.openalpha/Scripts for 2.0
-- For missions using FLAGS and this script, the CSAR flags will NOT interfere with your mission :)

csar.bluesmokecolor = 4 -- Color of smokemarker for blue side, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue
csar.redsmokecolor = 1 -- Color of smokemarker for red side, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue

csar.requestdelay = 2 -- Time in seconds before the survivors will request Medevac

csar.coordtype = 3 -- Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates.
csar.coordaccuracy = 1 -- Precision of the reported coordinates, see MIST-docs at http://wiki.hoggit.us/view/GetMGRSString
-- only applies to _non_ bullseye coords

csar.immortalcrew = true -- Set to true to make wounded crew immortal
csar.invisiblecrew = true -- Set to true to make wounded crew insvisible

csar.messageTime = 30 -- Time to show the intial wounded message for in seconds

csar.loadDistance = 60 -- configure distance for pilot to get in helicopter in meters.

csar.radioSound = "beacon.ogg" -- the name of the sound file to use for the Pilot radio beacons. If this isnt added to the mission BEACONS WONT WORK!

csar.allowFARPRescue = true --allows pilot to be rescued by landing at a FARP or Airbase

 

To enable a helicopter to do CSAR, make sure the pilot name is one of these or add your own names to the list:

csar.csarUnits = { "MEDEVAC #1", "MEDEVAC #2", "MEDEVAC #3", "MEDEVAC #4", "MEDEVAC #5", "MEDEVAC RED #1" } -- List of all the MEDEVAC _UNIT NAMES_ (the line where it says "Pilot" in the ME)!

 

An optional MASH can be added to the mission to drop rescued pilots at. By default, pilots can be rescued by landing at a friendly airfield or FARP. The MASH can be any unit and must be named one of these names in the list or you can edit the list:

 

csar.bluemash = { "BlueMASH #1", "BlueMASH #2" } -- The unit that serves as MASH for the blue side
csar.redmash = { "RedMASH #1", "RedMASH #2" } -- The unit that serves as MASH for the red side

 

If you want to use the Multiplayer slot blocking feature:

 

Edit the CSAR script and set csar.enableSlotBlocking = true and add to your mission as normal.

 

Copy the csarSlotBlockGameGUI.lua file to C:/Users/<YOUR USERNAME>/DCS/Scripts for 1.5 or C:/Users/<YOUR USERNAME>/DCS.openalpha/Scripts for 2.0

 

If you mission uses flags, make sure that all the flags you use are above 1000 to stop conflicts with the disable script.

 

 

Sample mission and latest download on GitHub:

 

Link: https://github.com/ciribob/DCS-CSAR

Latest Version: v1.9.0

 

Make sure you have the latest MIST (4.0.57)!

 

Please Note: For radio beacons to work you must add beacon.ogg to your mission!

 

As always, please let me know if you have any issues or suggestions!

 

Slot Blocking Demo for CSAR v1.8.3


Edited by Ciribob
  • Thanks 1

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

Thanks RagnarDa! Yeah that was what VSAAF were going to use it for.

 

Whats quite nice is you can list who's onboard for ribbing later on your forums :thumbup:

 

Although I've managed to rescue myself in this test.

 

One thing I've been thinking about but not implemented is instead of disabling a specific aircraft that has crashed or ejected, it could actually be swapped so the player that was flying that aircraft is stopping from flying any other aircraft until their pilot is rescued.

 

What do you guys think?

1438812040_DCS.exe_DX9_20150805_215702.thumb.png.7f1a5b446454e1deb60c69cdcfb75ef0.png

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

can your script be edited to allow the TF51 to act as a CSAR pickup plane? It gave me some ideas

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Link to comment
Share on other sites

can your script be edited to allow the TF51 to act as a CSAR pickup plane? It gave me some ideas

 

Yup. You don't even need to edit it. You can actually use any plane as long as the name of the planes pilot is in the csar.csarUnits list :)

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

  • 3 weeks later...

Sorry guys looks like CSAR isn't working with DCS 1.5...

 

Issue is I can't get a group from a unit.

 

The code unit:getGroup() isnt working for some reason. I'll keep working on it!


Edited by Ciribob

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

Good news, should have a complete working version this afternoon and a fix for the radio beacons.

 

Special thanks to Grimes for the help!

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

New version of the CSAR Script v1.5 - 1.5 - BETA Compatible!

 

Breaking Change!

Radio beacons will no longer function if you use the version on 1.2 but WILL work on the Beta 1.5 :)

 

Make sure you have the new MIST 4.0.55 !

 

Fully compatible with 1.5 with working radio beacons for homing to pilots

 

When upgrading a 1.2 mission to 1.5:

  • Remove and Re-add beacon.ogg using a Sound to country Action
  • Make sure you have the latest MISTloaded as a DO SCRIPT before CSAR's DO SCRIPT. You must not use "On Mission Start" or "Initialization Script" as these are bugged

 

Please see Github for latest code

Link:https://github.com/ciribob/DCS-CSAR

 

As always, please let me know if you have any issues or suggestions!

 

Please Note: For radio beacons to work you must add beacon.ogg to your mission!

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

Ciribob, thanks for ding this! I've got a couple of missions I've downloaded and edited with your script and have been bummed that they wouldn't work in 1.5. Now they will! :thumbup::beer:

Justificus

 

System Specs:

i7 4970K @ 4.8, GTX 1080 SC, 32GB G.Skill DDR 2133,Thermaltake Level 10 Full Tower Case, Noctua NH-D15 6 Cooler, Win 10 Pro, Warthog, CH Pro Pedals, CH Throttle Quadrant, Oculus, 1 32" & 2 19" Monitors

 

 

 

Modules Owned: A-10C I+II, Ka-50, FC3, F-86, Mig-15, Mig21, UH-1H, Mi-8, CA, P-51D, BF-109K-4, FW-190 D-9, Hawk, NTTR, M-2000C, SA342, F-5E, Spit Mk. IX, AJS-37, Normandy, WWII A.P., AV-8B, F/A-18C, L-39, Persian Gulf, Mig-19P, I-16, Super Carrier, F-16, Channel, Syria

Link to comment
Share on other sites

No worries. Let me know if you have any issues! :)

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

New version of the CSAR Script v1.6 - 1.5 - BETA Compatible!

 

Small bug fix for 1.5. Works fine with the latest hotfix.

 

Make sure you have the new MIST 4.0.55 !

 

Fully compatible with 1.5 with working radio beacons for homing to pilots

 

Please see Github for latest code

Link:https://github.com/ciribob/DCS-CSAR

 

As always, please let me know if you have any issues or suggestions!

 

Please Note: For radio beacons to work you must add beacon.ogg to your mission!


Edited by Ciribob

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 like the idea of disabled slots of downed planes until their pilot is rescued. I will definitely check this out. Thank you for this script, Ciribob!

CPU: Intel Core i9-10900K (10. Generation) @5 GHz, Cooler: Corsair iCUE H150i RGB Pro XT, RAM: 64 GB Corsair Dominator Platinum RGB DDR4-3200, HDD: 1TB Samsung 970 EVO Plus M.2 SSD i.a., Mainboard: ASRock Z490 Taichi, Graphic Card: ASUS TUF Gaming GeForce RTX 4090 24 GB OC Edition, Case: Lian Li - PC-011 Dynamic XL, black, Power Adapter: 1000W – be quiet! Straight Power 11 Platinum, Monitor: Samsung Odyssey Ark (55" 4K), MFD: 2 x TM Cougar MFD with Lilliput 8" Monitors, Mouse: Roccat Kone AIMO, Mousepad: Corsair MM700 RGB, Keyboard: Roccat Vulcan 121 AIMO LED, black, Joystick: Thrustmaster HOTAS Warthog, Rudderpedals: MFG Crosswind Flight Rudder Pedals (Graphite), Headtracker: TrackIR 5, VR Headset: Pimax Vision 8K X DMAS, Mikrophone: Rode NT-USB

Link to comment
Share on other sites

It should give you a message and kick you out after 20 seconds or so. Is that working?

 

I can't actually disable the slot completely, just remove the aircraft once you get in it.

 

Wpuld you mind just double check that the disableAircraft setting is set to true as it seems to work in my test mission?

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'll test your demo in a sec, but no, what happens i get the message saying I need to be picked up when I eject, i swap slots into one thats been already ejected and I get the message immediately but theres no kicking me out.and I waited for about 5 mins this time. If I repeat and eject again from that slot it doesnt bother showing me the message again.

Untitled.jpg.570404468574e553fe39975f6d70006f.jpg

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

OK, I've found ways to reproduce it broken and working.

 

If you run the script from a mission in the mission editor it will work as expected.

 

If you load that into multiplayer or a multiplayer server, theres no kick.

 

Odd.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

New version of the CSAR Script v1.7 - 1.5 - BETA Compatible!

 

Fix for aircraft not being disabled in Multiplayer

 

Make sure you have the new MIST 4.0.55 !

 

Fully compatible with 1.5 with working radio beacons for homing to pilots

 

By default AI pilots don't need rescuing and you can fly a CSAR heli after ejecting even if the pilot isn't rescued. These defaults are easily changeable at the top of CSAR.lua for your missions :)

 

As always, please let me know if you have any issues or suggestions!

 

Please see Github for latest code

Link:https://github.com/ciribob/DCS-CSAR

 

Please Note: For radio beacons to work you must add beacon.ogg to your mission!

 

Thanks Pikey for the detailed bug report! :thumbup:


Edited by Ciribob

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 had a thought for an enhancement, similar to aries mod, when the pilot ejects (you already detect that) to play the ejection alarm on the broadcast frequency (and have it able to be disabled because its really annoying). It's quite immersive though.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Janes F/A-18 had SAR missions for AI build in. ALl you had to do was assign a SAR TAsk to an Helicopter.IF your Wingman had to eject he would tell you so and after he reached the ground he would ask for SAR. If enemy ground forces were near he would also say: "Enemy near I'm hiding." As soon as the SAR was on sight the unit did pop smoke. I cant believe that such detail was a default feature in a Sim made in 1999 and still is not in DCS because now we even have Player controlled aircraft suited for SAR.

Link to comment
Share on other sites

Not sure what the real beacons would broadcast. I'll see if i can find a recording.

 

The Morse code for mine is actually an Easter egg as its CTLD as that's the script I first got beacons working in...

 

I could definitely transmit something over the guard frequency when the pilot ejects put im not sure it would work in game without Aries. What frequency is the message transmitted on?

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

  • Recently Browsing   0 members

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