SWAPR - SWeet Automatic Player Replacement script - Page 2 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 08-03-2019, 01:36 PM   #11
Shahdoh
Senior Member
 
Shahdoh's Avatar
 
Join Date: Jan 2013
Posts: 1,263
Default

I have done a couple of those things like removing all other triggers and leaving only Moose and the table building script. 200 plus aircraft is a lot to go through and compare, but feel that each one is setup uniquely and the mission has no mods. The mission has been running great for the past couple months on the Warbirds of Prey server. I will look into reducing the number of client aircraft and see how that works out, but will probably take me a while to wittle things down.

Again, thank you for a great script!
Shahdoh is offline   Reply With Quote
Old 08-03-2019, 09:33 PM   #12
Rudel_chw
Veteran
 
Join Date: Nov 2013
Location: Antofagasta, Chile
Posts: 4,248
Default

Quote:
Originally Posted by Hardcard View Post
@Rudel_chw
Thanks for showcasing SWAPR in your posts, cool stuff!
You are most welcome

.. I do have a suggestion tough: I understand the need for a small offset on aircrafts spawn on FARPs, but in the case of the Harrier can the Script be modified such that the Harrier doesnt get offset when placed on a normal parking position?

For example, on the above screencaps you can see that my Harrier is offest relative to the remaining three unocuppied clients .. I'd like to have the Harrier with no offset on this type of parking.

Thanks a lot,


Eduardo
__________________
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: 27" Monitor - Ryzen 1500X - 32 GB DDR4 2400 - MSI GTX970 - SSD 480 GB - HDD 10 TB - Windows 8.1 Pro - Thrustmaster HOTAS Cougar - Oculus Rift CV1
Mobile: iPad Pro 12.9" of 128 GB
Rudel_chw is online now   Reply With Quote
Old 08-03-2019, 11:23 PM   #13
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 607
Default

Quote:
Originally Posted by Rudel_chw View Post
in the case of the Harrier can the Script be modified such that the Harrier doesnt get offset when placed on a normal parking position?
I guess I could create specific checks for harriers and helicopters, so that they only get offset when placed on FARPs... I'll look into it and perform tests, see if it's feasible.

In the meantime, you're free to remove the y offset applied to helicopters and harriers, simply subtract 5 from their y values in Reference_Table.

For instance:
Spoiler:
["Mi8_2_Client_Helo"] = {
["Heading"] = 0 ,
["Country"] = 7 ,
["Coalition"] = 2 ,
["x"] = 12005.234375 ,
["StaticName"] = "Mi8_2_Client_Helo_Replacement_Static" ,
["y"] = 368334.6875 , -- The corrected y value (without the offset applied) would be 368329.6875
["TypeName"] = "Mi-8MT" ,
["ClientName"] = "Mi8_2_Client_Helo" ,
},

Last edited by Hardcard; 08-03-2019 at 11:33 PM.
Hardcard is offline   Reply With Quote
Old 08-04-2019, 04:38 PM   #14
Shahdoh
Senior Member
 
Shahdoh's Avatar
 
Join Date: Jan 2013
Posts: 1,263
Default

I ended up trimming down the table build mission to 56 aircraft. This was probably more than required to get it to work, but for the mission, made a logical sense for the aircraft placement and population there of. I kept the same number of clients in the original mission and things seem to be working properly.
Shahdoh is offline   Reply With Quote
Old 08-04-2019, 05:19 PM   #15
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 607
Default

@Everyone

I've improved SWAPR (Reference_Table builder).lua and reuploaded it, check the changelog


@Shahdoh

Thanks a lot for the info!

So it seems that there is indeed a limit of clients that can be targeted in a single run...

I'll need to look into this issue, chances are other people will experience it too...

I'll probably modify SWAPR (Reference_Table builder).lua again, see if I can make it reference clients by groups of 50 or so.

Hardcard is offline   Reply With Quote
Old 08-04-2019, 05:34 PM   #16
TheBamse
Member
 
TheBamse's Avatar
 
Join Date: Jan 2017
Location: Gothenburg, Sweden
Posts: 167
Default

I also ran into the issue where not all aicraft gets enumerated. In our mission I've never been able to get more than 76 slots to get enumerated by the script and the wanted total is about 115. There seem to be a set of aircraft that it can't enumerate even if I remove others so I'm currently messing around to see what the blockage is.

I'm only using parking spots on Senaki-Kolhi and Sochi, no FARPs or freely non-parking spot placed aircraft.
Total unit count ~300.


Latest version of the reference builder mentioned above I get an error on line 56:
2019-08-04 19:37:25.074 ERROR DCS: Mission script error: : [string "<edited path to reference lua>"]:56: attempt to index local 'ClosestFARP' (a nil value)
stack traceback:
[C]: ?
[string "<edited path to reference lua>"]:56: in main chunk
[string "assert(loadfile("<edited path to reference lua>"))()"]:1: in main chunk

Last edited by TheBamse; 08-04-2019 at 05:40 PM.
TheBamse is offline   Reply With Quote
Old 08-04-2019, 05:39 PM   #17
Shahdoh
Senior Member
 
Shahdoh's Avatar
 
Join Date: Jan 2013
Posts: 1,263
Default

Cool, thanks, Yeah, the large number of client aircraft is mostly to give them preset options. I am sure that modern day missions might have even more given the fact that there are even more different aircraft to choose from.

And learning from this, and I am sure you knew already, but for others looking into this script, you do not HAVE to build a table entry for EVERY client aircraft if you have a large selection. You can tailor the list to have just enough to make it look populated, but not bloated full of targets.

Yes, doing this, there will be some aircraft that pop into existence, but its another trade off from showing a 100% full airfield because you want to give your clients options. That in itself may be an unrealistic situation.

For many years, this has been asked for and always the answer was that it could not be done. YOU have made it work. Not only that, but in a way that can be integrated into older missions. Yes, there IS a certain amount of work involved to do it, but for most that have put in that much work into a mission, this would be miniscule amount in comparison. Well worth the effort and can only see it being improved from here! Well done!
Shahdoh is offline   Reply With Quote
Old 08-04-2019, 06:20 PM   #18
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 607
Default

Quote:
Originally Posted by TheBamse View Post
Latest version of the reference builder mentioned above I get an error on line 56:
2019-08-04 19:37:25.074 ERROR DCS: Mission script error: : [string "<edited path to reference lua>"]:56: attempt to index local 'ClosestFARP' (a nil value)
stack traceback:
[C]: ?
[string "<edited path to reference lua>"]:56: in main chunk
[string "assert(loadfile("<edited path to reference lua>"))()"]:1: in main chunk

Yes, I was just reviewing the new version again and thought to myself "wait... if they have no FARPS in the mission, this is likely to generate a nil error, I need to fix it before anyone notices!"


I'll fix this in a moment, sorry about that

EDIT: I've uploaded a corrected version of SWAPR (Reference_Table builder).lua , the issue should be solved, give it a go and let me know if it works.

Last edited by Hardcard; 08-04-2019 at 06:40 PM.
Hardcard is offline   Reply With Quote
Old 08-04-2019, 06:43 PM   #19
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,212
Default

Brilliant idea, mate! This also has some nice implications for PvP scenarios. For example, one could disable client slots if the other coalition manages to destroy some static aircraft. Just thinking out loud here
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 08-04-2019, 06:58 PM   #20
GTFreeFlyer
Member
 
Join Date: Dec 2018
Location: Orange County, California, USA
Posts: 286
Default

You may want to consider making this an open source project and see how it naturally grows, perhaps put it on github or something similar. People can make changes and then submit them for incorporating into the master file (which you can still review and approve and maintain control over the master file). Development of new features and bug fixes can have a shorter turn around time. Not all scripts are right for this approach, but I feel like this one would be an ideal candidate for open source. It is a great idea
__________________
Sim: RTX2080, Rift CV1, 32 GB DDR4 2666 MHz, Intel i7-8700 3.2 GHz, SSD, Windows 10 (Omen by HP Obelisk Desktop), Warthog HOTAS, CH Pro Rudder Pedals
DLC: A-10C, Hornet, Huey, PG, NTTR, The Enemy Within, Piercing Fury
IRL: Private Pilot, UAS Test Pilot, Aircraft Designer
GTFreeFlyer is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:46 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.