Jump to content

DCS Artillery Enhancement Script


MBot

Recommended Posts

DCS Artillery Enhancement Script is a script addon for the DCS Mission Editor to enable fully autonomous AI indirect fire support. A ground AI change in the 1.24 patch has had a negative effect of the very foundation of this script, making this a "as is" release with reservations. Key features are:

 

-Spotter units that autonomously detect and prioritize targets for engagement with indirect fire support weapons.

-Counterfire radar units that autonomously detect and prioritize hostile artillery fire and direct counter battery fire.

-Artillery groups that autonomously change position when under indirect fire or perform preemptive survivability moves after each firemission.

-Hierarchy levels to allow for centralized or decentralized indirect fire support.

-Tactical nuclear artillery.

 

The premise is that the mission designer adds units to his mission as usual. Then he has to define which of his units will fulfill certain tasks in the fire support effort. He can define groups containing artillery unit as Firing Batteries. These groups will then provide indirect fire to anyone that asks for it. He can define individual units as spotters. These will detect (nearly) stationary enemy units, group them together, prioritize them and send fire support request to firing batteries. The batteries will then answer request based on chain of command and target priority. Spotters can be any units, including helicopters and aircraft. And they will even request artillery fire on landed or low hovering hostile helicopters.

 

The mission designer can also define individual units as counterfire radars. These units will detect enemy artillery shells with a certain chance of detection and position error, based on range, azimuth and shell type. They will then proceed to request artillery fire on the hostile firing artillery position. Counterfire radars can be initialized to represent specific radar types. The AN/TPQ-36 and AN/TPQ-37 Firefinder attributes are base on fairly specific data from US army field manuals. A Soviet type is also present in the form of the ARK-1M Rys (although not based on as solid data as the US types).

 

3 artillery units in DCS are capable to fire nuclear shells, the M109, 2S3 and 2S19. This is modeled in this script. The M109 can launch the W48 warhead with a yield of 0.072kt. The 2S3 and 2S19 can launch the ZBV3 with a yield of 1 kt. Artillery units do not carry nuclear shells by default, they have to be added to a battery by script line. This can be done at mission start or with a trigger, simulating delivery of nuclear shells from a special weapons depot to the firing battery mid-mission (for example by truck or with a helicopter *cough* Huey *cough*). Nuclear weapons are also controlled by a priority rating, which is configurable by the mission designer. A firing battery could be set to engage every target conventionally, but only targets of high priority (for example a group of minimum 10 tanks) with nuclear warheads. When a nuclear firemission is performed, the battery will fire a single shell, which will airburst above the target with the respective yield. The W48 of the M109 will usually destroy up to company sized targets.

 

The implementation of the script is fairly easy. The mission designer first has to initialize the script using "do script", "do script file" or through initialization script. Then he has to run some simple lines of code with "do script" in order to set the basic configuration of the script for the mission. The most basic code lines are:

 

AddFiringBattery("Name of Group")

AddSpotter("Name of Unit")

AddCounterfireRadar("Name of Unit")

 

More advanced options of the script can be controlled with extended or additional script lines. More details are in the supplied instructions pdf.

 

 

Note: This script is supplied "as is" and will not work under all circumstances as intended. Until recently, artillery units in DCS would attack enemy units in line of sight with direct fire at close ranges up to 4 km. This script was designed and build under this premise. In the final week of the development of this script, DCS 1.24 was released, which features a drastic increase of this direct fire range, under some circumstances up to 10 km (the exact characteristics are still unclear to me, it is somehow fluent). When attacking units with direct fire, higher AI routines take over the artillery units, removing them from script control. The increase of this range above basic self-defense range means that artillery units will now quite frequently engage enemies on their own, making them uncontrollable. This has broken this script on a very fundamental level. The problem can be avoided by placing artillery groups in a way that they will never be in LOS with enemy ground units. Another workaround is to set the ROE of artillery groups to hold fire manually in the ME. But when firing their first firemission, these artillery groups will still be reset to ROE open fire automatically and will then start to have their own, uncontrollable mind.

 

I have started this script one month ago as an exercise in programming. This was the first time I ever programmed anything. I read a LUA tutorial on a Sunday afternoon and then jumped into writing code. In 5 weeks I put 100 hours into this project (yes, I kept records). Last week I was basically done, when I updated DCS to 1.24 and discovered this small change (or is it a bug? I don't know) that put my whole script into question. This project was primary a programming exercise, so has achieved its goal. Still I was very frustrated. After having taken a week off from it I now feel it would be a shame to let it rot on my hard drive. I decided to release it "as is", even though I am very unhappy to release something that is not fit for flawless use. Still many parts work as intended and with careful use, it could still be of value for mission designers and fun for those that play these missions.

 

 

---------------------------------------------

Version 1.1 Update 23. June 2013

 

The script is updated to version 1.1. This includes a fix to the bug that spotters would detect unactivated units, making sure that the script handles destroyed units and groups, as well as some bug fixes related to displacing under fire.

DCSArtilleryEnhancementScript_v1.1.zip


Edited by MBot
  • Like 3
Link to comment
Share on other sites

I must say for a first time scriptor you did a fantastic job on these. I watched the demo missions and that counter battery mission went on for ever. I love the way the vehicles shoot and skoot. Even the JAAT mission worked great. I was playing cat and mouse with the recon helo and they kept zeroing in on me where ever I drove around. Great job and dont give up on this.

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

Impressive! I had a look and it worked well for me. I am sure there is a way around the LOS-problem, for example did you try adding a loop that will set the ROE of the artillery system to Hold Fire if there isnt a script-initiated fire-mission started? On the other hand, this might be a "problem" most users wont see, only you the developer ;)

DCS AJS37 HACKERMAN

 

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

Link to comment
Share on other sites

Very nice work! Thanks for sharing this with the community

Intel i7-3770K,Windows 10 64,Noctua NH-U12S ,ASRock Z77 Extreme4 ,G.Skill 32GB DDR3 2400,EVGA GTX 1080,ADATA XPG900x2 RAID 0, CM HAF XB Case,Thrustmaster Warthog,Combat Rudder Pedals,Logitech G930 with wireless TrackIR 5, 39" Insignia LED 120Hz Monitor, Oculus Rift

Link to comment
Share on other sites

Great work MBot, what I really like is that you've painstakingly added descriptions and explanations to the script to help 'hacks' like me figure out what does what and make simple adjustments!

Intel i9-9900KF @5.2GHz

MSI Z390 Gaming Pro Carbon

32GB G.Skill Trident Z DDR3200 RAM

MSI RTX 2080 Ti Gaming X Trio

40" Panasonic TH-40DX600U @ 4K

Pimax Vision 8K Plus / Oculus Rift CV1 / HTC Vive

Gametrix JetSeat with SimShaker

Windows 10 64 Bit Home Edition

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Thank you for all the encouraging comments I received. The script in the original post is updated to version 1.1 This includes a fix to the bug that spotters would detect unactivated units, making sure that the script handles destroyed units and groups, as well as some bug fixes related to displacing under fire.

Link to comment
Share on other sites

Where did you find the DCS scripting reference to interface the scripts with DCS?

 

http://en.wiki.eagle.ru/wiki/Simulator_Scripting_Engine_Documentation

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Its too bad about the direct fire of arty. I tried to make a mission using nonas as the battery but I think they are firing on their own regardless of the spotter. Its hard to prove though as the battery wont fire unless the nme is within its max range.

I was in Art of the Kill D#@ it!!!!

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I just ran a small test and the direct fire range for arty is still up to 8 km. That means that any artillery unit with a enemy within 8 km and line of sight will be uncontrollable.

 

Then a ran the counterfire demo mission (man I love this thing :) ) and it fortunately still worked perfectly. So if you take care about artillery placement and LOS (putting them behind hills), the script is ok for use.

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

Thanks for sharing this great script (thanks also for documentation). I got my Scout Manpad guy to peek around a building at the enemies with his binoculars and the tactical nuke blew them up just as it should. Now that is some Combined Arms.

 

I did get some error messages pop up though. When the enemy tanks took pot shots at me and hit the building I was hiding behind in first person view. Because the building didn't have a coalition value the event.target code caused an error.

Link to comment
Share on other sites

  • 2 years later...

Ok so it has been 3 years, and I have just now discovered this (haven't really been delving much into ME for a variety of reasons).

 

MBOT, this is brilliant! I tried it out last night but I got an error, so I didn't get the really play with it myself. But this is exactly what I am looking for. In fact, DCS should just implement it and built it right into the ME.

 

I wonder, do you have this little gem working now in 1.5.3 or 1.5.4 or whatever we have these days?

[sIGPIC]sigpic65507_1.gif[/sIGPIC]

Link to comment
Share on other sites

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

Yes, the script's creator has not updated the script in 3+ years...in bold, in the first post, you'll see he says that the script was broken by 1.24 as he was preparing to release it...it has not been updated since then...three years later, a bunch of people wandered in and said "hey this doesn't work." :lol:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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