Alternative CSAR Script - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 09-11-2015, 03:13 PM   #1
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default Alternative CSAR Script

*** 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:
Code:
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:
Code:
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:

Code:
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
__________________
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

Last edited by Ciribob; 04-22-2016 at 08:00 PM.
Ciribob is offline   Reply With Quote
Old 09-11-2015, 03:26 PM   #2
RagnarDa
3rd Party Developer
 
RagnarDa's Avatar
 
Join Date: Mar 2012
Posts: 1,577
Default

Wonderful! This sounds like really fun in TvT mp!
__________________
DCS AJS37 HACKERMAN

Bugs will happen
RagnarDa is offline   Reply With Quote
Old 09-11-2015, 05:25 PM   #3
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

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

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?
Attached Thumbnails
Click image for larger version

Name:	1438812040_DCS.exe_DX9_20150805_215702.png
Views:	468
Size:	2.92 MB
ID:	121354  
__________________
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
Ciribob is offline   Reply With Quote
Old 09-11-2015, 06:40 PM   #4
dooom
Senior Member
 
dooom's Avatar
 
Join Date: Sep 2009
Location: Saskatoon Saskatchewan
Posts: 2,241
Default

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

""This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL
*NOTCH VIDEO F15 vs SU33
*P-51D ANM64 Bombing guide
dooom is offline   Reply With Quote
Old 09-11-2015, 07:11 PM   #5
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

Quote:
Originally Posted by dooom View Post
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
Ciribob is offline   Reply With Quote
Old 10-02-2015, 04:16 PM   #6
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

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

Last edited by Ciribob; 12-28-2015 at 09:28 AM.
Ciribob is offline   Reply With Quote
Old 10-03-2015, 09:37 AM   #7
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

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
Ciribob is offline   Reply With Quote
Old 10-03-2015, 02:09 PM   #8
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

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
Ciribob is offline   Reply With Quote
Old 10-03-2015, 02:34 PM   #9
Justificus
Member
 
Join Date: Jan 2015
Posts: 778
Default

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

System Specs:
Spoiler:
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 Rift, 1 32" & 2 19" Monitors



Modules Owned: A-10C, 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
Justificus is offline   Reply With Quote
Old 10-04-2015, 10:29 PM   #10
Ciribob
ED Testers Team
 
Join Date: Mar 2015
Location: Brighton, UK
Posts: 1,785
Default

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
Ciribob is offline   Reply With Quote
Reply

Tags
beacon, csar, huey, medevac, sar

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 05:12 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.