Jump to content

Recommended Posts

Posted

Of my 1000+ hours in DCS I think the majority of that has been in sandbox missions either alone or with friends. They are immensely valuable to me as a learning tool and as a low pressure socialization venue.

 

More recently I have been trying to make sandbox missions better; Make them less cumbersome to build, and more convenient to fly. Because of limitations with the mission editor I've turned to lua scripting, and now I'm running into limitations of the scripting environment as well.

 

Here is a list of a few problems I'm encountering, and the API expansion(s) which would help me - and others - to build better missions for everyone in the community to enjoy:

 

Note: I'm pretty sure these are all things which have been requested before by others, but I want to lend my voice to the cause and my own personal examples of why these things are so greatly needed.

 

 

 

 

1. No way to determine which Unit invoked a Radio Menu command

 

There are two ways this could be addressed. I think we need both:

 

The first is to provide a way to add radio menus/commands to a single unit, not just an entire group

 

missionCommands.addSubMenuForUnit
missionCommands.addCommandForUnit
missionCommands.removeItemForUnit

 

The second is to provide an event for when radio menu commands are called.

 

S_EVENT_RADIO_COMMAND

 

This way we could add radio menus globally when appropriate and then simply key on the event to know when they were called and who they were called by.

 

Why is this important?

 

I made something cool: I wrote the functions that enable a player on my sandbox maps to spawn a tanker directly in front of them which matches their heading and extends out for 100nm in that direction. This cuts down dramatically on time spent just trying to rejoin with the tanker, and makes it easier than ever to practice the actual act of AAR. Any time, any place. No more having to place a dozen tankers on the map so one will always be nearby.

 

The downside? Because I can only add this command to a Group I have no way to know which unit in the group wanted the tanker unless I limit group sizes to one client per group. This has implications, such as not being able to put Hornets in a group together so they can take advantage of datalink stuff, and greatly increasing the time it takes to place all of my client spawns, since I can't just configure one plane and then up the group size. I have to copy/paste and rename and fix all the waypoints.

 

 

 

 

 

 

2. No way to determine what a player is locking/targeting

 

So in my missions players can now dynamically spawn pretty much anything they want, wherever they want. When the unit spawns it will announce everything you need to know about it, such as radio freq, TACAN channel, ILS channel, and so on. But the thing about tankers and boats is that they tend to be alive a lot longer than that message is around.

 

Sure, I can also put that information in the Briefing (Which I do), but one of the features I want to build next is the ability to spawn multiple boats or tankers of the same type and have my scripting auto-increment the radio frequency, TACAN, and ILS channels they are using. I can report that when the unit spawns, but then there is no way for the player to get it again later on when they inevitably forget.

 

We need

 

Unit.getSPI() -- returns a table {point = vec3, object = object} of whatever the radar, TGP, or current Sensor of Interest is focused on

 

(Obviously this should work for anything that can designate a target, not just for the A-10. Everything that lands on a boat or can AAR right now has a radar at the bare minimum, which should be compatible with this function.)

 

This way we could, say, re-send the tanker or boat's information to the player if they lock it up on radar or designate it on the TGP or whatever.

 

However, that brings us to another set of functions we need:

 

trigger.action.outTextToUnit()
trigger.action.outSoundToUnit()

 

So that we can send the message and any sounds to the unit directly, not to the entire group (who probably don't care).

 

 

 

 

 

 

3. No way to rearm a plane or access the current state of its pylons

 

We don't typically run "Unlimited Ammo" because it has some undesirable side effects, notably things like not all weapons work correctly with it, and not being able to ever shed that weight without using the admiral's doorbell (emergency stores jettison). It's a no-compromise all-or-nothing setting that doesn't give us the granularity we desire for practicing.

 

We need

 

Unit.getPylons() -- Returns table of pylons {wepName, wepNum, clsid}
Unit.setPylons() -- Reconfigure the Unit's pylons based on a given pylon table
Unit.addAmmo() -- Adds ammo to a unit
Unit.removeAmmo() -- removes amunition from a unit
Unit.setAmmo() -- sets the units ammo to given values
Unit.getInitialAmmo() -- returns a table of the initial ammo for the unit.
Unit.rearmNow() --- forces the unit to rearm Unit.stopRearm() -- force stops the rearming process, because in CA you can do it, we should be able to force it for the player.
Unit.getRearmTime() -- returns when a unit will be rearmed. If currently rearming returns when it would be rearmed, if not rearming how long it would take if started now.

 

These should work basically any time, including while in the air. It would give us the ability to do things like rearm the plane using a Radio Menu command or define a "Rearm Zone" in the map and rearm the plane whenever it flies to this location. Not only would that be useful for sandbox maps, but for recreations of Ace Combat missions which I know there is an audience for in DCS.

 

These would also allow for a more immersive rearming experience in single player missions and campaigns where you could rearm mid-mission without needing the player to manually use the Rearm and Refuel window.

 

Speaking of which, being able to disable that would be cool.

 

Unit.disableRearm()
Unit.enableRearm()

 

These would toggle the Ground Crew's willingness to rearm a plane which requests it via the Alt + ' window. Immersion!

 

 

 

 

 

 

 

4. No way to control the weather

 

If you could look at my sandbox mission changelog from the last couple years you would see a lot of "changed the weather" as the only thing in each "version". Sometimes we want to practice with clear skies and no wind, other times in terrible crosswinds or with blanketing cloud cover and a low ceiling. etc. It kind of sucks that we have to quit the mission and edit it in order to do that - especially now that we can watch videos of people just changing the weather any time from a menu in FS2020. Give us the API commands to control the weather and we'll bring that to DCS too.

 

atmosphere.setWeather() -- sets static weather
atmosphere.getWeather() -- gets static weather
atmosphere.getDynWeather() -- gets current position of weather fronts
atmosphere.addDynWeather() -- adds a weather front at a given point and values whatever they are
atmoshphere.removeDynWeather() -- removes a weather front.
atmosphere.setTime() -- sets the mission time to a given date and time. (Must decouple the time with triggers, if a AI flight spawns 1 hour after mission start make it relative to mission start and not the world time that would be modified here)

 

This would be huge not just for sandbox missions but for campaigns and other SP missions as well, allowing the mission creator to have dynamic but predictable weather. For example, clear skies at the start of the mission which slowly degrade until you end up doing a case III back to the boat at the end, or a rough launch which turns into a calm evening after the main objective is cleared. This would add so much to mission immersion.

 

For MP servers too, this would allow better approximations of realtime weather, where they could poll weather from multiple stations in the region and update them multiple times throughout the mission's runtime. Right now we are kinda stuck with one set of static weather until the mission reloads and can pick new weather.

 

 

 

 

 

 

5. Very limited control over AI shared knowledge and behavior

 

 

This one's a bit more complicated, and even though I don't have a specific list of functions we need here (because I've not personally tried to tackle this yet as many others have already tried), we need more control over how the AI behave, and how they inform their decisions.

 

The biggest example I can think of here is an Integrated Air Defense System (IADS)

 

 

Right now my sandbox mission lets users plop down different groups of air defense systems (S-300, SA-6, SA-8, etc etc etc) but they all just have the default behavior of "FIRE EVERYTHING!" at max range.

 

It would be really, really cool if we could use the existing dynamic spawn engine I wrote to create an actual functioning intelligent SAM network where we could then simulate different configurations and practice suppressing or penetrating them without needing to build multiple missions to do it.

 

 

Other examples would be things like

 

- Smarter tanker behavior, allowing scripting to (easily) redirect them to a new waypoint or to intelligently rejoin with a plane that has requested fuel.

- More control over weapons engagement behavior than just "FIRE EVERYTHING AT MAX RANGE" and "Don't defend yourself ever!" It would be great if carriers could defend themselves without also feeling the need to lob missiles at something 250nm away. Eg, being able to set maximum engagement ranges, or prioritized target lists.

 

 

 

 

 

6. No way to dynamically add Client spawns

 

This could be a Mission Editor feature too, but right now the one thing I have to go through and hand place in my sandbox missions is Client Spawns. Everything else I can do with trigger zones, markpoints, and lua scripting.

 

The implication is I have to go configure and place spawns for nearly every plane in the game, with duplicates so we can all fly the same thing, and repeat for multiple airfields so we can spawn all over the map. It takes forever and I hate it.

 

It would be amazing if I could dynamically add Client groups to the mission as well, either to specific airfields or to a trigger zone (ideally to both). This way I could define all my spawns as Lua tables one time and simply load them into any blank mission.

 

We would need

 

- The ability to get a list of available parking at any airfield

- The ability to dynamically add a Client group to the mission and link it to a parking stall

 

 

And I would really love to have the ability to spawn any unit "On Ground" as the helicopters and Harrier can do. This would allow us to work around the current parking stall limitations, which make it very difficult to fit all of our spawns into any one airfield (really limiting our choices) even when there is physically plenty of space.

 

 

 

 

 

 

Bonus: No way to access the Warehouse right now

 

Alright these are a little bit less focused on sandbox missions and a little more on dynamic missions, but very typically the former trends towards the latter as complexity increases.

 

We need

 

 

Warehouse class Warehouse.getInventory() -- returns a list of all objects in the warehouse
Warehouse.addLink() --- links one warehouse to another with set properties
Warehouse.removeLink() --- removes warehouse from linakge
Warehouse.setLinkProperty() -- modifies warehouse link properties.
Warehouse.addItem() --- Adds object to a warehouse in X quantity
Warehouse.removeItem() -- removes X of item type from warehouse
Warehouse.setItem() -- sets item type to have X number available.
Warehouse.getByName() Warehouse.getObject() -- returns unit, static, or airbase object

 

 

 

Conclusion

 

These are all barriers I have run into while trying to build a better Sandbox Map experience for myself, my friends, and for the DCS community at large. All I am asking for here is the tools I need to build better content. That doesn't just benefit me, it benefits everyone. Sandbox maps are quite popular because of the steep learning curve in DCS. We could build better ones than we do today if we just had the support from ED on the scripting side. Give us the power to make cool things and we will.

 

Thanks.

 

(PS, feel free to check out my DCS-Sandbox repo on github -- https://github.com/vsterminus/dcs-sandbox -- You'll see for yourself if you look through the code how much trouble it is to make all this stuff work, but also how cool it can be when it does.)

  • Like 7
  • 2 years later...
  • Recently Browsing   0 members

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