Jump to content

MOOSE - Mission Object Oriented Scripting Framework


Recommended Posts

I don't know if this is relevant in this page, but how do I minimise DCS when I'm using MOOSE. I can't get the ME to minimise it stays full screen and I have to keep closing it so that I can enter the scripts into LDT. Anyone any ideas, many thanks ???? ????

Link to comment
Share on other sites

In DCS World Options uncheck FULL SCREEN and set screen resolution less than your monitor to start DCS in Window mode. I use a mod manager OvGME with 2 different configurations to switch between full screen and windowed mode easily.

Link to comment
Share on other sites

I don't know if this is relevant in this page' date=' but how do I minimise DCS when I'm using MOOSE. I can't get the ME to minimise it stays full screen and I have to keep closing it so that I can enter the scripts into LDT. Anyone any ideas, many thanks ???? ????[/quote']

 

This has 99.9% nothing to do with Moose. You should be able to ALT-TAB to switch to LDT or anything else for that matter. If not its some bogus DCS issue which would be of no surprise!!

Link to comment
Share on other sites

The answer to the question is that in windowed mode, DCS remains like a full screen app at your monitor size. It's not until you make the window a smaller resolution than its host monitor that you get the bar, windows controls and better handling for the window. And the reason for that is for better multimonitor support, they dont want a full screen windowed display minimising on a multiscreen display very easily and if you think about that, it makes a lot of sense.

___________________________________________________________________________

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

Link to comment
Share on other sites

  • 2 weeks later...

Convoy Mayhem

 

Decided to use moose for the first time, first simple little step and I'm ready to throw the PC out the window lol.

 

I just put a convoy on a road in the ME with a route, inital on-road, final on-road. I want many of these to spawn, so I call:

 

A2G_CONVOY1 = SPAWN:New( "A2G_CONVOY_EAST" )

A2G_CONVOY1:Spawn()

 

They spawn, but immediately turn right a few degrees, turn back towards the road (at various speeds due to the different vehicles), run into the back of each other, and eventually sort themselves out after some time... Screenshot attached. I've done with it already, I've loaded the mission 100 times, changing it to off-road first, put a waypoint just in front of them, various different starting speeds.

crunch.jpg.0e620bc139bc83a3b97690b8702c0eb3.jpg

Link to comment
Share on other sites

Decided to use moose for the first time, first simple little step and I'm ready to throw the PC out the window lol.

 

I just put a convoy on a road in the ME with a route, inital on-road, final on-road. I want many of these to spawn, so I call:

 

A2G_CONVOY1 = SPAWN:New( "A2G_CONVOY_EAST" )

A2G_CONVOY1:Spawn()

 

They spawn, but immediately turn right a few degrees, turn back towards the road (at various speeds due to the different vehicles), run into the back of each other, and eventually sort themselves out after some time... Screenshot attached. I've done with it already, I've loaded the mission 100 times, changing it to off-road first, put a waypoint just in front of them, various different starting speeds.

 

Likely NOTHING to do with Moose and most likely 99.9% due to DCS AI. If this is all that happens you're super lucky!!!

Link to comment
Share on other sites

Perhaps it's not moose, but... if I use the regular late activation feature of the ME, they work fine. It basically looks to me like moose is cloning my template and deploying them in the right place, but the initial formation is set to off-road, causing them to all want to get back on the road they are already on...

 

I honestly don't know how you guys have the patience. I just added 2xF18'x for fun, 30nm out, one with GBU-38 and one with AGM-154A. Hornet carrying the 154's drop 30nm out, GBU-38 guy waits until 5nm overhead at 30k ft. F-18 with AGM-54E misses by miles and doesn't use the pod. I could go on, suffice to say, I've tried 10 test missions in the last 30 minutes and... nothing works as expected.

 

Anything beyond an armored group of targets sitting like ducks in a farmers field, sitting there getting high on the white phosphorous and doing nothing about it is just too painful.

Link to comment
Share on other sites

Perhaps it's not moose, but... if I use the regular late activation feature of the ME, they work fine. It basically looks to me like moose is cloning my template and deploying them in the right place, but the initial formation is set to off-road, causing them to all want to get back on the road they are already on...

 

I honestly don't know how you guys have the patience. I just added 2xF18'x for fun, 30nm out, one with GBU-38 and one with AGM-154A. Hornet carrying the 154's drop 30nm out, GBU-38 guy waits until 5nm overhead at 30k ft. F-18 with AGM-54E misses by miles and doesn't use the pod. I could go on, suffice to say, I've tried 10 test missions in the last 30 minutes and... nothing works as expected.

 

Anything beyond an armored group of targets sitting like ducks in a farmers field, sitting there getting high on the white phosphorous and doing nothing about it is just too painful.

 

That is a bit odd. Unless you are giving them a different spawn location I would think they would start exactly as position in the ME. But perhaps there is some odd small translation "bug" in Moose. Don't know. If you want you can submit the issue on GitHub and someone MIGHT look at it. Doesn't sound too serious though. In reality if you weren't watching the units it probably wouldn't even be an issue cause you would never know and there would just be a minute or two delay until they started moving out properly.

 

But I've been in those situations as well thinking, look how dumb these units are cause you're debugging and watching and WAITING!!

Link to comment
Share on other sites

I'm trying to use MOOSE AIRBASE wrapper to identify the closest enemy (red) base (reference to drone at krymsk) and set an AI Task for the "DRONE_1" group. Tasks are defined for the group and works OK when pushed through ME triggers.

 

I'm using the following code, but its not pushing the AITask:

 

local krasnodar = AIRBASE:FindByName("Krasnodar-Center")
local maykop = AIRBASE:FindByName("Maykop-Khanskaya")
local sochi = AIRBASE:FindByName("Sochi-Adler")
local gudauta = AIRBASE:FindByName("Gudauta")
local sukhumi = AIRBASE:FindByName("Sukhumi-Babushara")
local senaki = AIRBASE:FindByName("Senaki-Kolkhi")
if krasnodar:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 1)
elseif maykop:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 2)
elseif sochi:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 3)
elseif gudauta:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 4)
elseif sukhumi:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 5)
elseif senaki:GetCoalition()==coalition.side.RED then
trigger.action.pushAITask("DRONE_1", 6)
end

 

 

Any idea what is my mistake??

 

Thanks

Link to comment
Share on other sites

I'm trying to use MOOSE AIRBASE wrapper to identify the closest enemy (red) base (reference to drone at krymsk) and set an AI Task for the "DRONE_1" group. Tasks are defined for the group and works OK when pushed through ME triggers.

 

I'm using the following code, but its not pushing the AITask:

 

Any idea what is my mistake??

 

Thanks

 

These commands

trigger.action.pushAITask("DRONE_1", 1) 

are not Moose related so this is better asked as a general scripting question.

Link to comment
Share on other sites

Thanks, so the Moose commands I'm using are used in the correct way?

 

UPDATE:

 

Got this sorted out, Moose AIRBASE commands were OK, and as Delta99 pointed out my problem was in the trigger.action command. I needed to put in there the actual object and not the name of it.

 

This is the correct code if someone find it helpful in the future:

 

local group = Group.getByName("DRONE_1")
if AIRBASE:FindByName("Krasnodar-Center"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 1)
elseif AIRBASE:FindByName("Maykop-Khanskaya"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 2)
elseif AIRBASE:FindByName("Sochi-Adler"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 3)
elseif AIRBASE:FindByName("Gudauta"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 4)
elseif AIRBASE:FindByName("Sukhumi-Babushara"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 5)
elseif AIRBASE:FindByName("Senaki-Kolkhi"):GetCoalitionName()=="Red" then
trigger.action.pushAITask( group, 6)
end

 

Thanks Delta99!


Edited by pacastro
Link to comment
Share on other sites

That is a bit odd. Unless you are giving them a different spawn location I would think they would start exactly as position in the ME. But perhaps there is some odd small translation "bug" in Moose. Don't know. If you want you can submit the issue on GitHub and someone MIGHT look at it. Doesn't sound too serious though. In reality if you weren't watching the units it probably wouldn't even be an issue cause you would never know and there would just be a minute or two delay until they started moving out properly.

 

But I've been in those situations as well thinking, look how dumb these units are cause you're debugging and watching and WAITING!!

 

You're correct mate, it's default logic. I reported it and posted the miz, have a watch for a laugh.

 

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

Link to comment
Share on other sites

When for training I place 1 tank on the road with an endpoint, and multiply the unit x15 everything is fine?

I do have to check the units line up nicely on a stretch of road, if not then s** happens.

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

Thanks, so the Moose commands I'm using are used in the correct way?

 

UPDATE:

 

Got this sorted out, Moose AIRBASE commands were OK, and as Delta99 pointed out my problem was in the trigger.action command. I needed to put in there the actual object and not the name of it.

 

Thanks Delta99!

 

Glad you got it working. If you didn't know make sure you monitor dcs.log as you'll see script errors there.

Link to comment
Share on other sites

Error with OPS module ...

 

Hi funkyfranky!

 

I started using MOOSE for carrier ops.When I apply the following script to a SH-60 ("LATE ACTIVATED", flying):

RescueHeloLincoln=RESCUEHELO:New(UNIT:FindByName("Lincoln"), "BLUE_Rescue_Heli")
RescueHeloLincoln:SetTakeoffCold()
RescueHeloLincoln:Start()

... I get this:

2020-07-26 22:37:52.884 INFO    SCRIPTING: 108470(    -1)/E:                    RESCUEHELO01364.function(RESCUEHELO Lincoln_BLUE_Rescue_Heli_01 | Rescue helo is NOT alive (and not stopped)!)
2020-07-26 22:37:52.884 INFO    SCRIPTING: 127143(    -1)/E:                  AI_FORMATION01435.function(Stopping formation.)
2020-07-26 22:37:52.884 INFO    SCRIPTING: 108669(    -1)/I:                    RESCUEHELO01364.function(RESCUEHELO Lincoln_BLUE_Rescue_Heli_01 | Stopping FSM. Helo was not alive.)

SetTakeoffCold() seems not working, SetTakeoffAir() works fine.

Any ideas how to start the chopper from deck?

Using SC.

OB 2.5.6.52437

 

 

EDIT 2020-08-02: DISREGARD THIS POST


Edited by TOViper

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G | NVIDIA GTX 1080 Ti OC 11GB | 32 GB 3200 MHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TPR | Rift CV1

 

Link to comment
Share on other sites

Hi folks, many of these dynamic maps have some big zones to spawn troops, and many times they are spawned under trees or even on rooftops. Aside from shrinking the zones and intelligent placement, is there any way to avoid spawning units under trees or on rooftops.

Link to comment
Share on other sites

Hi folks, many of these dynamic maps have some big zones to spawn troops, and many times they are spawned under trees or even on rooftops. Aside from shrinking the zones and intelligent placement, is there any way to avoid spawning units under trees or on rooftops.

 

I don't think so.

 

From the DCS World scripting wiki.

land.SurfaceType 
 LAND             1
 SHALLOW_WATER    2
 WATER            3 
 ROAD             4
 RUNWAY           5

 

https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation

Link to comment
Share on other sites

Hi funkyfranky!

 

I started using MOOSE for carrier ops.

 

When I apply the following script to a SH-60 ("LATE ACTIVATED", flying):

 

 

SetTakeoffCold() seems not working, SetTakeoffAir() works fine.

Any ideas how to start the chopper from deck?

 

Using SC.

 

OB 2.5.6.52437

 

Maybe set it to start on the deck instead of flying (the actual unit).

 

Not sure if related, but I'm having an issue with my rescue helos, after some hours of mission time the rescue helo goes to refuel on deck to never respawn again, it juts stays cold on deck. Before last update they respawned ok on deck and went back to station. Now I have set it to :SetRespawnInAir() to get continued operation.


Edited by pacastro
Link to comment
Share on other sites

Maybe set it to start on the deck instead of flying (the actual unit).

 

Not sure if related, but I'm having an issue with my rescue helos, after some hours of mission time the rescue helo goes to refuel on deck to never respawn again, it juts stays cold on deck. Before last update they respawned ok on deck and went back to station. Now I have set it to :SetRespawnInAir() to get continued operation.

 

Thanks for the info, I will try!

 

EDIT 2020-08-02:

===========

Disregard my post https://forums.eagle.ru/showpost.php?p=4434847&postcount=2142

I had it placed it correctly to the Lincoln, but the warehouse of the carrier was empty (STUPID mission designer failure)

 

SetTakeoffCold() IS working, SetTakeoffAir() works fine too.

@pacastro: Yesterday, during a MP mission, the UH-60 came back for refueling (I think) after a long time, and went away again (I was initially starting it via SetTakeoffAir().


Edited by TOViper

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G | NVIDIA GTX 1080 Ti OC 11GB | 32 GB 3200 MHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TPR | Rift CV1

 

Link to comment
Share on other sites

I can route a ground unit to a vec2 very easily, but I'm trying to expand that into (n) destinations past that.

 

Anyone have a technique in MOOSE to pass a route to a ground unit that essentially hands them a series of waypoints to follow?

 

Hoping there's a simple solution I'm overlooking.

 

Thanksbros!

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

Anyone have a technique in MOOSE to pass a route to a ground unit that essentially hands them a series of waypoints to follow?

Something like

 local Speed=50  -- km/h
 local Formation="Off Road"
 
 local zone1=ZONE:New("Zone Alpha")
 local zone2=ZONE:New("Zone Bravo")

 local wp={}  
 wp[1]=zone1:GetCoordinate():WaypointGround(Speed, Formation)
 wp[2]=zone2:GetCoordinate():WaypointGround(Speed, Formation)
 
 GROUP:FindByName("My Mobile Ground Group"):Route(wp)

will route them off road to trigger zone "Alpha" and "Bravo".

 

In general, you need a set of coordinates, create waypoints and use :Route() on the waypoint table.

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

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

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

Link to comment
Share on other sites

Something like

 local Speed=50  -- km/h
 local Formation="Off Road"
 
 local zone1=ZONE:New("Zone Alpha")
 local zone2=ZONE:New("Zone Bravo")

 local wp={}  
 wp[1]=zone1:GetCoordinate():WaypointGround(Speed, Formation)
 wp[2]=zone2:GetCoordinate():WaypointGround(Speed, Formation)
 
 GROUP:FindByName("My Mobile Ground Group"):Route(wp)

will route them off road to trigger zone "Alpha" and "Bravo".

 

In general, you need a set of coordinates, create waypoints and use :Route() on the waypoint table.

 

WHOOHOO!!!

 

This is exactly what I was hoping for.

 

Thank you!

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Link to comment
Share on other sites

Question relating EVENTS

 

Hi funkyfranky,

 

is there a way to check if a client player has selected an aircraft from the "MULTIPLAYER - Select role" menu? Im not interested in checking if he had already entered a unit, but just selected it ...

 

THANKS!

Visit https://www.viggen.training
...Viggen... what more can you ask for?

my computer:
AMD Ryzen 5600G | NVIDIA GTX 1080 Ti OC 11GB | 32 GB 3200 MHz DDR4 DUAL | SSD 980 256 GB SYS + SSD 2TB DCS | TM Warthog Stick + Throttle + TPR | Rift CV1

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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