reece146 Posted August 30, 2020 Share Posted August 30, 2020 Attached are the logs and missions for two TF51s sitting in parking at Kutaisi with an AM2 FARP. The one that works as expected has the FARP quite a distance away. The one that does not work has the FARP at the "elbow" of the parking area - something like 80m away from the aircraft. The one that works... well works. The one that does not work makes SWAPR not work effectively. You can still choose/use the slots but you can't see the other aircraft when in the cockpit and from the spectators view you can't see either plane. I took a look at the log files - nothing really interesting in there but I don't know what I'm looking for so... Here's the link to the mod so you don't have to go hunting for it: https://forums.eagle.ru/showpost.php?p=4328283&postcount=8 Let me know if there is anything else you need/want. Thanks!swapr_farp_issue_demo_works.mizswapr_farp_issue_demo_no_swapr.mizdcs_swapr_farp_issue_demo_works.logdcsswapr_farp_issue_demo_no_swapr.log Link to comment Share on other sites More sharing options...
mboddicker Posted September 12, 2020 Share Posted September 12, 2020 I was trying to implement SWAPR in a new mission and ran into the following error: Mission script error: [string "Scripts/Moose/Wrapper/Airbase.lua"]:515: attempt to index local 'DCSAirbase' (a nil value) Since this was coming from Moose, I loaded the sample mission that comes in the SWAPR_1_3 download. After testing it without any mods SWAPR worked correctly. I updated Moose within the test mission to the latest version in the Release branch. This caused the same error as I was seeing in my mission. After more troubleshooting, I found a fix. Needed to modify lines 320, 322 and 324 in the SWAPR_1_3.lua, changing "GetClosestAirbase(Airbase.Category.AIRDROME)" to "GetClosestAirbase2(Airbase.Category.AIRDROME)". This change allowed SWAPR to work again for me. Something must have changed in the latest updates to Moose. 1 Link to comment Share on other sites More sharing options...
gavagai Posted September 12, 2020 Share Posted September 12, 2020 Very simple test mission. Single player. Set to AI, and I know it's working because the aircraft starts with a pilot in the cockpit (when static the cockpit is empty). AI spawns and sits there forever isntead of taking off. mission and dcs.log included.SWAPR test.zip P-51D | Fw 190D-9 | Bf 109K-4 | Spitfire Mk IX | P-47D | WW2 assets pack | F-86 | Mig-15 | Mig-21 | Mirage 2000C | A-10C II | F-5E | F-16 | F/A-18 | Ka-50 | Combined Arms | FC3 | Nevada | Normandy | Straight of Hormuz | Syria Link to comment Share on other sites More sharing options...
pacastro Posted September 13, 2020 Share Posted September 13, 2020 (edited) Very simple test mission. Single player. Set to AI, and I know it's working because the aircraft starts with a pilot in the cockpit (when static the cockpit is empty). AI spawns and sits there forever isntead of taking off. mission and dcs.log included. They are supposed to sit there forever until that spot is used by a client, then the client spawns and takes control. What Swapr does is place planes in the spots (client slots) you define, in order to populate airfields with planes in the parking spots. They don't move. The AI setting lets the model "inherit" loadouts and settings like "hidden". If you want them to take off and perform tasks, you have to set them as AI with specific task in ME... but then they are no longer client spots. Or use MOOSE AI_Balancer module (https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_Balancer.html), I haven't used this module but it is supposed to use free client spots for AI that performs tasks (move), not sure if it works on single player though. Edited September 13, 2020 by pacastro Link to comment Share on other sites More sharing options...
Fankmaster Posted November 2, 2020 Share Posted November 2, 2020 How to limit client aircraft spawn? Sorry for my English, I use a translator... Link to comment Share on other sites More sharing options...
Azza276 Posted December 24, 2020 Share Posted December 24, 2020 Hi, Got pointed to this script from the MOOSE Discord, and it is great for what I need. Thanks. I do have a question though. When I spawn into a Client slot on a multi-client group, the AI "Wingman" disappears. e.g. the Client taking the slot prevents any AI in the group. Am I missing something or is that the intended function? If it is the intended function, may I feature request to have AI "Wingman" remain in the group. Thanks. Azza. Link to comment Share on other sites More sharing options...
Hardcard Posted January 5, 2021 Author Share Posted January 5, 2021 @mboddicker Nice detective work there. Yes, you're probably correct, I haven't updated SWAPR to be compatible with the latest MOOSE builds yet. I might do it one of these days, when I feel like torturing myself some more @gavagai What @pacastro said. @Fankmaster By not using the prefix/suffix of clients you don't want SWAPR to replace. @Azza276 I'd avoid multi-client groups, stick to one client per group only. As for AI wingmen within client groups, I seem to remember that SWAPR automatically removes AI replacements for the specific client spawned (and respawns them if needed). I'll look into it when I decide to update SWAPR (if I feel like torturing myself again, like I said), but don't hold your breath. @All Sorry for the late replies, I'm not as interested in scripting/DCS as I used to be, so I barely check the forum these days. Happy new year, btw. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Nox K. Posted March 24, 2021 Share Posted March 24, 2021 Hey there. Just set up my mission with your script and I love it. Airports feel so alive! Any news for updates to be compatible with the latest MOOSE builds? Cause I use some new functions from the latest Moose=) Thanks! Link to comment Share on other sites More sharing options...
Nox K. Posted March 24, 2021 Share Posted March 24, 2021 (edited) On 9/12/2020 at 11:35 PM, mboddicker said: After more troubleshooting, I found a fix. Needed to modify lines 320, 322 and 324 in the SWAPR_1_3.lua, changing "GetClosestAirbase(Airbase.Category.AIRDROME)" to "GetClosestAirbase2(Airbase.Category.AIRDROME)". This change allowed SWAPR to work again for me. Something must have changed in the latest updates to Moose. Oh basically this fix is working with the new dev build of MOOSE Thanks! Edited March 24, 2021 by Nox K. Link to comment Share on other sites More sharing options...
Poulet67 Posted April 15, 2021 Share Posted April 15, 2021 Curious if this still works now with the added "start from ground" options for player aircraft? Link to comment Share on other sites More sharing options...
reece146 Posted April 16, 2021 Share Posted April 16, 2021 SWAPR works fine with 2.7 - if anyone was wondering. My SWAPR enabled missions work the same as before in 2.7. 1 Link to comment Share on other sites More sharing options...
Hardcard Posted April 19, 2021 Author Share Posted April 19, 2021 (edited) @Poulet67 Tbh, when I saw the new "start from ground" feature in the 2.7 changelog, my first thought was... I haven't tested it yet, since I'm experiencing unrelated problems with 2.7, I hope that what @reece146 said is true in most cases. Edited April 19, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
reece146 Posted April 19, 2021 Share Posted April 19, 2021 FWIW, I've had the Suntsag 'start from ground' adjustment of the lua all along without issue - expect that whatever ED changed with 2.7 is similar/same. I haven't gone digging for confirmation. Link to comment Share on other sites More sharing options...
Mav87th Posted April 30, 2021 Share Posted April 30, 2021 Problems getting it to work in 2.7 Attached is the mission i made to test it, and the two different MOOSE lua's i tried to use and the Swapr lua i have used. Best regards Mav Mission and Logs.zip Link to comment Share on other sites More sharing options...
Hardcard Posted May 1, 2021 Author Share Posted May 1, 2021 (edited) @Mav87th Thanks, I'll take a look. You didn't include your dcs.log in the zip file, please provide it as well. It's located in C:\Users\YourUserName\Saved Games\DCS.openbeta\Logs EDIT: In any case, I think I've found the problems in your mission: 1- "Game_Mode" option is set to "MP" instead of "SP". If you want to use SWAPR in a single player environment, this option must be set to "SP" 2- You (or somebody) changed the line _SETTINGS:SetPlayerMenuOff() (correct syntax) to _SETTINGS:SetPlayerMenuOFF() (incorrect syntax) This change generated a scripting error that prevented SWAPR from running. I'll need to update SWAPR anyway, since the MOOSE team changed the method used to find airbases, which SWAPR relies on. Edited May 1, 2021 by Hardcard 1 [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Hardcard Posted May 4, 2021 Author Share Posted May 4, 2021 (edited) @Anyone Interested After days of tweaking and testing, SWAPR 1.4 is finally out! Main post updated with new videos and links (old videos and links removed) 04-05-2021 SWAPR 1.4 released! Updated for DCS 2.7 Updated for MOOSE 2.7.1 Reintroduced replacement offsets for clients without parking spot Other minor changes Edited May 4, 2021 by Hardcard 3 [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 4, 2021 Share Posted May 4, 2021 I'm glad to see that you have continously improved and updated this Script, I'm no longer editing MP missions, but I enjoyed using your script back when I was still doing MP ... nowadays I enjoy DCS more when flying by myself .. maybe an age thing 1 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 3600X - 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 comment Share on other sites More sharing options...
Mav87th Posted May 8, 2021 Share Posted May 8, 2021 On 5/4/2021 at 11:16 PM, Hardcard said: @Anyone Interested After days of tweaking and testing, SWAPR 1.4 is finally out! Main post updated with new videos and links (old videos and links removed) 04-05-2021 SWAPR 1.4 released! Updated for DCS 2.7 Updated for MOOSE 2.7.1 Reintroduced replacement offsets for clients without parking spot Other minor changes It was driving me nuts that i could not get it to work with my simple mission with 4 jets in a flight. Everything was like in your demo mission. I even went and added my four jets in your mission to see if that helped, but it did not. Only the one i spawned in were spawned.... That's when it hit me......my aircrafts are in a flight... Apparently it does not work if you have say 2 planes in the same flight (like 2 of 2) only if you place the two planes as two single flights. Lesson learned best regards Mav Link to comment Share on other sites More sharing options...
Hardcard Posted May 9, 2021 Author Share Posted May 9, 2021 (edited) @Mav87th The mission file you included in "Mission and Logs" zip was using a modified SWAPR script with invalid syntax in line 19, that's why it didn't work, like I explained. After correcting that line, I set "Game_Mode" to "SP" and tested in a single player environment, seemed to work fine, even with 4 clients in the same group (which I don't recommend). I tested the same mission with SWAPR 1.4 and noticed some weird behavior: 1- First client in the group eventually gets replaced by an AI with the engines running. Also, when jumping back to that slot, the client starts hot, even though it's set to cold start in ME. This is probably a DCS issue, since SWAPR doesn't force replacements to start hot (it actually does the opposite), also, it can't change the settings of the original clients in ME, it can only influence their replacements. 2- The third client in the group is ignored at first (doesn't get the initial replacement used for heading capture), but it does get the actual replacement in the end. I honestly don't know what's going on with that, but it might be linked to having several clients in the same group. 3- I experienced a couple of abnormal spawns that led to access violations (ie DCS crashes). This might also be linked to having several clients in the same group, or having some of them in sheltered parking spots and the rest in open parking spots... In any case, I noticed something else in your mission that can potentially cause problems, the group name has a dash in it "Toxic-2". As a general rule, avoid using Lua characters in group and client names, since it might lead to problems and crashes. Like I explained in the main post: To be on the safe side, avoid using any of the following characters in either group or unit names ( ) [] {} / | # , . ` ´ ' % + - ~ = * ¿? ¡! ¨ ^ $ € @ Underscores are fine, you can use as many as you want. Yes, I know that Mission Editor automatically adds dashes to group and client names, but it doesn't generate replacements like SWAPR does, so it's better to be cautious. Anyway, despite these problems, SWAPR 1.4 seems to work fine with your test mission, even when you have 4 clients in the same group (which, again, I don't recommend) Edited May 9, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
gunterlund21 Posted May 9, 2021 Share Posted May 9, 2021 (edited) cant seem to get this to work. Can you take a look. My log fileLatakia.mizs reset but I saw no errors. I dont see any ai or statics being spawned. Im using the latest dev version of moose Edited May 9, 2021 by gunterlund21 I was in Art of the Kill D#@ it!!!! Link to comment Share on other sites More sharing options...
gunterlund21 Posted May 9, 2021 Share Posted May 9, 2021 here is the mission file Latakia.miz I was in Art of the Kill D#@ it!!!! Link to comment Share on other sites More sharing options...
Hardcard Posted May 9, 2021 Author Share Posted May 9, 2021 @gunterlund21 You making me work on Sunday, huh? No prob, I'll take a look right now [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Hardcard Posted May 9, 2021 Author Share Posted May 9, 2021 @gunterlund I don't own the Syria map and won't be buying it any time soon, so I can't take a look. Also, SWAPR is only meant to support stable versions of MOOSE, since dev versions change every few days. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Bones1775 Posted May 31, 2021 Share Posted May 31, 2021 seams there are some issues with ground starts at airbases. most of my AC do not spawn unless set to ramp. hornets spawn Ai instead of statics in this instance and are facing the wrong direction. i have been doing my testing on the caucasus map. has anyone else experienced this. Link to comment Share on other sites More sharing options...
cfrag Posted May 31, 2021 Share Posted May 31, 2021 I recently (last thursday?) played around with the swapper script (nice!!!), and did not run into any issues. I did notice (i think it was mentioned in the docs) that you need to set up a plane for each side and enter the game via spectator, else there are some bad side effects. Link to comment Share on other sites More sharing options...
Recommended Posts