Hardcard Posted June 3, 2021 Author Share Posted June 3, 2021 (edited) On 8/2/2019 at 3:09 PM, Hardcard said: Where do I report issues? Issues can be reported directly in this thread (you can also send me a PM). Please, always include your mission file, dcs.log and server hook (if MP) in your reports @Bones1775 Edited June 3, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Cyclops Posted June 4, 2021 Share Posted June 4, 2021 (edited) Hey @Hardcard, been putting together a multiplayer mission but I am having some issues with SWAPR. The static units spawn correctly, but do not despawn when a player fills the slot. Any ideas of what could be causing this? Works fine in singleplayer with "SP" selected. I have attached the mission file, the hook lua, and a screenshot of the incident. Thank you! 20210606_June_Campaign.miz SWAPR_1_4_Server_Hook.lua Edited June 4, 2021 by Cyclops Link to comment Share on other sites More sharing options...
Hardcard Posted June 5, 2021 Author Share Posted June 5, 2021 (edited) @Cyclops Your server hook is using an incorrect suffix ( "_client" instead of "_Client" ), that's probably why it isn't working, remember that Lua is case sensitive. Also, I'd remove all the dashes from your client group / unit names in the mission, since they might cause problems, use underscores instead. Edited June 5, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Spins321 Posted June 6, 2021 Share Posted June 6, 2021 @Hardcard Hey man! First, thanks for the super sweet mod! My buddies and I are trying to get this script to work but we are having an issue with the static/client planes disappearing after 3 minutes. Wondering if you or anyone else has encountered this problem. Thanks, Spins Link to comment Share on other sites More sharing options...
Hardcard Posted June 7, 2021 Author Share Posted June 7, 2021 @Spins321 On 6/3/2021 at 8:08 PM, Hardcard said: Where do I report issues? Issues can be reported directly in this thread (you can also send me a PM). Please, always include your mission file, dcs.log and server hook (if MP) in your reports [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Spins321 Posted June 8, 2021 Share Posted June 8, 2021 @Hardcard Thanks HC! Attached is the miz file CVW-14 TRAINING MISSION 2021 v.1.0 SWAPR min triggers.miz Link to comment Share on other sites More sharing options...
Hardcard Posted June 8, 2021 Author Share Posted June 8, 2021 (edited) @Spins321 Thanks. Could you also attach the dcs.log that was running when you encountered the issue? Also, if you were running the mission in MP, I'll need the server hook as well. Additionally, if the mission is using mods, please remove any modded units/objects, so I'm not required to install them. Edited June 9, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Spins321 Posted June 12, 2021 Share Posted June 12, 2021 On 6/7/2021 at 4:06 AM, Hardcard said: @Hardcard Here you go! Thanks much! On 6/7/2021 at 4:06 AM, Hardcard said: SWAPR Mission.zip Link to comment Share on other sites More sharing options...
Hardcard Posted June 12, 2021 Author Share Posted June 12, 2021 @Spins321 Ok, we're talking about the replacements at Kobuleti, right? I can confirm that AI replacements are removed after ~3 minutes, fortunately, this issue doesn't seem to affect static replacements. Until I find the culprit, I recommend that you set Replacement_Type to "Static". (Keep in mind that tomcat static models are bugged since the introduction of 2.7, this is a known DCS bug and has already been reported. It has nothing to do with SWAPR) Also, I noticed that your SWAPR script is using several client suffixes that aren't present in the mission. Your clients at Kobuleti only use "_client", so your SWAPR_Prefixes table should look like this: local SWAPR_Prefixes = { "_client" } Finally, a 10 second delay for the SWAPR script trigger might be a bit overkill [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Cyclops Posted June 13, 2021 Share Posted June 13, 2021 On 6/4/2021 at 6:51 PM, Hardcard said: @Cyclops Your server hook is using an incorrect suffix ( "_client" instead of "_Client" ), that's probably why it isn't working, remember that Lua is case sensitive. Also, I'd remove all the dashes from your client group / unit names in the mission, since they might cause problems, use underscores instead. Forgot to respond to this, thank you @Hardcard this fixed it! 1 Link to comment Share on other sites More sharing options...
BigMillerTime Posted June 19, 2021 Share Posted June 19, 2021 SWAPR users. Any one having challenges spawning HELOS at the airbase parking spots? Link to comment Share on other sites More sharing options...
Spins321 Posted June 19, 2021 Share Posted June 19, 2021 @Hardcard Looks like it's working with static! Link to comment Share on other sites More sharing options...
Hardcard Posted June 20, 2021 Author Share Posted June 20, 2021 @BigMillerTime Hey Miller, what's the problem? Do you have a mission file I can look at? @Spins321 Unfortunately, I have no idea of what's making AI replacements despawn. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Erikson Posted June 30, 2021 Share Posted June 30, 2021 (edited) Hello Hardcard. First I would like to thank you for the work you put in this scripting. I have installed the script on my dedicated server , but I ran into a small problem : The SWAPR script starts normally and spawns all available aircraft as a static model. I (or another player) joins the server and selects a aircraft. The aircraft I (or any other player) spawn in spawns normally BUT the static aircraft does NOT despawn. For ease of log reading : First occurance : 2021-06-29 22:08:51.613 Second occurance : 2021-06-29 22:11:02.867 My testing : 2021-06-30 07:31:27.381 During testing I also noticed that sheltered clients are not replaced bij statics even though my lua settings should be correct for sheltered replacements I have tried to check the logs but could not find any obvious errors. SWAPR Report.zip Edited June 30, 2021 by Erikson Link to comment Share on other sites More sharing options...
Hardcard Posted July 1, 2021 Author Share Posted July 1, 2021 @Erikson Thanks for including all the required files in the report (Take note, guys, this is how you make a report ) The SWAPR_1_4.lua inside your mission file is set to "SP", so if you run the script like that in a multiplayer environment, replacement removal won't work. The reason why I had to create separate "SP" and "MP" modes is because DCS events needed for the removal of replacements don't work in MP, only in SP. "MP" mode relies on server code (included in the server hook) for replacement removal instead. I tested your mission with the game mode set to "MP" and it works fine, but keep in mind that I don't have access to a dedicated server, so this isn't 100% conclusive. As for sheltered clients being replaced by AI instead of statics, this is intended, since statics used to spawn on top of shelters instead of in them when I created the script. I think that ED recently fixed this particular issue, so I might modify SWAPR to allow static spawning in sheltered spots again, we'll see. As for AI replacements being removed from the map after ~3 minutes, it might be a relatively new DCS cleanup routine that didn't exist before. I might end up ditching AI replacements and using statics exclusively... but it's risky, since there's a good chance statics will get bugged again in the future. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Erikson Posted July 1, 2021 Share Posted July 1, 2021 Hi Hardcard. Thanks for the help. I didn't know the actual swapr script would get encoded into the mission file. I thought it would just refer to the script (location) so I left the script in SP mode on my play machine thinking it would work on the server in the same way. I have now updated my play machine to a MP setting so I can edit missions for the server. Thanks again. Link to comment Share on other sites More sharing options...
Hardcard Posted July 1, 2021 Author Share Posted July 1, 2021 5 hours ago, Erikson said: I didn't know the actual swapr script would get encoded into the mission file. When you load a file in Mission Editor, DCS makes a copy of it, which is saved in the miz file. You need to reload the file every time you make changes to it, otherwise these changes won't apply. There's also the possibility of loading scripts dynamically, which allows you to modify script files without having to reload them every time. Here, Pikey made a nice tutorial about it: [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
MARLAN_ Posted July 16, 2021 Share Posted July 16, 2021 Is this updated for Marianas? Virtual CVW-8 - The mission of Virtual Carrier Air Wing EIGHT is to provide its members with an organization committed to presenting an authentic representation of U.S. Navy Carrier Air Wing operations in training and combat environments based on the real world experience of its real fighter pilots, air intercept controllers, airbosses, and many others. Link to comment Share on other sites More sharing options...
Hardcard Posted July 17, 2021 Author Share Posted July 17, 2021 @MARLAN_ I haven't tested it yet, since I don't like the map (don't even have it installed ) I've recently bought the Syria map, though, so I'm now able to test SWAPR there (I have the feeling that there'll be issues, though ) Try SWAPR in the Marianas map, if it doesn't work, I'll take a look. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
TonyG Posted July 18, 2021 Share Posted July 18, 2021 I’ve got it working on the Mariana map, no issues at all. 2 1 Link to comment Share on other sites More sharing options...
pacastro Posted July 25, 2021 Share Posted July 25, 2021 (edited) Hi, I just updated my swapr script to 1.4 and now I'm having a problem. I'm getting replacement units displayed for both coalitions no matter which coalition owns the airfield, so it seems the capture logic isn't working. Attached a simple mission (in SP mode), with sawpr units for red and blue. A ground blue unit is inside airfield capture zone so airfield is Blue, but I'm getting swapr units for red and blue displayed anyways. The same thing is happening in more complex missions since I updated to 1.4. SWAPR_1_4_Server_Hook.lua SWAPR_v1_4.lua swapr_test(SWAPR_1_4).miz dcs.log Edited July 26, 2021 by pacastro Link to comment Share on other sites More sharing options...
Hardcard Posted July 27, 2021 Author Share Posted July 27, 2021 (edited) @pacastro Capture logic was only implemented in an experimental 1.3 version, 1.4 doesn't support it. The reason being that DCS automatically removes airbase replacements and prevents them from spawning upon capture (at least sometimes). It was a mess, so I removed the related code. Edited July 27, 2021 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Jimi08 Posted August 1, 2021 Share Posted August 1, 2021 Hey Hardcard, First, great job with this product! Really brings the airfield alive! I do have a quick question for you, have you noticed or had any reports of glitches with using SWAPR with objects spawned using the "Takeoff From Ground" option, where the objects are spawned in a (as they should), but are hovering about a foot or so above the ground? Just wanted to know if it is already a known issue (... and if it's being worked on...) before I go through the work of stripping my mission of addons and uploading it here... Once again... thanks again for this awesome script! -Jimi Link to comment Share on other sites More sharing options...
Hardcard Posted August 3, 2021 Author Share Posted August 3, 2021 On 8/1/2021 at 1:36 PM, Jimi08 said: objects spawned using the "Takeoff From Ground" option, where the objects are spawned in a (as they should), but are hovering about a foot or so above the ground? Just wanted to know if it is already a known issue (... and if it's being worked on...) before I go through the work of stripping my mission of addons and uploading it here... Sounds like a new issue, but, tbh, I don't think I can do anything about it, script wise. DCS spawning has been screwed for a long time and looks like they're finding new ways of screwing it with every new build [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Jimi08 Posted August 4, 2021 Share Posted August 4, 2021 13 hours ago, Hardcard said: Sounds like a new issue, but, tbh, I don't think I can do anything about it, script wise. DCS spawning has been screwed for a long time and looks like they're finding new ways of screwing it with every new build Figured as much, but I figured I'd ask anyways. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts