Ciribob Posted April 1, 2017 Posted April 1, 2017 (edited) Something thats been asked a few times is an easy way to enable or disable slots on a multiplayer mission, so I've put this together. Its basically a modified version of the script I use for the CSAR slot blocking. The script only needs to be installed by the server host. The script can be used to: Block / unblock a slot by setting a flag Reserve an aircraft slot for clan members only Disable the GCI / AWACS / Ground commander slot for everyone except specific players Installation To Install got to GitHub https://github.com/ciribob/DCS-SimpleSlotBlock and click "clone or download" and download the repository or click this: https://github.com/ciribob/DCS-SimpleSlotBlock/archive/master.zip Copy the SimpleSlotBlockGameGUI.lua to your C:Users\Saved GamesDCSScriptshooks and into any other DCS folders e.g. DCS.openalphaScriptshooks Configuration SSB (SimpleSlotBlock) only has a few global configuration options. These are listed in the file and shown below: NOTE: Changes to GameGUI files only take effect after a full DCS Restart ssb.showEnabledMessage = true -- if set to true, the player will be told that the slot is enabled when switching to it ssb.controlNonAircraftSlots = false -- if true, only unique DCS Player ids will be allowed for the Commander / GCI / Observer Slots -- If you set this to 0, all slots are ENABLED -- by default as every flag starts at 0. -- If you set this to anything other than 0 all slots -- will be DISABLED BY DEFAULT!!! -- Each slot will then have to be manually enabled via -- trigger.action.setUserFlag("GROUP_NAME",100) -- where GROUP_NAME is the group name (not pilot name) and 100 is the value you're setting the flag too which must -- match the enabledFlagValue ssb.enabledFlagValue = 0 -- what value to look for to enable a slot. -- any aircraft slot controlled by the GROUP Name (not pilotname!) -- that contains a prefix below will only allow players with that prefix -- to join the slot -- -- NOTE: the player prefix must match exactly including case -- The examples below can be turned on by removing the -- in front -- ssb.prefixes = { -- "-=104th=-", -- "-=VSAAF=-", -- "ciribob", -- you could also add in an actual player name instead "some_clan_tag", "-=AnotherClan=-", } -- any NON aircraft slot eg JTAC / GCI / GAME COMMANDER -- will only allow certain PLAYER IDS -- PLAYER IDS are unique DCS ids that can't be changed or spoofed -- This script will output to the them to the dcs.log file when a player changes slots so you can copy them out easily :) -- This will only take effect if: ssb.controlNonAircraftSlots = true ssb.commanderPlayerUCID = { "292d911c1b6f631476795cb80fd93b1f", "some_uniqe_player_ucid", } Usage In Missions To enable the SSB script in a mission first create a TRIGGER with a TIME MORE of 1 and an ACTION of DO SCRIPT with the Script below: trigger.action.setUserFlag("SSB",100) This first trigger turns on SSB for the currently running mission. If this flag isn't set in the mission then Slot Blocking will not work Next create as many triggers as you like to enable or disable a slot. For example, to disable a slot at mission start: Create a TRIGGER with a TIME MORE of 1 and an ACTION of DO SCRIPT with the Script below: trigger.action.setUserFlag("HELI1",100) This will disable the playable helicopter with the GROUP NAME of HELI1 To enable, simply set the flag back to 0 trigger.action.setUserFlag("HELI1",0) Note: If you change the ssb.enabledFlagValue, remember to update all your triggers and flag values! Reserve Aircraft Slot To reserver a slot for a specific clan tag (or individual player) add a new entry to the ssb.prefixes list in the GameGUI: ssb.prefixes = { "-=433=-", "ciribob", } You can add as many entries as you like, not every mission has to use them all but this sets the list of tags / prefixes we'll be looking for. Next in a mission add the prefix you want to use for a unit to the GROUP NAME i.e to reserve a UH1 for the 104th Squadron: ssb.prefixes = { "104th", } then set the UH-1 GROUP NAME to: "Huey 1 104th" The reservation system will still take into account if the slot is enabled or not so a slot could be reserved but disabled if you like. Reserve Non Aircraft Slot Non aircraft slots, GCI / Game Commander etc can be globally reserved. Turning this on will effect all missions on the server. First edit SimpleSlotBlockGameGUI.lua and set: ssb.controlNonAircraftSlots = true Make sure that DCS isnt running when you edit or restart DCS for the settings to take effect. Next you need to add players unique DCS player ids (UCID) to the list of ucids in ssb.commanderPlayerUCID To obtain a players UCID, have the player try to join a slot running SSB and then check the dcs.log in C:Users\Saved GamesDCSLogs There should be a line that looks something like: 00115.172 INFO LuaNET: SSB - Player Selected slot - player: Ciribob side:2 slot: 2 ucid: 283d911c1b6f631476795cb80fd93b7a Just copy the UCID e.g. 283d911c1b6f631476795cb80fd93b7a and add to the commanderPlayerUCID list in the GameGUI. Again make sure to restart DCS after changes to the GameGUI : ssb.commanderPlayerUCID = { "292d911c1b6f631476795cb80fd93b1f", "283d911c1b6f631476795cb80fd93b7a", "223d911c1b6f631476795cb80fd93b8a", } The UCID is unique to the DCS player account so name changes won't affect it so its a pretty sure way to lock down a slot to specific members. Tutorial Video I've put together a quick example mission from scratch that shows how you can disable a slot at mission start and then use a players action to unlock it again. I hope this helps explain it better! Note - since the video gameGUI files must go in scripts / hooks folder now I've also attached a pre-configured test mission from the tutorial video that shows activating a second helicopter slot by flying into a zone. You can test by installing the SimpleSlotBlockGameGUI.lua and then starting a multiplayer server. Remember to unpause and wait a second if you're testing so that the script initialises :) Please let me know how you get on or if you have any issues! Enjoy :)slot_block_test_helis.miz Edited December 27, 2017 by Ciribob 4 Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :) DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
gospadin Posted April 1, 2017 Posted April 1, 2017 awesome, thanks! My liveries, mods, and missions for DCS:World M-2000C English Cockpit | Extra Beacons Mod | Nav Kneeboard | Community A-4E
Pikey Posted April 2, 2017 Posted April 2, 2017 Superb, thank you so much! ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
104th_Maverick Posted April 3, 2017 Posted April 3, 2017 Awesome sir, thank you! [sIGPIC][/sIGPIC] 104th Phoenix Wing Commander / Total Poser / Elitist / Hero / Chad www.104thPhoenix.com www.facebook.com/104thPhoenix My YouTube Channel
HellsBells Posted April 24, 2017 Posted April 24, 2017 Another Superb Mod from Ciribob. Thank you | i9 9900K Octa Core 2TB SSD +32GB Spectrix DDR4 @3200MHz RGB | 2 x Radeon RX480 in Crossfire. | TrackIR5 HOTAS Warthog,MFG Crosswind Pedals | Cougar MFDs | [OCG] Oceanic Combat Group discord.gg/ZmXEBSU "Through The Inferno" by deadlyfishes Official Australian Servers SRS: All Servers have Auto-Connect Enabled Server 1: TTI Caucasus Server 2: TTI Persian Gulf Server 3: OCG Training Server 4: OCG NTTR & Multiplayer Missions Australian Website AU Discord Server
Alpenwolf Posted June 18, 2017 Posted June 18, 2017 (edited) Bless you buddy! I didn't work for me though. Did all you've said and double checked that. I have other lau scripts running in my mission. Could that be the problem? EDIT: Works now! Edited June 18, 2017 by Alpenwolf HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Pikey Posted June 18, 2017 Posted June 18, 2017 Bless you buddy! I didn't work for me though. Did all you've said and double checked that. I have other lau scripts running in my mission. Could that be the problem? Since it works, and only based on the global flags, unless your other LUA changes global flags then no, its more likely to be a setup error. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
Alpenwolf Posted June 18, 2017 Posted June 18, 2017 Since it works, and only based on the global flags, unless your other LUA changes global flags then no, its more likely to be a setup error. Sure it works! My bad, sorry... Sometimes double checking aint enough. A comma was all that was missing. HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Alpenwolf Posted June 19, 2017 Posted June 19, 2017 (edited) Ok... The whole thing works for me but only if I start a new server (for testing as you've mentioned). The mission runs now on the ACG Cold War server on DCS 1.5.6 and the slot blocking doesnt work there! What's the difference between running the mission on an empty server for testing only and having it on a public server like ACG? Edited June 19, 2017 by Alpenwolf HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Ciribob Posted June 20, 2017 Author Posted June 20, 2017 Ok... The whole thing works for me but only if I start a new server (for testing as you've mentioned). The mission runs now on the ACG Cold War server on DCS 1.5.6 and the slot blocking doesnt work there! What's the difference between running the mission on an empty server for testing only and having it on a public server like ACG? Have you copied the GameGUI file to the server? Sent from my ONEPLUS A3003 using Tapatalk Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :) DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Alpenwolf Posted June 20, 2017 Posted June 20, 2017 Have you copied the GameGUI file to the server? Sent from my ONEPLUS A3003 using Tapatalk The admin forgot to do that. I told him about it and now it works :thumbup: HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
hikikomori Posted August 1, 2017 Posted August 1, 2017 Hi! Thank you for your works! I've copyed the lua in the script directory and I tried the script but it don't work for me. I've tryed your sample mission with the same result. Maybe with 1.5.7 version it won't work? =36= Rabo®
Alpenwolf Posted August 21, 2017 Posted August 21, 2017 (edited) Thanks again for this script! Edited August 23, 2017 by Alpenwolf HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Ciribob Posted December 13, 2017 Author Posted December 13, 2017 In the current openalpha and openbeta, all gameGUI files must be moved to scripts/hooks instead of just scripts folder. This will be the case as well in stable when openbeta is moved to stable :) Sent from my ONEPLUS A3003 using Tapatalk Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :) DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Pikey Posted December 15, 2017 Posted December 15, 2017 hmmm, good to see you are still watching the development. If you notice any more gotchas like this for the folks that like playing, please please take 5 mins to brain dump on a forum so we can avoid such things. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
Alpenwolf Posted December 17, 2017 Posted December 17, 2017 Looks like the Slot Blocking script ain't working no more after the DCS 1.5.8 update! Anyone having the same issue here? HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Ciribob Posted December 17, 2017 Author Posted December 17, 2017 Looks like the Slot Blocking script ain't working no more after the DCS 1.5.8 update! Anyone having the same issue here?Check my post one post up... :) Move it to scripts/hooks Sent from my ONEPLUS A3003 using Tapatalk Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :) DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Alpenwolf Posted December 17, 2017 Posted December 17, 2017 Check my post one post up... :) Move it to scripts/hooks Sent from my ONEPLUS A3003 using Tapatalk Sorry, may bad. Just another one please; there is no such folder and I can't rename it to "Scripts/Hooks". You know, no characters like "/" are allowed in names. HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
Ciribob Posted December 17, 2017 Author Posted December 17, 2017 Sorry, may bad. Just another one please; there is no such folder and I can't rename it to "Scripts/Hooks". You know, no characters like "/" are allowed in names.Make a folder called hooks in scripts folder :) Sent from my ONEPLUS A3003 using Tapatalk Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :) DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord
Alpenwolf Posted December 17, 2017 Posted December 17, 2017 Stupid me... Hungry and tired... I'm off :) Thanks! HACA DYCA Discord Cold War 1947 - 1991 You can help me with keeping up the server via PayPal donations: hokumyounis@yahoo.com
edokg Posted April 10, 2018 Posted April 10, 2018 Hi guys, is there a way to reserve slots ONLY for Game Master? I need to have free access for Tactical Commander or Forward Observer but I need to reserve one slot only for Game Master. Tks!! [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic128931_4.gif[/sIGPIC] SO:Win10 64bit CPU:Intel i7 8700K@3.7 RAM:DDR4 46GB G.Skill Trident 3200MHz CL14 GPU:Nvidia EVGA GTX1080Ti FTW iCX MB:ASRock Z370 Extreme4 HDD: 512GB Samsung 970 PRO SSD M.2 NVMe + 250GB Samsung 850 EVO SSD + 2x500GB Seagate Barracuda 7200RPM
edokg Posted April 10, 2018 Posted April 10, 2018 Hi guys, is there a way to reserve slots ONLY for Game Master? I need to have free access for Tactical Commander or Forward Observer but I need to reserve one slot only for Game Master. Tks!! Solved! [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic128931_4.gif[/sIGPIC] SO:Win10 64bit CPU:Intel i7 8700K@3.7 RAM:DDR4 46GB G.Skill Trident 3200MHz CL14 GPU:Nvidia EVGA GTX1080Ti FTW iCX MB:ASRock Z370 Extreme4 HDD: 512GB Samsung 970 PRO SSD M.2 NVMe + 250GB Samsung 850 EVO SSD + 2x500GB Seagate Barracuda 7200RPM
edokg Posted April 12, 2018 Posted April 12, 2018 How? Cancel or quote: _unitRole == "forward_observer" _unitRole == "artillery_commander" _unitRole == "observer" near line 282 and near line 331 in the SimpleSlotBlockGameGUI.lua In this mode you will exclude these "slots" from the control of SSB and only Game Master's slot are affected by the restrictions... [sIGPIC]https://forums.eagle.ru/signaturepics/sigpic128931_4.gif[/sIGPIC] SO:Win10 64bit CPU:Intel i7 8700K@3.7 RAM:DDR4 46GB G.Skill Trident 3200MHz CL14 GPU:Nvidia EVGA GTX1080Ti FTW iCX MB:ASRock Z370 Extreme4 HDD: 512GB Samsung 970 PRO SSD M.2 NVMe + 250GB Samsung 850 EVO SSD + 2x500GB Seagate Barracuda 7200RPM
Recommended Posts