Jump to content

SWAPR - SWeet Automatic Player Replacement script


Hardcard

Recommended Posts

For me it is running well as long as I don't try to run it on my dedicated server. The planes spawn as they should but when I grab a seat the jet explodes instantly. After a couples of tries I can get a seat without exploding but that me jet has no gear.

 

When I run the same mission on my main pc it works fine. Any ideas?

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

@Snapper

 

Execution delay is probably causing the replacement unit to not be removed in time, so your client immediately collides with it and blows up on spawn.

 

The current plug & play version won't solve that issue, since it doesn't apply offsets to planes in airbases.

 

Lucky for you, I think I've just discovered a way to dispense with all offsets and avoid such spawn collisions for good... I'll be releasing a new version soon.

 

Also, the upcoming SWAPR version will probably support carrier-based replacements for the Kuznetsov and the Vinson (Stennis is a bit of a nightmare, but I might pull it off yet :thumbup:... Tarawa is a no go)


Edited by Hardcard
Link to comment
Share on other sites

@Everyone

 

Hi there people!

 

Looks like I'll need volunteers to make SWAPR work with the Stennis, right now I can only test helicopters on it (since I don't own the tomcat, harrier or hornet modules).

 

Tomcat, harrier and hornet module owners interested in getting SWAPR to work with the Stennis, please contact me via PM :thumbup:

Link to comment
Share on other sites

PM sent :)

 

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

@Everyone

 

Good news, people!

 

I've managed to finally get SWAPR working with some Stennis-based clients (only helicopters so far...fingers crossed for planes)

 

The new SWAPR version I'm working on features:

 

 

  • Replacement unit removal before the client spawns (which should take care of the collision issue)

 

  • Multiple-client group support

 

  • Open terrain client support (for clients spawning on flat terrain anywhere on the map, set to "Takeoff from ground")

 

  • FARP client support (FARP clients should be set to "Takeoff from ground", though)

 

  • Full airbase client support (even for clients placed inside sheltered spots)

 

  • Kuznetsov and Vinson client support (clients must be set to "Takeoff from runway" on the Vinson, though)

 

  • Support for Huey and Mi-8 clients on the Stennis (haven't tested gazelle clients, but they should be supported as well)

 

  • All carrier-based clients have a "Deck Cleanup" F10 menu available, which they can use to remove and respawn replacements at will

 

  • Absurdly simple and quick setup

 

 

 

I'll keep working on Stennis plane implementation... if I pull it off, I'll need someone to punch me, to make sure I'm not dreaming ;)


Edited by Hardcard
Link to comment
Share on other sites

Hi Hardcard,

 

Thanks for all the hard work on this!

 

I'm having trouble getting it working. I'm coming in cold to the plug and play version (never tried the previous version), and I'm a bit new at scripting and ME.

 

I've added the _Client and _Plane suffixes to my pilot names, and I've modified the lua file to look for those 2 suffixes.

 

When I load the mission and select spectators, SWAPR sees the 2 clients I've added the suffixes to (I get the SWAPR Count = 2). However, no statics spawn in their spots. Clearly I'm missing something, but I can't figure it out. I've watched the new video, but I'll admit I didn't watch the old one as it seemed to include a lot of stuff that's not needed anymore.

 

What could I be doing wrong?

Ryzen 7 5800X3D / Asus Crosshair VI Hero X370 / Corsair H110i / Sapphire Nitro+ 6800XT / 32Gb G.Skill TridentZ 3200 / Samsung 980 Pro M.2 / Virpil Warbrd base + VFX and TM grips / Virpil CM3 Throttle / Saitek Pro Combat pedals / Reverb G2

Link to comment
Share on other sites

Here's a super basic mission with just 2 A10Cs to try it out. SWAPR sees them when I go into spectators, but nothing spawns.

 

Thanks!

SWAPR Test.miz

Ryzen 7 5800X3D / Asus Crosshair VI Hero X370 / Corsair H110i / Sapphire Nitro+ 6800XT / 32Gb G.Skill TridentZ 3200 / Samsung 980 Pro M.2 / Virpil Warbrd base + VFX and TM grips / Virpil CM3 Throttle / Saitek Pro Combat pedals / Reverb G2

Link to comment
Share on other sites

Here's a super basic mission with just 2 A10Cs to try it out. SWAPR sees them when I go into spectators, but nothing spawns.

 

Hi,

 

I tested your mission and indeed it didnt work ... the cause is that you are using an older version of the Moose framework than @Hardcard uses.

 

Unfortunately, it seems that the download link at the Moose thread is a bit old at the moment and its latest 2.3.0 version is not enough for Swapr :(

 

I hope that @hardcard will be able to reach Moose authors and get them to release a more current version (or modify swapper to work witn Moose 2.3.0 )

 

best regards

 

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

@Hardcard , is SWAPR inextricably linked to airfield parking slots for fixed wings?

 

I've modded some missions to utilize more ramp space by making client slots set to "takeoff from ground," but SWAPR isn't catching them. Well, it is catching them via the prefix's but they do not get dynamically spawned like the client slots in fixed parking spots.

 

Is it possible to capture fixed wing clients set to "takeoff from ground?"

Link to comment
Share on other sites

@Sandman1330

 

As Rudel_chw pointed out, you're using an old version of MOOSE, which doesn't support some methods that are required to run SWAPR.

 

I provided a download link to a valid Moose.lua in the OP, please use that one, don't use anything that's not specified in the OP.

 

 

Are there any special requirements?

SWAPR is partially powered by MOOSE, so you'll need to get the latest Moose.lua file and load it in ME (before loading SWAPR.lua)

 


Edited by Hardcard
Link to comment
Share on other sites

I hope that @hardcard will be able to reach Moose authors and get them to release a more current version (or modify swapper to work witn Moose 2.3.0 )

 

I'll try, but FlightControl (the creator of MOOSE) isn't around much, so I make no promises.

 

(or modify swapper to work witn Moose 2.3.0 )

 

Hehe... that would be like like modifying a smartphone to turn it into one of these...

 

 

large.jpg

:D

 

 

Link to comment
Share on other sites

I'll try, but FlightControl (the creator of MOOSE) isn't around much, so I make no promises.

 

That's fine, I hadn't noticed that you had provided a Moose download link on the OP :)

 

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

Thanks guys! Nice work Hardcard, what a great and easy to implement script!

 

Edit - It's working great in single player, but when I try to run it on my multiplayer server, the planes blow up!

 

Any ideas? My mission is attached:

 

Edit again: I see it’s a known issue on dedicated servers. Hopefully you’ll find a fix!

Sandman's Server - PG - V1.1.miz


Edited by Sandman1330

Ryzen 7 5800X3D / Asus Crosshair VI Hero X370 / Corsair H110i / Sapphire Nitro+ 6800XT / 32Gb G.Skill TridentZ 3200 / Samsung 980 Pro M.2 / Virpil Warbrd base + VFX and TM grips / Virpil CM3 Throttle / Saitek Pro Combat pedals / Reverb G2

Link to comment
Share on other sites

@Sandman1330

 

 

Known Issues:

 

 


  • SWAPR won't work properly with carrier-based clients. There's a problem with DCS, which causes statics to spawn at the bottom of the sea instead of on the carrier's deck
    I'm working on it, but don't hold your breath... I make no promises

 


  • When running in dedicated servers, execution delay might cause replacements to not be removed in time when clients spawn... so they'll explode and mess it all up.
    I think I've solved this particular issue in the new version I'm working on. I'll release it as soon as it passes all tests

 

 

 

As mentioned, I think I've already solved this particular issue, but the new version is still being tested, hopefully, I'll get definitive results from different users soon, so I'll be able to release it.

 

 

In the meantime, I'll send you the new test version I'm working on via PM, it would be really helpful if you could test it on a dedicated server, along with other players :thumbup:

Link to comment
Share on other sites

@johnv2pt0

 

Did you modify me_route.lua in order to have the "Takeoff from ground" option available for the two F-5s?

 

I'll need to know the exact modifications you made in order to provide a definitive answer.

 

 

EDIT: Problem solved (I think), you have a PM ;)

(Btw, the replacement F-5s won't go anywhere, even when set to "Takeoff from ground hot", since they'll spawn without fuel)


Edited by Hardcard
Link to comment
Share on other sites

@Everyone

We've finally made SWAPR work on a dedicated server, no more spawn collisions! :yay:

 

If things go according to plan, I'll be releasing a new version of SWAPR in the coming days, after polishing and further testing.

 

Next on the list is Stennis implementation!


Edited by Hardcard
Link to comment
Share on other sites

@Everyone

 

The new version of SWAPR is officially out!

 

New setup and demo videos in the OP!

 

This new version brings important fixes, expanded support and new features to the table!

 

[b]Changes:[/b]

[list]
[*]Fixed client spawn collisions (in both SP an MP)

[*]Added support for multi-client groups

[*]Hybrid design (script can be set to either "SP" or "MP" mode)

[*]Added "Deck Cleanup" F10 menu for carrier-based clients
[/list]

[list]
[*]Added support for clients based on the following vessels:
[list]

[*]Kuznetsov carrier (Su-33 & helos. PRK 1,2,3)
[*]Vinson carrier (F-18C, F-14B, Harrier & helos. PRK 1,2,3,4 "Takeoff from runway" only)
[*]Moskva cruiser (all helos, except for the Mi-8)
[*]Type 054A frigate (all helos, except for the Mi-8)
[*]Type 052B destroyer (all helos, except for the Mi-8)
[*]Type 052C destroyer (all helos, except for the Mi-8)
[*]Ticonderoga cruiser (all helos, except for the Mi-8)
[*]Oliver Hazard Perry frigate (all helos, except for the Mi-8)
[/list]
[/list]


Edited by Hardcard
Link to comment
Share on other sites

@Everyone

 

After several hours of painstaking work, troubleshooting and testing, looks like I've managed to increase SWAPR's tweakability quite a bit

 

SWAPR PnP Hybrid v1.1 is out! :clap:

 

Changes:

 

 

  • 08-30-2019
    • Script rewritten for expanded customization!
       
    • Added the following extra settings:
      • Replacement_Type: If set to "AI", clients based on FARPs, open terrain and open airbase parking spots will receive uncontrolled AI replacements. If set to "Static", the mentioned clients will receive static replacements instead
      • Hidden_AI_Replacements: If true, generated AI replacements will be hidden on F10 map (doesn't work for static replacements, only works for AI replacements)
      • Sheltered_Replacements: If true, SWAPR will generate uncontrolled AI replacements for clients located inside sheltered parking spots. If false, no replacements will be generated for sheltered clients
      • Ship_Replacements: If true, SWAPR will generate uncontrolled AI replacements for clients based on compatible carriers, destroyers, frigates and cruisers. If false, no replacements will be generated for ship-based clients

 

 

As I said, I've tested it quite thoroughly, but haven't tried it on a dedicated server (it should work, just like v1.0).

 

Please report any issues you find! :thumbup:

Link to comment
Share on other sites

As I said, I've tested it quite thoroughly, but haven't tried it on a dedicated server (it should work, just like v1.0).

 

Please report any issues you find! :thumbup:

 

 

Thank you @Hardcard, I will try it out on my dedicated server during the week-end and report any issues that I find :) Cheers!

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...