Module Sound.SRS
-Sound - Simple Radio Standalone (SRS) Integration and Text-to-Speech.
- - - -- -
Main Features:
- --
-
- Incease immersion of your missions with more sound output -
- Play sound files via SRS -
- Play text-to-speech via SRS -
- -
Youtube Videos: None yet
- -- -
Example Missions: GitHub.
- -- -
Sound files: MOOSE Sound Files
- -- -
The goal of the SRS project is to bring VoIP communication into DCS and to make communication as frictionless as possible.
- -- -
Author: funkyfranky
- -Global(s)
Global MSRS |
-
- It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde - -- - The MSRS Concept- -This class allows to broadcast sound files or text via Simple Radio Standalone (SRS). - |
-
It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde
- -- -
The MSRS Concept
- -This class allows to broadcast sound files or text via Simple Radio Standalone (SRS).
- - - -Prerequisites
- --
-
- This script needs SRS version >= 1.9.6 -
- You need to de-sanitize os, io and lfs in the missionscripting.lua -
- Optional: DCS-gRPC as backend to communicate with SRS (vide infra) -
Knwon Issues
- -Pop-up Window
- -The text-to-speech conversion of SRS is done via an external exe file. When this file is called, a windows cmd window is briefly opended. That puts DCS out of focus, which is annoying,
-expecially in VR but unavoidable (if you have a solution, please feel free to share!).
NOTE that this is not an issue if the mission is running on a server. -Also NOTE that using DCS-gRPC as backend will avoid the pop-up window.
- -Play Sound Files
- -local soundfile=SOUNDFILE:New("My Soundfile.ogg", "D:\\Sounds For DCS")
-local msrs=MSRS:New("C:\\Path To SRS", 251, radio.modulation.AM)
-msrs:PlaySoundFile(soundfile)
-
-
-Play Text-To-Speech
- -Basic example:
- --- Create a SOUNDTEXT object.
-local text=SOUNDTEXT:New("All Enemies destroyed")
-
--- MOOSE SRS
-local msrs=MSRS:New("D:\\DCS\\_SRS\\", 305, radio.modulation.AM)
-
--- Text-to speech with default voice after 2 seconds.
-msrs:PlaySoundText(text, 2)
-
-
-Set Gender
- -Use a specific gender with the MSRS.SetGender function, e.g. SetGender("male") or :SetGender("female").
Set Culture
- -Use a specific "culture" with the MSRS.SetCulture function, e.g. :SetCulture("en-US") or :SetCulture("de-DE").
Set Voice
- -Use a specific voice with the MSRS.SetVoice function, e.g, :SetVoice("Microsoft Hedda Desktop").
-Note that this must be installed on your windows system.
Note that you can set voices for each provider via the MSRS.SetVoiceProvider function. Also shortcuts are available, i.e. -MSRS.SetVoiceWindows, MSRS.SetVoiceGoogle, MSRS.SetVoiceAzure and MSRS.SetVoiceAmazon.
- -For voices there are enumerators in this class to help you out on voice names:
- -MSRS.Voices.Microsoft -- e.g. MSRS.Voices.Microsoft.Hedda - the Microsoft enumerator contains all voices known to work with SRS
-MSRS.Voices.Google -- e.g. MSRS.Voices.Google.Standard.en_AU_Standard_A or MSRS.Voices.Google.Wavenet.de_DE_Wavenet_C - The Google enumerator contains voices for EN, DE, IT, FR and ES.
-
-
-Set Coordinate
- -Use MSRS.SetCoordinate to define the origin from where the transmission is broadcasted. -Note that this is only a factor if SRS server has line-of-sight and/or distance limit enabled.
- -Set SRS Port
- -Use MSRS.SetPort to define the SRS port. Defaults to 5002.
- -Set SRS Volume
- -Use MSRS.SetVolume to define the SRS volume. Defaults to 1.0. Allowed values are between 0.0 and 1.0, from silent to loudest.
- -Config file for many variables, auto-loaded by Moose
- -See MSRS.LoadConfigFile for details on how to set this up.
- -TTS Providers
- -The default provider for generating speech from text is the native Windows TTS service. Note that you need to install the voices you want to use.
- -Pro-Tip - use the command line with power shell to call DCS-SR-ExternalAudio.exe - it will tell you what is missing
-and also the Google Console error, in case you have missed a step in setting up your Google TTS.
-For example, .\DCS-SR-ExternalAudio.exe -t "Text Message" -f 255 -m AM -c 2 -s 2 -z -G "Path_To_You_Google.Json"
-plays a message on 255 MHz AM for the blue coalition in-game.
In order to use Google Cloud for TTS you need to use MSRS.SetProvider and MSRS.SetProviderOptionsGoogle functions:
- -msrs:SetProvider(MSRS.Provider.GOOGLE)
-msrs:SetProviderOptionsGoogle(CredentialsFile, AccessKey)
-
-
-The parameter CredentialsFile is used with the default 'DCS-SR-ExternalAudio.exe' backend and must be the full path to the credentials JSON file.
-The AccessKey parameter is used with the DCS-gRPC backend (see below).
You can set the voice to use with Google via MSRS.SetVoiceGoogle.
- -When using Google it also allows you to utilize SSML in your text for more flexibility. -For more information on setting up a cloud account, visit: https://cloud.google.com/text-to-speech -Google's supported SSML reference: https://cloud.google.com/text-to-speech/docs/ssml
- -Amazon Web Service [Only DCS-gRPC backend]
- -In order to use Amazon Web Service (AWS) for TTS you need to use MSRS.SetProvider and MSRS.SetProviderOptionsAmazon functions:
- -msrs:SetProvider(MSRS.Provider.AMAZON)
-msrs:SetProviderOptionsAmazon(AccessKey, SecretKey, Region)
-
-
-The parameters AccessKey and SecretKey are your AWS access and secret keys, respectively. The parameter Region is your AWS region.
You can set the voice to use with AWS via MSRS.SetVoiceAmazon.
- -Microsoft Azure [Only DCS-gRPC backend]
- -In order to use Microsoft Azure for TTS you need to use MSRS.SetProvider and MSRS.SetProviderOptionsAzure functions:
- -msrs:SetProvider(MSRS.Provider.AZURE)
-msrs:SetProviderOptionsAmazon(AccessKey, Region)
-
-
-The parameter AccessKey is your Azure access key. The parameter Region is your Azure region.
You can set the voice to use with Azure via MSRS.SetVoiceAzure.
- -Backend
- -The default interface to SRS is via calling the 'DCS-SR-ExternalAudio.exe'. As noted above, this has the unavoidable drawback that a pop-up briefly appears -and DCS might be put out of focus.
- -DCS-gRPC as an alternative to 'DCS-SR-ExternalAudio.exe' for TTS
- -Another interface to SRS is DCS-gRPC. This does not call an exe file and therefore avoids the annoying pop-up window. -In addition to Windows and Google cloud, it also offers Microsoft Azure and Amazon Web Service as providers for TTS.
- -Use MSRS.SetDefaultBackendGRPC to enable DCS-gRPC as an alternate backend for transmitting text-to-speech over SRS. -This can be useful if 'DCS-SR-ExternalAudio.exe' cannot be used in the environment or to use Azure or AWS clouds for TTS. Note that DCS-gRPC does not (yet?) support -all of the features and options available with 'DCS-SR-ExternalAudio.exe'. Of note, only text-to-speech is supported and it it cannot be used to transmit audio files.
- -DCS-gRPC must be installed and configured per the DCS-gRPC documentation and already running via either the 'autostart' mechanism -or a Lua call to 'GRPC.load()' prior to use of the alternate DCS-gRPC backend. If a cloud TTS provider is being used, the API key must be set via the 'Config\dcs-grpc.lua' -configuration file prior DCS-gRPC being started. DCS-gRPC can be used both with DCS dedicated server and regular DCS installations.
- -To use the default local Windows TTS with DCS-gRPC, Windows 2019 Server (or newer) or Windows 10/11 are required. Voices for non-local languages and dialects may need to -be explicitly installed.
- -To set the MSRS class to use the DCS-gRPC backend for all future instances, call the function MSRS.SetDefaultBackendGRPC().
Note - When using other classes that use MSRS with the alternate DCS-gRPC backend, pass them strings instead of nil values for non-applicable fields with filesystem paths, -such as the SRS path or Google credential path. This will help maximize compatibility with other classes that were written for the default backend.
- -Basic Play Text-To-Speech example using alternate DCS-gRPC backend (DCS-gRPC not previously started):
- --- Start DCS-gRPC
-GRPC.load()
--- Select the alternate DCS-gRPC backend for new MSRS instances
-MSRS.SetDefaultBackendGRPC()
--- Create a SOUNDTEXT object.
-local text=SOUNDTEXT:New("All Enemies destroyed")
--- MOOSE SRS
-local msrs=MSRS:New('', 305.0)
--- Text-to speech with default voice after 30 seconds.
-msrs:PlaySoundText(text, 30)
-
-
-Basic example of using another class (ATIS) with SRS and the DCS-gRPC backend (DCS-gRPC not previously started):
- --- Start DCS-gRPC
-GRPC.load()
--- Select the alternate DCS-gRPC backend for new MSRS instances
-MSRS.SetDefaultBackendGRPC()
--- Create new ATIS as usual
-atis=ATIS:New("Nellis", 251, radio.modulation.AM)
--- ATIS:SetSRS() expects a string for the SRS path even though it is not needed with DCS-gRPC
-atis:SetSRS('')
--- Start ATIS
-atis:Start()
-
-
-
-Global MSRSQUEUE |
- - - | -
Type(s)
| Fields and Methods inherited from MSRS | -Description | -
|---|---|
| - |
- Add frequencies. - |
-
| - |
- Add modulations. - |
-
| - | - - | -
| - |
- Name of the class. - |
-
| - |
- Name of the standard config file. - |
-
| - |
- Path to the standard config file. - |
-
| - |
- If |
-
| - |
- Get currently set backend. - |
-
| - |
- Get coalition. - |
-
| - |
- Get frequencies. - |
-
| - |
- Get label. - |
-
| - |
- Get modulations. - |
-
| - |
- Get path to SRS directory. - |
-
| - |
- Get port. - |
-
| - |
- Get provider. - |
-
| - |
- Get provider options. - |
-
| - |
- Get voice. - |
-
| - |
- Get SRS volume. - |
-
| - |
- Print SRS help to DCS log file. - |
-
| - |
- Label showing up on the SRS radio overlay. Default is "ROBOT". No spaces allowed. - |
-
| - |
- Get central SRS configuration to be able to play tts over SRS radio using the |
-
| - |
- Create a new MSRS object. - |
-
| - |
- Play sound file (ogg or mp3) via SRS. - |
-
| - |
- Play a SOUNDTEXT text-to-speech object. - |
-
| - |
- Play text message via MSRS. - |
-
| - |
- Play text message via MSRS with explicitly specified options. - |
-
| - |
- Play text file via MSRS. - |
-
| - | - - | -
| - |
- Set backend to communicate with SRS. - |
-
| - |
- Set DCS-gRPC as backend to communicate with SRS. - |
-
| - |
- Set |
-
| - |
- Set coalition. - |
-
| - |
- Set the coordinate from which the transmissions will be broadcasted. - |
-
| - |
- Set culture. - |
-
| - |
- Set the default backend. - |
-
| - |
- Set DCS-gRPC to be the default backend. - |
-
| - |
- Set frequencies. - |
-
| - |
- Set gender. - |
-
| - |
- [Deprecated] Use google text-to-speech credentials. - |
-
| - |
- [Deprecated] Use google text-to-speech set the API key (only for DCS-gRPC). - |
-
| - |
- Set label. - |
-
| - |
- Set modulations. - |
-
| - |
- Set path to SRS install directory. - |
-
| - |
- Set port. - |
-
| - |
- Set provider used to generate text-to-speech. - |
-
MSRS:SetProviderOptions(Provider, CredentialsFile, AccessKey, SecretKey, Region) |
-
- Set provider options and credentials. - |
-
| - |
- Set provider options and credentials for Amazon Web Service (AWS). - |
-
| - |
- Set provider options and credentials for Microsoft Azure. - |
-
| - |
- Set provider options and credentials for Google Cloud. - |
-
| - |
- Use Amazon Web Service (AWS) to provide text-to-speech. - |
-
| - |
- Use Microsoft Azure to provide text-to-speech. - |
-
| - |
- Use Google to provide text-to-speech. - |
-
| - |
- Use Microsoft to provide text-to-speech. - |
-
| - |
- Set to use a specific voice. - |
-
| - |
- Set to use a specific voice if Amazon Web Service is use as provider (only DCS-gRPC backend). - |
-
| - |
- Set to use a specific voice if Microsoft Azure is use as provider (only DCS-gRPC backend). - |
-
| - |
- Set to use a specific voice if Google is use as provider. - |
-
| - |
- Set to use a specific voice for a given provider. - |
-
| - |
- Set to use a specific voice if Microsoft Windows' native TTS is use as provider. - |
-
| - |
- Set SRS volume. - |
-
| - | - - | -
MSRS._CreateProviderOptions(Provider, CredentialsFile, AccessKey, SecretKey, Region) |
-
- Create MSRS.ProviderOptions. - |
-
MSRS:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate) |
-
- Make DCS-gRPC API call to transmit text-to-speech over SRS. - |
-
| - |
- Execute SRS command to play sound using the |
-
MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, speed, port, label, coordinate) |
-
- Get SRS command to play sound using the |
-
| - |
- Get lat, long and alt from coordinate. - |
-
| - |
- Backend used as interface to SRS (MSRS.Backend.SRSEXE or MSRS.Backend.GRPC). - |
-
| - |
- Coalition of the transmission. - |
-
| - |
- Coordinate from where the transmission is send. - |
-
| - |
- Culture. Default "en-GB". - |
-
| - |
- Frequencies used in the transmissions. - |
-
| - |
- Gender. Default "female". - |
-
| - |
- Function returns estimated speech time in seconds. - |
-
| - |
- Class id string for output to DCS log file. - |
-
| - |
- Modulations used in the transmissions. - |
-
| - |
- Name. Default "MSRS". - |
-
| - |
- Path to the SRS exe. - |
-
| - |
- Provider options. Each element is a data structure of type |
-
| - |
- Port. Default 5002. - |
-
| - |
- Provider of TTS (win, gcloud, azure, amazon). - |
-
| - |
- Function for UUID. - |
-
| - |
- MSRS class version. - |
-
| - |
- Specific voice. Only used if no explicit provider voice specified. - |
-
| - |
- Volume between 0 (min) and 1 (max). Default 1. - |
-
| Fields and Methods inherited from BASE | -Description | -
|---|---|
| - |
- The ID number of the class. - |
-
| - |
- The name of the class. - |
-
| - |
- The name of the class concatenated with the ID number of the class. - |
-
| - |
- Clear the state of an object. - |
-
MSRS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
-
- Creation of a Birth Event. - |
-
MSRS:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
-
- Creation of a Crash Event. - |
-
MSRS:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
-
- Creation of a Dead Event. - |
-
| - |
- Creation of a |
-
| - |
- Creation of a Remove Unit Event. - |
-
| - |
- Creation of a Takeoff Event. - |
-
| - |
- Creation of a Crash Event. - |
-
| - |
- Log an exception which will be traced always. - |
-
| - |
- Returns the event dispatcher - |
-
| - |
- Remove all subscribed events - |
-
| - |
- Trace a function call. - |
-
| - |
- Trace a function call level 2. - |
-
| - |
- Trace a function call level 3. - |
-
| - |
- Get the ClassID of the class instance. - |
-
| - |
- Get the ClassName of the class instance. - |
-
| - |
- Get the ClassName + ClassID of the class instance. - |
-
| - |
- Get the Class Core.Event processing Priority. - |
-
| - |
- This is the worker method to retrieve the Parent class. - |
-
| - |
- Get a Value given a Key from the Object. - |
-
| - |
- Subscribe to a DCS Event. - |
-
| - |
- Log an information which will be traced always. - |
-
| - |
- This is the worker method to inherit from a parent class. - |
-
| - |
- This is the worker method to check if an object is an (sub)instance of a class. - |
-
| - |
- Enquires if tracing is on (for the class). - |
-
| - |
- BASE constructor. - |
-
| - |
- Occurs when an Event for an object is triggered. - |
-
| - |
- BDA. - |
-
| - |
- Occurs when a ground unit captures either an airbase or a farp. - |
-
| - |
- Occurs when any object is spawned into the mission. - |
-
| - |
- Occurs when any aircraft crashes into the ground and is completely destroyed. - |
-
| - |
- Occurs when an object is dead. - |
-
| - |
- Unknown precisely what creates this event, likely tied into newer damage model. - |
-
| - |
- Discard chair after ejection. - |
-
| - |
- Occurs when a pilot ejects from an aircraft -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs when any aircraft shuts down its engines. - |
-
| - |
- Occurs when any aircraft starts its engines. - |
-
| - |
- Occurs whenever an object is hit by a weapon. - |
-
| - |
- Occurs when any system fails on a human controlled aircraft. - |
-
| - |
- Occurs on the death of a unit. - |
-
| - |
- Occurs when an aircraft lands at an airbase, farp or ship -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. - |
-
| - |
- Landing quality mark. - |
-
| - |
- Occurs when a new mark was added. - |
-
| - |
- Occurs when a mark text was changed. - |
-
| - |
- Occurs when a mark was removed. - |
-
| - |
- Occurs when a mission ends -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs when a mission starts -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Weapon add. - |
-
| - |
- Occurs when the pilot of an aircraft is killed. - |
-
| - |
- Occurs when a player enters a slot and takes control of an aircraft. - |
-
| - |
- Occurs when any player assumes direct control of a unit. - |
-
| - |
- Occurs when any player relieves control of a unit to the AI. - |
-
| - |
- Occurs when an aircraft connects with a tanker and begins taking on fuel. - |
-
| - |
- Occurs when an aircraft is finished taking fuel. - |
-
| - |
- Occurs when any modification to the "Score" as seen on the debrief menu would occur. - |
-
| - |
- Occurs when any unit stops firing its weapon. - |
-
| - |
- Occurs when any unit begins firing a weapon that has a high rate of fire. - |
-
| - |
- Occurs whenever any unit in a mission fires a weapon. - |
-
| - |
- Occurs when an aircraft takes off from an airbase, farp, or ship. - |
-
| - |
- Trigger zone. - |
-
| - |
- Occurs when the game thinks an object is destroyed. - |
-
| - |
- Schedule a new time event. - |
-
MSRS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
-
- Schedule a new time event. - |
-
| - |
- Stops the Schedule. - |
-
| - | - - | -
| - |
- Set the Class Core.Event processing Priority. - |
-
| - |
- Set a state or property of the Object given a Key and a Value. - |
-
| - |
- Trace a function logic level 1. - |
-
| - |
- Trace a function logic level 2. - |
-
| - |
- Trace a function logic level 3. - |
-
| - |
- Trace all methods in MOOSE - |
-
| - |
- Set tracing for a class - |
-
| - |
- Set tracing for a specific method of class - |
-
| - |
- Set trace level - |
-
| - |
- Set trace off. - |
-
| - |
- Set trace on. - |
-
| - |
- Set trace on or off -Note that when trace is off, no BASE.Debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default. - |
-
| - |
- UnSubscribe to a DCS event. - |
-
| - | - - | -
MSRS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
-
- Trace a function call. - |
-
MSRS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
-
- Trace a function logic. - |
-
| - | - - | -
| - |
- The main event handling function... - |
-
| Fields and Methods inherited from MSRS.Backend | -Description | -
|---|---|
| - |
- Use DCS-gRPC. - |
-
| - |
- Use |
-
| Fields and Methods inherited from MSRS.GRPCOptions | -Description | -
|---|---|
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| - | - - | -
| Fields and Methods inherited from MSRS.Provider | -Description | -
|---|---|
| - |
- Amazon Web Service ( |
-
| - |
- Microsoft Azure ( |
-
| - |
- Google ( |
-
| - |
- Microsoft windows ( |
-
| Fields and Methods inherited from MSRS.ProviderOptions | -Description | -
|---|---|
| - |
- Google credentials JSON file (full path). - |
-
| - |
- Default voice (not used). - |
-
| - |
- Access key (DCS-gRPC with Google, AWS, AZURE as provider). - |
-
| - |
- Provider. - |
-
| - |
- Region. - |
-
| - |
- Secret key (DCS-gRPC with AWS as provider) - |
-
| - |
- Voice used. - |
-
| Fields and Methods inherited from MSRS.Voices | -Description | -
|---|---|
| - | - - | -
| - | - - | -
| Fields and Methods inherited from MSRSQUEUE | -Description | -
|---|---|
| - |
- Add a transmission to the radio queue. - |
-
| - |
- Broadcast radio message. - |
-
| - |
- Calculate total transmission duration of all transmission in the queue. - |
-
| - |
- Name of the class "MSRSQUEUE". - |
-
| - |
- Clear the radio queue. - |
-
| - | - - | -
| - |
- Create a new MSRSQUEUE object for a given radio frequency/modulation. - |
-
| - |
- Create a new transmission and add it to the radio queue. - |
-
| - | - - | -
| - |
- Switch to only transmit if there are players on the server. - |
-
| - |
- Time (abs) when the last transmission finished. - |
-
| - | - - | -
| - |
- Check radio queue for transmissions to be broadcasted. - |
-
| - |
- Name of the radio queue. - |
-
| - |
- If |
-
| - |
- Time interval in seconds for checking the radio queue. - |
-
| - |
- ID for dcs.log. - |
-
| - |
- The queue of transmissions. - |
-
| Fields and Methods inherited from BASE | -Description | -
|---|---|
| - |
- The ID number of the class. - |
-
| - |
- The name of the class. - |
-
| - |
- The name of the class concatenated with the ID number of the class. - |
-
| - |
- Clear the state of an object. - |
-
MSRSQUEUE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
-
- Creation of a Birth Event. - |
-
MSRSQUEUE:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
-
- Creation of a Crash Event. - |
-
MSRSQUEUE:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
-
- Creation of a Dead Event. - |
-
| - |
- Creation of a |
-
| - |
- Creation of a Remove Unit Event. - |
-
| - |
- Creation of a Takeoff Event. - |
-
| - |
- Creation of a Crash Event. - |
-
| - |
- Log an exception which will be traced always. - |
-
| - |
- Returns the event dispatcher - |
-
| - |
- Remove all subscribed events - |
-
| - |
- Trace a function call. - |
-
| - |
- Trace a function call level 2. - |
-
| - |
- Trace a function call level 3. - |
-
| - |
- Get the ClassID of the class instance. - |
-
| - |
- Get the ClassName of the class instance. - |
-
| - |
- Get the ClassName + ClassID of the class instance. - |
-
| - |
- Get the Class Core.Event processing Priority. - |
-
| - |
- This is the worker method to retrieve the Parent class. - |
-
| - |
- Get a Value given a Key from the Object. - |
-
| - |
- Subscribe to a DCS Event. - |
-
| - |
- Log an information which will be traced always. - |
-
| - |
- This is the worker method to inherit from a parent class. - |
-
| - |
- This is the worker method to check if an object is an (sub)instance of a class. - |
-
| - |
- Enquires if tracing is on (for the class). - |
-
| - |
- BASE constructor. - |
-
| - |
- Occurs when an Event for an object is triggered. - |
-
| - |
- BDA. - |
-
| - |
- Occurs when a ground unit captures either an airbase or a farp. - |
-
| - |
- Occurs when any object is spawned into the mission. - |
-
| - |
- Occurs when any aircraft crashes into the ground and is completely destroyed. - |
-
| - |
- Occurs when an object is dead. - |
-
| - |
- Unknown precisely what creates this event, likely tied into newer damage model. - |
-
| - |
- Discard chair after ejection. - |
-
| - |
- Occurs when a pilot ejects from an aircraft -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs when any aircraft shuts down its engines. - |
-
| - |
- Occurs when any aircraft starts its engines. - |
-
| - |
- Occurs whenever an object is hit by a weapon. - |
-
| - |
- Occurs when any system fails on a human controlled aircraft. - |
-
| - |
- Occurs on the death of a unit. - |
-
| - |
- Occurs when an aircraft lands at an airbase, farp or ship -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. - |
-
| - |
- Landing quality mark. - |
-
| - |
- Occurs when a new mark was added. - |
-
| - |
- Occurs when a mark text was changed. - |
-
| - |
- Occurs when a mark was removed. - |
-
| - |
- Occurs when a mission ends -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Occurs when a mission starts -Have a look at the class Core.Event#EVENT as these are just the prototypes. - |
-
| - |
- Weapon add. - |
-
| - |
- Occurs when the pilot of an aircraft is killed. - |
-
| - |
- Occurs when a player enters a slot and takes control of an aircraft. - |
-
| - |
- Occurs when any player assumes direct control of a unit. - |
-
| - |
- Occurs when any player relieves control of a unit to the AI. - |
-
| - |
- Occurs when an aircraft connects with a tanker and begins taking on fuel. - |
-
| - |
- Occurs when an aircraft is finished taking fuel. - |
-
| - |
- Occurs when any modification to the "Score" as seen on the debrief menu would occur. - |
-
| - |
- Occurs when any unit stops firing its weapon. - |
-
| - |
- Occurs when any unit begins firing a weapon that has a high rate of fire. - |
-
| - |
- Occurs whenever any unit in a mission fires a weapon. - |
-
| - |
- Occurs when an aircraft takes off from an airbase, farp, or ship. - |
-
| - |
- Trigger zone. - |
-
| - |
- Occurs when the game thinks an object is destroyed. - |
-
| - |
- Schedule a new time event. - |
-
MSRSQUEUE:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
-
- Schedule a new time event. - |
-
| - |
- Stops the Schedule. - |
-
| - | - - | -
| - |
- Set the Class Core.Event processing Priority. - |
-
| - |
- Set a state or property of the Object given a Key and a Value. - |
-
| - |
- Trace a function logic level 1. - |
-
| - |
- Trace a function logic level 2. - |
-
| - |
- Trace a function logic level 3. - |
-
| - |
- Trace all methods in MOOSE - |
-
| - |
- Set tracing for a class - |
-
| - |
- Set tracing for a specific method of class - |
-
| - |
- Set trace level - |
-
| - |
- Set trace off. - |
-
| - |
- Set trace on. - |
-
| - |
- Set trace on or off -Note that when trace is off, no BASE.Debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default. - |
-
| - |
- UnSubscribe to a DCS event. - |
-
| - | - - | -
MSRSQUEUE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
-
- Trace a function call. - |
-
MSRSQUEUE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
-
- Trace a function logic. - |
-
| - | - - | -
| - |
- The main event handling function... - |
-
| Fields and Methods inherited from MSRSQUEUE.Transmission | -Description | -
|---|---|
| - |
- PlayerSet created when TransmitOnlyWithPlayers == true - |
-
| - |
- Mission time (abs) in seconds when the transmission should be played. - |
-
| - |
- If true, only transmit if there are alive Players. - |
-
| - |
- Mission time (abs) in seconds when the transmission started. - |
-
| - |
- Coordinate for this transmission - |
-
| - |
- Voice culture - |
-
| - |
- Duration in seconds. - |
-
| - |
- Frequency. - |
-
| - |
- Voice gender - |
-
| - |
- Interval in seconds before next transmission. - |
-
| - |
- If true, transmission is currently playing. - |
-
| - |
- Label to be used - |
-
| - |
- Modulation. - |
-
| - |
- MOOSE SRS object. - |
-
| - |
- Duration of the subtitle being displayed. - |
-
| - |
- Groups to send subtitle to. - |
-
| - |
- Subtitle of the transmission. - |
-
| - |
- Text to be transmitted. - |
-
| - |
- Voice if any - |
-
| - |
- Volume - |
-
MSRS class.
- -Field(s)
-Name of the class.
- -Name of the standard config file.
- -Path to the standard config file.
- -If true if config file was loaded.
Label showing up on the SRS radio overlay. Default is "ROBOT". No spaces allowed.
- -Backend used as interface to SRS (MSRS.Backend.SRSEXE or MSRS.Backend.GRPC).
- -Coalition of the transmission.
- -Culture. Default "en-GB".
- -Frequencies used in the transmissions.
- -Gender. Default "female".
- -Class id string for output to DCS log file.
- -Modulations used in the transmissions.
- -Name. Default "MSRS".
- -Path to the SRS exe.
- -Provider options. Each element is a data structure of type MSRS.ProvierOptions.
Port. Default 5002.
- -Provider of TTS (win, gcloud, azure, amazon).
- -MSRS class version.
- -Specific voice. Only used if no explicit provider voice specified.
- -Volume between 0 (min) and 1 (max). Default 1.
- -Function(s)
-Add frequencies.
- -Defined in:
-MSRS
-Parameter:
-- #table - Frequencies -
-Frequencies in MHz. Can also be given as a #number if only one frequency should be used.
- -Return value:
-self
- -Add modulations.
- -Defined in:
-MSRS
-Parameter:
-- #table - Modulations -
-Modulations. Can also be given as a #number if only one modulation should be used.
- -Return value:
-self
- -Get currently set backend.
- -Defined in:
-MSRS
-Return value:
-#string:
-Backend.
- -Get coalition.
- -Defined in:
-MSRS
-Return value:
-#number:
-Coalition.
- -Get frequencies.
- -Defined in:
-MSRS
-Return value:
-#table:
-Frequencies in MHz.
- -Get label.
- -Defined in:
-MSRS
-Return value:
-#number:
-Label.
- -Get modulations.
- -Defined in:
-MSRS
-Return value:
-#table:
-Modulations.
- -Get path to SRS directory.
- -Defined in:
-MSRS
-Return value:
-#string:
-Path to the directory. This includes the final slash "/".
- -Get port.
- -Defined in:
-MSRS
-Return value:
-#number:
-Port.
- -Get provider.
- -Get provider options.
- -Defined in:
-MSRS
-Parameter:
-- #string - Provider -
-Provider. Default is as set via MSRS.SetProvider.
- -Return value:
-Provider options.
- -Get voice.
- -Defined in:
-MSRS
-Parameter:
-- #string - Provider -
-Provider. Default is the currently set provider (self.provider).
Return value:
-#string:
-Voice.
- -Get SRS volume.
- -Defined in:
-MSRS
-Return value:
-#number:
-Volume Volume - 1.0 is max, 0.0 is silence
- -Get central SRS configuration to be able to play tts over SRS radio using the DCS-SR-ExternalAudio.exe.
Defined in:
-MSRS
-Parameters:
-- #string - Path -
-Path to config file, defaults to "C:\Users\
- #string - Filename -
-File to load, defaults to "Moose_MSRS.lua"
- -Return value:
-#boolean:
-success
- -Usage:
- 0) Benefits: Centralize configuration of SRS, keep paths and keys out of the mission source code, making it safer and easier to move missions to/between servers,
- and also make config easier to use in the code.
- 1) Create a config file named "Moose_MSRS.lua" at this location "C:\Users\<yourname>\Saved Games\DCS\Config" (or wherever your Saved Games folder resides).
- 2) The file needs the following structure:
-
- -- Moose MSRS default Config
- MSRS_Config = {
- Path = C:\\Program Files\\DCS-SimpleRadio-Standalone, -- Path to SRS install directory.
- Port = 5002, -- Port of SRS server. Default 5002.
- Backend = "srsexe", -- Interface to SRS: "srsexe" or "grpc".
- Frequency = {127, 243}, -- Default frequences. Must be a table 1..n entries!
- Modulation = {0,0}, -- Default modulations. Must be a table, 1..n entries, one for each frequency!
- Volume = 1.0, -- Default volume [0,1].
- Coalition = 0, -- 0 = Neutral, 1 = Red, 2 = Blue (only a factor if SRS server has encryption enabled).
- Coordinate = {0,0,0}, -- x, y, alt (only a factor if SRS server has line-of-sight and/or distance limit enabled).
- Culture = "en-GB",
- Gender = "male",
- Voice = "Microsoft Hazel Desktop", -- Voice that is used if no explicit provider voice is specified.
- Label = "MSRS",
- Provider = "win", --Provider for generating TTS (win, gcloud, azure, aws).
-
- -- Windows
- win = {
- voice = "Microsoft Hazel Desktop",
- },
- -- Google Cloud
- gcloud = {
- voice = "en-GB-Standard-A", -- The Google Cloud voice to use (see https://cloud.google.com/text-to-speech/docs/voices).
- credentials="C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourfilename.json", -- Full path to credentials JSON file (only for SRS-TTS.exe backend)
- key="Your access Key", -- Google API access key (only for DCS-gRPC backend)
- },
- -- Amazon Web Service
- aws = {
- voice = "Brian", -- The default AWS voice to use (see https://docs.aws.amazon.com/polly/latest/dg/voicelist.html).
- key="Your access Key", -- Your AWS key.
- secret="Your secret key", -- Your AWS secret key.
- region="eu-central-1", -- Your AWS region (see https://docs.aws.amazon.com/general/latest/gr/pol.html).
- },
- -- Microsoft Azure
- azure = {
- voice="en-US-AriaNeural", --The default Azure voice to use (see https://learn.microsoft.com/azure/cognitive-services/speech-service/language-support).
- key="Your access key", -- Your Azure access key.
- region="westeurope", -- The Azure region to use (see https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/regions).
- },
- }
-
- 3) The config file is automatically loaded when Moose starts. YOu can also load the config into the MSRS raw class manually before you do anything else:
-
- MSRS.LoadConfigFile() -- Note the "." here
-
- Optionally, your might want to provide a specific path and filename:
-
- MSRS.LoadConfigFile(nil,MyPath,MyFilename) -- Note the "." here
-
- This will populate variables for the MSRS raw class and all instances you create with e.g. `mysrs = MSRS:New()`
- Optionally you can also load this per **single instance** if so needed, i.e.
-
- mysrs:LoadConfigFile(Path,Filename)
-
- 4) Use the config in your code like so, variable names are basically the same as in the config file, but all lower case, examples:
-
- -- Needed once only
- MESSAGE.SetMSRS(MSRS.path,nil,MSRS.google,243,radio.modulation.AM,nil,nil,
- MSRS.Voices.Google.Standard.de_DE_Standard_B,coalition.side.BLUE)
-
- -- later on in your code
-
- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS(243,radio.modulation.AM,nil,nil,MSRS.Voices.Google.Standard.fr_FR_Standard_C)
-
- -- Create new ATIS as usual
- atis=ATIS:New(AIRBASE.Caucasus.Batumi, 123, radio.modulation.AM)
- atis:SetSRS(nil,nil,nil,MSRS.Voices.Google.Standard.en_US_Standard_H)
- --Start ATIS
- atis:Start()
-
-Create a new MSRS object.
- - -Required argument is the frequency and modulation.
-Other parameters are read from the Moose_MSRS.lua config file. If you do not have that file set up you must set up and use the DCS-SR-ExternalAudio.exe (not DCS-gRPC) as backend, you need to still
-set the path to the exe file via MSRS.SetPath.
Defined in:
-MSRS
-Parameters:
-- #string - Path -
-Path to SRS directory. Default C:\\Program Files\\DCS-SimpleRadio-Standalone.
- #number - Frequency -
-Radio frequency in MHz. Default 143.00 MHz. Can also be given as a #table of multiple frequencies.
- -- #number - Modulation -
-Radio modulation: 0=AM (default), 1=FM. See radio.modulation.AM and radio.modulation.FM enumerators. Can also be given as a #table of multiple modulations.
- #string - Backend -
-Backend used: MSRS.Backend.SRSEXE (default) or MSRS.Backend.GRPC.
Return value:
-self
- -Play sound file (ogg or mp3) via SRS.
- -Defined in:
-MSRS
-Parameters:
-- Sound.SoundOutput#SOUNDFILE - Soundfile -
-Sound file to play.
- -- #number - Delay -
-Delay in seconds, before the sound file is played.
- -Return value:
-self
- -Play a SOUNDTEXT text-to-speech object.
- -Defined in:
-MSRS
-Parameters:
-- Sound.SoundOutput#SOUNDTEXT - SoundText -
-Sound text.
- -- #number - Delay -
-Delay in seconds, before the sound file is played.
- -Return value:
-self
- -Play text message via MSRS.
- -Defined in:
-MSRS
-Parameters:
-- #string - Text -
-Text message.
- -- #number - Delay -
-Delay in seconds, before the message is played.
- -- Core.Point#COORDINATE - Coordinate -
-Coordinate.
- -Return value:
-self
- -Play text message via MSRS with explicitly specified options.
- -Defined in:
-MSRS
-Parameters:
-- #string - Text -
-Text message.
- -- #number - Delay -
-Delay in seconds, before the message is played.
- -- #table - Frequencies -
-Radio frequencies.
- -- #table - Modulations -
-Radio modulations.
- -- #string - Gender -
-Gender.
- -- #string - Culture -
-Culture.
- -- #string - Voice -
-Voice.
- -- #number - Volume -
-Volume.
- -- #string - Label -
-Label.
- -- Core.Point#COORDINATE - Coordinate -
-Coordinate.
- -Return value:
-self
- -Play text file via MSRS.
- -Defined in:
-MSRS
-Parameters:
-- #string - TextFile -
-Full path to the file.
- -- #number - Delay -
-Delay in seconds, before the message is played.
- -Return value:
-self
- -Set backend to communicate with SRS.
- - -There are two options:
- --
-
MSRS.Backend.SRSEXE: This is the default and uses theDCS-SR-ExternalAudio.exe.
- MSRS.Backend.GRPC: Via DCS-gRPC.
-
Defined in:
-MSRS
-Parameter:
-- #string - Backend -
-Backend used. Default is MSRS.Backend.SRSEXE.
Return value:
-self
- -Set DCS-gRPC as backend to communicate with SRS.
- -Set DCS-SR-ExternalAudio.exe as backend to communicate with SRS.
Set coalition.
- -Defined in:
-MSRS
-Parameter:
-- #number - Coalition -
-Coalition. Default 0.
- -Return value:
-self
- -Set the coordinate from which the transmissions will be broadcasted.
- - -Note that this is only a factor if SRS has line-of-sight or distance enabled.
- -Defined in:
-MSRS
-Parameter:
-- Core.Point#COORDINATE - Coordinate -
-Origin of the transmission.
- -Return value:
-self
- -Set culture.
- -Defined in:
-MSRS
-Parameter:
-- #string - Culture -
-Culture, e.g. "en-GB".
- -Return value:
-self
- -Set the default backend.
- -Defined in:
-MSRS
-Parameter:
-- Backend -
-Set DCS-gRPC to be the default backend.
- -Defined in:
-MSRS
-Set frequencies.
- -Defined in:
-MSRS
-Parameter:
-- #table - Frequencies -
-Frequencies in MHz. Can also be given as a #number if only one frequency should be used.
- -Return value:
-self
- -Set gender.
- -Defined in:
-MSRS
-Parameter:
-- #string - Gender -
-Gender: "male" or "female" (default).
- -Return value:
-self
- -[Deprecated] Use google text-to-speech credentials.
- - -Also sets Google as default TTS provider.
- -Defined in:
-MSRS
-Parameter:
-- #string - PathToCredentials -
-Full path to the google credentials JSON file, e.g. "C:\Users\username\Downloads\service-account-file.json". Can also be the Google API key.
- -Return value:
-self
- -[Deprecated] Use google text-to-speech set the API key (only for DCS-gRPC).
- -Defined in:
-MSRS
-Parameter:
-- #string - APIKey -
-API Key, usually a string of length 40 with characters and numbers.
- -Return value:
-self
- -Set label.
- -Defined in:
-MSRS
-Parameter:
-- #number - Label -
-Default "ROBOT"
- -Return value:
-self
- -Set modulations.
- -Defined in:
-MSRS
-Parameter:
-- #table - Modulations -
-Modulations. Can also be given as a #number if only one modulation should be used.
- -Return value:
-self
- -Set path to SRS install directory.
- - -More precisely, path to where the DCS-SR-ExternalAudio.exe is located.
Defined in:
-MSRS
-Parameter:
-- #string - Path -
-Path to the directory, where the sound file is located. Default is C:\\Program Files\\DCS-SimpleRadio-Standalone.
Return value:
-self
- -Set port.
- -Defined in:
-MSRS
-Parameter:
-- #number - Port -
-Port. Default 5002.
- -Return value:
-self
- -Set provider used to generate text-to-speech.
- - -These options are available:
- --
-
MSRS.Provider.WINDOWS: Microsoft Windows (default)
- MSRS.Provider.GOOGLE: Google Cloud
- MSRS.Provider.AZURE: Microsoft Azure (only with DCS-gRPC backend)
- MSRS.Provier.AMAZON: Amazone Web Service (only with DCS-gRPC backend)
-
Note that all providers except Microsoft Windows need as additonal information the credentials of your account.
- - -Defined in:
-MSRS
-Parameter:
-- #string - Provider -
-Return value:
-self
- -Set provider options and credentials.
- -Defined in:
-MSRS
-Parameters:
-- #string - Provider -
-Provider.
- -- #string - CredentialsFile -
-Full path to your credentials file. For Google this is the path to a JSON file.
- -- #string - AccessKey -
-Your API access key.
- -- #string - SecretKey -
-Your secret key.
- -- #string - Region -
-Region to use.
- -Return value:
-Provider optionas table.
- -Set provider options and credentials for Amazon Web Service (AWS).
- - -Only supported in combination with DCS-gRPC as backend.
- - -Set provider options and credentials for Microsoft Azure.
- - -Only supported in combination with DCS-gRPC as backend.
- - -Set provider options and credentials for Google Cloud.
- -Defined in:
-MSRS
-Parameters:
-- #string - CredentialsFile -
-Full path to your credentials file. For Google this is the path to a JSON file. This is used if DCS-SR-ExternalAudio.exe is used as backend.
- #string - AccessKey -
-Your API access key. This is necessary if DCS-gRPC is used as backend.
- -Return value:
-self
- -Use Amazon Web Service (AWS) to provide text-to-speech.
- - -Only supported if used in combination with DCS-gRPC as backend.
- -Use Microsoft Azure to provide text-to-speech.
- - -Only supported if used in combination with DCS-gRPC as backend.
- -Use Google to provide text-to-speech.
- -Use Microsoft to provide text-to-speech.
- -Set to use a specific voice.
- - -Note that this will override any gender and culture settings as a voice already has a certain gender/culture.
- -Defined in:
-MSRS
-Parameter:
-- #string - Voice -
-Voice.
- -Return value:
-self
- -Set to use a specific voice if Amazon Web Service is use as provider (only DCS-gRPC backend).
- - -Note that this will override any gender and culture settings.
- - -Set to use a specific voice if Microsoft Azure is use as provider (only DCS-gRPC backend).
- - -Note that this will override any gender and culture settings.
- -Defined in:
-MSRS
-Parameter:
-- #string - Voice -
-Azure Voice. Default "en-US-AriaNeural".
Return value:
-self
- -Set to use a specific voice if Google is use as provider.
- - -Note that this will override any gender and culture settings.
- -Defined in:
-MSRS
-Parameter:
-- #string - Voice -
-Voice. Default MSRS.Voices.Google.Standard.en_GB_Standard_A.
Return value:
-self
- -Set to use a specific voice for a given provider.
- - -Note that this will override any gender and culture settings.
- -Defined in:
-MSRS
-Parameters:
-- #string - Voice -
-Voice.
- -- #string - Provider -
-Provider. Default is as set by MSRS.SetProvider, which itself defaults to MSRS.Provider.WINDOWS if not set.
Return value:
-self
- -Set to use a specific voice if Microsoft Windows' native TTS is use as provider.
- - -Note that this will override any gender and culture settings.
- -Defined in:
-MSRS
-Parameter:
-- #string - Voice -
-Voice. Default "Microsoft Hazel Desktop".
Return value:
-self
- -Set SRS volume.
- -Defined in:
-MSRS
-Parameter:
-- #number - Volume -
-Volume - 1.0 is max, 0.0 is silence
- -Return value:
-self
- -Create MSRS.ProviderOptions.
- -Defined in:
-MSRS
-Parameters:
-- #string - Provider -
-Provider.
- -- #string - CredentialsFile -
-Full path to your credentials file. For Google this is the path to a JSON file.
- -- #string - AccessKey -
-Your API access key.
- -- #string - SecretKey -
-Your secret key.
- -- #string - Region -
-Region to use.
- -Return value:
-Provider optionas table.
- -Make DCS-gRPC API call to transmit text-to-speech over SRS.
- -Defined in:
-MSRS
-Parameters:
-- #string - Text -
-Text of message to transmit (can also be SSML).
- -- #table - Frequencies -
-Radio frequencies to transmit on. Can also accept a number in MHz.
- -- #string - Gender -
-Gender.
- -- #string - Culture -
-Culture.
- -- #string - Voice -
-Voice.
- -- #number - Volume -
-Volume.
- -- #string - Label -
-Label.
- -- Core.Point#COORDINATE - Coordinate -
-Coordinate.
- -Return value:
-self
- -Execute SRS command to play sound using the DCS-SR-ExternalAudio.exe.
Defined in:
-MSRS
-Parameter:
-- #string - command -
-Command to executer
- -Return value:
-#number:
-Return value of os.execute() command.
- -MSRS:_GetCommand(freqs, modus, coal, gender, voice, culture, volume, speed, port, label, coordinate)
-Get SRS command to play sound using the DCS-SR-ExternalAudio.exe.
Defined in:
-MSRS
-Parameters:
-- #table - freqs -
-Frequencies in MHz.
- -- #table - modus -
-Modulations.
- -- #number - coal -
-Coalition.
- -- #string - gender -
-Gender.
- -- #string - voice -
-Voice.
- -- #string - culture -
-Culture.
- -- #number - volume -
-Volume.
- -- #number - speed -
-Speed.
- -- #number - port -
-Port.
- -- #string - label -
-Label, defaults to "ROBOT" (displayed sender name in the radio overlay of SRS) - No spaces allowed!
- -- Core.Point#COORDINATE - coordinate -
-Coordinate.
- -Return value:
-#string:
-Command.
- -Get lat, long and alt from coordinate.
- -Defined in:
-MSRS
-Parameter:
-- Core.Point#Coordinate - Coordinate -
-Coordinate. Can also be a DCS#Vec3.
- -Return values:
-#number:
-Latitude (or 0 if no input coordinate was given).
- -#number:
-Longitude (or 0 if no input coordinate was given).
- -#number:
-Altitude (or 0 if no input coordinate was given).
- -Function returns estimated speech time in seconds.
- - -Assumptions for time calc: 100 Words per min, average of 5 letters for english word so
- --
-
- 5 chars * 100wpm = 500 characters per min = 8.3 chars per second -
So length of msg / 8.3 = number of seconds needed to read it. rounded down to 8 chars per sec map function:
- --
-
- (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min -
Defined in:
-MSRS
-Parameters:
-- #number - length -
-can also be passed as #string
- -- #number - speed -
-Defaults to 1.0
- -- #boolean - isGoogle -
-We're using Google TTS
- -Field(s)
-Name of the class.
- -Name of the standard config file.
- -Path to the standard config file.
- -If true if config file was loaded.
Label showing up on the SRS radio overlay. Default is "ROBOT". No spaces allowed.
- -Backend used as interface to SRS (MSRS.Backend.SRSEXE or MSRS.Backend.GRPC).
- -Coalition of the transmission.
- -Culture. Default "en-GB".
- -Frequencies used in the transmissions.
- -Gender. Default "female".
- -Class id string for output to DCS log file.
- -Modulations used in the transmissions.
- -Name. Default "MSRS".
- -Path to the SRS exe.
- -Provider options. Each element is a data structure of type MSRS.ProvierOptions.
Port. Default 5002.
- -Provider of TTS (win, gcloud, azure, amazon).
- -MSRS class version.
- -Specific voice. Only used if no explicit provider voice specified.
- -Volume between 0 (min) and 1 (max). Default 1.
- -Function(s)
-Clear the state of an object.
- -Defined in:
- -Parameters:
-- Object -
-The object that holds the Value set by the Key.
- -- StateName -
-The key that is should be cleared.
- -Creation of a Birth Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- #string - IniUnitName -
-The initiating unit name.
- -- place -
-- subplace -
-Creation of a Crash Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- IniObjectCategory -
-Creation of a Dead Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- IniObjectCategory -
-Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.
Defined in:
- -Parameter:
-- Wrapper.Unit#UNIT - PlayerUnit -
-The aircraft unit the player entered.
- -Creation of a Remove Unit Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Creation of a Takeoff Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Creation of a Crash Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Log an exception which will be traced always.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Returns the event dispatcher
- -Remove all subscribed events
- -Trace a function call.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function call level 2.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function call level 3.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Get the ClassID of the class instance.
- -Defined in:
- -Return value:
-#string:
-The ClassID of the class instance.
- -Get the ClassName of the class instance.
- -Defined in:
- -Return value:
-#string:
-The ClassName of the class instance.
- -Get the ClassName + ClassID of the class instance.
- - -The ClassName + ClassID is formatted as '%s#%09d'.
- -Defined in:
- -Return value:
-#string:
-The ClassName + ClassID of the class instance.
- -Get the Class Core.Event processing Priority.
- - -The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.
- -This is the worker method to retrieve the Parent class.
- - -Note that the Parent class must be passed to call the parent class method.
- -self:GetParent(self):ParentMethod()
-
-
-
-
-
-Get a Value given a Key from the Object.
- - -Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
- -Defined in:
- -Parameters:
-- Object -
-The object that holds the Value set by the Key.
- -- Key -
-The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
- -Return value:
-The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
- -Subscribe to a DCS Event.
- -Defined in:
- -Parameters:
-- Core.Event#EVENTS - EventID -
-Event ID.
- -- #function - EventFunction -
-(optional) The function to be called when the event occurs for the unit.
- -Return value:
-Log an information which will be traced always.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -This is the worker method to inherit from a parent class.
- -Defined in:
- -Parameters:
-- Child -
-is the Child class that inherits.
- -- #BASE - Parent -
-is the Parent class that the Child inherits from.
- -Return value:
-Child
- -This is the worker method to check if an object is an (sub)instance of a class.
- - - -Examples:
- --
-
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
-
Defined in:
- -Parameter:
-- ClassName -
-is the name of the class or the class itself to run the check against
- -Return value:
-#boolean:
-Enquires if tracing is on (for the class).
- -MSRS:New()
-BASE constructor.
- - - -This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
- -function EVENT:New()
- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
- return self
-end
-
-
-
-Occurs when an Event for an object is triggered.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that triggered the event.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -BDA.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a ground unit captures either an airbase or a farp.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that captured the base -place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any object is spawned into the mission.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was spawned
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft crashes into the ground and is completely destroyed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that has crashed
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an object is dead.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is dead.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Unknown precisely what creates this event, likely tied into newer damage model.
- - -Will update this page when new information become available.
- --
-
- initiator: The unit that had the failure. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Discard chair after ejection.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a pilot ejects from an aircraft -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- - -initiator : The unit that has ejected
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft shuts down its engines.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is stopping its engines.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft starts its engines.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is starting its engines.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs whenever an object is hit by a weapon.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit object the fired the weapon -weapon: Weapon object that hit the target -target: The Object that was hit.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any system fails on a human controlled aircraft.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that had the failure
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs on the death of a unit.
- - -Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: The unit that killed the target -
- target: Target Object -
- weapon: Weapon Object -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft lands at an airbase, farp or ship -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- - -initiator : The unit that has landed -place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
- - -Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from. -
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists. -
- subplace: is always 0 for unknown reasons. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Landing quality mark.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a new mark was added.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mark text was changed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mark was removed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mission ends -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mission starts -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Weapon add.
- - -Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when the pilot of an aircraft is killed.
- - -Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that the pilot has died in.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a player enters a slot and takes control of an aircraft.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. -initiator : The unit that is being taken control of.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any player assumes direct control of a unit.
- - -Note - not Mulitplayer safe. Use PlayerEnterAircraft. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is being taken control of.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any player relieves control of a unit to the AI.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that the player left.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft connects with a tanker and begins taking on fuel.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is receiving fuel.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft is finished taking fuel.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was receiving fuel.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any modification to the "Score" as seen on the debrief menu would occur.
- - -There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any unit stops firing its weapon.
- - -Event will always correspond with a shooting start event. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was doing the shooting.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any unit begins firing a weapon that has a high rate of fire.
- - -Most common with aircraft cannons (GAU-8), autocannons, and machine guns. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is doing the shooting. -target: The unit that is being targeted.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs whenever any unit in a mission fires a weapon.
- - -But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft takes off from an airbase, farp, or ship.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that tookoff -place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Trigger zone.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when the game thinks an object is destroyed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: The unit that is was destroyed. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Schedule a new time event.
- - -Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
- -Defined in:
- -Parameters:
-- #number - Start -
-Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
- -- #function - SchedulerFunction -
-The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
- -- #table - ... -
-Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
- -Return value:
-#string:
-The Schedule ID of the planned schedule.
- -Schedule a new time event.
- - -Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
- -Defined in:
- -Parameters:
-- #number - Start -
-Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
- -- #number - Repeat -
-Specifies the interval in seconds when the scheduler will call the event function.
- -- #number - RandomizeFactor -
-Specifies a randomization factor between 0 and 1 to randomize the Repeat.
- -- #number - Stop -
-Specifies the amount of seconds when the scheduler will be stopped.
- -- #function - SchedulerFunction -
-The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
- -- #table - ... -
-Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
- -Return value:
-#string:
-The Schedule ID of the planned schedule.
- -Stops the Schedule.
- -Defined in:
- -Parameter:
-- #string - SchedulerID -
-(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
- -Set the Class Core.Event processing Priority.
- - -The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.
- -Defined in:
- -Parameter:
-- #number - EventPriority -
-The Core.Event processing Priority.
- -Return value:
-self
- -Set a state or property of the Object given a Key and a Value.
- - -Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
- -Defined in:
- -Parameters:
-- Object -
-The object that will hold the Value set by the Key.
- -- Key -
-The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
- -- Value -
-The value to is stored in the object.
- -Return value:
-The Value set.
- -Trace a function logic level 1.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function logic level 2.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function logic level 3.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace all methods in MOOSE
- -Defined in:
- -Parameter:
-- #boolean - TraceAll -
-true = trace all methods in MOOSE.
- -Set tracing for a class
- -Set tracing for a specific method of class
- -Defined in:
- -Parameters:
-- #string - Class -
-Class name.
- -- #string - Method -
-Method.
- -Set trace level
- -Set trace off.
- -Set trace on.
- -Set trace on or off -Note that when trace is off, no BASE.Debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.
- - -So tracing must be switched on manually in your mission if you are using Moose statically. -When moose is loading dynamically (for moose class development), tracing is switched on by default.
- -Defined in:
- -Parameter:
-- #boolean - TraceOnOff -
-Switch the tracing on or off.
- -Usage:
-
- -- Switch the tracing On
- BASE:TraceOnOff( true )
-
- -- Switch the tracing Off
- BASE:TraceOnOff( false )
-
-
-UnSubscribe to a DCS event.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTS - EventID -
-Event ID.
- -Return value:
-Trace a function call.
- - -This function is private.
- -Defined in:
- -Parameters:
-- Arguments -
-A #table or any field.
- -- DebugInfoCurrentParam -
-- DebugInfoFromParam -
-Trace a function logic.
- -Defined in:
- -Parameters:
-- Arguments -
-A #table or any field.
- -- DebugInfoCurrentParam -
-- DebugInfoFromParam -
-The main event handling function...
- - -This function captures all events generated for the class.
- -Backend options to communicate with SRS.
- -Field(s)
-Use DCS-gRPC.
- -Use DCS-SR-ExternalAudio.exe.
Function(s)
-GRPC options.
- -Field(s)
-Provider options: voice, credentials
- -Function(s)
-Text-to-speech providers.
- - -These are compatible with the DCS-gRPC conventions.
- -Field(s)
-Amazon Web Service (aws). Only possible with DCS-gRPC backend.
Microsoft Azure (azure). Only possible with DCS-gRPC backend.
Google (gcloud).
Microsoft windows (win).
Function(s)
-Provider options.
- -Field(s)
-Google credentials JSON file (full path).
- -Default voice (not used).
- -Access key (DCS-gRPC with Google, AWS, AZURE as provider).
- -Provider.
- -Region.
- -Secret key (DCS-gRPC with AWS as provider)
- -Voice used.
- -Function(s)
-Voices
- -Field(s)
-Function(s)
-Manages radio transmissions.
- - - -The purpose of the MSRSQUEUE class is to manage SRS text-to-speech (TTS) messages using the MSRS class. -This can be used to submit multiple TTS messages and the class takes care that they are transmitted one after the other (and not overlapping).
- - -Field(s)
-Name of the class "MSRSQUEUE".
- -Time (abs) when the last transmission finished.
- -Name of the radio queue.
- -If true, the queue update function is scheduled to be called again.
Time interval in seconds for checking the radio queue.
- -ID for dcs.log.
- -The queue of transmissions.
- -Function(s)
-Add a transmission to the radio queue.
- -Defined in:
-MSRSQUEUE
-Parameter:
-- #MSRSQUEUE.Transmission - transmission -
-The transmission data table.
- -Return value:
-self
- -Broadcast radio message.
- -Defined in:
-MSRSQUEUE
-Parameter:
-- #MSRSQUEUE.Transmission - transmission -
-The transmission.
- -Calculate total transmission duration of all transmission in the queue.
- -Defined in:
-MSRSQUEUE
-Return value:
-#number:
-Total transmission duration.
- -Clear the radio queue.
- -Defined in:
-MSRSQUEUE
-Return value:
-self The MSRSQUEUE object.
- -Create a new MSRSQUEUE object for a given radio frequency/modulation.
- -Defined in:
-MSRSQUEUE
-Parameter:
-- #string - alias -
-(Optional) Name of the radio queue.
- -Return value:
-self The MSRSQUEUE object.
- -Create a new transmission and add it to the radio queue.
- -Defined in:
-MSRSQUEUE
-Parameters:
-- #string - text -
-Text to play.
- -- #number - duration -
-Duration in seconds the file lasts. Default is determined by number of characters of the text message.
- -- Sound.SRS#MSRS - msrs -
-MOOSE SRS object.
- -- #number - tstart -
-Start time (abs) seconds. Default now.
- -- #number - interval -
-Interval in seconds after the last transmission finished.
- -- #table - subgroups -
-Groups that should receive the subtiltle.
- -- #string - subtitle -
-Subtitle displayed when the message is played.
- -- #number - subduration -
-Duration [sec] of the subtitle being displayed. Default 5 sec.
- -- #number - frequency -
-Radio frequency if other than MSRS default.
- -- #number - modulation -
-Radio modulation if other then MSRS default.
- -- #string - gender -
-Gender of the voice
- -- #string - culture -
-Culture of the voice
- -- #string - voice -
-Specific voice
- -- #number - volume -
-Volume setting
- -- #string - label -
-Label to be used
- -- Core.Point#COORDINATE - coordinate -
-Coordinate to be used
- -Return value:
-Radio transmission table.
- -Switch to only transmit if there are players on the server.
- -Defined in:
-MSRSQUEUE
-Parameter:
-- #boolean - Switch -
-If true, only send SRS if there are alive Players.
- -Return value:
-self
- -Check radio queue for transmissions to be broadcasted.
- -Defined in:
-MSRSQUEUE
-Parameter:
-- #number - delay -
-Delay in seconds before checking.
- -Field(s)
-Name of the class "MSRSQUEUE".
- -Time (abs) when the last transmission finished.
- -Name of the radio queue.
- -If true, the queue update function is scheduled to be called again.
Time interval in seconds for checking the radio queue.
- -ID for dcs.log.
- -The queue of transmissions.
- -Function(s)
-Clear the state of an object.
- -Defined in:
- -Parameters:
-- Object -
-The object that holds the Value set by the Key.
- -- StateName -
-The key that is should be cleared.
- -Creation of a Birth Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- #string - IniUnitName -
-The initiating unit name.
- -- place -
-- subplace -
-Creation of a Crash Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- IniObjectCategory -
-Creation of a Dead Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -- IniObjectCategory -
-Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT event.
Defined in:
- -Parameter:
-- Wrapper.Unit#UNIT - PlayerUnit -
-The aircraft unit the player entered.
- -Creation of a Remove Unit Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Creation of a Takeoff Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Creation of a Crash Event.
- -Defined in:
- -Parameters:
-- DCS#Time - EventTime -
-The time stamp of the event.
- -- DCS#Object - Initiator -
-The initiating object of the event.
- -Log an exception which will be traced always.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Returns the event dispatcher
- -Remove all subscribed events
- -Trace a function call.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function call level 2.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function call level 3.
- - -Must be at the beginning of the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Get the ClassID of the class instance.
- -Defined in:
- -Return value:
-#string:
-The ClassID of the class instance.
- -Get the ClassName of the class instance.
- -Defined in:
- -Return value:
-#string:
-The ClassName of the class instance.
- -Get the ClassName + ClassID of the class instance.
- - -The ClassName + ClassID is formatted as '%s#%09d'.
- -Defined in:
- -Return value:
-#string:
-The ClassName + ClassID of the class instance.
- -Get the Class Core.Event processing Priority.
- - -The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.
- -This is the worker method to retrieve the Parent class.
- - -Note that the Parent class must be passed to call the parent class method.
- -self:GetParent(self):ParentMethod()
-
-
-
-
-
-Get a Value given a Key from the Object.
- - -Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
- -Defined in:
- -Parameters:
-- Object -
-The object that holds the Value set by the Key.
- -- Key -
-The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
- -Return value:
-The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
- -Subscribe to a DCS Event.
- -Defined in:
- -Parameters:
-- Core.Event#EVENTS - EventID -
-Event ID.
- -- #function - EventFunction -
-(optional) The function to be called when the event occurs for the unit.
- -Return value:
-Log an information which will be traced always.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -This is the worker method to inherit from a parent class.
- -Defined in:
- -Parameters:
-- Child -
-is the Child class that inherits.
- -- #BASE - Parent -
-is the Parent class that the Child inherits from.
- -Return value:
-Child
- -This is the worker method to check if an object is an (sub)instance of a class.
- - - -Examples:
- --
-
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
- ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
-
Defined in:
- -Parameter:
-- ClassName -
-is the name of the class or the class itself to run the check against
- -Return value:
-#boolean:
-Enquires if tracing is on (for the class).
- -BASE constructor.
- - - -This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
- -function EVENT:New()
- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
- return self
-end
-
-
-
-Occurs when an Event for an object is triggered.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that triggered the event.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -BDA.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a ground unit captures either an airbase or a farp.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that captured the base -place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any object is spawned into the mission.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was spawned
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft crashes into the ground and is completely destroyed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that has crashed
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an object is dead.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is dead.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Unknown precisely what creates this event, likely tied into newer damage model.
- - -Will update this page when new information become available.
- --
-
- initiator: The unit that had the failure. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Discard chair after ejection.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a pilot ejects from an aircraft -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- - -initiator : The unit that has ejected
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft shuts down its engines.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is stopping its engines.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any aircraft starts its engines.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is starting its engines.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs whenever an object is hit by a weapon.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit object the fired the weapon -weapon: Weapon object that hit the target -target: The Object that was hit.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any system fails on a human controlled aircraft.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that had the failure
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs on the death of a unit.
- - -Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: The unit that killed the target -
- target: Target Object -
- weapon: Weapon Object -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft lands at an airbase, farp or ship -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- - -initiator : The unit that has landed -place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
- - -Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from. -
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists. -
- subplace: is always 0 for unknown reasons. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Landing quality mark.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a new mark was added.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mark text was changed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mark was removed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -MarkID: ID of the mark.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mission ends -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a mission starts -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Weapon add.
- - -Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when the pilot of an aircraft is killed.
- - -Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that the pilot has died in.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when a player enters a slot and takes control of an aircraft.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. -initiator : The unit that is being taken control of.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any player assumes direct control of a unit.
- - -Note - not Mulitplayer safe. Use PlayerEnterAircraft. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is being taken control of.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any player relieves control of a unit to the AI.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that the player left.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft connects with a tanker and begins taking on fuel.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is receiving fuel.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft is finished taking fuel.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was receiving fuel.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any modification to the "Score" as seen on the debrief menu would occur.
- - -There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any unit stops firing its weapon.
- - -Event will always correspond with a shooting start event. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that was doing the shooting.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when any unit begins firing a weapon that has a high rate of fire.
- - -Most common with aircraft cannons (GAU-8), autocannons, and machine guns. -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that is doing the shooting. -target: The unit that is being targeted.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs whenever any unit in a mission fires a weapon.
- - -But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when an aircraft takes off from an airbase, farp, or ship.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes. -initiator : The unit that tookoff -place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Trigger zone.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Occurs when the game thinks an object is destroyed.
- - -Have a look at the class Core.Event#EVENT as these are just the prototypes.
- --
-
- initiator: The unit that is was destroyed. -
Defined in:
- -Parameter:
-- Core.Event#EVENTDATA - EventData -
-The EventData structure.
- -Schedule a new time event.
- - -Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
- -Defined in:
- -Parameters:
-- #number - Start -
-Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
- -- #function - SchedulerFunction -
-The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
- -- #table - ... -
-Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
- -Return value:
-#string:
-The Schedule ID of the planned schedule.
- -Schedule a new time event.
- - -Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
- -Defined in:
- -Parameters:
-- #number - Start -
-Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
- -- #number - Repeat -
-Specifies the interval in seconds when the scheduler will call the event function.
- -- #number - RandomizeFactor -
-Specifies a randomization factor between 0 and 1 to randomize the Repeat.
- -- #number - Stop -
-Specifies the amount of seconds when the scheduler will be stopped.
- -- #function - SchedulerFunction -
-The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
- -- #table - ... -
-Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
- -Return value:
-#string:
-The Schedule ID of the planned schedule.
- -Stops the Schedule.
- -Defined in:
- -Parameter:
-- #string - SchedulerID -
-(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
- -Set the Class Core.Event processing Priority.
- - -The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.
- -Defined in:
- -Parameter:
-- #number - EventPriority -
-The Core.Event processing Priority.
- -Return value:
-self
- -Set a state or property of the Object given a Key and a Value.
- - -Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
- -Defined in:
- -Parameters:
-- Object -
-The object that will hold the Value set by the Key.
- -- Key -
-The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
- -- Value -
-The value to is stored in the object.
- -Return value:
-The Value set.
- -Trace a function logic level 1.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function logic level 2.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace a function logic level 3.
- - -Can be anywhere within the function logic.
- -Defined in:
- -Parameter:
-- Arguments -
-A #table or any field.
- -Trace all methods in MOOSE
- -Defined in:
- -Parameter:
-- #boolean - TraceAll -
-true = trace all methods in MOOSE.
- -Set tracing for a class
- -Set tracing for a specific method of class
- -Defined in:
- -Parameters:
-- #string - Class -
-Class name.
- -- #string - Method -
-Method.
- -Set trace level
- -Set trace off.
- -Set trace on.
- -Set trace on or off -Note that when trace is off, no BASE.Debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.
- - -So tracing must be switched on manually in your mission if you are using Moose statically. -When moose is loading dynamically (for moose class development), tracing is switched on by default.
- -Defined in:
- -Parameter:
-- #boolean - TraceOnOff -
-Switch the tracing on or off.
- -Usage:
-
- -- Switch the tracing On
- BASE:TraceOnOff( true )
-
- -- Switch the tracing Off
- BASE:TraceOnOff( false )
-
-
-UnSubscribe to a DCS event.
- -Defined in:
- -Parameter:
-- Core.Event#EVENTS - EventID -
-Event ID.
- -Return value:
-Trace a function call.
- - -This function is private.
- -Defined in:
- -Parameters:
-- Arguments -
-A #table or any field.
- -- DebugInfoCurrentParam -
-- DebugInfoFromParam -
-Trace a function logic.
- -Defined in:
- -Parameters:
-- Arguments -
-A #table or any field.
- -- DebugInfoCurrentParam -
-- DebugInfoFromParam -
-The main event handling function...
- - -This function captures all events generated for the class.
- -Radio queue transmission data.
- -Field(s)
-PlayerSet created when TransmitOnlyWithPlayers == true
- -Mission time (abs) in seconds when the transmission should be played.
- -If true, only transmit if there are alive Players.
- -Mission time (abs) in seconds when the transmission started.
- -Coordinate for this transmission
- -Voice culture
- -Duration in seconds.
- -Frequency.
- -Voice gender
- -Interval in seconds before next transmission.
- -If true, transmission is currently playing.
- -Label to be used
- -Modulation.
- -Duration of the subtitle being displayed.
- -Groups to send subtitle to.
- -Subtitle of the transmission.
- -Text to be transmitted.
- -Voice if any
- -Volume
- -
-
-