Browsed by
Month: May 2018

Lua and air defense logistics in CMANO

Lua and air defense logistics in CMANO

Holy moley it’s been months since I’ve done a blog post. Anyways had a great discussion on modeling air defense in CMANO on Kushan’s Discord and wanted to add it here so I remember the lua code in the future. Hope it helps you too.

The conversation started with structure and how you could play with sides to model an integrated air defense. Bottom line is you can have a side that is friendly to two other sides who are not friendly with each other. This makes that central side (node) important as it is the link between the tow. Destroy it and you break the link. So it is possible to model a network hierarchy of sorts with central control centers and substation.  It is pretty straightforward but I think there is a hard stop at 2 or 3 layers. If you look at Operation Lighting Strikes scenario in the included scenarios you can find this setup with the Pakistani air defense sides.

The conversation then veered to the logistics part of it and how to reload SAMs. Most SAM units have attached magazines so they’ll first shoot what’s on their mounts and then pull from their magazines. Problem is you tend to shoot through these relatively quickly and most nations store a significant number in a nearby site. The good news is that CMANO allows you to group an ammo unit to an existing unit and it will reload from it. So it is possible to add hardened bunkers, ammo trucks, ammo revetments filled with reloads to a group of air defense units and they’ll draw reloads from them. CMANO Lua does have a way for you to refill mags and mounts by code as well but I like to group the units together because it gives the player another opportunity to impact the system by hitting the central ammo dump.

Now we come to a couple of twists to this.

Let say you want model ammo trucks or helicopters delivering ordinance.  You can’t start out grouped because the ammo is loaded instantly regardless of range. So this is how you would do it.

Event: Reload unit once ammo carrier comes in range.

Trigger: Unit Enters area or maybe even unit remains in area.

Action: Lua Code (Example)

ScenEdit_SetUnit({Side=’Nicaragua’,unitname=’Chinandega Ammo’,group=’Chinandega Army Base’})
ScenEdit_SetUnit({Side=’Nicaragua’,unitname=’Huete Munitions Bunker’,group=’Huete SAM Site’})

So in this CMANO event once the ammo carrying unit enters the area trigger it fires the lua code which is a set unit using the side, unitname and group name.

Now let’s look at this a little differently.

Let’s say you want to model a slight reaction delay to surprise attack or an encounter where the defender is not at a wartime posture or might be disorganized or something like that.

Here is how I model it:

  1. Empty the mounts of mags of all units that will incur a delay. This is probably true of most MANPADS, gun positions or AAA in vehicle parks but may include exposed SAM sites.
  2.  Add ammo carrying unit. Don’t group with units (yet).
  3. Create an event which has a damage or destroy trigger to catch the first bomb hitting. Then use then use the Lua code above.

So the intent is to model the crews getting the message of an attack and then manning their systems. It is not 100 perfect but it works for me.

Hope this helps!