Delta99 Posted January 6, 2019 Posted January 6, 2019 @corvinus I have very good news and pretty bad news. :doh: The good news is that, after 3 hours of insanity and despair, I figured it out (I think). The bad news is that the MOOSE documentation and Moose.lua will probably need to be corrected. Hardcard, great work here. Can you enter this as an issue on the Moose Github. Hopefully someone will correct it sooner rather than later. Reference this forum post as well. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Hardcard Posted January 6, 2019 Posted January 6, 2019 Hi Delta! Funkyfranky told me that he was going to note my findings in the MOOSE development branch. But sure, I can also create a new issue on the MOOSE Github, just in case :thumbup: [sIGPIC][/sIGPIC]
Silvern Posted January 7, 2019 Posted January 7, 2019 The attached MOOSE demo mission (+ script) does what you asked... although it uses quite a few more lines of code :D Thanks, this will help! :)
marginal Posted January 8, 2019 Posted January 8, 2019 DUAL CAP script I like the "CAP-011 - CAP and Engage within Zone.lua" script on the MOOSE github. I'm trying to adapt it into a script where I can launch a CAP flight "CHEVY" then after a period of time launch another CAP flight "DODGE" I've used the above script and demo mission as a guide but the CAP flights don't respect the engage zone and shoot at any enemies. I'm not all too sure if they are patrolling the complete zone, they seem to be orbiting. Any suggestions on how to fix this welcome.DUAL CAP.mizDUAL CAP.lua
Hardcard Posted January 8, 2019 Posted January 8, 2019 @marginal I haven't tested anything yet, but after opening your mission script, I noticed that there's a "Z" at the end of line 24 (typo, I'm assuming). It generates the following DCS scripting error: :26: '=' expected near 'CapEngageZone' [sIGPIC][/sIGPIC]
marginal Posted January 8, 2019 Posted January 8, 2019 Thanks Hardcard, I'll rerun the mission tonight and see what happens. One other question: AICapZone = AI_CAP_ZONE:New( PatrolZone, 1000, 2000, 500, 600 ) I want to confirm the constraints on this line are upper and lower altitude in meters, upper and lower speed in km/h? Cheers, M
Delta99 Posted January 8, 2019 Posted January 8, 2019 Almost everything in DCS scripting is specified in meters and km/h so that is a good guess. Otherwise you can reference the docs. Also, always monitor your dcs.log file for errors. Thanks Hardcard, I'll rerun the mission tonight and see what happens. One other question: AICapZone = AI_CAP_ZONE:New( PatrolZone, 1000, 2000, 500, 600 ) I want to confirm the constraints on this line are upper and lower altitude in meters, upper and lower speed in km/h? Cheers, M My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
ECV56_Polten Posted January 10, 2019 Posted January 10, 2019 (edited) Thanks Hardcard, I'll rerun the mission tonight and see what happens. One other question: AICapZone = AI_CAP_ZONE:New( PatrolZone, 1000, 2000, 500, 600 ) I want to confirm the constraints on this line are upper and lower altitude in meters, upper and lower speed in km/h? Cheers, M That's correct, lower/upper alt, slower/faster airspeed. Both cases in metric system. Edited January 10, 2019 by ECV56_Polten Typo Intel i5-7600K @3,80 (4,9 OC) + Corsair Vengeance 16GB DDR4@3200 XMP 2.0 + Cooler Master Hyper 212 LED + Asus MAXIMUS IX HERO + Thermaltake Chaser A31 Snow Edition Geforce RTX 2060 6GB SSD Samsung 850 EVO 500GB + HDD WDC WD500 500GB Saitek X-52 Pro & Thrustmaster T.Flight Rudder Pedals & TrackIR 5 & Kingston HyperX Alloy FPS Oh, yeah, also the Sony PlayStation 4 :happy:
BoneDust Posted January 10, 2019 Posted January 10, 2019 Does anyone have a successful script to have tankers respawn on a server. I have a script someone wrote but it doesn't work, and I've wrote one myself still doesn't work. 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 | Pimax Crystal VR
Iceviper Posted January 10, 2019 Posted January 10, 2019 (edited) Master Moose issue and the development environment? Guys, I'm having an issue. I've not used Moose in a long time but decided to go back and take a look at it today. I downloaded the master from https://github.com/FlightControl-Master/MOOSE (after a little digging for it). It says version 2.4.14. So I presume its the most up to date version. I've followed the to the letter to set up my Lua environment again and to get intellisense working. There are comments to the video regarding errors being received. Error [string 'C:\Users\xxx\AppData\Local\Temp\/DCS~mis000000920']:4: attempt to index 'EVENT' (a nil value) slack traceback: [C]: ? [string 'C:\users\xxx\AppData\Local\Temp\DCS\/~mis000000920']:4: in main chunk I also get that error when trying to load the Moose.lua, which incidentally is now in a different location to the video C:\MOOSE-master\Moose Development\Moose, which is different to the video, however. In the comments, someone helpfully instructs us to use the correct Lua and points to download file. I've done this and instead of placing it in the development folder I've placed it in C:\MOOSE-master and loaded that into my mission it's working brilliantly. My questions are this though. 1. Is there an issue with the original Lua or is to something to do with the file structure? 2. What happens to future updates? Will I just download the lua file and overwrite the one I was supplied by the helpful youtube guy. 3. Is this having any effect on my development environment as I won't be using the same lua as the moose master. If I overwrite the moose file in the development folder with the 2.4.1 version won't it be an old version. Everything seems to be working fine but will I be using the correct version? If I use the one in the development folder I always get the above error. 4. Are the issues being caused because I'm a noob? Have I done something wrong in the installation? bearing in mind I have used this before with success so am not totally green. I also went back over all the setup videos and guides and followed them to what I thought was the letter. Sorry but I'm a noob with this so please go steady with the replies lol. Just as a side note there are a few links in the documentation website that need to be updated to point to the correct files. eg. The documentation here supplies a link for the latest version of moose but it takes me to the moose patch files on GitHub. It looks as if the moose master file has the latest version rather than the patch files nor is it clear how to get from the patch files to the moose release for a GitHub noob like me. Perhaps the website start-up guide would be better pointing to the master repository and a version number could be included there in the guide as well so that we can ensure we are getting the correct version from GitHub. I appreciate this all takes time but I think a few people may be put off from using what is really a fantastic system for the sake of the instructions? Apologies for the length of the post Edited January 10, 2019 by ICEVIPER spelling and to update q.3
Hardcard Posted January 10, 2019 Posted January 10, 2019 (edited) @ICEVIPER 1- There are two different types of Moose.lua as far as I know: "source version" and "include version". If you try to load the "source version" in your missions, it'll generate the error you mentioned. The "source version" is the one included in the source code zip file for each MOOSE release, btw. Always use the "source version" to set up LDT, the "include version" is the one you need to use in your missions. 2- Every time a new MOOSE release comes around, I do the following: - I go to the MOOSE release section on Github - I look for the latest release (first on the list) - I download both the source code zip file and Moose.lua (which is the include version for that release) - The source code zip file contains all that I need to set up LDT (including the source Moose.lua file, which mustn't be used in missions) - I use the Moose.lua include version for that release in my missions (ie. the Moose.lua file that I downloaded separately from the release section) 3- I'm not sure I understand what you mean :huh: Are you talking about setting up LDT using the latest MOOSE release as source? Simply repeat the steps you followed the first time you set it up, but with the new build. 4- What issues are those exactly? The error you mentioned? As I said, that happens when the "source version" Moose.lua is used instead of the "include version". The docs page that you mentioned provides a link to the MOOSE release section, which is where you'll find the latest releases (forget about the "patch" bit, consider them full releases). Edited January 11, 2019 by Hardcard [sIGPIC][/sIGPIC]
Iceviper Posted January 11, 2019 Posted January 11, 2019 (edited) @Hardcard Thanks so much for taking the time to reply. You make things much clearer. I'll take another look. I think I need to spend more time looking at GitHub. Things do look slightly different in the setup videos though and I'm not the only one who was caught out. I'll set things up again to ensure I'm using the correct versions. By issue I only meant that error.No others Thanks again. Cheers Edited January 11, 2019 by ICEVIPER Spelling
Delta99 Posted January 11, 2019 Posted January 11, 2019 I would suggest to start here: https://flightcontrol-master.github.io/MOOSE_DOCS/ I believe the structure of GitHub / releases has changed since the videos were produced. FlightControl would have to say for sure. I don't have time to go back and take a look. But that is probably why there is a disconnect. The above link will have the info for the way things are currently setup. There are also a couple of different ways you can use / setup your environment and Moose depending on what exactly you are interested in doing. Whether you want to setup the LDT, use the release or development versions etc etc. If you haven't already, join the Discord as there are usually people online there that will give you hand as well. And thanks to Hardcard for helping out @Hardcard Thanks so much for taking the time to reply. You make things much clearer. I'll take another look. I think I need to spend more time looking at GitHub. Things do look slightly different in the setup videos though and I'm not the only one who was caught out. I'll set things up again to ensure I'm using the correct versions. By issue I only meant that error.No others Thanks again. Cheers My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Iceviper Posted January 11, 2019 Posted January 11, 2019 Yeah it's the GitHub that threw me as I had no issues the last time I used it. I realise there's not enough hours in the day for developers to update videos and code as well. I'll take your recommendation and join the discord channel. Thanks for the reply.
Delta99 Posted January 11, 2019 Posted January 11, 2019 Yeah it's the GitHub that threw me as I had no issues the last time I used it. I realise there's not enough hours in the day for developers to update videos and code as well. I'll take your recommendation and join the discord channel. Thanks for the reply. Yeah, depends how long ago you used it. Things have changed in the structure and the repositories have been broken into separate repositories. So not everything is in one place anymore. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
marginal Posted January 12, 2019 Posted January 12, 2019 Dual CAP script This script works. I think part of the problem with my previous attempt was the type of redfor aircraft which flew in the area outside the engage zone were detecting the bluefor CAP coming up and setting up for attack by flying into the engage zone irregardless the track they were supposed to fly. In this demo mission 2 enemy aircraft remain clear of the engage zone and 2 enter the zone. The two which enter are shot down, the two which remain clear are not shot down. 2 CAP aircraft groups will fly via this script. DODGE and CHEVY will launch depending on the triggers you've built in the mission editor. They won't engage aircraft that have not flown into the engage zone. Once the enemy aircraft have flown into the engage zone they will pursue and attack. I'm planning on using this script to launch a CAP at mission start, then launch a second CAP later in the mission using whatever trigger is necessary. I want to create more of a "big battle" environment by setting up similar scripts for SEAD and CAS aircraft as well as ground units.DUAL CAP.luaDUAL CAP.miz
Hardcard Posted January 12, 2019 Posted January 12, 2019 The script you posted contains some interesting tricks, thanks for sharing! :thumbup: Well-intentioned remark: zone irregardless the track they were supposed to fly. Irrespective = Not respective Regardless = Without regard Irrespective + Regardless = Irregardless (Double negative!) Negative + negative = affirmative --> not + without = with So... Irregardless = not + without + respect/regard = WITH respect/regard You can try mixing other synonyms of the same type in order to see the problem more clearly. For instance: - Irresponsible + Reckless = Irreckless? Irreckless = not + without + responsibility/reck (aka care) = WITH responsibility/reck (aka care) - Unkind + Heartless = Unheartless? Unheartless = not + without + kindness/heart = WITH kindness/heart -Unabashed + Shameless = Unshameless? Unshameless = not + without + abashment/shame = WITH abashment/shame -Unrepentant + Remorseless = Unremorseless? Unremorseless = not + without + repentance/remorse = WITH repentance/remorse etc. Like scripting languages, actual languages are also governed by logic (for the most part :D) [sIGPIC][/sIGPIC]
Habu_69 Posted January 12, 2019 Posted January 12, 2019 Re DUAL CAP.lua: is it necessary to repeat the PatrolZone = ZONE:New() and EngageZoneGroup instantiations? If so, why?
Delta99 Posted January 12, 2019 Posted January 12, 2019 (edited) Re DUAL CAP.lua: is it necessary to repeat the PatrolZone = ZONE:New() and EngageZoneGroup instantiations? If so, why? No. Although an issue I see with this script is that the second AICapZone is definitely going to step on the 1st AICapZone. In other words it will be extremely lucky if CAP 1 will actually work properly. They might start out looking like it but at some point will likely break down. Those global variables should be different. Also just notice CapPlane also clashes. This is ripe for breaking for certain. I am surprised if it works really. And it might seem to work for the initial stage but for any longer than that unlikely. It would be fine to write the Patrol zone stuff once as I mentioned above. It is similar for both so no need to redefine it. Just wasting CPU cycles and redefining variables to be the exact same thing. One further thing. The RTB and fuel settings that are part of AICAPZONE will likely override what you set in the editor. So I would test those as well. You can set both with methods on AICapZone. Edited January 12, 2019 by Delta99 My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Habu_69 Posted January 12, 2019 Posted January 12, 2019 Hopefully marginal takes these comments as constructive criticism. I am not sure what he means by the comment "SET UNCONTROLLED" in the script file. Perhaps he means LATE ACTIVATION. The script comments also state: "In trigger menu: add "perform command - start"", which I do not understand. I usually hesistate to comment on someone else's work, as I am certainly no expert. Yesterday I spent about 4 hours testing to determine why this code would not destroy MiG group: BanditGrp21:Spawn() BanditGrp21:Destroy() Finally discovered I needed a container: TestBandit = BanditGrp21:Spawn() TestBandit:Destroy() :doh:
Delta99 Posted January 12, 2019 Posted January 12, 2019 Hopefully marginal takes these comments as constructive criticism. Agreed, that is how they are intended. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
marginal Posted January 13, 2019 Posted January 13, 2019 Hopefully marginal takes these comments as constructive criticism. I am not sure what he means by the comment "SET UNCONTROLLED" in the script file. Perhaps he means LATE ACTIVATION. The script comments also state: "In trigger menu: add "perform command - start"", which I do not understand. Nope, I mean "set uncontrolled" and "perform command - start". This is how I get the AI aircraft to spawn on mission start but do nothing until a "start" is triggered in mission editor usually by a time(more) but several methods to trigger the start could be used. I found that these two settings will allow me to do that. I'm certainly no expert at lua coding, I'm modifying demo missions for my own use then running them thru ME. The RTB and fuel settings that are part of AICAPZONE will likely override what you set in the editor. So I would test those as well. You can set both with methods on AICapZone. I'd like to build RTB and fuel settings into the lua script and move away from having to do it in ME. Also build a time(more) delay into the lua. Can you show me how? Thanks, M
Delta99 Posted January 14, 2019 Posted January 14, 2019 Nope, I mean "set uncontrolled" and "perform command - start". This is how I get the AI aircraft to spawn on mission start but do nothing until a "start" is triggered in mission editor usually by a time(more) but several methods to trigger the start could be used. I found that these two settings will allow me to do that. I'm certainly no expert at lua coding, I'm modifying demo missions for my own use then running them thru ME. I'd like to build RTB and fuel settings into the lua script and move away from having to do it in ME. Also build a time(more) delay into the lua. Can you show me how? Thanks, M There are many different ways to spawn based on logic or timing etc so it really depends on what you are really trying to accomplish. Using "set uncontrolled" and "perform command start" are likely going to mess with Moose as well. I wouldn't mix the two. But I could be wrong on that. I would look at https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Core.Spawn.html specifically the section on delaying the initial spawn. Might be useful to you. Look here for managing fuel threshold: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_Cap.html##(AI_CAP_ZONE).ManageFuel My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Tiramisu Posted January 18, 2019 Posted January 18, 2019 Is the newly announced dynamical campaigns system going to incorporate MOOSE? Or is ED going to develop something totally different?
Chicki Posted January 22, 2019 Posted January 22, 2019 Hi guys. Does none of this stuff work in 1.5.8 anymore? I'm just trying to setup a simple CAP. They just fly to the WP and then RTB. Even in the test mission. Just wondering.
Recommended Posts