Jump to content

StopGaps - Script to fill empty player slots with planes


cfrag

Recommended Posts

3 hours ago, Kervinou said:

there's a problem when you use hot choppers on the ground on something other than a runway

This is currently an issue in single-player mode only in DCS, it works in multiplayer. To work around this, you can add '-sp' to the group or unit name to have stopGap ignore the unit in single-player mode, and work in full stopGap glory in multiplayer.

Please see the mission that you kindly provided changed accordingly.

Cheers,
-ch

DIV_SIN_helico-famille SG.miz

Link to comment
Share on other sites

  • 2 weeks later...

Cfrag,

Great script!  I too was a fan of Hardcard's work and glad that you decided to pick up the baton!  Definitely appreciative of how you are able to fix the floating issue when using the "Takeoff from ground" option!  I did run into a few snags though, so I have a few questions/issues....

1.  After running your script and using the "-sg" option to exclude aircraft, I get a repeating "skipping group" message (e.g., << '-sg' skipping group XXXXX -sg >>) that constantly flashes once every second and doesn't go away.  This message pops up right after the initial "Stop-Gap-ing" message stating which units StopGap has been applied to.  I can't get these skipping group messages to go away unless I edit them out in your script.

example: 
 

    if group.name:sub(-#stopGap.ignoreMe) == stopGap.ignoreMe then
        --[[ stopGap.verbose then
            -trigger.action.outText("<< '-sg' skipping group " .. group.name .. ">>", 30)
        end ]]--
        return nil
    end
    if (not stopGap.isMP) and group.name:sub(-#stopGap.spIgnore) == stopGap.spIgnore then
        --[[ stopGap.verbose then
            trigger.action.outText("<<'-sp' !SP! skipping group " .. group.name .. ">>", 30)
        end ]]--
        return nil
    end

Any idea on what I'm doing wrong and/or how to fix?

 

2. Also every time I stop the mission I've created, instead of DCS going to the mission debrief page, it give me a message stating "Cannot Open Debriefing File", skips the mission debrief page, and it brings me straight to the Mission Editor GUI.  I've attached a screenshot of the message.

 

3.  Lastly, a request.  Is there a way to change the configuration in which the aircraft are being spawned into the sim?  For example, all of the static hornets are spawned in with wings folded.  Is there a way to have them spawn in with wings extended?

 

That's it!  Thanks again for this great script and thanks in advance for any help/insight that you might be able to provide to fix these issues.

null

image.png

Link to comment
Share on other sites

4 hours ago, Jimi08 said:

This message pops up right after the initial "Stop-Gap-ing" message stating which units StopGap has been applied to.  I can't get these skipping group messages to go away unless I edit them out in your script.

StopGap has a debugging feature that tells mission designers when it is active, and the messages that you are seeing are these messages. To turn it off, change line 3 of the script from 

stopGap.verbose = true 

to 

stopGap.verbose = false 

The newest version of the script should have that value set up as 'false' by default (please see OP), so maybe make sure that you are using the most current version.

4 hours ago, Jimi08 said:

Also every time I stop the mission I've created, instead of DCS going to the mission debrief page, it give me a message stating "Cannot Open Debriefing File",

I don't think that StopGap is the source for that. Are you running any other scripts? I've seen this dialog come up when scripts mess with the current writing directory via the (unsanitizued) lfs library. StopGap does not do that. Please check if you are using other scripts, most probably some persistence helpers, and check that code. 

4 hours ago, Jimi08 said:

Lastly, a request.  Is there a way to change the configuration in which the aircraft are being spawned into the sim?  For example, all of the static hornets are spawned in with wings folded.  Is there a way to have them spawn in with wings extended?

I've experimented with that, but it seems that this cannot be done at the moment. That's how DCS sees fit to spawn the aircraft, and it steadfastly ignores any prods and shoves I'm giving it to show munitions or other stuff (like said wings). Since there is no real API that I know of to set up static aircraft other than the one that you are seeing now, I would love to, but currently can't improve on that. 


Edited by cfrag
  • Like 2
Link to comment
Share on other sites

cfrag,

Messed around a little more.... A few things:

1.  The verbose change fixed the messages.  Thanks.  I see you have two different versions of 1.06 Standalone.  The download link has the version still have verbose enabled, while the other version where you have the lua displayed has it disabled...

 

2.  As for the error, yes, I'm running other scripts concurrently, but even if I disable all but yours, I still getting the error. 

Conversely, if I run all others and only disable your script, the error goes away...  Not running any persistence helpers...yet...

 

Any ideas?

 

Thanks again.


Edited by Jimi08
Link to comment
Share on other sites

29 minutes ago, Jimi08 said:

2.  As for the error, yes, I'm running other scripts concurrently, but even if I disable all but yours, I still getting the error. 

Conversely, if I run all others and only disable your script, the error goes away...  Not running any persistence helpers...yet...

 

Any ideas?

Unfortunately, no, this is highly unusual. If possible, please PM the mission to me, so I can have a look.

 

Link to comment
Share on other sites

  • 1 month later...
5 minutes ago, maikchaos said:

With your mission it works.

I have some more slots and mostly all of them are 2 - Ship formations. But i can join the other Slots without problems (have not tested all Slots)

That's good (sort of), so stopGap may be in the clear. Let's try and figure out what may be wrong. Please post (or PM to me) the mission, and tell me which slot crashes DCS for you, and I'll try and trace the issue.

Link to comment
Share on other sites

hello, it didnt work for me on Dedicated Server. How i can to make it work?

VPC MongoosT-50CM2 Grip w/ VPC MongoosT-50CM2 Base, VPC MongoosT-50CM3 Throttle, VPC Ace-torq rudder, VPC SharKa-50 Collective Grip w/ K51 collective base, VPC SharKa-50 Control Panel, Oculus Quest 2 HMD

HP Pavilion Gaming 15 I5-10300H, GTX-1650 4GB, RAM 24GB
ASUS Rog Strix G17 R7 5800H, RTX-3070 8GB, 2k-165Hz, RAM 32GB 

Modules: F-4E Phantom 2, AH-64D Apache, Mi-24P Hind, Mi-8MTV2 w/Ns-430 Navigation Unit, Ka-50 Black Shark 3, F-15E Strike Eagle, Mirage F1, F-16C Viper, F/A-18C Hornet w/ SuperCarrier, F-14 A/B Tomcat, JF-17 Thunder, A-10C-2, P-51D, BF-109K-4, Uh-1 Huey, AJS-37 Viggen, M-2000C Mirage, AV-8B Harrier, CASA C-101 Aviojet, Mig-15bis, Mig-21bis, FC3, CA.

Maps: Syria, Persian Gulf, NTTR, Caucasus, South Atlantic, Sinai, Normandy 2.0.

Link to comment
Share on other sites

9 minutes ago, TrumBass said:

hello, it didnt work for me on Dedicated Server. How i can to make it work?

I think that would depend a lot on how and what you have installed where on your server. If you followed the instructions in the OP, it *should* work in 99.9% of the cases, included dedicated server (I'm using stopGapGUI on a dedicated server hosted by the kind people of Fox3). You'll also have to make sure that you observe the other items, mainly that the mission must be running (stopGap only kicks in when the server is running - many dedicated server are set up to start a mission paused). 

So I'd suggest we start small: what did you install where on your server, is the server running the mission (i.e. the mission is not paused), and have you installed the stopGaps script to run at start in your mission?

Once we tick off the above we can go into a deeper analysis where SG may be misbehaving.

Link to comment
Share on other sites

1 час назад, cfrag сказал:

I think that would depend a lot on how and what you have installed where on your server. If you followed the instructions in the OP, it *should* work in 99.9% of the cases, included dedicated server (I'm using stopGapGUI on a dedicated server hosted by the kind people of Fox3). You'll also have to make sure that you observe the other items, mainly that the mission must be running (stopGap only kicks in when the server is running - many dedicated server are set up to start a mission paused). 

So I'd suggest we start small: what did you install where on your server, is the server running the mission (i.e. the mission is not paused), and have you installed the stopGaps script to run at start in your mission?

Once we tick off the above we can go into a deeper analysis where SG may be misbehaving.

mission not paused, script is installed to run at start. But i think it didnt hook little lua in scripts\hooks


Edited by TrumBass

VPC MongoosT-50CM2 Grip w/ VPC MongoosT-50CM2 Base, VPC MongoosT-50CM3 Throttle, VPC Ace-torq rudder, VPC SharKa-50 Collective Grip w/ K51 collective base, VPC SharKa-50 Control Panel, Oculus Quest 2 HMD

HP Pavilion Gaming 15 I5-10300H, GTX-1650 4GB, RAM 24GB
ASUS Rog Strix G17 R7 5800H, RTX-3070 8GB, 2k-165Hz, RAM 32GB 

Modules: F-4E Phantom 2, AH-64D Apache, Mi-24P Hind, Mi-8MTV2 w/Ns-430 Navigation Unit, Ka-50 Black Shark 3, F-15E Strike Eagle, Mirage F1, F-16C Viper, F/A-18C Hornet w/ SuperCarrier, F-14 A/B Tomcat, JF-17 Thunder, A-10C-2, P-51D, BF-109K-4, Uh-1 Huey, AJS-37 Viggen, M-2000C Mirage, AV-8B Harrier, CASA C-101 Aviojet, Mig-15bis, Mig-21bis, FC3, CA.

Maps: Syria, Persian Gulf, NTTR, Caucasus, South Atlantic, Sinai, Normandy 2.0.

Link to comment
Share on other sites

20 hours ago, TrumBass said:

But i think it didnt hook little lua in scripts\hooks

You'll usually have to re-start DCS for any any change in the /Hooks folder to activate. I prefer to cold-start the server to get around potential caching issues. Have you tried that? 

Link to comment
Share on other sites

13 минут назад, cfrag сказал:

You'll usually have to re-start DCS for any any change in the /Hooks folder to activate. I prefer to cold-start the server to get around potential caching issues. Have you tried that? 

yep, i tried turning off dedicated server (thats not a game btw), tried to put hooks and turning on a server but... nothing. If i start server from a game (from server browser and etc) it works perfectly. But not on dedicated server 

VPC MongoosT-50CM2 Grip w/ VPC MongoosT-50CM2 Base, VPC MongoosT-50CM3 Throttle, VPC Ace-torq rudder, VPC SharKa-50 Collective Grip w/ K51 collective base, VPC SharKa-50 Control Panel, Oculus Quest 2 HMD

HP Pavilion Gaming 15 I5-10300H, GTX-1650 4GB, RAM 24GB
ASUS Rog Strix G17 R7 5800H, RTX-3070 8GB, 2k-165Hz, RAM 32GB 

Modules: F-4E Phantom 2, AH-64D Apache, Mi-24P Hind, Mi-8MTV2 w/Ns-430 Navigation Unit, Ka-50 Black Shark 3, F-15E Strike Eagle, Mirage F1, F-16C Viper, F/A-18C Hornet w/ SuperCarrier, F-14 A/B Tomcat, JF-17 Thunder, A-10C-2, P-51D, BF-109K-4, Uh-1 Huey, AJS-37 Viggen, M-2000C Mirage, AV-8B Harrier, CASA C-101 Aviojet, Mig-15bis, Mig-21bis, FC3, CA.

Maps: Syria, Persian Gulf, NTTR, Caucasus, South Atlantic, Sinai, Normandy 2.0.

Link to comment
Share on other sites

1 hour ago, TrumBass said:

If i start server from a game (from server browser and etc) it works perfectly. But not on dedicated server 

That sounds strange indeed. You may want to look up your server's configuration and see from where it loads the server scripts. Usually it would be Scripts/Hooks in you Saved Games/DCS folder, but you may want to check how your server is set up. If stopGapGUI isn't loaded, there's a good chance your other server-side scripts aren't run either.

Link to comment
Share on other sites

8 минут назад, cfrag сказал:

That sounds strange indeed. You may want to look up your server's configuration and see from where it loads the server scripts. Usually it would be Scripts/Hooks in you Saved Games/DCS folder, but you may want to check how your server is set up. If stopGapGUI isn't loaded, there's a good chance your other server-side scripts aren't run either.

it works but if i pick a craft it will spawn damaged or destroyed sometimes. But if we starting with stopGapGUI it works fine

VPC MongoosT-50CM2 Grip w/ VPC MongoosT-50CM2 Base, VPC MongoosT-50CM3 Throttle, VPC Ace-torq rudder, VPC SharKa-50 Collective Grip w/ K51 collective base, VPC SharKa-50 Control Panel, Oculus Quest 2 HMD

HP Pavilion Gaming 15 I5-10300H, GTX-1650 4GB, RAM 24GB
ASUS Rog Strix G17 R7 5800H, RTX-3070 8GB, 2k-165Hz, RAM 32GB 

Modules: F-4E Phantom 2, AH-64D Apache, Mi-24P Hind, Mi-8MTV2 w/Ns-430 Navigation Unit, Ka-50 Black Shark 3, F-15E Strike Eagle, Mirage F1, F-16C Viper, F/A-18C Hornet w/ SuperCarrier, F-14 A/B Tomcat, JF-17 Thunder, A-10C-2, P-51D, BF-109K-4, Uh-1 Huey, AJS-37 Viggen, M-2000C Mirage, AV-8B Harrier, CASA C-101 Aviojet, Mig-15bis, Mig-21bis, FC3, CA.

Maps: Syria, Persian Gulf, NTTR, Caucasus, South Atlantic, Sinai, Normandy 2.0.

Link to comment
Share on other sites

4 minutes ago, TrumBass said:

it works but if i pick a craft it will spawn damaged or destroyed sometimes.

That is the exact symptom that stopGapGUI is not running on your server - that is what stopGapGUI is designed to prevent. I recommend that you check your server log to verify stopGapGui is really run when the server starts up.

Link to comment
Share on other sites

4 hours ago, Mike_Romeo said:

Would it be possible for the static units to repair themself after x time or to make them immortal

Well, yes. Never thought of that, but that (hopefully) should not be too difficult to achieve. Let me see what I can do...

 

Link to comment
Share on other sites

20 hours ago, Mike_Romeo said:

Would it be possible for the static units to repair themself after x time

They do now. I have updated StopGaps to version 1.0.8 that allows an optional timer to refresh all statics every n seconds (please read the OP for details). By default, this value is set to -1, making it never happen. If you set it to a value n greater than zero, stopGaps refreshes all statics, not matter how badly they are mangled every n seconds. For example, if you set it to 3600, stopGaps will refresh all statics every 3600 seconds (= 1 hour.)

Here's a demo mission that refreshes player stand-ins every 10 seconds. Jump into the Huey, and mini-gun the heck out of the Hog. It's refresh every 10 seconds.

My thanks to @Mike_Romeo for suggesting this option.

-ch 

my immortal.miz


Edited by cfrag
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

CFrag, I just discovered this gem ! Thank you for sharing it!

I have a question and a little bug report for you:

I noticed that in your example missions, you load the script from a DO SCRIPT trigger instead of a DO SCRIPT FILE, so, other that doing that to change options, is there any other reason? 

And the bug... Attached is a test mission with 1 client F-15E slot, parked at Batumi spot 01
image.png

When I run the mission, the Mudhen spawns at spot 02
image.png
 

The issue seems to be limited to the Strike Eagle.. At least, I haven't found any other A/C with this behavior.

test STOP GAP.miz

Link to comment
Share on other sites

1 hour ago, Draken35 said:

I noticed that in your example missions, you load the script from a DO SCRIPT trigger instead of a DO SCRIPT FILE, so, other that doing that to change options, is there any other reason?

Since I do a lot of coding, it's faster for me to paste than load/re-load from file; it's a purely personal preference.

1 hour ago, Draken35 said:

Attached is a test mission with 1 client F-15E slot, parked at Batumi spot 01

The Mudhen is currently bugged, and does not work correctly with StopGaps. Use the '-sg' tag in a the Group or Unit's name to selectively remove Mudhens from stopGap (or if you are using the DML version, use a trigger zone with an attribute). Hopefully Raz can fix this at some point in time.

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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