MOOSE - Mission Object Oriented Scripting Framework - Page 158 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 04-14-2019, 01:30 PM   #1571
TLTeo
Member
 
TLTeo's Avatar
 
Join Date: Mar 2018
Posts: 359
Default

Hello! I'm trying to install Moose to make a few missions, but I feel like I'm either misreading something or the documentation has not been updated.


I've been trying to follow this guide:
https://flightcontrol-master.github....tup_Guide.html
but when I setup the framework in Eclipse the folder structure is completely different from that of the files I've downloaded and extracted. This is what the guide shows:

And this is what the .zip contains:

So what ends up happening is that there is no "Moose Mission Setup" folder as mentioned in part 6.2, so I have no idea where to go to import and run the Moose.lua script in DCS.

Did I miss something obvious? Thanks!
TLTeo is offline   Reply With Quote
Old 04-15-2019, 03:23 AM   #1572
Sierra99
Campaign Testers
 
Sierra99's Avatar
 
Join Date: Apr 2012
Location: Orlando Florida
Posts: 1,852
Default

Quote:
Originally Posted by Hardcard View Post
Try using the unit name of the carrier
Code:
AIRBASE:FindByName("Unit name of the carrier in ME")
That didn't work...It's throwing the following error:

Spoiler:
2019-04-15 03:13:10.215 ERROR DCS: Mission script error: : [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis000015D3.lua"]:103126: attempt to index field 'Airbase' (a nil value)
stack traceback:
[C]: ?
[string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis000015D3.lua"]:103126: in function 'SetSquadron'
[string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis00004587.lua"]:27: in main chunk


Here is the Script

Spoiler:
-- Date Created: 14 April 2019

-- Define a SET_GROUP object that builds a collection of groups that define the EWR network.

DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( { "E2D" } )
DetectionSetGroup:FilterStart()

Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )

-- Setup the A2A dispatcher, and initialize it.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )

-- Enable the tactical display panel.
A2ADispatcher:SetTacticalDisplay( true )

-- Any enemy crossing this border will be engaged.
CVNBorderZone = ZONE_POLYGON:New( "CVN Border", GROUP:FindByName( "CVN Border" ) )
A2ADispatcher:SetBorderZone( CVNBorderZone )

A2ADispatcher:SetEngageRadius( 80000 )

-- Setup the squadrons. (LINE 27)
(LINE 27) A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 )

-- Setup the overhead
A2ADispatcher:SetSquadronOverhead( "Stennis", 1.2 )

-- Setup the Grouping
A2ADispatcher:SetSquadronGrouping( "Stennis", 1 )

-- Setup the Takeoff methods
A2ADispatcher:SetSquadronTakeoffFromRunway( "Stennis" )

-- Setup the Landing methods
A2ADispatcher:SetSquadronLandingAtRunway( "Stennis" )

-- GCI Squadron execution.
A2ADispatcher:SetSquadronGci( "Stennis", 900, 1200 )
Attached Files
File Type: miz OTT.miz (941.8 KB, 5 views)
__________________

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 1070 Ti AMP Extreme, Windows 10 Professional, Thrustmaster Warthog, Cougar MFDs x3, Thrustmaster T.Flight Rudder Pedals and TrackIR 5.
Sierra99 is offline   Reply With Quote
Old 04-15-2019, 03:31 AM   #1573
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 365
Default

@TLTeo

Follow the instructions given in this video (it shows an older MOOSE version, but the procedure is the same).

You'll find the latest MOOSE release here (the source code is required to set up LDT, Moose.lua is the file you'll be including in your DCS missions)
Hardcard is offline   Reply With Quote
Old 04-15-2019, 03:44 AM   #1574
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 365
Default

@Sierra99

According to intellisense and the documentation, the second parameter in :SetSquadron() must be a string (the airbase name) rather than the object.

Checking the MOOSE declaration, I've seen that MOOSE automatically runs AIRBASE:FindByName() for you, with the given string parameter.

So, instead of this:
Code:
A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 )
Try this:
Code:
A2ADispatcher:SetSquadron( "Stennis","unit name of the carrier in ME", { "ALERT 5" }, 20 )

Last edited by Hardcard; 04-15-2019 at 03:47 AM.
Hardcard is offline   Reply With Quote
Old 04-15-2019, 04:03 AM   #1575
Sierra99
Campaign Testers
 
Sierra99's Avatar
 
Join Date: Apr 2012
Location: Orlando Florida
Posts: 1,852
Default

Quote:
Originally Posted by Hardcard View Post
@Sierra99

According to intellisense and the documentation, the second parameter in :SetSquadron() must be a string (the airbase name) rather than the object.

Checking the MOOSE declaration, I've seen that MOOSE automatically runs AIRBASE:FindByName() for you, with the given string parameter.

So, instead of this:
Code:
A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 )
Try this:
Code:
A2ADispatcher:SetSquadron( "Stennis","unit name of the carrier in ME", { "ALERT 5" }, 20 )
I'll give it a shot in the morning...

If it works, it would make for some interesting missions...Thanks for the help
__________________

Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 1070 Ti AMP Extreme, Windows 10 Professional, Thrustmaster Warthog, Cougar MFDs x3, Thrustmaster T.Flight Rudder Pedals and TrackIR 5.
Sierra99 is offline   Reply With Quote
Old 04-15-2019, 06:30 AM   #1576
Cyclonictank
Junior Member
 
Join Date: Apr 2019
Posts: 3
Default

G'day everyone, I am trying to make a mission with infinitely respawing air and ground units, but I am unable to even get MOOSE to load instead I am presented with a mission script error informing me that a nil value was uncovered whilst trying to index global, I am using a standard version of Moose with the Beta branch of DCS, is this possible the problem?
Cyclonictank is offline   Reply With Quote
Old 04-15-2019, 08:57 AM   #1577
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 365
Default

@Cyclonictank

Make sure that you're using the include version of Moose.lua in your mission.

Also, it would be better for you to post both the script and mission here.
Hardcard is offline   Reply With Quote
Old 04-15-2019, 09:41 AM   #1578
Cyclonictank
Junior Member
 
Join Date: Apr 2019
Posts: 3
Default

@Hardcard

Thanks for the response, I tried loading loading the mission with lua file you supplied but still no luck, I have attached the mission below (I think, first time trying this).
Attached Files
File Type: miz Dynamic Battle protoype.miz (50.3 KB, 8 views)
Cyclonictank is offline   Reply With Quote
Old 04-15-2019, 12:01 PM   #1579
EntropySG
Member
 
EntropySG's Avatar
 
Join Date: Feb 2015
Posts: 721
Default

you did not include the moose.lua that Hardcad provided. Just open your miz file with e.g. winrar and check l10n/DEFAULT/ folder the moose.lua in there is the dynamic version thats used for development.

simply delete the trigger in your mission file in the mission editor that loads moose, and re-add the trigger pointing to the file that Hardcard linked and it will work. Verify the correct file directly in your mission file.
__________________
EntropySG is offline   Reply With Quote
Old 04-15-2019, 01:19 PM   #1580
Cyclonictank
Junior Member
 
Join Date: Apr 2019
Posts: 3
Default

Thanks everyone for the help it seems that it is now working as intended. This has been eating at me all weekend.
Cyclonictank 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 12:19 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.