Jump to content

MOOSE - Mission Object Oriented Scripting Framework


Recommended Posts

On 12/26/2020 at 8:31 PM, Delta99 said:

 

We have hundreds of people using Moose daily and haven't heard from anyone else having issues like this. It could be something specific you are using in your mission. Try slimming down various parts of what you are using to see if you can pinpoint the issue.

Yes, I confirm it is good, because it was on the server that the program for counting statistics broke the matter.

Specialization A-10C

https://vbw304.pl/

Link to post
Share on other sites
  • 2 weeks later...
  • Replies 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

An FYI, We've been having a bit of a problem with the Moose build process recently. Glad to report Applevangelist has fixed Appveyor, it seemed that our old friend Flight Control's Appveyor account ra

Ok. I'll check it tomorrow xcom.

To add, there are more aggressive ways of dealing with those people but I find the educational ways are better and doesn't make the server a target for frustration afterwards. Arma3 used something sim

2 hours ago, Fuelburner said:

I don´t get the range script running.....can anyone provide help ?


That script is not part of Moose ... it has its own support thread here: 

 

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to post
Share on other sites

All those scripts need some time for proper start at the mission loading. Set it to have 2-3s (or even more 10s) space between Moose loading, Rage loading, Mist loading, etc.

Link to post
Share on other sites

Has anyone noticed that SET_GROUP classes with :FIlterStart() are no longer updating the set dynamically?

 

Noticed this while troubleshooting with ARTY units. The issue is not the filter scope itself because when the SET_GROUP statement is re-run manually after the other objects are present, it does pick them up. 

 

 

[sIGPIC][/sIGPIC]

Are you ready to take your chopper flying skills to the next level?

Then check out http://www.blacksharkden.com/ Or visit us on Discord https://discord.gg/kaayJ5z and talk to some of our awesome pilots today.

Link to post
Share on other sites
On 2/11/2021 at 4:44 PM, fargo007 said:

Has anyone noticed that SET_GROUP classes with :FIlterStart() are no longer updating the set dynamically?

 

Noticed this while troubleshooting with ARTY units. The issue is not the filter scope itself because when the SET_GROUP statement is re-run manually after the other objects are present, it does pick them up. 

 

 

I had a set group recently and it populated new spawns itself. So the problem would be somewhere around the name or the specifc type of object and most likely would then have an error in the log.

___________________________________________________________________________

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

Link to post
Share on other sites

Thanks,

 

There's no error, it just doesn't add new items matching the filter to the set dynamically.  But it DOES add them if they exist at the time the SET_GROUP is declared. 

 

The name and type of object are fine, as when it's run identically a second time they are added to the set. If that was the issue they would not join the set once it's run a second (and further) time.  

 

This is a situation where previously running code showed expected behavior and now doesn't - as of a couple DCS updates ago.

 

I'll pull a reproducer together tomorrow. 

[sIGPIC][/sIGPIC]

Are you ready to take your chopper flying skills to the next level?

Then check out http://www.blacksharkden.com/ Or visit us on Discord https://discord.gg/kaayJ5z and talk to some of our awesome pilots today.

Link to post
Share on other sites

Reproducer:

 

Script code:

 

env.info("DEBUG: SCRIPT BEGINS /FARGO") 

--molniyas = nil
   
    molniyas = SET_GROUP:New():FilterPrefixes("molniya"):FilterActive():FilterStart()
    molniyas:ForEachGroup(function(SpawnGroup)
    
          env.info("DEBUG: ship filter has ran!" )
          env.info("DEBUG: group alive: " .. SpawnGroup:GetName())

      end
    )
    
    
    
    tanks = SET_GROUP:New():FilterPrefixes("tank"):FilterActive():FilterStart()
    tanks:ForEachGroup(function(SpawnGroup)
    
          env.info("DEBUG: tank filter has ran!" )
          env.info("DEBUG: group alive: " .. SpawnGroup:GetName())

      end
    )

 

Triggers:

 

1. Ships activated at :30, :40, :50 seconds.

2. Tanks activated at  :35, :40, :45 seconds.

 

Observe:

 

Filter does not dynamically update for either.

 

Action: 

 

1. Use radio menu to reload/re-run the script after the units are activated.

2. entries will appear in the log that include the injected statements.

 

2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: SCRIPT BEGINS /FARGO
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya-2
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya-1
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-2
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-1
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-3

 

 

set_group_testing-1.miz

[sIGPIC][/sIGPIC]

Are you ready to take your chopper flying skills to the next level?

Then check out http://www.blacksharkden.com/ Or visit us on Discord https://discord.gg/kaayJ5z and talk to some of our awesome pilots today.

Link to post
Share on other sites

Is there a way of defining the F10 "menu slot" for Airboss? Sometimes it is F3, sometimes F4, etc depending on other modules running.  This makes Voice Attack a bit of a pain to keep straight. I'm having to keep a number of profiles for VA depending on which F slot Airboss may occupy

 

 

Link to post
Share on other sites
22 hours ago, Reccelow said:

Is there a way of defining the F10 "menu slot" for Airboss? Sometimes it is F3, sometimes F4, etc depending on other modules running.  This makes Voice Attack a bit of a pain to keep straight. I'm having to keep a number of profiles for VA depending on which F slot Airboss may occupy

I think not. Best you can do is create voice commands for F1, F2, etc.

Link to post
Share on other sites

Ok thanks, I think I've got a decent workaround by "keying" to my side number.  Once I'm in-game I check to see which slot (F2-F3-F4...) AB is at then I use the ground crew to change my side number

 

F2 use "102"

F3 use "103" and so on...

And have all voice commands duplicated for each 

 

That way instead of  saying "Comm...F10...F3...F3"

I can say "103 request marshal" and AB responds with the correct side number too.

Link to post
Share on other sites
On 2/26/2021 at 10:02 AM, Arkangel said:

Hello, I would like a CAP to start attacking enemies within a zone from a certain time after being established in the racetrack.

 

 

Routine task with Moose. Go to the Moose Discord. Download the Moose User Guide. Start reading.

Link to post
Share on other sites

HI,

I have a problem with the CAZ Capture Zone scripts. I copied everything after this video https://www.youtube.com/watch?v=R_2dkz57IAU&t=694s  but the script still doesn't work. Can you please help me here because I haven't found anything up-to-date on this topic on github?

I attached the .lua and .miz files that I created as an attachment. Can somebody help me? 😪

 

Capture_Zone_Test.miz CAZ-100_-_Capture_Zone.lua

Link to post
Share on other sites
Quote

AttackZoene = ZONE:New( "AttackZone")

 

  • Like 1

i7-7700K @ 4.9Ghz | 16Gb DDR4 @ 3200Mhz | MSI Z270 Gaming M7 | MSI GeForce GTX 1080ti Gaming X | Win 10 Home | Thrustmaster Warthog | MFG Crosswind pedals | Oculus Rift S

Link to post
Share on other sites

AIRBOSS question on the following:

function AIRBOSS:AddRecoveryWindow(starttime, stoptime, case, holdingoffset, turnintowind, speed, uturn)

-- @param #boolean turnintowind If true, carrier will turn into the wind 5 minutes before the recovery window opens.
-- @param #number speed Speed in knots during turn into wind leg.

 

I would like to be able to set the boats speed in the ME and accept whatever over-deck  I get from the dynamic wind. 

 

Under dynamic weather with high winds the boat comes to a complete stop if the resulting wind over deck is more than 30 . I've tried setting the value to 35, 40, 45, etc and it has no effect.  Also tried setting the "turnintowind" true with no speed value and get a script error....

 

Any way of getting the boat into wind without relying on the speed value? 

 

Link to post
Share on other sites
On 2/16/2021 at 3:43 PM, fargo007 said:

Reproducer:

 

Script code:

 


env.info("DEBUG: SCRIPT BEGINS /FARGO") 

--molniyas = nil
   
    molniyas = SET_GROUP:New():FilterPrefixes("molniya"):FilterActive():FilterStart()
    molniyas:ForEachGroup(function(SpawnGroup)
    
          env.info("DEBUG: ship filter has ran!" )
          env.info("DEBUG: group alive: " .. SpawnGroup:GetName())

      end
    )
    
    
    
    tanks = SET_GROUP:New():FilterPrefixes("tank"):FilterActive():FilterStart()
    tanks:ForEachGroup(function(SpawnGroup)
    
          env.info("DEBUG: tank filter has ran!" )
          env.info("DEBUG: group alive: " .. SpawnGroup:GetName())

      end
    )

 

Triggers:

 

1. Ships activated at :30, :40, :50 seconds.

2. Tanks activated at  :35, :40, :45 seconds.

 

Observe:

 

Filter does not dynamically update for either.

 

Action: 

 

1. Use radio menu to reload/re-run the script after the units are activated.

2. entries will appear in the log that include the injected statements.

 


2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: SCRIPT BEGINS /FARGO
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya-2
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: ship filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: molniya-1
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-2
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-1
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: tank filter has ran!
2021-02-16 15:36:55.947 INFO    SCRIPTING: DEBUG: group alive: tank-3

 

 

set_group_testing-1.miz 1.09 MB · 2 downloads

Hi thanks for this, i didnt notice there was a response, feel free to mention me, the forum tool works well for that. For the question, thanks for the detail. Slightly different from how I imagined it. I couldnt say what this is I need to dig in.

 

___________________________________________________________________________

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

Link to post
Share on other sites

hi @fargo007
I realised the iteration was the problem so I changed the print to log using tanks:Count() and molniyas:Count() run on a repeat and the sets updated their counts immediatley as the units appeared on screen. So I know the sets are fine, but the reporting of them is not working, maybe this is an antiflood mechanic from ED as I notice they dont like env.info spam (they aggregate these already - note messages like: 2021-03-23 11:02:24.993 WARNING LOG: 1 duplicate message(s) skipped.

 

image.png
TLDR; SET's work of course, reporting on their contents you need to do a different way.

___________________________________________________________________________

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

Link to post
Share on other sites
On 3/21/2021 at 12:32 PM, Reccelow said:

AIRBOSS question on the following:

function AIRBOSS:AddRecoveryWindow(starttime, stoptime, case, holdingoffset, turnintowind, speed, uturn)

-- @param #boolean turnintowind If true, carrier will turn into the wind 5 minutes before the recovery window opens.
-- @param #number speed Speed in knots during turn into wind leg.

 

I would like to be able to set the boats speed in the ME and accept whatever over-deck  I get from the dynamic wind. 

 

Under dynamic weather with high winds the boat comes to a complete stop if the resulting wind over deck is more than 30 . I've tried setting the value to 35, 40, 45, etc and it has no effect.  Also tried setting the "turnintowind" true with no speed value and get a script error....

 

Any way of getting the boat into wind without relying on the speed value? 

 

Hi @Reccelow
sounds like the code can't calculate what was impossible to start with!!! 🙂
I suspect the author never considered this scenario. So if I understand correctly, at a certain threshold, if the wind over deck reaches some value that would make the boat have to go backwards to keep it, the maths and stupidity involved become too much for the code and it breaks?!! 😄

So, welcome to dynamic weather.
And now say goodbye to it also because clouds are coming and with them presets.

Dynamic weather in DCS is not mature enough to handle what we need, which is a carrier to always do the right thing or to close the deck (which is not an option right?). Having played with this extensively the randomness of the situation is not worth trying to fix. Most solutions people have implemented involve using real weather mission changers at run time, dynamic is so bad that coding for it is sending good money after bad. I long ago gave up and now set wind to a parameter that will always give a known result for wind over deck.

You might try entering nil in the parameter to get whatever the default is, or log an enhancement request on Github with the author to ignore wind entirely or at least add some checks that keep the carrier at 1kt forwards no matter what the wind is.

Other than that, my advice would be to give up on dynamic weather and if you want random wind, inject that to the mission file before runtime like some mods do, with a top limit provided.

EDIT: But, since your problem is not unique to you and it needs a solution (We want random wind, but not random weather) I will log a feature request for it. Th etime for weather requests is on time or early.


Edited by Pikey
EDIT...

___________________________________________________________________________

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

Link to post
Share on other sites
7 hours ago, Pikey said:

hi @fargo007
I realised the iteration was the problem so I changed the print to log using tanks:Count() and molniyas:Count() run on a repeat and the sets updated their counts immediatley as the units appeared on screen. So I know the sets are fine, but the reporting of them is not working, maybe this is an antiflood mechanic from ED as I notice they dont like env.info spam (they aggregate these already - note messages like: 2021-03-23 11:02:24.993 WARNING LOG: 1 duplicate message(s) skipped.

 

image.png
TLDR; SET's work of course, reporting on their contents you need to do a different way.

 

 

Thanks for taking a look.  My original discovery of this was on a much more complex scenario.  I have a filterprefix on "ARTY" where new units fitting that description (e.g. M270 batteries) are to spawn, and then be included in the set where they are declared as ARTY objects.

 

I noticed that groups matching the filter that spawned after the initial :FilterStart() were not getting included as ARTYs.  I used a mark containing "arty request, everyone, ammo" to verify.

 

I will re-investigate the original condition that brought me to build the reproducer since it's still apparent.  

 

I spawned a second 270 battery, and after several minutes they are still not included in the set. Same occurs with a ship.  

 

Again, I know nothing's wrong with the filter itself, because if I either redeclare it (re-run the filter declaration or the entire script) or restart the mission with the group already active and in place, they all get included just fine. 

 

Adding also that this USED to work 100% as expected.  

 

The image here is showing that the new group, ARTY-PUNISHER#001 does not get included dynamically, but it would on either start, or re-run.

 

I do agree that the set updates in some respect - they get removed exactly as they should. I can reproduce that fine.

 

There's something else going on here. Thanks for helping me look in a more appropriate direction.

 

Set classes do appear to be fine - how the groups are spawned is something I need to look closer at. 

 

 

 

 

Screenshot_2021-03-23_12-09-51.png


Edited by fargo007

[sIGPIC][/sIGPIC]

Are you ready to take your chopper flying skills to the next level?

Then check out http://www.blacksharkden.com/ Or visit us on Discord https://discord.gg/kaayJ5z and talk to some of our awesome pilots today.

Link to post
Share on other sites

Thank you for the response, and I agree with your points about the dynamic weather.  I'm OK with it, I dont expect "activeSky" type injections, and its fine for what it does. I use it in conjunction with DSMC "semi-dynamic" campaign creation with random weather. 

 

To be clear what I'm looking for is to have Airboss turn the carrier into wind for the recovery window and disregard the speed value.  Perhaps something like :

 

function AIRBOSS:AddRecoveryWindow(starttime, stoptime, case, holdingoffset, turnintowind, speed(true/false, ((if true then nn knts)) ), uturn)  

 

As is evident, my coding skills are limited to cut and paste.....

Link to post
Share on other sites
On 3/23/2021 at 5:15 PM, fargo007 said:

 

 

Thanks for taking a look.  My original discovery of this was on a much more complex scenario.  I have a filterprefix on "ARTY" where new units fitting that description (e.g. M270 batteries) are to spawn, and then be included in the set where they are declared as ARTY objects.

 

I noticed that groups matching the filter that spawned after the initial :FilterStart() were not getting included as ARTYs.  I used a mark containing "arty request, everyone, ammo" to verify.

 

I will re-investigate the original condition that brought me to build the reproducer since it's still apparent.  

 

I spawned a second 270 battery, and after several minutes they are still not included in the set. Same occurs with a ship.  

 

Again, I know nothing's wrong with the filter itself, because if I either redeclare it (re-run the filter declaration or the entire script) or restart the mission with the group already active and in place, they all get included just fine. 

 

Adding also that this USED to work 100% as expected.  

 

The image here is showing that the new group, ARTY-PUNISHER#001 does not get included dynamically, but it would on either start, or re-run.

 

I do agree that the set updates in some respect - they get removed exactly as they should. I can reproduce that fine.

 

There's something else going on here. Thanks for helping me look in a more appropriate direction.

 

Set classes do appear to be fine - how the groups are spawned is something I need to look closer at. 

 

 

 

 

Screenshot_2021-03-23_12-09-51.png

 

SETS are working fine. I took your sample and it worked. What didnt work was the env.info writing to the logs, dont get the assumption that if there was nothing then it didnt run, confused with the set not working, you can clearly see the objects. Try using Flush() or printing the entire set object out to the logs and you will see.

On 3/24/2021 at 1:33 PM, Reccelow said:

Thank you for the response, and I agree with your points about the dynamic weather.  I'm OK with it, I dont expect "activeSky" type injections, and its fine for what it does. I use it in conjunction with DSMC "semi-dynamic" campaign creation with random weather. 

 

To be clear what I'm looking for is to have Airboss turn the carrier into wind for the recovery window and disregard the speed value.  Perhaps something like :

 

function AIRBOSS:AddRecoveryWindow(starttime, stoptime, case, holdingoffset, turnintowind, speed(true/false, ((if true then nn knts)) ), uturn)  

 

As is evident, my coding skills are limited to cut and paste.....

Yes, I know what you are asking for. It should work fine as it is, so I believe its a bug. You need to reprot that onto GH to get it fixed by the module author.

___________________________________________________________________________

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

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...