Amarok_73 Posted April 7 Posted April 7 3 hours ago, MissionCMDR said: DESIGNATE can prioritize targets and is a Finite State Machine. This is how you set it: Designate:SetThreatLevelPrioritization ( true ) It’s entirely plausible, for Moose, nurtured by Applevangelist, Wingthor, and their esteemed companions - pardon me for grouping them together rather than listing each one individually - is a creature that evolves with remarkable swiftness. I must admit, it’s been many months since I last explored this fascinating DESIGNATE Class, so I might be outdated a bit indeed. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
ward8124 Posted June 1 Posted June 1 Hi gang, having an issue with a mission I'm trying to script moose parameters for. I'm extremely new to this so bare with me. Desired objective: I want to enable/disable trigger zones used for "DROP" and "LOAD" e.g. a pickup zone for troops (LOAD) won't be active unless a trigger has a true flag value. What I've done: I've used my_ctld:AddCTLDZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD,SMOKECOLOR.White,true,true) to get the moose to configure the LOAD zone and it works for testing. I've then disabled it in the same lua file using my_ctld:DeactivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) Created a trigger so that a condition i.e. group dead leads to flag on (intended to tell player to go to pickup zone and get more troops) and also to DO SCRIPT with the following entry my_ctld:ActivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) this is meant to re-activate the zone i previously de-activated at mission start. RESULT CTLD option does not show any active pickup/load zones in f10 options. I've tried creating a separate lua script to re-create the zone but this hasn't worked either. Question What am I doing wrong? Is there an easier way in moose ctld OPs to activate/deactivate pickup/drop off zones? Is the DO SCRIPT syntax correct or am I missing anything? If I created another lua with the my_ctld:AddCTLDZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD,SMOKECOLOR.White,true,true) and ran it when the triggerr fired why won't this reactivate the zone in moose ctld? I did also try my_ctld:ActivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) but same result. EVGA GTX1080TISC2 Black Hybrid Cooler, Asus Strix X399, Water cooled ThreadRipper 1920X, Dominator 32GB 3200Mhz,NVME Samsung 250/500GB SSDs, Corsair Air 740 case, Acer Predator 34' Gsync curved display + 3x Alienware 23inch 120hz monitors. TM HOTAS, RAZER - Tiamat,Blackwidow, Mamba, Tartarus and Oculus Rift CV1/DK2 + TrackIR5, MFG crosswinds Oh and a very understanding wife.
Wingthor Posted June 2 Posted June 2 Not easy to grasp your issue based on the info you gave in your post. 20 hours ago, ward8124 said: Hi gang, having an issue with a mission I'm trying to script moose parameters for. I'm extremely new to this so bare with me. Desired objective: I want to enable/disable trigger zones used for "DROP" and "LOAD" e.g. a pickup zone for troops (LOAD) won't be active unless a trigger has a true flag value. What I've done: I've used my_ctld:AddCTLDZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD,SMOKECOLOR.White,true,true) to get the moose to configure the LOAD zone and it works for testing. I've then disabled it in the same lua file using my_ctld:DeactivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) Created a trigger so that a condition i.e. group dead leads to flag on (intended to tell player to go to pickup zone and get more troops) and also to DO SCRIPT with the following entry my_ctld:ActivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) this is meant to re-activate the zone i previously de-activated at mission start. RESULT CTLD option does not show any active pickup/load zones in f10 options. I've tried creating a separate lua script to re-create the zone but this hasn't worked either. Question What am I doing wrong? Is there an easier way in moose ctld OPs to activate/deactivate pickup/drop off zones? Is the DO SCRIPT syntax correct or am I missing anything? If I created another lua with the my_ctld:AddCTLDZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD,SMOKECOLOR.White,true,true) and ran it when the triggerr fired why won't this reactivate the zone in moose ctld? I did also try my_ctld:ActivateZone("DELTA PICK UP",CTLD.CargoZoneType.LOAD) but same result. It might be you have a script lifecycle issue... Initially I will advice you to read the documentation for the class. You can find it here and also you will find documentation more about Moose in general following this link. You can download test missions from this link... https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Ops/CTLD https://github.com/FlightControl-Master/MOOSE_GUIDES I guess it would be easier for me if you pasted your script into this forum or even better join the Moose discord community... https://discord.com/invite/gj68fm969S Hope this will bring you forward. Regards Moose framework contributor Moose scripting an DCS mission developer
ward8124 Posted June 3 Posted June 3 Thanks Wingthor - took the advice and went to Discord and got some pointers and after a lot of trial and error have got a working solution. Turns out "local my_ctld" at the start of my script taken from a donor mission wasn't a good start point as well as a parameter in the DO SCRIPT not being Global. All of this is new to me but will keep at it. EVGA GTX1080TISC2 Black Hybrid Cooler, Asus Strix X399, Water cooled ThreadRipper 1920X, Dominator 32GB 3200Mhz,NVME Samsung 250/500GB SSDs, Corsair Air 740 case, Acer Predator 34' Gsync curved display + 3x Alienware 23inch 120hz monitors. TM HOTAS, RAZER - Tiamat,Blackwidow, Mamba, Tartarus and Oculus Rift CV1/DK2 + TrackIR5, MFG crosswinds Oh and a very understanding wife.
CidTheViking Posted June 7 Posted June 7 Hello, I’m currently doing some research to better understand the differences between using MOOSE and programming directly with the DCS API. While I'm not a programmer myself, I've noticed that some of our developers prefer to work directly with the API rather than using MOOSE, and I'm simply trying to get a clearer picture of whether that approach is ultimately worth the additional effort. From what I can see, it seems like they might be recreating a lot of functionality that MOOSE already provides. With that in mind, I have a few questions: How much overhead does MOOSE introduce? Are there things MOOSE enables that can’t be done with the base DCS API, or vice versa? I'm genuinely curious and would really appreciate any insights that could help me better understand the trade-offs. Thank you!
Wingthor Posted June 7 Posted June 7 Hello CidTheViking, Great question! MOOSE (Mission Object Oriented Scripting Environment) is built on DCS Lua to facilitate object-oriented scripting in DCS World. Some developers prefer working directly with the DCS API, but MOOSE provides an abstraction layer that simplifies complex scripting tasks. What is MOOSE? You can think of MOOSE as a large library that contains numerous convenient functions, making it significantly easier to write scripts for DCS World. Essentially, it allows you to create very complex missions with just a few lines of code. The object-oriented approach provides several benefits, including: Reuse of code through inheritance Flexibility through polymorphism Modularity for easier troubleshooting Overhead & Differences Overhead: MOOSE introduces some overhead due to its abstraction layers, but it greatly reduces the amount of manual coding required. Performance impact depends on how efficiently MOOSE is implemented within a mission. Differences & Capabilities: MOOSE offers structured tools for AI behavior, mission automation, and dynamic campaign elements, streamlining mission scripting. The DCS API, however, grants direct access to the core game functions, allowing for deeper customization at the cost of more effort. Importantly, MOOSE and the DCS API can be used together—developers don’t necessarily have to choose one over the other. Since MOOSE is built on DCS Lua, scripts can integrate elements from both, taking advantage of MOOSE’s simplicity while still utilizing direct API programming for specialized tasks. Community MOOSE also has an active community on Discord, where developers can discuss scripting strategies, troubleshoot issues, and collaborate on projects: Join the MOOSE Discord Community Would love to hear insights from experienced developers on this! Moose framework contributor Moose scripting an DCS mission developer
Wazoo Posted July 1 Posted July 1 Hello, Trying to learn MOOSE and scripting in DCS. Question: Is it a requirement to physically create a unit and group inside the ME, Late Activate it, and then use the myriad of SPAWN options in MOOSE.... or can I forgo the ME Map entirely and create a group and issue SPAWN's exclusively within a script? i7-7700k eVGA 1080 Ti Win 10 Pro Samsung Odyssey WMR Warthog HOTAS
Amarok_73 Posted July 1 Posted July 1 3 hours ago, Wazoo said: or can I forgo the ME Map entirely and create a group and issue SPAWN's exclusively within a script? Hi, You can define group entirely with Lua. This is what does Enchanced Gamemaster Script where You can find the Gamemaster_Templates.lua file, which contains plenty of templates definitions. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Wingthor Posted July 1 Posted July 1 5 hours ago, Wazoo said: Hello, Trying to learn MOOSE and scripting in DCS. Question: Is it a requirement to physically create a unit and group inside the ME, Late Activate it, and then use the myriad of SPAWN options in MOOSE.... or can I forgo the ME Map entirely and create a group and issue SPAWN's exclusively within a script? Hi, In Moose, groups from Mission Editior (ME) are templates. You don't need a ME template for every spawn, you can use same template as many times you like. However watch out so when spawning that you don't overwrite an already spawn group. Consider SpawnWithAlias... https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Spawn.html Also feel free to join the Moose Discord community https://discord.gg/gj68fm969S Good luck with Moose scripting. Moose framework contributor Moose scripting an DCS mission developer
Recommended Posts