Jump to content

MOOSE - Mission Object Oriented Scripting Framework


Recommended Posts

Your error messages say version of the recovery tanker is 1.0.5, while the current version is 1.0.9.

You get errors because you are using a Moose.lua version which does not include the functions you are using.

 

The latest I grab is the dev Moose static. Is that not the latest?

 
 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

@BoneDust

 

Please, get the temporary script file(s) referenced in the dcs.log error(s) (following the steps I explained) and upload it/them here.

 

It might very well be that you have the wrong Moose.lua file loaded in your mission.

 

Here it is.

~mis00004B42.lua

 
 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

I've just started using MOOSE, I spent a whole day watching the videos, and a second day playing with the example missions. I have so..many.. questions...

 

I'll keep it simple for the first one.

 

I'm spawning units from MOOSE, and I notice that their unit names are just numbers like "1002028" and "1002026"

 

how do I get this unit name and manipulate the unit? I've tried adding the ":InitKeepUnitNames()" to no avail, even the example mission doesn't seem to keep the unit names.

 

Just for testing I tried calling the unit name and putting it in a message to and it really didn't like that. I had to convert it to a string, and I get "table: 0000000718149FAO"

local VariableUnit = UNIT:FindByName("Unit #1")
trigger.action.outText( tostring(VariableUnit), 1)

 

I'm using the SPA 320 and the SPA 021 mission .luas and .miz for examples.

i7-6700K, Gigabyte GTX1080 8GB , MSI Z170A, 32GB, 750W

VFA-113

Link to comment
Share on other sites

I am still not able to get the AirBoss working.

 

I changed the script and it doesn't show any errors in the log, yet the Airboss menu is still not showing in the F10 menu. I made a very basic Airboss script (two lines) and still no F10 menu. The only thing I can think of is the moose version, but I updated the dev file tonight and it said it was updated 2 hours ago.

 
 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

@BoneDust

 

The dcs.log errors that you posted here clearly referenced pretty large script files of, at least, 20k - 90k lines... the temporary script file that you uploaded isn't any of those.

 

Aren't you getting those errors anymore?

 

Could you please post your dcs.log (so we can see the errors you're getting) + all the temporary script files referenced in those errors?

 

 

If you have changed the script now and you're not longer getting errors, please post your new script file as well, so we can see the differences.


Edited by Hardcard
Link to comment
Share on other sites

@BoneDust

 

The dcs.log errors that you posted here clearly referenced pretty large script files of, at least, 20k - 90k lines... the temporary script file that you uploaded isn't any of those.

 

Aren't you getting those errors anymore?

 

Could you please post your dcs.log (so we can see the errors you're getting) + all the temporary script files referenced in those errors?

 

 

If you have changed the script now and you're not longer getting errors, please post your new script file as well, so we can see the differences.

 

Not getting any errors now, yet still not getting the airboss menu. I've been trying to get this working because its driving me nuts haha. Using a clean mission and making some changes to the script. I'll post the log and new script later.

 

cheers

 
 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

Hi guys I would really appreciate if someone can help me with this.

I have been the last couple of days reading all available doucments about A2A Dispatcher, I have seen the really nice tutorials available, I understand the funcionalities and parameters to be used however I fail to understand where to find the base luas where to write such parameters.

I have downloaded several demo misions and each uses a different set of luas with different names.

I need to make a cold war scenario in the persian gulf and I also need to know the names the script uses for each airbase on this map.

Is there any "master" Dispatcher A2A Dispatcher lua that I can download and write ther the particular parameters of my mision?

The demo mission available in GitHub are for Caucasus, Nevada and Normandy.

 

I do not have available time to learn to use the LDT, I am pretty short on thime and I was counting to use the old GCI/CAP script that required only some customization.

While the capabilities of MOOSE are awesome, I do simply have not the time to learn scriptint full lua with the LDT the next month.

 

If someone can provide a lua based on the AI A2A dispatcher in the Persian Gulf just for Red Side, Cold War, and if possible a super simple miz associated with it I could populate the lua with my own parameters.

 

Thank you very much in advance!! :thumbup:

Link to comment
Share on other sites

I've been trying to get to the AI A2A Dispatcher link, but keep getting a 404 error on them.

i5-9600k @ 5.0 GHz| Gigabyte Z390 Aorus Master | 32 GB Trident G.Skill RAM @ 3200 MHz | Thermaltake Floe Riing 360 AIO | Samsung EVO 860 500 GB SSD | Crucial MX500 500 GB M.2 | SanDisk 1TB SSD | EVGA RTX 2080 Ti Ultra Gaming | EVGA G3 850W Gold PSU | Thermaltake View 71 TG Snow Edition | Thrustmaster Warthog HOTAS | MFC Crosswind pedals | Oculus Rift-S

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

 

Wow, thank you! Seems like every link I clicked was bad. Much appreciated! :thumbup:

i5-9600k @ 5.0 GHz| Gigabyte Z390 Aorus Master | 32 GB Trident G.Skill RAM @ 3200 MHz | Thermaltake Floe Riing 360 AIO | Samsung EVO 860 500 GB SSD | Crucial MX500 500 GB M.2 | SanDisk 1TB SSD | EVGA RTX 2080 Ti Ultra Gaming | EVGA G3 850W Gold PSU | Thermaltake View 71 TG Snow Edition | Thrustmaster Warthog HOTAS | MFC Crosswind pedals | Oculus Rift-S

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Is there a way in MOOSE to have get player name and unit then play a sound file when they join the unit? I see a way in MIST but would prefer to use MOOSE.

 

 

 

cheers

 
 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

Hello,

I have problem with static spawn. When I spawn smoke+fire effect via:

 

PointVec2:BigSmokeAndFireHuge(1)

 

It works fine in SP, in MP on dedicated server it only works if player is connected. Otherwise no static smoke+fire effects are placed. No scripting bug in log. It is just not there.

 

Is there some workaround or it is DCS limitation please?


Edited by ataribaby
Link to comment
Share on other sites

Hello,

I have problem with static spawn. When I spawn smoke+fire effect via:

 

PointVec2:BigSmokeAndFireHuge(1)

 

It works fine in SP, in MP on dedicated server it only works if player is connected. Otherwise no static smoke+fire effects are placed. No scripting bug in log. It just not there.

 

Is there some workaround or it is DCS limitation please?

 

This is one of those typical DCS MP issues.

Link to comment
Share on other sites

Can anyone help identify whether this is a DCS/MOOSE bug or am I doing something wrong?...

 

I went to the MOOSE discord to seek assistance with creating a respawning "stream" of APCs filled with infantry using AICargoDispatchAPC that will continuously attempt to enter a zone (inevitably being destroyed until a player intervenes and clears the way). This requires the APC and its CARGO infantry group to respawn and function again as it did at the start of the mission. AICargoDispatcherAPC breaks unless the :OnSpawnGroup/CARGO_GROUP etc lines are added, but when those are added the :InitLimit line is ignored and infantry gets spawned infinitely. I only want a small number of APCs and infantry alive at one time so it doesn't bog down the mission, but the script I found on the Discord (from someone that had an identical request back in July) seems to be missing something or bugged so it's ignoring :InitLimit( 5,25 ) or any other number I enter...it just keeps creating infantry infinitely.

 

I suspect it's something to do with the :OnSpawnGroup changing the whatever the InitLimit is looking to count so it never reaches its designated limit. Does anyone have any insight on how to fix this?

 

Zone1 = ZONE:New("spawn1")
Zone2 = ZONE:New("spawn2") 
Destination1 = ZONE:New("DeployZone")

Zonegroup1 = {Zone1}
Zonegroup2 = {Zone2}

CargoInfantrySet = SET_CARGO:New():FilterTypes( "Unit" ):FilterStart()
SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart()
DeployZonesSet = SET_ZONE:New():FilterPrefixes( "DeployZone" ):FilterOnce()
AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, CargoInfantrySet, nil, DeployZonesSet,500 ) 
AICargoDispatcherAPC:SetDeploySpeed(40)
AICargoDispatcherAPC:SetPickupSpeed(40)
AICargoDispatcherAPC:__Start(10)


Spawn_LCAC = SPAWN:New("APC")
:InitKeepUnitNames()
:InitLimit(4,15)
--:InitRandomizeTemplate( LCACPlatoons )
:InitRandomizeZones(Zonegroup1) 
:SpawnScheduled( 7, 0 )
       

Spawn_Infantry = SPAWN:New("Unit")
 :InitKeepUnitNames()
 :InitLimit(5,25)
--  :InitRandomizeTemplate(LCACInfantry)
:InitRandomizeZones(Zonegroup1) 
 --:InitCleanUp(240)
 :OnSpawnGroup( 
   function( SpawnGroup )
     CARGO_GROUP:New(SpawnGroup,"Unit",SpawnGroup:GetName(),150,20) 
   end)
 :SpawnScheduled( 5, 0 )
 

Link to comment
Share on other sites

Is there a way in MOOSE to have get player name and unit then play a sound file when they join the unit? I see a way in MIST but would prefer to use MOOSE.

cheers

 

You can use EVENTS.Birth to check when a unit has spawned... Then check EventData for IniPlayerName...

 

function OnEventBirth(EventData)
 if EventData.IniPlayerName then
   [insert logic for playing soundfiles here]

 end
end

Never used it for that exact purpose, but I see no reason why it shouldn't work. EVENTS.PlayerEnterUnit works in SP, but not in MP.

EVENTS.Birth works in MP just fine.

Wayz Out

 

 

Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe

HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals

Link to comment
Share on other sites

Where can I found a list of all the Parsion Gulf Air fiealds name?

[sIGPIC][/sIGPIC]

 

IAF Bell205

IAF Anafa

 

-----------------------

DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR

-----------------------

My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.

-------------

Link to comment
Share on other sites

Thanks.

But i not think this is the names i should use in the RAT script.

[sIGPIC][/sIGPIC]

 

IAF Bell205

IAF Anafa

 

-----------------------

DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR

-----------------------

My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.

-------------

Link to comment
Share on other sites

Thanks.

But i not think this is the names i should use in the RAT script.

 

 

You can mix the references to the airports like this, either by name or by calling the AIRBASE reference:

Airport_red = ({"Gelendzhik",AIRBASE.Caucasus.Mineralnye_Vody})

 

 

Here is the whole list coiped from the moose.lua file:

AIRBASE.PersianGulf = {
 ["Abu_Dhabi_International_Airport"] = "Abu Dhabi International Airport",
 ["Abu_Musa_Island_Airport"] = "Abu Musa Island Airport",
 ["Al_Ain_International_Airport"] = "Al Ain International Airport",
 ["Al_Bateen_Airport"] = "Al-Bateen Airport",
 ["Al_Dhafra_AB"] = "Al Dhafra AB",
 ["Al_Maktoum_Intl"] = "Al Maktoum Intl",
 ["Al_Minhad_AB"] = "Al Minhad AB",
 ["Bandar_Abbas_Intl"] = "Bandar Abbas Intl",
 ["Bandar_Lengeh"] = "Bandar Lengeh",
 ["Bandar_e_Jask_airfield"] = "Bandar-e-Jask airfield",
 ["Dubai_Intl"] = "Dubai Intl",  
 ["Fujairah_Intl"] = "Fujairah Intl",
 ["Havadarya"] = "Havadarya",
 ["Jiroft_Airport"] = "Jiroft Airport",
 ["Kerman_Airport"] = "Kerman Airport",
 ["Khasab"] = "Khasab",
 ["Kish_International_Airport"] = "Kish International Airport",
 ["Lar_Airbase"] = "Lar Airbase",
 ["Lavan_Island_Airport"] = "Lavan Island Airport",
 ["Liwa_Airbase"] = "Liwa Airbase",
 ["Qeshm_Island"] = "Qeshm Island",
 ["Ras_Al_Khaimah_International_Airport"] = "Ras Al Khaimah International Airport",
 ["Sas_Al_Nakheel_Airport"] = "Sas Al Nakheel Airport",
 ["Sharjah_Intl"] = "Sharjah Intl",
 ["Shiraz_International_Airport"] = "Shiraz International Airport",
 ["Sir_Abu_Nuayr"] = "Sir Abu Nuayr",
 ["Sirri_Island"] = "Sirri Island",
 ["Tunb_Island_AFB"] = "Tunb Island AFB",
 ["Tunb_Kochak"] = "Tunb Kochak",
}


Edited by hobus
Link to comment
Share on other sites

InitLimit is broken when spawning CARGO_GROUP using function(SpawnGroup) (as in my post above)...I'm a Lua newb, but trying to work on a way to manually stop spawning of units that have been spawned in with the code that is misbehaving to create a workaround for the issue. It's currently crippling the mission I have planned.

 

Can anyone assist with this?

 

--Add Infantry to CARGO SET
local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart()

-- Here we setup the spawning of Infantry..
local SpawnCargoInfantry = SPAWN
 :New( "Infantry" )
 :InitLimit( 40, 60 )
 :InitRandomizeZones( { ZONE_POLYGON:NewFromGroupName( "Pickup Location" ) } )
 :OnSpawnGroup(
   function( SpawnGroup )
     -- This will automatically add also the CargoInfantry object to the SetCargoInfantry (in the background through the event system).
[b]      -- This line below breaks the InitLimit function by, I suspect, changing the name of the group that is spawned before InitLimit can count it[/b]
     local CargoInfantry = CARGO_GROUP:New( SpawnGroup, "Infantry", SpawnGroup:GetName(), 150 )
   end
 )
 :SpawnScheduled( 2, 0.5 )
--[b]Here is my code to try and stop spawning after 10 Infantry have been spawned[/b]
local SpawnCargoInfantry = GROUP:FindByName( "Infantry" )
   SpawnCargoInfantry:HandleEvent( EVENTS.Birth )
   function SpawnCargoInfantry:OnEventBirth( EventData )
          InfantrySize = SpawnCargoInfantry:GetSize()
       if InfantrySize > 10 then
          self:SpawnScheduleStop()
   end
 end
[b]--Here is my code to try and start spawning once <10 Infantry are alive[/b]
     SpawnCargoInfantry:HandleEvent( EVENTS.Dead )
     function SpawnCargoInfantry:OnEventDead( EventData )
       self:SpawnScheduleStart()
       end

 

Neither of my additions are working. Is self:SpawnScheduleStop() and start not seeing the original SpawnScheduled(2, 0.5) to identify what to start/stop?


Edited by AbortedMan
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...