DCS Mission Editing Tools and Discussion

You guys have me thinking (uh oh)…

DCS Grok is coming along fine. It’s software so it always takes 2x longer than you think and I have to take 2 weeks off for personal stuff but, when I hit it again…

I would think that having LUA code ‘snippets’ might come in handy. Now for what exactly I can’t think of off the top of my head (my brain is all clouded with UI coding right now :slight_smile: ) but your code, as an example, should be something that could be added to a library of LUA snippets.

Seems the formatting would be handled by a RegEx Replace op, taking the targets from the UI (Group, Unit, etc), then stuffing into the MIZ output file.

JR

1 Like

I think there are some small libraries out there - Hoggit and ED forums…?

One of the things that I have noticed is that there are some very talented programers out there (and I would include @Franze in that category). Brilliant!

However, some of them seem to go a but overboard - the adage “I asked was time it was and he built me a clock” comes to mind. (@Franze’s not included in this category; his work is the epitome of cogent.)

So small snippets like we have been discussing, can a bit hard to find. …but you can find code that will build an entire IADS…which is very cool. :slightly_smiling_face:

Talented, me? Not so much. Persistent maybe. Lot of this stuff is new to me (UI system) but I’m getting it. The rest is, kind of, old-school C/C++. I have two weeks on the road to flesh things out a bit more and it’s a good point to do that.

Clicking a clickable cockpt via mission editor trigger

Ran across this today. In my deep dive into the ME I had a need for the player to start with the autopilot engaged, but could not find an API for it.

Some digging and I found out about the Clickable Action thing. Indexing the proper arguments took some GREP work but, it does work. Not real fast though as it seems I can’t hit it with 2 clicks in one trigger; it only worked when I clicked it ON on Trigger1, then 1-second later clicked ON with the second trigger.

So, the Hornet will loose some altitude, about 4-500, feet but it is functional. Here’s the basics and a helper image I dug up on the 'Net to Id (much quicker) the devices and such.

Click the A/P UFC button (id == 25), Button id == 1 (must add 3000 to the index number)

Click the BARO button, 1-second later (same device, button id == 12)

Image show some id’s:

2 Likes

Isn’t there also aircraft state arguments you can pass?

1 Like

I do not know? Eager to hear about it.

So, I did this thing this weekend - taught myself LUA programming. Or started to.

In my “deep dive” to learn about the ME I decided to create a campaign. Been interesting.

I wanted simple things that just didn’t seem to be there:

  • Radio management with your flight
  • Fuel status from flight
  • Radio “atmosphere” - It’s kinda dead sounding, at least with the amount of AI my PC can handle (this is all meant for us low-life’s with ‘older’ systems)

Among others.

I accomplished the above withOUT LUA by Saturday but, man, that was ugly! Couple of PAGES of triggers. So, thus the trip down LUA lane yesterday evening.

What I have now is a simplified method of radio usage and flight fuel status tracking, with audio…the audio was a prime motivator for immersion. And ‘atmosphere’ - with about 30% of the triggers! Makes doing the actual mission stuff less painful to keep track of.

FLIGHT RADIO MANAGMEENT

When a radio ‘context’ changes (say you need to switch to ATC, ABCC/CCC, or such) you click the appropriate F10 menu (in my test scenario they are ‘coded’) and you get each flight member checking on as per normal procedures.

ATC “FORD 11, contact K-MART Ruby-1” (Ruby-1 = 305.0 for instance)

  • Player: Click F10 item: “Radios | Switch Ruby-1”
  • Audio plays, “Flight Check”, then “Two”, “Three”, “Four” (1 to 3 wingmen).
  • Each flight member’s frequency is changed - so your wingmen will be on the SAME channel (this was annoying). You do have to change your own freq in the aircraft.
  • Player: Click F10 to respond within context. In this case “K-Mart” just checks you in - “say’s hello” or some-such as scripted.

JOKER
A timer checks every n-minutes for “Joker” state, playing “We’re JOKER” at some defined percentage of total fuel (just pass an argument from 0 -1.0).

SIDEBAR | In this mission (I’ve run it like 30 times!) the [single] wingman seems to do a LOT better on gas than before. Actually using slightly less gas than I do. Seemed like before they had a big leak in their tank. Note that I’m not doing any combat in this mission and trying to be ‘ginger’ with my wingman 'Bot.

ATMOSPHERE
You can play sound clips from any source, having them play in sequence or randomly, at some interval you specify. This makes a surprisingly big difference, to me anyway, especially when droning on enroute to the AOR.

Anything else while I’ve got my text editor out?

Oh, and yes there may already be libraries out there that do this but then I wouldn’t have learned anything this week :slight_smile: And I just want a few specific things, for now :slight_smile:

Oh[2]: Any LUA Guru’s (say that three times fast) out there mind taking a look; point out any gross misunderstandings I have about LUA? Never dealt with this new fangled stuff. Scoping seems different. Been a quarter century since my ‘C’ Days.

1 Like

I would really like an item in my radio menu that incites my wingpersons to tell their fuel state.

1 Like

This does.

If will output text for all wingmen, regardless of the count.

The audio only supports replies from the lowest state member right now, and in simplified form: “Low state 10.0 plus” for example. The text would be “2 is 11.1”, “3 is 10.9”, “4 is 10.3”

Building audio responses ‘on the fly’ seems, at this point in my DCS ME/LUA education, to be kinda messy. Doable though. I just wanted something.

Just a matter of building all the audio files but, since in DCS someone could create a flight of, oh I don’t know, 1000! wingman, the limit will be 4. Is there a limit to flight size? I dunno actually, never tried more than 4.

Uploading a video to YT now of a test run. Pretty rough but should get the idea across. Now, if the cable guys would dig faster I might have been able to upload 18 minutes of video in less than 8 HOURS!

1 Like

@Franze had a script that did something like that. Can’t remember is it was in this ME edit thread or the other one.

I miss him.

Ugg. Several hours of uploading only for Google/YT to tell me my video was too long - by like 90 seconds!?!?!?. Ya know google, there’s an API fxn that’ll tell you all this BEFORE you let me waste my time!.

Then I thought I discovered a way for VoiceAttack/VAICOM Pro to support a direct ‘call’ to the radio stuff (F10 “Other” nested menu items in my case - the checkbox: Import F10 Menu items in VC-Pro) but can’t get it to work. Have questions out on this cuzz that would be the perfect.

Anyway, it works in a simplified manner (compared to real world).

Sanity check here - question:
In DCS your AI wingmen are always on the freq you set in at the start. You, the player, can of course change freq’s but the AI will be oblivious to this. I know they don’t respond if I’m not on that original freq. But there is a function in the scripting engine that solves it, albeit with some extra work. Thus these posts.

@schurem and other, demo is up.

DCS Mission Editing PSA: When DATALINK and A/A TACAN’s Stop Making Nice.

TLDR; A post I dug up (and it took some digging):


keep this post of Wags in mind when setting up AWACS.

Hey everyone,

As some have correctly deduced, we also implemented realistic frequencies for A/A TACAN that do not interfere with the datalink. If you are having issues of C2 aircraft, C2 contacts, and some PPLI not appearing on the SA page, note that that TACAN functionality is embedded in the MIDS terminal. Because the upper antenna filter is fixed, it filters A/A TACAN frequencies on channels

1-36 and 64-99 (X and Y). A/A TACAN channels should be chosen outside of these ranges.

The upper filter makes the top antenna unusable for T/R (Air to Ground) TACAN channels 1-29 X and Y, 47X to 63X and 64Y to 92Y. For TACAN channels in these ranges, the bottom antenna is the only antenna for TACAN. [This] causes reduced ranges for DME at channels within the range of the filter when flying directly away from the TACAN station.

In addition to setting TACANs within the correct range, also be sure to set the initial waypoint of an AWACS to include an EPLRS advanced waypoint action set to ON.

  • Wags

Guess I didn’t get the memo on this (like a couple of years ago?). Just didn’t imagine they had gone to this detail.

But during a recent DAS (Deep Air Support - thank you @Deacon211 for the ref. material) in my “Attack Pilot” campaign (that’s the semi-official name now) I first noticed the A/A TACAN getting, well, weird. Had to work to find the little buggers. In the process of writing the code I kind of pushed it off, “I’ll look into that later…”.

The AI is horrible at doing AR - the SEAD/DEAD guys were keeping everyone waiting, burning gas and RTB’g too soon. So I added another tanker (the boom refueler’s are the worst). Seemed innocuous enough. I just picked any old TACAN channel.

Today the SA page was coming up blank!? Or almost. My wingman was there, and a lot of “Unknown” HAFU’s. Had no idea how to fix this one. So, a few hours of digging and I found the above.

Too much to keep track of :slight_smile:

2 Likes

All A/A tankers have ‘ground’ TACAN active - so A/A-TACAN only works between fighters, but only for the distance not heading.

So we have changed all our tanker channels to Y [T/R, NOT A/A TCN!].

2 Likes

Yeah, I misspoke…was late, not sure where the A/A thing came from. Problem resolved/understood now.

More for future Mission Builders: AI Formation Keeping

[Note: this is just what I’ve observed and what seems to help. Not enough days in the year to test this in great detail. All to hopefully reduce frustration for others]

FWIW I’ve discovered the AI (when in the same AI group) are terrible at formation keeping under anything but simple situations, to name one: they are all thumbs when the route makes a turn of more than about 20-30 degrees, especially when climbing (think a departure climbing to altitude on some non-trivial route).

Keep it under this and they do fine. Go over and it’s a mess. It’s like the wingman can’t keep up, gets out of place; then the lead levels off (and often descends) and does one (often more) 360’s waiting for his rock to get back into place.

And the wingman seem to know nothing about lead pursuit here - they will try to re-form by following a ‘bread-crumb’ trail left by lead. All while lead continues to spin in circles. And this takes FOREVER. Totally messing up any timing you’ve hoped for. Likely if you insert a mandatory time at subsequent waypoints they will then go full reheat to catch up, burning all their gas, and crashing early.

Similar with changing the formation at a waypoint. A real flying circus when that happens. I haven’t tested this in depth.

I just wish ED would at least publish something that went into more detail about the limitations on the AI. Then we could work around these limits from the start, saving a lot of time just trying to figure out what works best.

2 Likes

To no one in particular…

Minus the 12 month break for uncontrollable [and icky] events, I’m making progress on the “Semi-Dynamic” campaign. A post recently made me think I might provide some tid-bits. So, here’s a screen capture of the latest test (like 5 minutes ago). Is just a ‘snip’ from a window, adding some labels for context. A bit blurry I think but, anway.

A “Mudspike” cookie (is there such a thing?) to anyone that notices the small, personal touches:

Oh, this is 99% code-generated (lua). There’s only about 10 ME triggers - they just load all the code. ALl you do is read the initial briefing then click “Fly”. Until ED gives us a proper “Briefing Room” (we’ll pretend the squadron ready room is being remodeled :slight_smile: ) you’ll get the final, target, details (and the above map) in the cockpit; being dynamically generated I can’t ‘run the numbers’ until the sim has loaded (you’re in the pit).

The gist here is you are an “Attack Pilot” (Marine - Harriers & Hornets) temp. duty to Syria to lend a hand with Operation Something-Or-Other. The narrative is still churning around in my head, pushed to the back-burner til I get all the functions complete (80% there).

Current hurdle: You (yes you) the Player comprise only ONE unit in this fracas - to the code you are just “Attacker[x]”. The issue is, well, sometimes Attacker[x] doesn’t get the juicy target (supporting role). But sometimes you just burn holes in the sky on your CAP/CAS station, waiting. I’m cool with that cus it’s – Authentic – but the trick is not having it happen too often. Cheating would be easy but I’ll try a more ‘elegant’ solution first.

Thanks for playing,
JR1

5 Likes

I like chocolate chip cookies… :wink:

Any DCS guru’s here (this is a deep one too) that can tell me what this entry in the mission lua file does/means?

[“offsets”] = {…}

My search-fu is tapped out. Barely one small blurb, without explanation.

Concerns linked objects (carrier deck here), ref’d in the mission lua under “units”:

With one caveat what I want to do works (so far) but I’m not sure why it does, based on these values and how they ‘behave’.

Hierarchy is as follows:

static.group[i].units[j]
[“offsets”] = {
x = meters[1]
y = meters[1]
angle = radian[2]}

[1] “X/Y”: These appear to be in what I’ll call “Model space” - relative to the unit this group is linked to (carrier again). AND they appear to be un-transformed values: a 2D vector (X/Z in world-space, though they call them X/Y in the file). Kinda makes sense…

[2]: “angle”: This one is a head-scratcher (it’s not the direction the unit is facing, that is under ["heading’] elsewhere).

Odd thing is, when skimming through these entries some appear to be radians, as expected (<= Pi * 2, where ‘up’ == 0, not the standard convention it seems, though positive rotation is CCW).

YET, some are strange numbers, like 27.x or something not <= Pi * 2.

I have a ‘template’ carrier, replete with tugs, personnel, static choppers, etc. And some conditional non-static aircraft.

When I ignore this sub-table (“offsets”) - AND my template is oriented on the X-axis (0-radians = ‘up’) it all works, no matter what trasnform I apply on my side, prior to writing it out to a fresh mission file (which is the goal).

But the values in this table change, when saved back out via the ME??? I would have thought DCS transforms these on the fly, of course.

I’m corn-fused (Pythagoras I’m not)