Jump to content

Scripting Usage


Recommended Posts

  • ED Team

So the Mission Editor polls have done well, some fixes and such are coming through, some are still to come.

 

In the same sense, I would like to ask people that use outside scripting to post here what they are using, what tool they are using MIST, MOOSE, CTLD, etc. And why they are using it.

 

Just a brief description, so as an example:

 

Script Function: What you are adding to the mission

Script Tool: MIST, MOOSE, CTLD, etc

Notes: Why you use it, not included in DCS, better than what is in DCS, etc

 

The purpose of this is to gauge what people are needing to support their missions outside of DCS, and what we can do to better support Mission Builders, MP servers, Scripting Tool creators, etc

 

Thanks all!

 

As always, please keep on topic, and skip any rants or complaints, just stick to the above, if needed, someone can add a discussion thread to support this.

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

CTLD for helicopter missions. It adds a ton of depth that vanilla DCS simply does not offer.

 

From the ability to bring a large variety of troops into battle, all the way to sling loading supplies into AO so you can dynamically set up FARPs or resupply airbases. And it's all fairly intuitive.

 

If essentially everything CTLD does could be included in the base game, that would be superb.

Ryzen 1700 @ 3.7ghz | GTX 960 | 16gb Crucial Ballistix

 

F/A-18C | Ka-50 | FC3 | A-10C | P-51D | UH-1H

 

Youtube Channel

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

What I am looking for much is native way to store persistent data per campaign save that is transferred between missions and can be used for persistence storage or state storage so next missions can be altered via script accordingly without sanitize hack in MissionScripting.lua and saving custom file into DCS root.

 

Something like Arma 3 game do via setVariable getVariable on mission namespace level

 

https://community.bistudio.com/wiki/missionNamespace

 

Hope it makes sense. Basically it allows all sort of dynamic and persistent campaigns/missions in Arma.

 

Other than that I am using Mist and mostly for dynamic spawning of groups from templates. I am missing way to set weather and mission date/time within lua.


Edited by ataribaby
  • Like 1
Link to comment
Share on other sites

I use the JTAC/Designation functions a lot. I also use the Zone Polygon to have polygon zones as DCS, unbelievably, doesn’t support something so obviously basic. I also use the menu functions to have nested menus. I can’t imagine building quality mission with just the native DCS ME functions. The script makers are quite literally saving the game.

Former USN Avionics Tech

VF-41 86-90, 93-95

VF-101 90-93

 

Heatblur Tomcat SME

 

I9-9900K | Gigabyte Z390 Aorus Ultra | 32GB DDR4 3200 | Samsung 970 EVO Plus NVMe | RTX 2070 Super | TM Throttle | VPC Warbird Base TM F-18 Stick

Link to comment
Share on other sites

Script Function: spawning of just about anything, keeping track of cargos, custom zone types, A2A ranges A2G ranges, ZEUS functionality, scripts to output player numbers (count aircraft, ground vechs, ships etc) , scripts to warn players of upcoming server restart, radio beacon code (because radio beacons are broken in MP) , scripts to handle smoke markers to simulate fires (because smoke does not work right in MP), (my script library stands a about 9,000 lines of code that works on top of MOOSE functions)

Script Tool: MOOSE, SLMOD (because evey MP game should hae the functionality it gives ... built in)

Notes: I use it because it abstracts away from low level DCS API

 

 

Biggest problem with scripting right now ..... run a script in the ME or SP == it runs fine things work

Run exact same script on dedicated server ........ different results

eg spawn ships in SP, you can control them, do same in MP and you cannot control them ...... this used to work in MP


Edited by HC_Official

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Link to comment
Share on other sites

MIST and MOOSE for the many additional tools they provide such as:

Custom trigger zone shapes

Respawning of units

Random waypoints

 

To name a few. There are many more functions they provide that the ME does not come close to being able to do on its own.

 

And special mention for the scripting in S.W.A.P.R. that allows for empty aircraft to be in place, on the ramp, until a Client loads into that aircraft.

Link to comment
Share on other sites

1. Target range functionality - tracks weapon hit accuracy for each type of weapon on separate ranges for each player.

 

MOOSE

Not available in DCS

 

 

2. Artillery control via F10 map markers

 

MOOSE

Not available in DCS

 

 

3. Respawning groups, scheduled spawns, and regeneration (infinite and finite), and despawning.

 

MOOSE

Not available in DCS. In the mission editor, you can only set up a finite number of respawns, which must be cloned on the map, and set the triggers for each spawn individually - this is maddening. MOOSE allows infinite respawning up to a fixed group size limit indefinitely with a single unit template and a single line of code.

 

 

 

4. Detection - tracking of units detected by AI, to inform automated CAP spawns and tasking, automated JTAC lasing or designation, automated artillery targeting, etc.

 

MOOSE

 

Multiple MOOSE classes exist (e.g., GCICAP) to drive a variety of AI reactive behaviors.

Not able to choose any but highly simplistic behaviors in DCS ME.

 

 

5. Menu building - create custom, multilevel radio menus that call scripts and change dynamically with executed scripts and player status.

MOOSE

Not available in DCS


Edited by Dino Might
Link to comment
Share on other sites

These are the Scripts that I've used the most:

 

1) RAT by @FunkyFranky

 

Script Function: Random Air Traffic

Script Tool: MOOSE

 

Notes: I use it to add background air traffic on my missions, as it increases immersion and forces the player to be mindful of other traffic when taxing and landing.

 

2) Range Script by @Ciribob

 

Script Function: Measures ground attack accuracy.

Script Tool: MIST

 

Notes: I use it on many weapons practice missions, as a means to evaluate the player's performance.

 

3) Swapper by @Hardcard

 

Script Function: Provides static aircraft in place of MP Client aircraft while they are unmanned.

Script Tool: MOOSE

 

Notes: Used it a lot when I edited MP missions (nowadays I'm sticking to SP only).

 

 

Cheers and thanks for asking.

  • Like 1

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

MOOSE for the airboss, recovery tanker, rescue helo functions as well as the A2A and A2G dispatchers and the random air traffic. The airboss, tanker, and rescue helo may one day be integrated into super carrier, but the other dispatchers and functions of MOOSE add so much potential options for everything in your mission.

Link to comment
Share on other sites

Use Mist mostly for CTLD and legacy scripts (for many years)

Use MOOSE for many things, mostly spawning air defences like GCI and CAPs, everything really.

 

The main reason for needing scripting is for longer running missions over the single sortie time, for join in progress, management and automation. So things like repeating caps, repeating defenders, repeating tankers, player management, replenishing things that got blown up, messaging, saving progress to disk.

 

Generally its not needed for 90% of normal sorties. But for long running stuff, you cant live with out scripting.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

I using Moose exclusively due to the variety of things I can do with it.

It has a great object orientation to it and once you get he hang of it there is alot there.

Zone management is very good.

Many predefined classes for CAS, Arty, CAP, AI Control, spawning, air traffic, carrier ops etc.

 

Moose all the way

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

Link to comment
Share on other sites

Script Function: Random Air Traffic, ATIS, Carrier stuff, control AI, ATC, Spawning in general.

Script Tool: MOOSE (but it does not really matter as explained below)

 

The purpose of this is to gauge what people are needing to support their missions outside of DCS, and what we can do to better support Mission Builders, MP servers, Scripting Tool creators, etc

The native DCS scripting engine already provides most things that are needed. It has great potential. Frameworks like MOOSE are "just" more complex scripts using what is already there.

 

What is really necessary for a better support (as this seems to be the real question), is that the native DCS scripting engine works reliably, e.g. MP vs SP issues, "funny" AI behaviour, broken events etc. These issues have been reported. If they could be addressed that would really unleash the potential of the DCS scripting engine.

 

In other words, most stuff is already there - now just make it work properly :)

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

The native DCS scripting engine already provides most things that are needed. It has great potential. Frameworks like MOOSE are "just" more complex scripts using what is already there.

 

What is really necessary for a better support (as this seems to be the real question), is that the native DCS scripting engine works reliably, e.g. MP vs SP issues, "funny" AI behaviour, broken events etc. These issues have been reported. If they could be addressed that would really unleash the potential of the DCS scripting engine.

 

In other words, most stuff is already there - now just make it work properly :)

agreed

 

 

putting this high-level functionality into base game scripting engine wouldnt help because these projects keep evolving, they are customizable and so on.

 

 

its like with the high-level airport capture and resupply system - while nice for most use cases, id rather prefer low-level lua functions for adding ammo and switching sides, and implement the high-level myself as needed, rather than use the prepackaged usually-but-not-always-appropriate solution.

 

 

just fix the existing low level scripting functionality and everythings golden :thumbup: in my opinion at least

CPU: AMD Ryzen 5 1600X

GPU: AMD RX 580

Link to comment
Share on other sites

Script Function: spawning of just about anything, keeping track of cargos, custom zone types, A2A ranges A2G ranges, ZEUS functionality, scripts to output player numbers (count aircraft, ground vechs, ships etc) , scripts to warn players of upcoming server restart, radio beacon code (because radio beacons are broken in MP) , scripts to handle smoke markers to simulate fires (because smoke does not work right in MP), (my script library stands a about 9,000 lines of code that works on top of MOOSE functions)

Script Tool: MOOSE

Notes: I use it because it abstracts away from low level DCS API

 

 

Biggest problem with scripting right now ..... run a script in the ME or SP == it runs fine things work

Run exact same script on dedicated server ........ different results

eg spawn ships in SP, you can control them, do same in MP and you cannot control them ...... this used to work in MP

 

+1 to all of this.

 

I use MOOSE. It provides a full API for everything from group creation, tracking, management, and manipulation. With three lines of Lua, you can launch a full AI mission (e.g., interdiction patrol that takes off, flies a randomized route, patrols an area, engages any targets it finds, and returns to refuel). As a mission designer, you can focus on telling the story in a very complex way that brings the world to life. My missions before MOOSE were sterile. My missions after MOOSE are alive.

 

My biggest concern is when ED changes the code underlying the API or the API itself in ways that break MOOSE and other third party libraries, usually (always?) with zero communication to any developer. Not even after the fact. Developers have to discover this themselves or rely on user reports to even figure out something is wrong, and then have to experiment or do forensics to figure out what changed. I know the original MOOSE developer asked for access to at least preview builds so he could work on getting the library working for its many users before ED releases the breaking changes. AFAIK, he heard nothing. I think he has since quit and the project has been taken over by other people. Who are in the same boat, but are sticking to the grind. IIRC, one of the more recent releases again kicked out the foundations from under them with no notice o, and they had to work overnight to get MOOSE working again. If they quit, and nobody is masochistic enough to step up, then MOOSE will die. It will be a shame. And it will be due to the lack of communication or care for communication from the ED house.

Link to comment
Share on other sites

Scripts functions: Spawning, AI tasks, Client Tasking, Cargo generating and more

Script Tool: MOOSE. (Mission Object Oriented Scripting Environment)

 

Reason:

 

 

  1. The object oriented approach Moose provides to mission scripting. Overide functions, inheritance and reuse of code.
  2. I can make rather sophisticated missions/sceneries with just few lines of code.
  3. Moose provides a huge API, which makes me able to do much with less code.
  4. Documentation written and Youtube vids
  5. Moose community provides help with code and sharing of code and such.

Moose framework contributor

Link to comment
Share on other sites

MOOSE for the airboss, recovery tanker, rescue helo functions as well as the A2A and A2G dispatchers and the random air traffic. The airboss, tanker, and rescue helo may one day be integrated into super carrier, but the other dispatchers and functions of MOOSE add so much potential options for everything in your mission.

 

We use pretty much the exact same scripts for the same functions as a base for our MP missions.

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

* MiST and a heavily customised CTLD/CSAR/JTACAutoLase

- used for helo ops - loading and unloading troops into combat dynamically (ie: without bring pre-set in the ME)

- CSAR used to simulate downed pilots that can be rescued

- Cargo logistics which can then be used to spawn ground units dynamically and can be controlled through Combined Arms

- MiST used for detecting particular unit types in zones

- MiST also used to build EVENT tracking to detect dead runways and stop aircraft spawning there in MOOSE

 

 

* MOOSE

- Used to respawn tankers when the RTB due to low fuel or are shot down

- Used to provide a recovery tanker which orbits over the (moving) carrier. Its orbit is updated regularly and automatically to keep it overhead - as in real life

- Used to provide a rescue helo that follows the carrier, RTB on bingo fuel and then spawn another to replace it.

 

- Used to automatically place CAP aircraft up in particular areas, and automatically route them around (randomly patrol). Uses AI ground and air radars to detect incoming enemies and route CAP towards them when within certain parameters. Disengage when enemy dead or RTB. Also sets up tanking so CAP can stay aloft until out of ammo

- Used to automatically generate AI CAS missions to attack ground units controlled by CA players or CTLD Pilots. CAS aircraft and nominated observers will detect opposing units and generate CAS missions against them.

- Used to make ships patrol (there is no `go to waypoint` in naval unit commands)


Edited by Ironwulf
Link to comment
Share on other sites

The VAF uses a combo of MOOSE, MIST and CTLD. We use outside scripting for many functions but regularly we use;

 

MOOSE:

Retasking for Air Refuelers, AWACs etc.

Detection script for enemy air response

Patrol script for managing patrols and cleanup

Carrier pattern script

 

MIST:

Spawning ground units

triggering map object destruction among other things

 

CTLD:

JTAC control

Helicopter ops for taking bases etc

 

 

We could not build any of our missions without the addition of these tools

Link to comment
Share on other sites

Not totally sure on the definition of "outside scripting" but I've had a good enough experience working with DCS's built-in environment. There's a lot to be desired but thanks to the Hoggit Wiki it has been accessible enough to build what my missions need.

Link to comment
Share on other sites

Our mission development team often uses MOOSE in favor of DCS' own functions, even if the result may be the same with some basic functions. Although MOOSE's documentation is by no means perfect, it is still light years ahead of the native scripting functions. Not to mention all the fantastic functions it provides, like the Airboss, which to this day is superior to the Supercarrier's ATC, being able to do recovery/launch windows and steer the ship. In addition to that, being able to create different shaped trigger zones as well as trigger zones attached to units easily in scripting is extremely powerful.

Everybody said: "That's impossible!" Then someone came along who didn't know that and just did it.

Flying the A-10C for the 107th Joint Aviation Squadron

Developing and creating missions for Through The Inferno

Join the TTI Discord

Link to comment
Share on other sites

Replay-ability is a huge factor for me when mission building.

If I am to invest an inordinate amount of time into making a mission, I want to be able to replay it numerous times, in numerous aircraft.

 

I use Moose to Spawn units from randomised templates, in randomised locations so that the mission is always different.

 

To me, this is the most valuable part of moose, and 3rd party scripts. It would be a great if this feature was incorporated into the mission editor.

Link to comment
Share on other sites

I use MOOSE for most of what have been said above. I also played with sockets to send data out to a nodejs server, pretty fun stuff.

 

 

I'd say having a better documentation (online and generated with your code), add API changes to changelogs and fixing SP/MP bugs would be awesome.

 

 

You should probably look at automation of things like automatic update of carrier heading based on wind, recovery tanker, auto relief of tankers when empty, Smart SAM that don't always stay radar ON (as an option), better spawning capabilities (like a "SpawnInZoneFromTemplate" trigger function), having the possibility to add unspawned client slots as statics is pretty cool too.

 

I also use MOOSE a lot to make AIs less dumb when it comes to engagements with the A2A_Dispatcher that allows me to set up borders for a faction, engagement range, disengage distance, etc ... + automatic spawning based on detected planes (can they carry fox3, etc ...)

 

 

 

I've been using CTLD lately and I think this could be a great addition to the editor aswell for helicopter ops. Troops management and beacons are really cool

 

 

 

As you can see there's a lot of great topics to work on :)

 

 

Thanks for taking the time to ask the community

Link to comment
Share on other sites

We at DDCS have been coding with the Direct ED DCS API for a while (4 years now) now so here is the things I think we need (DDCS, MOOSE, MIST, and every other script out there does the same thing), I directly use the direct API to keep everything smooth, the less loaded in lua the quicker the engine runs, more resources for the server to do its normal things, here is a few things that we could leverage greatly to make this sim even better:

 

1. The more hooks you allow us to manipulate on the direct mission API side of things, the more interesting things we can do in the game engine for example:

a. Getters and Setters to read and write the weapons, fuel, and plane allocations in each base (let us control the flow of resources, war of attrition)

b. functions to repair base assets like runways and ammo depots (helicopter play to repair the unusable runway, restore resources)

c. allow us to spawn in FARPS and player/client enabled aircraft (variable bases, someone could build a farp without restarting mission, FARPS no longer are a known place to the enemy)

d. allow us to spawn in CA units with less ammo and less health, keep the state of the server between restarts (not every unit gets refreshed after a restart)

e. allow us to read the player name or ID that is occupying a CA unit (allows us to let CA players use specialized f10 menu options, so a APC can carry troops and deploy them using the F10 menu which in turn calls the lua scripts)

f. change the weather (wind etc) by API

g. change the time of day by API

h. allow us to set any of the missions settings by API realtime (f10 options, fog of war, labels etc)

 

2. Keep the game lua version up to date, right now it is now running Lua 5.1.5 which the last update for this version was 02-17-2012 (so it is pretty old). Its very important to keep 3rd party library versions up to date (its been compiled to newer hooks on newer processors, security reasons, long list of the reasons why), you gain the benefit of bugfixes and new architectures (it is worth the work you have to do to keep it this way.) - the current stable version of lua is 5.4.0 from http://lua.org - this can also lead into us developers using third party libraries like luaSQL (or others) work on different architectures, right now we have to compile specialized versions of these libraries (that match the in game lua version of DCS) to use it (third party libraries are force multipliers)

 

3. Company run API documentation (with patch notes announcements when API is modified), right now we have to use a third party site for any new added API functionality (sometimes hard to know when ED adds new functionality, I do thank Grimes for the hardwork in keeping this resource up to date but it should be updated by the company) - https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation

 

4. (some what hard to do, but it can be run on a different process thread and result merged into existing sim engine)API lua enviroment decoupled from main runtime of engine, if a big command is run it should not hold up the game engine (causing stutters and freezes sometimes)

 

5. A more verbose bug output flag(turn on or off at will) on running the DCS server or sim that spits out better error messages to help us and you get to the bottom of these bugs when they do show up (we do understand that more verbose can also = slower performance, but we do need to find these bugs, so if we are looking for them, we can turn this on temporarily)

 

6. Eventually, we need a better login screen that can sidelock people on, and once they are locked they cant peak at the other sides to see where the other side spawned and what the other side spawned in, kind of ruins the war because the enemy knows what you spawned in already and where you are, the war of information is a very important one (if you ever played starcraft, this is 1/2 the game) - also dotn allow commands to center a map over the player, this also ruins the "where am I" part of the game realism, we have all these fancy nav systems and dont use them like we should be (server option of course)

 

I am not sure if these are attainable, but they have been on our mind for a while now, and we do feel that some of these are "low hanging fruit", something quick and easy to implement (especially the getter's and setters of the base resource allocations, this is just update memory numbers directly)

 

The more control in the direct DCS API you give us, the more we can leverage and make better experiences in the end, so updating the API will have a "force multiplier" effect, aka we can make much better experiences!

 

If you have any questions with the stuff we brought up above, don't hesitate to let me (or any of the DDCS admins) know, We will gladly help, I, personally, have been coding for over 20 years, I can basically build anything at this point, so let me help you guys

 

I also love this sim and its community, and want to help it reach its full potential and we can definitely get there.

 

Thanks,

 

Sincerely,

 

Andrew "Drex" Finegan

andrew.finegan@gmail.com

https://discord.gg/KJSxqKc


Edited by Drexx
  • Like 1

Developer of DDCS MP Engine, dynamicdcs.com

https://forums.eagle.ru/showthread.php?t=208608

Link to comment
Share on other sites

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