MOOSE - Mission Object Oriented Scripting Framework - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 01-24-2015, 09:50 AM   #1
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,003
Default MOOSE - Mission Object Oriented Scripting Framework

MOOSE Release 2.3.0

Assets
  • Moose.lua (with comments, larger file) ... For mission designers, who are developing missions and want to check upon errors appearing in the dcs.log or have a detailed code reference etc.
  • Moose_.lua (without comments, smaller file) ... For runtime environments, to facilitate quicker downloads of mission files and performance.
You can download the files in the Downloads section below.


To use, include the Moose.lua in your .miz file using a DO SCRIPT Trigger. Mission Designers need to read here for a detailed usage description. Consult the MOOSE documentation for further details on the framework.



1. RANGE Practice





The RANGE class enables easy set up of bombing and strafing ranges within DCS World.


Implementation is based on the Simple Range Script by Ciribob, which itself was motivated by a script by SNAFU see here.
476th - Air Weapons Range Objects mod is highly recommended for this class.

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.


2. Zone Capturing





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.
Models the possible state transitions between 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.



3. ATC Operations





The ATC_GROUND_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.
The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.



4. RAT




Lots of improvements on the RAT system.


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
  • 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) and future maps are supported.
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.
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.



5. User Sounds


A simple class for the Management of DCS User Sounds.




6. User Flags


A simple class for the Management of DCS User Flags, which are set within the Mission Editor.



7. Upcoming in Release 2.4.0.alpha



NOTE: There is also cargo capability in release 2.3.
But consider this cargo functionality WIP.
The upcoming release 2.4 is focused solely on CARGO, which includes:
  1. Cargo Management (Cargo of different types)
  2. Cargo Transport Tasking
  3. Cargo CSAR Tasking
  4. AI Armoured Personnel Carrier moving Cargo
  5. AI Helicopter moving Cargo
  6. AI Planes moving Cargo
  7. AI Ships moving Cargo
  8. Slingloading
  9. Cargo objects loading/unloading
  10. Cargo Infantry boarding and unboarding one by one
  11. ...

A lot of that can already be tested in the develop branch of the MOOSE Framework... I'll open a 2.4.0.alpha release for this purpose, so you know what is coming.

You can download the latest new functions of Moose.lua in the release 2.4.0.alpha from the develop branch of the MOOSE_INCLUDE repository.


And a special thanks to FunkyFranky, who is making all these wonderful classes and helping to extend the framework... Other community members have been posting me other classes. We really appreciate the efforts and your contributions.
If you are planning to create a new class to be added in the framework, we advise we discuss the approach, design, purpose, just as Frank and myself are jointly doing.


Thanks!

FC and FunkyFranky and all MOOSE contributors
__________________

Last edited by FlightControl; 04-14-2018 at 05:59 AM.
FlightControl is offline   Reply With Quote
Old 01-25-2015, 08:55 PM   #2
xcom
Senior Member
 
xcom's Avatar
 
Join Date: Jun 2012
Posts: 1,365
Default

Thank you Sven, looks excellent!
I'll have a look around and give back my review, but seems very useful by the documented functions.

BTW, nice stathandler.lua file, seems awefully similar to my estathandler.lua file that I published a while back on how to create statistics.

Last edited by xcom; 01-25-2015 at 09:05 PM.
xcom is offline   Reply With Quote
Old 01-25-2015, 09:06 PM   #3
Midnight
Member
 
Midnight's Avatar
 
Join Date: Jul 2012
Location: South Africa
Posts: 481
Default

Hey Sven, great work. I'm sure I will contact you in the near future for assistance lol
__________________

http://www.vsaaf.co.za
Midnight is offline   Reply With Quote
Old 01-26-2015, 05:09 AM   #4
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,003
Default

Quote:
Originally Posted by xcom View Post
Thank you Sven, looks excellent!
I'll have a look around and give back my review, but seems very useful by the documented functions.

BTW, nice stathandler.lua file, seems awefully similar to my estathandler.lua file that I published a while back on how to create statistics.


Hey Xcom. Yes. The stathandler is yours. Forgot to mention that. I will revise the text of the intro.
Due to your advise and your posts on event catching and logging, I started to understand event handing much better.
Now that being said, if you have a look to the base class in the class hierarchy, you'll see how I catch events for the classes. Pay careful attention how I passed the 'self' variable to the BASE class event handler... It worked. So now the event handler works polymorphic for all derived classes from base.
Much more stuff to discuss, eg. Include script files, mist embedding (with grimes), your start files handler, score system, database class.
Consider this an alpha version. It is the idea of it that could be considered. Through objects, build a script framework. Each object defines it's behaviour, control and takes off the mission.
__________________

Last edited by FlightControl; 01-26-2015 at 08:38 AM.
FlightControl is offline   Reply With Quote
Old 01-28-2015, 07:48 PM   #5
xcom
Senior Member
 
xcom's Avatar
 
Join Date: Jun 2012
Posts: 1,365
Default

Hey Sven,

Thanks, thought I recognized it

I'm trying to use the MOOSE framework, kinda hard to get into the structure so I'm just copying your parts from the Gori Valley script.

I'm attaching the miz file and the lua I made that is relevant to your framework.
Hopefully I did things correctly, unfortunately for some reason there are no missions shown when I take the relevant planes.

Thanks for any help!
Attached Files
File Type: miz Operation JaggerNautV3.4_no external.miz (1.69 MB, 103 views)
File Type: lua JagerNaut.lua (4.2 KB, 122 views)
xcom is offline   Reply With Quote
Old 01-28-2015, 08:30 PM   #6
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,003
Default

Ok. I'll check it tomorrow xcom.
__________________
FlightControl is offline   Reply With Quote
Old 01-28-2015, 08:40 PM   #7
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,003
Default

In the meanwhile, can you send the dcs.log and the missionscripting.lua from the scripts directory to my private mailbox?
__________________
FlightControl is offline   Reply With Quote
Old 01-28-2015, 09:25 PM   #8
xcom
Senior Member
 
xcom's Avatar
 
Join Date: Jun 2012
Posts: 1,365
Default

sure, attached.
I'm not sure where is the problem, it could be that the structure I wrote in the lua file I attached before is not correct.
Attached Files
File Type: lua MissionScripting.lua (996 Bytes, 109 views)
File Type: txt dcs.txt (63.3 KB, 144 views)
xcom is offline   Reply With Quote
Old 01-28-2015, 09:44 PM   #9
FlightControl
Senior Member
 
FlightControl's Avatar
 
Join Date: Mar 2012
Location: Antwerp, Belgium
Posts: 2,003
Default

I think I know the problem. Have you started the MISSIONSCHEDULER? Check Gori valley script, there are 3 lines with mission scheduler.
__________________
FlightControl is offline   Reply With Quote
Old 01-28-2015, 10:07 PM   #10
xcom
Senior Member
 
xcom's Avatar
 
Join Date: Jun 2012
Posts: 1,365
Default

I did add the following to the end of the JagerNaut.lua file -
Code:
-- MISSION SCHEDULER STARTUP
MISSIONSCHEDULER.Start()
MISSIONSCHEDULER.ReportMenu()
MISSIONSCHEDULER.ReportMissionsFlash( 120 )
Were these the lines you talked about?
xcom is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:24 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.