2022-09-06 14:23:04 +02:00
|
|
|
## MapVote
|
|
|
|
The `MapVote` plugin for squad js based on the original version https://github.com/maskedmonkyman/squad-js-map-vote
|
2022-09-06 11:27:30 -04:00
|
|
|
|
|
|
|
### Commands
|
|
|
|
|
|
|
|
#### User Commands
|
|
|
|
- `!vote help` - sends possbile commands to a player in the from of a warning
|
|
|
|
- `!vote choices` - sends choices to player in the from of a warning
|
|
|
|
- `!vote results` - sends player the results in a warning
|
|
|
|
|
|
|
|
#### Admin Commands
|
|
|
|
- `!vote start` - Starts a vote with 6 layers, random modes
|
|
|
|
- `!vote cancel` - Cancels current round of voting
|
|
|
|
- `!vote restart` - Restarts voting with 6 random maps and modes
|
|
|
|
- `!vote broadcast` - Broadcasts current voting results - happens every 7m automatically
|
|
|
|
|
|
|
|
##### Vote by modes
|
|
|
|
- `!vote start *_raas` - Starts a vote with 6 layers, all RAAS
|
|
|
|
- `!vote start *_aas` - Starts a vote with 6 layers, all AAS
|
|
|
|
- `!vote start *_inv` - Starts a vote with 6 layers, all INV
|
|
|
|
|
|
|
|
##### Vote by map
|
|
|
|
- `!vote start yeh gor lash gor albas` - Starts a vote with X maps, random modes
|
|
|
|
|
|
|
|
##### Vote by map + mode, mixed
|
|
|
|
- `!vote start yeh_raas gor_raas lash_inv gor albas_inv` - Starts a vote with X maps, X modes
|
|
|
|
|
|
|
|
|
2022-09-06 14:23:04 +02:00
|
|
|
### Options
|
2022-09-06 11:27:30 -04:00
|
|
|
#### commandPrefix
|
|
|
|
###### Description
|
|
|
|
The command name to use in chat.
|
|
|
|
###### Default
|
|
|
|
```
|
|
|
|
!vote
|
|
|
|
```
|
2022-09-06 14:23:04 +02:00
|
|
|
#### minPlayersForVote
|
|
|
|
###### Description
|
|
|
|
The number of players needed on the server for a vote to start.
|
|
|
|
###### Default
|
|
|
|
```
|
2022-09-06 11:27:30 -04:00
|
|
|
40
|
2022-09-06 14:23:04 +02:00
|
|
|
```
|
|
|
|
#### voteWaitTimeFromMatchStart
|
|
|
|
###### Description
|
|
|
|
The time in mins from the start of a round to the start of a new map vote.
|
|
|
|
###### Default
|
|
|
|
```
|
2022-09-06 11:27:30 -04:00
|
|
|
15
|
2022-09-06 14:23:04 +02:00
|
|
|
```
|
|
|
|
#### voteBroadcastInterval
|
|
|
|
###### Description
|
|
|
|
The broadcast interval for vote notification in mins.
|
|
|
|
###### Default
|
|
|
|
```
|
|
|
|
7
|
|
|
|
```
|
|
|
|
#### automaticSeedingMode
|
|
|
|
###### Description
|
2022-09-08 11:52:50 +02:00
|
|
|
Instantly change to a seeding layer if server has less than 5 players and set next layer to a seeding layer if server has less than 20 players.
|
2022-09-06 14:23:04 +02:00
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
true
|
|
|
|
```
|
2022-09-06 11:27:30 -04:00
|
|
|
#### numberRecentMapsToExlude
|
|
|
|
###### Description
|
|
|
|
The random layer list will not include the X recent maps
|
|
|
|
###### Default
|
|
|
|
```
|
|
|
|
4
|
|
|
|
```
|
2022-09-06 14:23:04 +02:00
|
|
|
#### gamemodeWhitelist
|
|
|
|
###### Description
|
|
|
|
The random layer list will be generated with only selected gamemodes.
|
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
[ "AAS", "RAAS", "INVASION" ]
|
|
|
|
```
|
|
|
|
#### layerLevelBlacklist
|
|
|
|
###### Description
|
|
|
|
The random layer list will not include the blacklisted layers or levels. (acceptable formats: Gorodok/Gorodok_RAAS/Gorodok_AAS_v1).
|
|
|
|
###### Default
|
|
|
|
```
|
|
|
|
[]
|
|
|
|
```
|
2022-09-16 01:07:54 +02:00
|
|
|
#### hideVotesCount
|
|
|
|
###### Description
|
|
|
|
Hides the number of votes a layer received in broadcast message.
|
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
false
|
|
|
|
```
|
|
|
|
#### showRerollOption
|
|
|
|
###### Description
|
|
|
|
vote option to restart the vote with random entries.
|
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
false
|
|
|
|
```
|
2022-09-16 22:41:55 +02:00
|
|
|
#### voteBroadcastMessage
|
|
|
|
###### Description
|
|
|
|
Message that is sent as broadcast to announce a vote.
|
|
|
|
###### Default
|
2022-09-16 23:36:48 +02:00
|
|
|
```json
|
|
|
|
"✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!"
|
2022-09-16 22:41:55 +02:00
|
|
|
```
|
2022-09-16 23:36:48 +02:00
|
|
|
#### logToDiscord
|
|
|
|
###### Description
|
|
|
|
Enables/disables vote logging to Discord.
|
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
false
|
|
|
|
```
|
|
|
|
#### channelID
|
|
|
|
###### Description
|
2022-09-18 01:28:37 +02:00
|
|
|
The ID of the channel to log votes to.
|
2022-09-16 23:36:48 +02:00
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
"112233445566778899"
|
2022-09-16 22:41:55 +02:00
|
|
|
```
|
2022-09-18 01:28:37 +02:00
|
|
|
#### timeFrames
|
|
|
|
###### Description
|
|
|
|
Array of timeframes that allows to override options based on local time. See example configuration
|
|
|
|
###### Default
|
|
|
|
```json
|
|
|
|
[]
|
|
|
|
```
|
2022-09-18 14:19:22 +02:00
|
|
|
###### Timeframe format
|
|
|
|
```javascript
|
|
|
|
{
|
2022-09-18 14:22:11 +02:00
|
|
|
name: "friendly name", // a friendly name visible in the logs
|
|
|
|
start: "12:00", // timeframe start time <hour>:<minutes>
|
|
|
|
end: "18:00", // timeframe end time <hour>:<minutes>
|
2022-09-20 21:29:46 +02:00
|
|
|
timezone: 0, // Timezone relative to UTC time. 0 for UTC, 2 for CEST (UTC+2), -1 (UTC-1)
|
2022-09-18 14:22:11 +02:00
|
|
|
overrides: { // options to override
|
|
|
|
automaticVoteStart: false,
|
|
|
|
layerLevelBlacklist: [ "Anvil", "Chora" ]
|
2022-09-18 14:19:22 +02:00
|
|
|
}
|
2022-09-18 14:23:04 +02:00
|
|
|
}
|
2022-09-18 14:19:22 +02:00
|
|
|
```
|
2022-09-06 14:23:04 +02:00
|
|
|
### Example configuration
|
|
|
|
```json
|
2022-09-06 14:23:48 +02:00
|
|
|
{
|
2022-09-06 14:13:23 +02:00
|
|
|
"plugin": "MapVote",
|
|
|
|
"enabled": true,
|
2022-09-17 01:36:04 +02:00
|
|
|
"discordClient": "discord",
|
2022-09-18 00:38:06 +02:00
|
|
|
"automaticVoteStart": true,
|
2022-09-06 14:13:23 +02:00
|
|
|
"minPlayersForVote": 30,
|
|
|
|
"voteWaitTimeFromMatchStart": 10,
|
|
|
|
"voteBroadcastInterval": 7,
|
|
|
|
"numberRecentMapsToExlude": 4,
|
|
|
|
"automaticSeedingMode": true,
|
|
|
|
"gamemodeWhitelist": [ "AAS", "RAAS", "Invasion" ],
|
2022-09-16 01:07:54 +02:00
|
|
|
"layerLevelBlacklist": [ "BlackCoast_Seed" ],
|
|
|
|
"hideVotesCount": false,
|
2022-09-16 22:41:55 +02:00
|
|
|
"showRerollOption": false,
|
2022-09-16 23:36:48 +02:00
|
|
|
"voteBroadcastMessage": "✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!",
|
2022-09-17 01:36:04 +02:00
|
|
|
"logToDiscord": true,
|
2022-09-18 00:38:06 +02:00
|
|
|
"channelID": "112233445566778899",
|
2022-09-18 00:41:09 +02:00
|
|
|
"timeFrames": [
|
2022-09-18 00:38:06 +02:00
|
|
|
{
|
2022-09-18 01:28:37 +02:00
|
|
|
"name": "follow layer rotation list",
|
2022-09-18 00:38:06 +02:00
|
|
|
"start": "12:00",
|
|
|
|
"end": "18:00",
|
2022-09-20 21:29:46 +02:00
|
|
|
"timezone": +2,
|
2022-09-18 00:38:06 +02:00
|
|
|
"overrides": {
|
|
|
|
"automaticVoteStart": false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": "22:00",
|
|
|
|
"end": "02:00",
|
2022-09-20 21:29:46 +02:00
|
|
|
"timezone": -1,
|
2022-09-18 00:38:06 +02:00
|
|
|
"overrides": {
|
|
|
|
"voteBroadcastMessage": "Late night games? Vote your favourite map!"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2022-09-18 01:32:41 +02:00
|
|
|
}
|
2022-09-06 14:23:04 +02:00
|
|
|
```
|