mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Documentation
This commit is contained in:
parent
a3e29a8d5c
commit
e6f51af34c
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Features:
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Monitor speed of the airplanes of players during taxi.
|
||||
-- * Communicate ATC ground operations.
|
||||
@ -10,7 +10,9 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police)
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [ABP - Airbase Police](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ABP%20-%20Airbase%20Police)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Functional** - (R2.4) Control artillery units.
|
||||
--- **Functional** - Control artillery units.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@ -6,30 +6,22 @@
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Multiple targets can be assigned. No restriction on number of targets.
|
||||
-- * Targets can be given a priority. Engagement of targets is executed a according to their priority.
|
||||
-- * Engagements can be scheduled, i.e. will be executed at a certain time of the day.
|
||||
-- * Multiple relocations of the group can be assigned and scheduled via queueing system.
|
||||
-- * Special weapon types can be selected for each attack, e.g. cruise missiles for Naval units.
|
||||
-- * Automatic rearming once the artillery is out of ammo (optional).
|
||||
-- * Automatic relocation after each firing engagement to prevent counter strikes (optional).
|
||||
-- * Automatic relocation movements to get the battery within firing range (optional).
|
||||
-- * Simulation of tactical nuclear shells as well as illumination and smoke shells.
|
||||
-- * New targets can be added during the mission, e.g. when they are detected by recon units.
|
||||
-- * Targets and relocations can be assigned by placing markers on the F10 map.
|
||||
-- * Finite state machine implementation. Mission designer can interact when certain events occur.
|
||||
-- * Multiple targets can be assigned. No restriction on number of targets.
|
||||
-- * Targets can be given a priority. Engagement of targets is executed a according to their priority.
|
||||
-- * Engagements can be scheduled, i.e. will be executed at a certain time of the day.
|
||||
-- * Multiple relocations of the group can be assigned and scheduled via queueing system.
|
||||
-- * Special weapon types can be selected for each attack, e.g. cruise missiles for Naval units.
|
||||
-- * Automatic rearming once the artillery is out of ammo (optional).
|
||||
-- * Automatic relocation after each firing engagement to prevent counter strikes (optional).
|
||||
-- * Automatic relocation movements to get the battery within firing range (optional).
|
||||
-- * Simulation of tactical nuclear shells as well as illumination and smoke shells.
|
||||
-- * New targets can be added during the mission, e.g. when they are detected by recon units.
|
||||
-- * Targets and relocations can be assigned by placing markers on the F10 map.
|
||||
-- * Finite state machine implementation. Mission designer can interact when certain events occur.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg)
|
||||
-- ## [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Features:
|
||||
-- ## Features:
|
||||
--
|
||||
--
|
||||
-- * Try to keep the airbase clean and operational.
|
||||
@ -12,6 +12,12 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [CLA - CleanUp Airbase](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Specific airbases need to be provided that need to be guarded. Each airbase registered, will be guarded within a zone of 8 km around the airbase.
|
||||
-- Any unit that fires a missile, or shoots within the zone of an airbase, will be monitored by CLEANUP_AIRBASE.
|
||||
-- Within the 8km zone, units cannot fire any missile, which prevents the airbase runway to receive missile or bomb hits.
|
||||
@ -38,10 +44,6 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CLA%20-%20CleanUp%20Airbase)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **FlightControl**
|
||||
-- ### Contributions:
|
||||
--
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Features:
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Faciliate the communication of detected targets to players.
|
||||
-- * Designate targets using lasers, through a menu system.
|
||||
@ -14,6 +14,12 @@
|
||||
-- * Reporting system of threats.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [DES - Designation](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Targets detected by recce will be communicated to a group of attacking players.
|
||||
-- A menu system is made available that allows to:
|
||||
@ -159,10 +165,6 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DES%20-%20Designation)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Features:
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Detection of targets by recce units.
|
||||
-- * Group detected targets per unit, type or area (zone).
|
||||
@ -13,12 +13,14 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units).
|
||||
-- It uses the in-built detection capabilities of DCS World, but adds new functionalities.
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [DET - Detection](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection)
|
||||
-- Facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units).
|
||||
-- It uses the in-built detection capabilities of DCS World, but adds new functionalities.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
|
||||
@ -2,6 +2,27 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Escort navigation commands.
|
||||
-- * Escort hold at position commands.
|
||||
-- * Escorts reporting detected targets.
|
||||
-- * Escorts scanning targets in advance.
|
||||
-- * Escorts attacking specific targets.
|
||||
-- * Request assistance from other groups for attack.
|
||||
-- * Manage rule of engagement of escorts.
|
||||
-- * Manage the allowed evasion techniques of escorts.
|
||||
-- * Make escort to execute a defined mission or path.
|
||||
-- * Escort tactical situation reporting.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [ESC - Escorting](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/ESC%20-%20Escorting)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Allows you to interact with escorting AI on your flight and take the lead.
|
||||
--
|
||||
-- Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).
|
||||
@ -77,47 +98,18 @@
|
||||
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
|
||||
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
|
||||
--
|
||||
-- # ESCORT construction methods.
|
||||
-- ===
|
||||
--
|
||||
-- Create a new SPAWN object with the @{#ESCORT.New} method:
|
||||
--
|
||||
-- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Wrapper.Group#GROUP} for a @{Wrapper.Client#CLIENT}, with an optional briefing text.
|
||||
--
|
||||
-- # ESCORT initialization methods.
|
||||
-- ### Authors: **FlightControl**
|
||||
--
|
||||
-- The following menus are created within the RADIO MENU (F10) of an active unit hosted by a player:
|
||||
--
|
||||
-- * @{#ESCORT.MenuFollowAt}: Creates a menu to make the escort follow the client.
|
||||
-- * @{#ESCORT.MenuHoldAtEscortPosition}: Creates a menu to hold the escort at its current position.
|
||||
-- * @{#ESCORT.MenuHoldAtLeaderPosition}: Creates a menu to hold the escort at the client position.
|
||||
-- * @{#ESCORT.MenuScanForTargets}: Creates a menu so that the escort scans targets.
|
||||
-- * @{#ESCORT.MenuFlare}: Creates a menu to disperse flares.
|
||||
-- * @{#ESCORT.MenuSmoke}: Creates a menu to disparse smoke.
|
||||
-- * @{#ESCORT.MenuReportTargets}: Creates a menu so that the escort reports targets.
|
||||
-- * @{#ESCORT.MenuReportPosition}: Creates a menu so that the escort reports its current position from bullseye.
|
||||
-- * @{#ESCORT.MenuAssistedAttack: Creates a menu so that the escort supportes assisted attack from other escorts with the client.
|
||||
-- * @{#ESCORT.MenuROE: Creates a menu structure to set the rules of engagement of the escort.
|
||||
-- * @{#ESCORT.MenuEvasion: Creates a menu structure to set the evasion techniques when the escort is under threat.
|
||||
-- * @{#ESCORT.MenuResumeMission}: Creates a menu structure so that the escort can resume from a waypoint.
|
||||
--
|
||||
--
|
||||
-- @usage
|
||||
-- -- Declare a new EscortPlanes object as follows:
|
||||
--
|
||||
-- -- First find the GROUP object and the CLIENT object.
|
||||
-- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
--
|
||||
-- -- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
-- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
|
||||
--
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @module Functional.Escort
|
||||
-- @image Escorting.JPG
|
||||
|
||||
--- ESCORT class
|
||||
-- @type ESCORT
|
||||
|
||||
|
||||
--- @type ESCORT
|
||||
-- @extends Core.Base#BASE
|
||||
-- @field Wrapper.Client#CLIENT EscortClient
|
||||
-- @field Wrapper.Group#GROUP EscortGroup
|
||||
@ -129,6 +121,26 @@
|
||||
-- @Field DCS#AI.Option.Air.val.ROE OptionROE Which ROE is set to the EscortGroup.
|
||||
-- @field DCS#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the EscortGroup.
|
||||
-- @field FunctionalMENU_GROUPDETECTION_BASE Detection
|
||||
|
||||
--- ESCORT class
|
||||
--
|
||||
-- # ESCORT construction methods.
|
||||
--
|
||||
-- Create a new SPAWN object with the @{#ESCORT.New} method:
|
||||
--
|
||||
-- * @{#ESCORT.New}: Creates a new ESCORT object from a @{Wrapper.Group#GROUP} for a @{Wrapper.Client#CLIENT}, with an optional briefing text.
|
||||
--
|
||||
-- @usage
|
||||
-- -- Declare a new EscortPlanes object as follows:
|
||||
--
|
||||
-- -- First find the GROUP object and the CLIENT object.
|
||||
-- local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
|
||||
-- local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
|
||||
--
|
||||
-- -- Now use these 2 objects to construct the new EscortPlanes object.
|
||||
-- EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
|
||||
--
|
||||
-- @field #ESCORT
|
||||
ESCORT = {
|
||||
ClassName = "ESCORT",
|
||||
EscortName = nil, -- The Escort Name
|
||||
|
||||
@ -1,18 +1,27 @@
|
||||
--- **Functional** -- MISSILETRAINER helps you to train missile avoidance.
|
||||
--- **Functional** -- Train missile defence and deflection.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The @{#MISSILETRAINER} class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft,
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
|
||||
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range <20>
|
||||
-- * Provide alerts when a missile would have killed your aircraft.
|
||||
-- * Provide alerts when the missile self destructs.
|
||||
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [MIT - Missile Trainer](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/MIT%20-%20Missile%20Trainer)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- Uses the MOOSE messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft,
|
||||
-- the class will destroy the missile within a certain range, to avoid damage to your aircraft.
|
||||
-- It suports the following functionality:
|
||||
--
|
||||
-- * Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
|
||||
-- * Provide alerts of missile launches, including detailed information of the units launching, including bearing, range <20>
|
||||
-- * Provide alerts when a missile would have killed your aircraft.
|
||||
-- * Provide alerts when the missile self destructs.
|
||||
-- * Enable / Disable and Configure the Missile Trainer using the various menu options.
|
||||
--
|
||||
-- When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:
|
||||
-- When running a mission where the missile trainer is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:
|
||||
--
|
||||
-- * **Messages**: Menu to configure all messages.
|
||||
-- * **Messages On**: Show all messages.
|
||||
@ -42,17 +51,40 @@
|
||||
-- * **150 meter**: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
|
||||
-- * **200 meter**: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Authors: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Stuka (Danny)**: Who you can search on the Eagle Dynamics Forums. Working together with Danny has resulted in the MISSILETRAINER class.
|
||||
-- Danny has shared his ideas and together we made a design.
|
||||
-- Together with the **476 virtual team**, we tested the MISSILETRAINER class, and got much positive feedback!
|
||||
-- * **132nd Squadron**: Testing and optimizing the logic.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- 1.1) MISSILETRAINER construction methods:
|
||||
-- -----------------------------------------
|
||||
-- @module Functional.MissileTrainer
|
||||
-- @image Missile_Trainer.JPG
|
||||
|
||||
|
||||
--- @type MISSILETRAINER
|
||||
-- @field Core.Set#SET_CLIENT DBClients
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
---
|
||||
--
|
||||
-- # Constructor:
|
||||
--
|
||||
-- Create a new MISSILETRAINER object with the @{#MISSILETRAINER.New} method:
|
||||
--
|
||||
-- * @{#MISSILETRAINER.New}: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
|
||||
--
|
||||
-- MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.
|
||||
--
|
||||
-- 1.2) MISSILETRAINER initialization methods:
|
||||
-- -------------------------------------------
|
||||
-- # Initialization:
|
||||
--
|
||||
-- A MISSILETRAINER object will behave differently based on the usage of initialization methods:
|
||||
--
|
||||
-- * @{#MISSILETRAINER.InitMessagesOnOff}: Sets by default the display of any message to be ON or OFF.
|
||||
@ -65,24 +97,8 @@
|
||||
-- * @{#MISSILETRAINER.InitRangeOnOff}: Sets by default the display of range information of missiles ON of OFF.
|
||||
-- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF.
|
||||
-- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- CREDITS
|
||||
-- ===
|
||||
-- **Stuka (Danny)** Who you can search on the Eagle Dynamics Forums.
|
||||
-- Working together with Danny has resulted in the MISSILETRAINER class.
|
||||
-- Danny has shared his ideas and together we made a design.
|
||||
-- Together with the **476 virtual team**, we tested the MISSILETRAINER class, and got much positive feedback!
|
||||
--
|
||||
-- @module Functional.MissileTrainer
|
||||
-- @image Missile_Trainer.JPG
|
||||
|
||||
|
||||
--- The MISSILETRAINER class
|
||||
-- @type MISSILETRAINER
|
||||
-- @field Core.Set#SET_CLIENT DBClients
|
||||
-- @extends Core.Base#BASE
|
||||
-- @field #MISSILETRAINER
|
||||
MISSILETRAINER = {
|
||||
ClassName = "MISSILETRAINER",
|
||||
TrackingMissiles = {},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Functional** -- Limit the MOVEMENT of simulaneous moving ground vehicles.
|
||||
--- **Functional** -- Limit the movement of simulaneous moving ground vehicles.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@ -10,9 +10,11 @@
|
||||
-- @module Functional.Movement
|
||||
-- @image MOOSE.JPG
|
||||
|
||||
--- the MOVEMENT class
|
||||
-- @type MOVEMENT
|
||||
--- @type MOVEMENT
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
---
|
||||
--@field #MOVEMENT
|
||||
MOVEMENT = {
|
||||
ClassName = "MOVEMENT",
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Functional** - (R2.4) Rudimentary ATC.
|
||||
--- **Functional** - Rudimentary ATC.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -8,7 +8,7 @@
|
||||
--
|
||||
-- In particular, a menu entry "Pseudo ATC" is created in the "F10 Other..." radiomenu.
|
||||
--
|
||||
-- ## Features
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Weather report at nearby airbases and mission waypoints.
|
||||
-- * Report absolute bearing and range to nearest airports and mission waypoints.
|
||||
@ -20,12 +20,6 @@
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg)
|
||||
|
||||
@ -1,33 +1,31 @@
|
||||
--- **Functional** - (R2.2) - Create random airtraffic in your missions.
|
||||
--- **Functional** - Create random airtraffic in your missions.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The aim of the RAT class is to fill the empty DCS world with randomized air traffic and bring more life to your airports.
|
||||
--
|
||||
-- In particular, it is designed to spawn AI air units at random airports. These units will be assigned a random flight path to another random airport on the map.
|
||||
--
|
||||
-- The aim of the RAT class is to fill the empty DCS world with randomized air traffic and bring more life to your airports.
|
||||
-- In particular, it is designed to spawn AI air units at random airports. These units will be assigned a random flight path to another random airport on the map.
|
||||
-- Even the mission designer will not know where aircraft will be spawned and which route they follow.
|
||||
--
|
||||
-- ## Features
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Very simple interface. Just one unit and two lines of Lua code needed to fill your map.
|
||||
-- * High degree of randomization. Aircraft will spawn at random airports, have random routes and random destinations.
|
||||
-- * Specific departure and/or destination airports can be chosen.
|
||||
-- * Departure and destination airports can be restricted by coalition.
|
||||
-- * Planes and helicopters supported. Helicopters can also be send to FARPs and ships.
|
||||
-- * Units can also be spawned in air within pre-defined zones of the map.
|
||||
-- * Aircraft will be removed when they arrive at their destination (or get stuck on the ground).
|
||||
-- * When a unit is removed a new unit with a different flight plan is respawned.
|
||||
-- * Aircraft can report their status during the route.
|
||||
-- * All of the above can be customized by the user if necessary.
|
||||
-- * All current (Caucasus, Nevada, Normandy, Persian Gulf) and future maps are supported.
|
||||
-- * Very simple interface. Just one unit and two lines of Lua code needed to fill your map.
|
||||
-- * High degree of randomization. Aircraft will spawn at random airports, have random routes and random destinations.
|
||||
-- * Specific departure and/or destination airports can be chosen.
|
||||
-- * Departure and destination airports can be restricted by coalition.
|
||||
-- * Planes and helicopters supported. Helicopters can also be send to FARPs and ships.
|
||||
-- * Units can also be spawned in air within pre-defined zones of the map.
|
||||
-- * Aircraft will be removed when they arrive at their destination (or get stuck on the ground).
|
||||
-- * When a unit is removed a new unit with a different flight plan is respawned.
|
||||
-- * Aircraft can report their status during the route.
|
||||
-- * All of the above can be customized by the user if necessary.
|
||||
-- * All current (Caucasus, Nevada, Normandy, Persian Gulf) and future maps are supported.
|
||||
--
|
||||
-- The RAT class creates an entry in the F10 radio menu which allows to
|
||||
-- The RAT class creates an entry in the F10 radio menu which allows to:
|
||||
--
|
||||
-- * Create new groups on-the-fly, i.e. at run time within the mission,
|
||||
-- * Destroy specific groups (e.g. if they get stuck or damaged and block a runway),
|
||||
-- * Request the status of all RAT aircraft or individual groups,
|
||||
-- * Place markers at waypoints on the F10 map for each group.
|
||||
-- * Create new groups on-the-fly, i.e. at run time within the mission,
|
||||
-- * Destroy specific groups (e.g. if they get stuck or damaged and block a runway),
|
||||
-- * Request the status of all RAT aircraft or individual groups,
|
||||
-- * Place markers at waypoints on the F10 map for each group.
|
||||
--
|
||||
-- Note that by its very nature, this class is suited best for civil or transport aircraft. However, it also works perfectly fine for military aircraft of any kind.
|
||||
--
|
||||
@ -35,10 +33,9 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # Demo Missions
|
||||
-- ## Missions:
|
||||
--
|
||||
-- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
-- ### [MOOSE - RAT Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/RAT%20-%20Random%20Air%20Traffic)
|
||||
-- ### [RAT - Random Air Traffic](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/RAT%20-%20Random%20Air%20Traffic)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
--- **Functional** - (R2.3) - Range Practice.
|
||||
--- **Functional** - Range Practice.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@ -9,30 +9,22 @@
|
||||
--
|
||||
-- [476th - Air Weapons Range Objects mod](http://www.476vfightergroup.com/downloads.php?do=file&id=287) is highly recommended for this class.
|
||||
--
|
||||
-- ## Features
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Impact points of bombs, rockets and missils are recorded and distance to closest range target is measured and reported to the player.
|
||||
-- * Number of hits on strafing passes are counted and reported. Also the percentage of hits w.r.t fired shots is evaluated.
|
||||
-- * Results of all bombing and strafing runs are stored and top 10 results can be displayed.
|
||||
-- * Range targets can be marked by smoke.
|
||||
-- * Range can be illuminated by illumination bombs for night practices.
|
||||
-- * Bomb, rocket and missile impact points can be marked by smoke.
|
||||
-- * Direct hits on targets can trigger flares.
|
||||
-- * Smoke and flare colors can be adjusted for each player via radio menu.
|
||||
-- * Range information and weather report at the range can be reported via radio menu.
|
||||
-- * Impact points of bombs, rockets and missils are recorded and distance to closest range target is measured and reported to the player.
|
||||
-- * Number of hits on strafing passes are counted and reported. Also the percentage of hits w.r.t fired shots is evaluated.
|
||||
-- * Results of all bombing and strafing runs are stored and top 10 results can be displayed.
|
||||
-- * Range targets can be marked by smoke.
|
||||
-- * Range can be illuminated by illumination bombs for night practices.
|
||||
-- * Bomb, rocket and missile impact points can be marked by smoke.
|
||||
-- * Direct hits on targets can trigger flares.
|
||||
-- * Smoke and flare colors can be adjusted for each player via radio menu.
|
||||
-- * Range information and weather report at the range can be reported via radio menu.
|
||||
--
|
||||
-- More information and examples can be found below.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg)
|
||||
-- ### [MOOSE - On the Range - Demonstration Video](https://www.youtube.com/watch?v=kIXcxNB9_3M)
|
||||
--
|
||||
|
||||
@ -1,4 +1,25 @@
|
||||
--- **Functional** -- (R2.0) - Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites.
|
||||
--- **Functional** - Administer the scoring of player achievements, and create a CSV file logging the scoring events for use at team or squadron websites.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Set the scoring scales based on threat level.
|
||||
-- * Positive scores and negative scores.
|
||||
-- * A contribution model to score achievements.
|
||||
-- * Score goals.
|
||||
-- * Score specific achievements.
|
||||
-- * Score the hits and destroys of units.
|
||||
-- * Score the hits and destroys of statics.
|
||||
-- * Score the hits and destroys of scenery.
|
||||
-- * Log scores into a CSV file.
|
||||
-- * Connect to a remote server using JSON and IP.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [SCO - Scoring](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SCO%20-%20Scoring)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@ -52,9 +73,34 @@
|
||||
-- Use the radio menu F10 to consult the scores while running the mission.
|
||||
-- Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission.
|
||||
--
|
||||
-- # 1) @{Functional.Scoring#SCORING} class, extends @{Core.Base#BASE}
|
||||
-- ===
|
||||
--
|
||||
-- ## 1.1) Set the destroy score or penalty scale
|
||||
-- ### Authors: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Wingthor (TAW)**: Testing & Advice.
|
||||
-- * **Dutch-Baron (TAW)**: Testing & Advice.
|
||||
-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing and Advice.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @module Functional.Scoring
|
||||
-- @image Scoring.JPG
|
||||
|
||||
|
||||
--- @type SCORING
|
||||
-- @field Players A collection of the current players that have joined the game.
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
--- SCORING class
|
||||
--
|
||||
-- # Constructor:
|
||||
--
|
||||
-- local Scoring = SCORING:New( "Scoring File" )
|
||||
--
|
||||
--
|
||||
-- # Set the destroy score or penalty scale:
|
||||
--
|
||||
-- Score scales can be set for scores granted when enemies or friendlies are destroyed.
|
||||
-- Use the method @{#SCORING.SetScaleDestroyScore}() to set the scale of enemy destroys (positive destroys).
|
||||
@ -67,7 +113,7 @@
|
||||
-- The above sets the scale for valid scores to 10. So scores will be given in a scale from 0 to 10.
|
||||
-- The penalties will be given in a scale from 0 to 40.
|
||||
--
|
||||
-- ## 1.2) Define special targets that will give extra scores.
|
||||
-- # Define special targets that will give extra scores:
|
||||
--
|
||||
-- Special targets can be set that will give extra scores to the players when these are destroyed.
|
||||
-- Use the methods @{#SCORING.AddUnitScore}() and @{#SCORING.RemoveUnitScore}() to specify a special additional score for a specific @{Wrapper.Unit}s.
|
||||
@ -84,7 +130,7 @@
|
||||
--
|
||||
-- Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) )
|
||||
--
|
||||
-- ## 1.3) Define destruction zones that will give extra scores.
|
||||
-- # Define destruction zones that will give extra scores:
|
||||
--
|
||||
-- Define zones of destruction. Any object destroyed within the zone of the given category will give extra points.
|
||||
-- Use the method @{#SCORING.AddZoneScore}() to add a @{Zone} for additional scoring.
|
||||
@ -94,12 +140,12 @@
|
||||
-- The other implementation could be to designate a scenery target (a building) in the mission editor surrounded by a @{Zone},
|
||||
-- just large enough around that building.
|
||||
--
|
||||
-- ## 1.4) Add extra Goal scores upon an event or a condition.
|
||||
-- # Add extra Goal scores upon an event or a condition:
|
||||
--
|
||||
-- A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens.
|
||||
-- Use the method @{#SCORING.AddGoalScore}() to add a score for a Player at any time in your mission.
|
||||
--
|
||||
-- ## 1.5) (Decommissioned) Configure fratricide level.
|
||||
-- # (Decommissioned) Configure fratricide level.
|
||||
--
|
||||
-- **This functionality is decomissioned until the DCS bug concerning Unit:destroy() not being functional in multi player for player units has been fixed by ED**.
|
||||
--
|
||||
@ -107,13 +153,13 @@
|
||||
-- Use the method @{#SCORING.SetFratricide}() to define the level when a player gets kicked.
|
||||
-- By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.
|
||||
--
|
||||
-- ## 1.6) Penalty score when a player changes the coalition.
|
||||
-- # Penalty score when a player changes the coalition.
|
||||
--
|
||||
-- When a player changes the coalition, he can receive a penalty score.
|
||||
-- Use the method @{#SCORING.SetCoalitionChangePenalty}() to define the penalty when a player changes coalition.
|
||||
-- By default, the penalty for changing coalition is the default penalty scale.
|
||||
--
|
||||
-- ## 1.8) Define output CSV files.
|
||||
-- # Define output CSV files.
|
||||
--
|
||||
-- The CSV file is given the name of the string given in the @{#SCORING.New}{} constructor, followed by the .csv extension.
|
||||
-- The file is incrementally saved in the **<User>\\Saved Games\\DCS\\Logs** folder, and has a time stamp indicating each mission run.
|
||||
@ -150,7 +196,7 @@
|
||||
-- The MOOSE designer cannot take any responsibility of any damage inflicted as a result of the de-sanitization.
|
||||
-- That being said, I hope that the SCORING class provides you with a great add-on to score your squad mates achievements.
|
||||
--
|
||||
-- ## 1.9) Configure messages.
|
||||
-- # Configure messages.
|
||||
--
|
||||
-- When players hit or destroy targets, messages are sent.
|
||||
-- Various methods exist to configure:
|
||||
@ -158,7 +204,7 @@
|
||||
-- * Which messages are sent upon the event.
|
||||
-- * Which audience receives the message.
|
||||
--
|
||||
-- ### 1.9.1) Configure the messages sent upon the event.
|
||||
-- ## Configure the messages sent upon the event.
|
||||
--
|
||||
-- Use the following methods to configure when to send messages. By default, all messages are sent.
|
||||
--
|
||||
@ -167,49 +213,16 @@
|
||||
-- * @{#SCORING.SetMessagesAddon}(): Configure to send messages for additional score, after a target has been destroyed.
|
||||
-- * @{#SCORING.SetMessagesZone}(): Configure to send messages for additional score, after a target has been destroyed within a given zone.
|
||||
--
|
||||
-- ### 1.9.2) Configure the audience of the messages.
|
||||
-- ## Configure the audience of the messages.
|
||||
--
|
||||
-- Use the following methods to configure the audience of the messages. By default, the messages are sent to all players in the mission.
|
||||
--
|
||||
-- * @{#SCORING.SetMessagesToAll}(): Configure to send messages to all players.
|
||||
-- * @{#SCORING.SetMessagesToCoalition}(): Configure to send messages to only those players within the same coalition as the player.
|
||||
--
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-02-26: Initial class and API.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- * **Wingthor (TAW)**: Testing & Advice.
|
||||
-- * **Dutch-Baron (TAW)**: Testing & Advice.
|
||||
-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing and Advice.
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Concept, Design & Programming.
|
||||
--
|
||||
-- @module Functional.Scoring
|
||||
-- @image Scoring.JPG
|
||||
|
||||
|
||||
--- The Scoring class
|
||||
-- @type SCORING
|
||||
-- @field Players A collection of the current players that have joined the game.
|
||||
-- @extends Core.Base#BASE
|
||||
-- @field #SCORING
|
||||
SCORING = {
|
||||
ClassName = "SCORING",
|
||||
ClassID = 0,
|
||||
@ -236,8 +249,10 @@ local _SCORINGCategory =
|
||||
-- @param #string GameName The name of the game. This name is also logged in the CSV score file.
|
||||
-- @return #SCORING self
|
||||
-- @usage
|
||||
--
|
||||
-- -- Define a new scoring object for the mission Gori Valley.
|
||||
-- ScoringObject = SCORING:New( "Gori Valley" )
|
||||
--
|
||||
function SCORING:New( GameName )
|
||||
|
||||
-- Inherits from BASE
|
||||
|
||||
@ -1,13 +1,41 @@
|
||||
--- **Functional** -- Provides defensive behaviour to a set of SAM sites within a running Mission.
|
||||
--- **Functional** -- Make SAM sites execute evasive and defensive behaviour when being fired upon.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * When SAM sites are being fired upon, the SAMs will take evasive action will reposition themselves when possible.
|
||||
-- * When SAM sites are being fired upon, the SAMs will take defensive action by shutting down their radars.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [SEV - SEAD Evasion](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SEV%20-%20SEAD%20Evasion)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Authors: **FlightControl**
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @module Functional.Sead
|
||||
-- @image SEAD.JPG
|
||||
|
||||
--- The SEAD class
|
||||
-- @type SEAD
|
||||
--- @type SEAD
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
--- Make SAM sites execute evasive and defensive behaviour when being fired upon.
|
||||
--
|
||||
-- This class is very easy to use. Just setup a SEAD object by using @{#SEAD.New}() and SAMs will evade and take defensive action when being fired upon.
|
||||
--
|
||||
-- # Constructor:
|
||||
--
|
||||
-- Use the @{#SEAD.New}() constructor to create a new SEAD object.
|
||||
--
|
||||
-- SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } )
|
||||
--
|
||||
-- @field #SEAD
|
||||
SEAD = {
|
||||
ClassName = "SEAD",
|
||||
TargetSkill = {
|
||||
|
||||
@ -1,7 +1,18 @@
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--- **Functional** - (R2.4) Suppress fire of ground units when they get hit.
|
||||
--- **Functional** - Suppress fire of ground units when they get hit.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Hold fire of attacked units when being fired upon.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- ## [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- When ground units get hit by (suppressive) enemy fire, they will not be able to shoot back for a certain amount of time.
|
||||
--
|
||||
@ -12,12 +23,6 @@
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [MOOSE - ALL Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [MOOSE YouTube Channel](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg)
|
||||
@ -28,7 +33,8 @@
|
||||
--
|
||||
-- ### Contributions: [FlightControl](https://forums.eagle.ru/member.php?u=89536)
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Functional.Suppression
|
||||
-- @image Suppression.JPG
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
--- **Functional** - (R2.4) - Simulation of logistic operations.
|
||||
--- **Functional** - Simulation of logistic operations.
|
||||
--
|
||||
-- The MOOSE warehouse concept simulates the organization and implementation of complex operations regarding the flow of assets between the point of origin and the point of consumption
|
||||
-- in order to meet requirements of a potential conflict. In particular, this class is concerned with maintaining army supply lines while disrupting those of the enemy, since an armed
|
||||
-- force without resources and transportation is defenseless.
|
||||
--
|
||||
-- Features:
|
||||
-- ===
|
||||
--
|
||||
-- ## Features:
|
||||
--
|
||||
-- * Holds (virtual) assests in stock and spawns them upon request.
|
||||
-- * Manages requests of assets from other warehouses.
|
||||
@ -16,13 +14,25 @@
|
||||
-- * Possibility to hook into events and customize actions.
|
||||
-- * Can be easily interfaced to other MOOSE classes.
|
||||
--
|
||||
-- Please not that his class is work in progress and in an **alpha** stage.
|
||||
-- ===
|
||||
--
|
||||
-- ## Missions:
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The MOOSE warehouse concept simulates the organization and implementation of complex operations regarding the flow of assets between the point of origin and the point of consumption
|
||||
-- in order to meet requirements of a potential conflict. In particular, this class is concerned with maintaining army supply lines while disrupting those of the enemy, since an armed
|
||||
-- force without resources and transportation is defenseless.
|
||||
--
|
||||
-- Please note that his class is work in progress and in an **alpha** stage.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **funkyfranky**
|
||||
-- ### Co-author: FlightControl (cargo dispatcher classes)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @module Functional.Warehouse
|
||||
-- @image MOOSE.JPG
|
||||
|
||||
@ -61,8 +71,6 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- # The Warehouse Concept
|
||||
--
|
||||
-- The MOOSE warehouse adds a new logistic component to the DCS World. *Assets*, i.e. ground, airborne and naval units, can be transferred from one place
|
||||
|
||||
@ -1,14 +1,40 @@
|
||||
--- **Functional** -- (R2.3) Models the process to zone guarding and capturing.
|
||||
--- **Functional** -- Models the process to zone guarding and capturing.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAZ - Capture Zones)
|
||||
-- ## Features:
|
||||
--
|
||||
-- - CAZ-000 - Capture Zone: Demonstrates the basic concept of capturing a zone.
|
||||
-- * Models the possible state transitions between the Guarded, Attacked, Empty and Captured states.
|
||||
-- * A zone has an owning coalition, that means that at a specific point in time, a zone can be owned by the red or blue coalition.
|
||||
-- * Provide event handlers to tailor the actions when a zone changes coalition or state.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### [YouTube Playlist](https://www.youtube.com/watch?v=0m6K6Yxa-os&list=PL7ZUrU4zZUl0qqJsfa8DPvZWDY-OyDumE)
|
||||
-- ## Missions:
|
||||
--
|
||||
-- [CAZ - Capture Zones](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CAZ%20-%20Capture%20Zones)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # Player Experience
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- The above models the possible state transitions between the **Guarded**, **Attacked**, **Empty** and **Captured** states.
|
||||
-- A zone has an __owning coalition__, that means that at a specific point in time, a zone can be owned by the red or blue coalition.
|
||||
--
|
||||
-- The Zone can be in the state **Guarded** by the __owning coalition__, which is the coalition that initially occupies the zone with units of its coalition.
|
||||
-- Once units of an other coalition are entering the Zone, the state will change to **Attacked**. As long as these units remain in the zone, the state keeps set to Attacked.
|
||||
-- When all units are destroyed in the Zone, the state will change to **Empty**, which expresses that the Zone is empty, and can be captured.
|
||||
-- When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to **Captured**.
|
||||
--
|
||||
-- The zone needs to be monitored regularly for the presence of units to interprete the correct state transition required.
|
||||
-- This monitoring process MUST be started using the @{#ZONE_CAPTURE_COALITION.Start}() method.
|
||||
-- Otherwise no monitoring will be active and the zone will stay in the current state forever.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ## [YouTube Playlist](https://www.youtube.com/watch?v=0m6K6Yxa-os&list=PL7ZUrU4zZUl0qqJsfa8DPvZWDY-OyDumE)
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@ -29,65 +55,76 @@ do -- ZONE_CAPTURE_COALITION
|
||||
--- Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.
|
||||
-- This is a powerful concept that allows to create very dynamic missions based on the different state transitions of various zones.
|
||||
--
|
||||
-- ---
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ---
|
||||
-- ===
|
||||
--
|
||||
-- # 0. Player Experience
|
||||
-- In order to use ZONE_CAPTURE_COALITION, you need to:
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- The above models the possible state transitions between the **Guarded**, **Attacked**, **Empty** and **Captured** states.
|
||||
-- A zone has an __owning coalition__, that means that at a specific point in time, a zone can be owned by the red or blue coalition.
|
||||
--
|
||||
-- The Zone can be in the state **Guarded** by the __owning coalition__, which is the coalition that initially occupies the zone with units of its coalition.
|
||||
-- Once units of an other coalition are entering the Zone, the state will change to **Attacked**. As long as these units remain in the zone, the state keeps set to Attacked.
|
||||
-- When all units are destroyed in the Zone, the state will change to **Empty**, which expresses that the Zone is empty, and can be captured.
|
||||
-- When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to **Captured**.
|
||||
--
|
||||
-- The zone needs to be monitored regularly for the presence of units to interprete the correct state transition required.
|
||||
-- This monitoring process MUST be started using the @{#ZONE_CAPTURE_COALITION.Start}() method.
|
||||
-- Otherwise no monitoring will be active and the zone will stay in the current state forever.
|
||||
-- See further in chapter 3.3 for more information about this.
|
||||
--
|
||||
-- ## 1. ZONE\_CAPTURE\_COALITION constructor
|
||||
--
|
||||
-- * @{#ZONE_CAPTURE_COALITION.New}(): Creates a new ZONE\_CAPTURE\_COALITION object.
|
||||
--
|
||||
-- In order to use ZONE\_CAPTURE\_COALITION, you need to:
|
||||
--
|
||||
-- - Create a @{Zone} object from one of the ZONE\_ classes. Note that ZONE\_POLYGON\_ classes are not yet functional. The only functional ZONE\_ classses are those derived from a ZONE\_RADIUS.
|
||||
-- * Create a @{Zone} object from one of the ZONE_ classes.
|
||||
-- Note that ZONE_POLYGON_ classes are not yet functional.
|
||||
-- The only functional ZONE_ classses are those derived from a ZONE_RADIUS.
|
||||
-- * Set the state of the zone. Most of the time, Guarded would be the initial state.
|
||||
-- * Start the zone capturing **monitoring process**.
|
||||
-- This will check the presence of friendly and/or enemy units within the zone and will transition the state of the zone when the tactical situation changed.
|
||||
-- The frequency of the monitoring must not be real-time, a 30 second interval to execute the checks is sufficient.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- Ensure that during the life cycle of the ZONE\_CAPTURE\_COALITION object, the object keeps alive.
|
||||
-- It is best to declare the object globally within your script.
|
||||
-- ### Important:
|
||||
--
|
||||
-- ## 2. ZONE\_CAPTURE\_COALITION is a finite state machine (FSM).
|
||||
-- You must start the monitoring process within your code, or there won't be any state transition checks executed.
|
||||
-- See further the start/stop monitoring process.
|
||||
--
|
||||
-- ### Important:
|
||||
--
|
||||
-- Ensure that the object containing the ZONE_CAPTURE_COALITION object is persistent.
|
||||
-- Otherwise the garbage collector of lua will remove the object and the monitoring process will stop.
|
||||
-- This will result in your object to be destroyed (removed) from internal memory and there won't be any zone state transitions anymore detected!
|
||||
-- So use the `local` keyword in lua with thought! Most of the time, you can declare your object gobally.
|
||||
--
|
||||
--
|
||||
--
|
||||
-- # Example:
|
||||
--
|
||||
-- -- Define a new ZONE object, which is based on the trigger zone `CaptureZone`, which is defined within the mission editor.
|
||||
-- CaptureZone = ZONE:New( "CaptureZone" )
|
||||
--
|
||||
-- -- Here we create a new ZONE_CAPTURE_COALITION object, using the :New constructor.
|
||||
-- ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED )
|
||||
--
|
||||
-- -- Set the zone to Guarding state.
|
||||
-- ZoneCaptureCoalition:__Guard( 1 )
|
||||
--
|
||||
-- -- Start the zone monitoring process in 30 seconds and check every 30 seconds.
|
||||
-- ZoneCaptureCoalition:Start( 30, 30 )
|
||||
--
|
||||
--
|
||||
-- # Constructor:
|
||||
--
|
||||
-- Use the @{#ZONE_CAPTURE_COALITION.New}() constructor to create a new ZONE_CAPTURE_COALITION object.
|
||||
--
|
||||
-- # ZONE_CAPTURE_COALITION is a finite state machine (FSM).
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 2.1 ZONE\_CAPTURE\_COALITION States
|
||||
-- ## ZONE_CAPTURE_COALITION States
|
||||
--
|
||||
-- * **Captured**: The Zone has been captured by an other coalition.
|
||||
-- * **Attacked**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guarded**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- ### 2.2 ZONE\_CAPTURE\_COALITION Events
|
||||
-- ## 2.2 ZONE_CAPTURE_COALITION Events
|
||||
--
|
||||
-- * **Capture**: The Zone has been captured by an other coalition.
|
||||
-- * **Attack**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
|
||||
-- * **Guard**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
|
||||
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
|
||||
--
|
||||
-- ## 3. "Script It"
|
||||
-- # "Script It"
|
||||
--
|
||||
-- ZONE\_CAPTURE\_COALITION allows to take action on the various state transitions and add your custom code and logic.
|
||||
-- ZONE_CAPTURE_COALITION allows to take action on the various state transitions and add your custom code and logic.
|
||||
--
|
||||
-- ### 3.1. Take action using state- and event handlers.
|
||||
-- ## Take action using state- and event handlers.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
@ -104,8 +141,6 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- - On Before the event is triggered. Return false to cancel the transition.
|
||||
-- - On After the event is triggered.
|
||||
--
|
||||
--
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- Each handler can receive optionally 3 parameters:
|
||||
@ -126,7 +161,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
--
|
||||
-- This code checks that when the __Guarded__ state has been reached, that if the **From** state was __Empty__, then display a message.
|
||||
--
|
||||
-- ### 3.2. Example Event Handler.
|
||||
-- ## Example Event Handler.
|
||||
--
|
||||
-- --- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self
|
||||
-- function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To )
|
||||
@ -145,7 +180,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
-- ### 3.3. Stop and Start the zone monitoring process.
|
||||
-- ## Stop and Start the zone monitoring process.
|
||||
--
|
||||
-- At regular intervals, the state of the zone needs to be monitored.
|
||||
-- The zone needs to be scanned for the presence of units within the zone boundaries.
|
||||
@ -157,8 +192,8 @@ do -- ZONE_CAPTURE_COALITION
|
||||
--
|
||||
-- Therefore, the mission designer is given 2 methods that allow to take control of the CPU utilization efficiency:
|
||||
--
|
||||
-- - @{#ZONE_CAPTURE_COALITION.Start()}(): This starts the monitoring process.
|
||||
-- - @{#ZONE_CAPTURE_COALITION.Stop()}(): This stops the monitoring process.
|
||||
-- * @{#ZONE_CAPTURE_COALITION.Start}(): This starts the monitoring process.
|
||||
-- * @{#ZONE_CAPTURE_COALITION.Stop}(): This stops the monitoring process.
|
||||
--
|
||||
-- ### IMPORTANT
|
||||
--
|
||||
@ -166,9 +201,9 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- The monitoring process is NOT started by default!!!**
|
||||
--
|
||||
--
|
||||
-- ## 4. Full Example
|
||||
-- # Full Example
|
||||
--
|
||||
-- The following annotated code shows a real example of how ZONE\_CAPTURE\_COALITION can be applied.
|
||||
-- The following annotated code shows a real example of how ZONE_CAPTURE_COALITION can be applied.
|
||||
--
|
||||
-- The concept is simple.
|
||||
--
|
||||
@ -329,7 +364,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
do
|
||||
|
||||
--- Captured State Handler OnLeave for ZONE\_CAPTURE\_COALITION
|
||||
--- Captured State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveCaptured
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -337,7 +372,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Captured State Handler OnEnter for ZONE\_CAPTURE\_COALITION
|
||||
--- Captured State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterCaptured
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -349,7 +384,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
do
|
||||
|
||||
--- Attacked State Handler OnLeave for ZONE\_CAPTURE\_COALITION
|
||||
--- Attacked State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveAttacked
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -357,7 +392,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attacked State Handler OnEnter for ZONE\_CAPTURE\_COALITION
|
||||
--- Attacked State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterAttacked
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -368,7 +403,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
do
|
||||
|
||||
--- Guarded State Handler OnLeave for ZONE\_CAPTURE\_COALITION
|
||||
--- Guarded State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveGuarded
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -376,7 +411,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guarded State Handler OnEnter for ZONE\_CAPTURE\_COALITION
|
||||
--- Guarded State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterGuarded
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -388,7 +423,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
do
|
||||
|
||||
--- Empty State Handler OnLeave for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty State Handler OnLeave for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnLeaveEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -396,7 +431,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty State Handler OnEnter for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty State Handler OnEnter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnEnterEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -407,7 +442,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
self:AddTransition( "*", "Guard", "Guarded" )
|
||||
|
||||
--- Guard Handler OnBefore for ZONE\_CAPTURE\_COALITION
|
||||
--- Guard Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeGuard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -415,25 +450,25 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Guard Handler OnAfter for ZONE\_CAPTURE\_COALITION
|
||||
--- Guard Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterGuard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Guard Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Guard Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Guard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Guard Asynchronous Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Guard Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Guard
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( "*", "Empty", "Empty" )
|
||||
|
||||
--- Empty Handler OnBefore for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -441,18 +476,18 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Empty Handler OnAfter for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterEmpty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Empty Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Empty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Empty Asynchronous Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Empty Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Empty
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
@ -460,7 +495,7 @@ do -- ZONE_CAPTURE_COALITION
|
||||
|
||||
self:AddTransition( { "Guarded", "Empty" }, "Attack", "Attacked" )
|
||||
|
||||
--- Attack Handler OnBefore for ZONE\_CAPTURE\_COALITION
|
||||
--- Attack Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeAttack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -468,25 +503,25 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Attack Handler OnAfter for ZONE\_CAPTURE\_COALITION
|
||||
--- Attack Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterAttack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Attack Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Attack Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Attack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Attack Asynchronous Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Attack Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Attack
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
self:AddTransition( { "Guarded", "Attacked", "Empty" }, "Capture", "Captured" )
|
||||
|
||||
--- Capture Handler OnBefore for ZONE\_CAPTURE\_COALITION
|
||||
--- Capture Handler OnBefore for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnBeforeCapture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
@ -494,18 +529,18 @@ do -- ZONE_CAPTURE_COALITION
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
--- Capture Handler OnAfter for ZONE\_CAPTURE\_COALITION
|
||||
--- Capture Handler OnAfter for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] OnAfterCapture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
--- Capture Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Capture Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] Capture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
|
||||
--- Capture Asynchronous Trigger for ZONE\_CAPTURE\_COALITION
|
||||
--- Capture Asynchronous Trigger for ZONE_CAPTURE_COALITION
|
||||
-- @function [parent=#ZONE_CAPTURE_COALITION] __Capture
|
||||
-- @param #ZONE_CAPTURE_COALITION self
|
||||
-- @param #number Delay
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user