Jump to content

Call Artillery Script


MBot

Recommended Posts

This script will allow you call and correct artillery fire using the F10 radio-menu. Works with every aircraft and can control tube artillery, rocket artillery, mortars and naval guns. MP compatible.

 

Demo mission: CallArtilleryScriptDemo.miz

 

How to play:

All functions are accessed with your radio-menu in the sub-menu F10>Fire Support.

1. Call for Fire:

a) Select the name of the battery you want to to request a fire mission from. Then select the type of fire mission:

I) Fire for Effect calls a full artillery barrage right away.

II) Adjust Fire will initially fire single rounds for you to spot and correct placement, with a full Fire for Effect following when all position corrections are done.

b) Next you have to provide the target position as a 6 digit MGRS coordinate (100 m precision). You have two options to enter this:

I) From Map Marker: Select the coordinates taken from existing map markers. If you add a new map marker only at this point, you have to select Refresh List first.

II) Manual Grid Entry: Manually enter the coordinate through the radio-menu. Requires 3 discreet entry steps due to the way DCS does the radio menus. First step is to enter the MGRS grid letters (e.g. GC or UV etc.). The grid you are currently in and all 8 grids surrounding it are automatically available for selection. Second step is to enter MGRS east coordinate in 3 digits (100 m precision). Third step is to enter the MGRS north coordinates in 3 digits (100 m precision). To find out MGRS coordinates on the F10 map you can switch the coordinates system display to MGRS using Alt+Z.

c) Request the number of rounds for the Fire for Effect phase (Adjust Fire will always fire single rounds first).

2. Fire Mission: The battery will process your call for fire. If the battery is alive, has ammo and the target is within minimum and maximum range of the battery, the fire mission will proceed. If the battery has less ammo available than requested, it might inform you of a reduction of the number of rounds. Once the battery fires the first round, it will call "shot". 5 seconds from impact of the first round, the battery will call "splash", giving you warning to observe it.

3. Adjustment phase:

a) You can request north/south and east/west adjustments in meters of the impact position and ask to follow up with either another Adjust Fire (single round) or Fire for Effect (full fire mission).

b) If the last round was an adjust fire and you are happy with the placement, you can directly request Fire for Effect on this position.

c) Repeat will repeat the last salvo. Useful when doing adjust fire and you were unable to spot the impact, or to repeat a fire for effect when the target was not fully destroyed.

d) End Mission will end the current fire mission, freeing the battery to receive requests from other participants.

4. Cancel Request/Check Fire/End Mission: You can end a fire mission at any point, freeing you and the battery for new requests. The only exception is a Check Fire call after the first rounds have been fired. The battery will cease fire immediately, but the adjustment phase will still be entered once the rounds land that are already in the air.

 

How to set it up in your own missions:

1. Run CallArtilleryScript.lua with either a Do Script or Do Script File trigger.

2. Run the following function with a Do Script trigger for each aircraft (Forward Observer) you want to be able to call artillery missions:

AddFO("UnitName")

For multiplayer, make sure that all forward observers are in a separate group.

3. Run the following function with a Do Script trigger for each ground/ship group (Fire Support) you want to be able to provide artillery missions:

AddFS("GroupName", {3, 6, 12})

The second function argument is a table with salvo sizes that is available for this FS. In this example you could request 3, 6 or 12 round salvos from this group. You can put in up to 10 different options for selectable salvo sizes of your choosing. Ideally they should make sense depending on the type and number of artillery systems in your FS group. If you do not want to deal with available salvo sizes, you can leave the second argument nil and a standard selection will be given automatically:

AddFS("GroupName")

Note that FS requires the group name while FO requires unit name.

You can add artillery, rocket artillery, mortar and ship groups.

FS groups should be equipped with homogeneous artillery unit types and these units must be the first units in the group. You can add non-artillery unit types (command, logistics, air defense etc.) after the artillery in the same group.

4. To get the beep sound on each radio message, add beep.wav to your mission using a Sound to All trigger (or any other sound trigger).

5. Tips:

  • Setting your artillery units skill to excellent will decrease time between request and shot. It will also make fire more accurate.
  • Beware of having ammo trucks in your artillery groups for reloading. After having spent just a couple of rounds, units will start to restock ammo. These units will not open fire for fire at point tasks received while reloading even after reloading is complete. This seems to be a DCS bug. The script will reset after a couple of minutes with the artillery not opening fire to clear this problem. If you want to reload artillery groups, it might be better to drive up ammo trucks at specific points for a short duration and then drive the ammo trucks away again.
  • Groups that are performing artillery missions will skip over regular tasks they may subsequently get when reaching waypoints. This may happen for example with a ship skipping over a Switch Waypoint task for doing a waypoint loop.

 

I hope you find this interesting and have fun.

 

CallArtilleryScript.lua

Right-click and save as beep.wav:


Edited by MBot
  • Like 5
  • Thanks 4
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

As usual, incredible work. If you don't mind, I'll integrate in an AI enhancement script I'm working on for DSMC integration. 

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

  • 5 weeks later...

It didn't work for me.  But this is the first script I've ever tried, and I undoubtedly did something wrong or am missing something ...like knowledge. 😄

Can you direct me to a tutorial on the basics of using scripts?  Is MOOSE really easy to use?  Can it already do something like this?  Any others? 

I read something about rescue of downed pilots feature.  Is that where a random generated downed pilot is placed to where you can fly out and rescue with a Huey?  Or a helo will come out and get you if you are the downed pilot?  I wish there were helicopters with a rescue winch ...such as the old Sikorsky HO3S-1, or Sea Sprite or Sea King.

Back to artillery:  I was thinking of a scenario where I have set up fire bases in the mission and I want to be in a Willys Jeep or such and be able to observe enemy forces and call for artillery from 1 or more separate fire bases.  It would make things easy (maybe too easy to be realistic) to be able to point a laser at the enemy and get range and bearing info to add to my coordinates and automatically generate the coordinates of the "target" and send them to the fire bases' artillery groups, with your commands like, "adjust fire" and "fire for effect".  Just not have to select the somewhat repetitive choices of coordinates.  But I could evaluate that further once getting this to work.  It might be fine just as it is. 

Script Error.PNG

Link to comment
Share on other sites

That error message is an indication that you have not beforehand initialized the script itself:

1. Run CallArtilleryScript.lua with either a Do Script or Do Script File trigger.

The order is important, as the function "AddFO()" only starts to exist after CallArtilleryScript.lua has been executed.

Hope this helps.

Link to comment
Share on other sites

17 hours ago, MBot said:

That error message is an indication that you have not beforehand initialized the script itself:

1. Run CallArtilleryScript.lua with either a Do Script or Do Script File trigger.

The order is important, as the function "AddFO()" only starts to exist after CallArtilleryScript.lua has been executed.

Hope this helps.

It did help.  Thank you!  That and a posted picture of the "TRIGGERS" page in DCS by cfrag on another thread, "Questions about loading scripts..."

It works now!  That's pretty cool.  Any possibility of adding to it a way to play sound files of the dialog?  Some good voice-actor sound files would really make this realistic, I think. 

Also, I discovered for myself that in order for a vehicle without a radio to have comms, you apparently have to set a frequency for it...and possibly the callsign, too.  I just set both...and on the artillery groups, too. 

I haven't yet figured out how to add the "beep" sound file.  I'd like to replace that, anyway, with a radio static burst, like at the end of a transmission.  "ch-shhh-t".  Once I figure out how to get it to work, it should be easy to swap a different .wav file in there.

In that frequency setting in DCS, there's an entry for watts, which defaults to 10w.  I would figure a small vehicle might only have 5w transmitter.  A walkie-talkie maybe just 1w.  Mobile CB radios are supposed to be no more than 4w.  Trying it out with just the text comms, 5w of power seemed to have no problem at all up to at least 7 miles.  Maybe there's no limit with text of the message.

I can only talk to one artillery group at a time?  You think there's a way you could expand your script to allow comms dialogs with up to 3 to 5 fire support sources?

And is it normal for the artillery to take about 2 minutes to commence firing after they receive the coordinates and number of rounds?  And especially after an adjust location.  I would think that would take only about 15 seconds to adjust fire 100m and then resume firing.  Instead, I'm seeing the same 2 minutes.  I did move my ammo supply assets over 500 feet away.  But how far away do they have to be?  And what units are ammo suppliers?  Trucks?  FARP Ammo Depot?  Helipad?  I suppose that takes another script to move trucks into reloading range (whatever that is) when the artillery units are out of ammo?  😉

 

Link to comment
Share on other sites

Is it possible to use this script with ground vehicles that are FAC capable? I set everything up correctly as near as I can see and I even get the radio option to call in artillery fire, but once I get to the option to choose either adjust fire or fire for effect, the menu crashes and nothing happens (the game still runs with no hiccup or anything), I am getting no error message that I can see. I've double checked the group and unit names and added in check logic to the triggers to confirm the scripts are being loaded, so I'm really at a loss as to why it is failing to progress past the CFF/AF phase

Any ideas?

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 3 months later...
  • 5 months later...

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