This is a slot blocking plugin that can be used in several ways (more to come). Slots can be either blocked by Discord roles (specific planes blocked for Discord Members, other ones blocked for Donators for instance), by credit points (see CreditSystem) that people earn by kills or a specific VIP role assigned in this plugin's configuration.
As SlotBlocking is an optional plugin, you need to activate it in main.yaml first like so:
opt_plugins:
- slotblocking
The plugin itself is configured with a file named config/plugins/slotblocking.yaml. You'll find a sample file in the ./samples directory:
DEFAULT: # Default section - true for all your servers.
VIP: # define a VIP group
audit: true # you want to be informed, if someone of that group enters your server
discord: # you can define VIPs by a specific discord role
- Admin
- DCS Admin
ucid: # and a list of UCIDs (can be a single one also)
- aabbccddeeffgghh
- 11aa22bb33dd44ee
slots: 2 # Optional: These number of slots are locked for VIPs only
message_server_full: The server is full, please try again later! # default message, if the server is considered full
restricted: # These slots are restricted in any way. Here we restrict CA slots for Donators or members or the Discord.
- unit_type: artillery_commander
discord: Donators
message: This slot is reserved for Donators!
- unit_type: forward_observer
discord: Donators
message: This slot is reserved for Donators!
- unit_type: instructor
discord: Donators
message: This slot is reserved for Donators!
- unit_type: observer
side: 2 # side 1 = red, 2 = blue, not given - both sides
discord: '@everyone' # Only the "everyone" role needs the @ at the beginning, all other roles don't.
message: This slot is reserved for members of https://invite.link!
- unit_type: dynamic # restrict the usage of dynamic slots in general for a specific Discord role
discord: Tester
message: Dynamic Slots are restricted for Testers only.
balancing: # Optional: Allows balancing for your server (blue vs red)
blue_vs_red: 0.5 # 50% balance blue vs red
threshold: 0.1 # 10% threshold until slots are blocked
activation_threshold: 10 # do not balance, if the number of players is below this threshold
message: You need to take a slot of the opposite coalition to keep the balance!
messages:
credits_taken: '{deposit} credits taken for using a reserved module.' # Possible variables: deposit, old_points, new_points
payback: 'You have been given {deposit} credits back.' # Possible variables: deposit, old_points, new_points
DCS.release_server:
restricted: # in this example we restrict by credit points
- group_name: Rookie # this tag has to be in the group name of the respective units (best is to prepend it)
points: 10 # you need at least 10 credit points to join this unit
costs: 10 # the unit will cost you 10 points, depending on the payback (see below)
- group_name: Veteran
points: 20
costs: 10
- group_name: Ace
points: 50
costs: 30
payback: true # payback the plane costs on proper landings, otherwise charge by usage
Each unit can be either defined by its "group_name" or "unit_name", which are substrings/pattern of the names used in your mission or by its "unit_type". The restriction can either be credit "points" that you gain by kills or "discord", which is then a specific Discord role (in the example "Donators"). "costs" are the points you lose when you get killed in this specific aircraft and if provided.
Here are some sample use cases that show how the plugin can be used.
You die, you can't hop in again.
slotblocking.yaml:
restricted:
- group_name: ".+" # true for each unit / group
points: 1 # you need 1 credit point to enter
costs: 1 # you'll immediately lose 1 credit point on entering
message: You ran out of lifes.
creditsystem.yaml:
initial_points: 1 # you get one initial credit point (your "lifes")
points_per_kill:
- default: 0 # you don't get new lifes by kills
slotblocking.yaml:
restricted:
- group_name: ".+" # true for each unit / group
points: 1 # you need 1 credit point to enter
costs: 1 # you'll immediately lose 1 credit point on entering
message: You ran out of lifes.
creditsystem.yaml:
initial_points: 1 # you get one initial credit point (your "lifes")
points_per_kill:
- default: 0 # you don't get new lifes by kills
- category: Planes # you get one point (aka one additional life), if you kill another player
type: Player
points: 1
Life will be taken if you hop in your plane already. You get it back, if you land properly on any airport, only then you can select another slot.
slotblocking.yaml:
payback: true # you get the costs back on landing
restricted:
- group_name: ".+" # true for each unit / group
points: 1 # you need 1 credit point to enter
costs: 1 # you'll immediately lose 1 credit point on entering
message: You ran out of lifes.
creditsystem.yaml:
initial_points: 1 # you get one initial credit point (your "lifes")
points_per_kill:
- default: 0 # you don't get new lifes by kills
If you have a PvP server and want to enable balancing, this is how you can set it up.
DEFAULT:
balancing: # Optional: Allows balancing for your server (blue vs red)
blue_vs_red: 0.5 # 50% balance blue vs red
threshold: 0.1 # 10% threshold until slots are blocked
activation_threshold: 10 # do not balance, if the number of players is below this threshold
message: You need to take a slot of the opposite coalition to keep the balance!
Note
Balancing will not be checked
- if a user selects another slot on the same side (if you are on blue, you can stay on blue)
- if a user jumps in a CA (Artillery Commander, etc.) or carrier slot (LSO, Airboss)