跳到主要内容
版本:0.0.55

VotingPresetPlugin

备注

该插件强制要求最低 CSP 版本 0.2.0 (2651),并且需要在 extra_cfg.yml 中设置 EnableClientMessages: true

配置

extra_cfg.yml 中启用该插件

extra_cfg.yml
EnablePlugins:
- VotingPresetPlugin

配置示例

plugin_voting_preset_cfg.yml
# Reconnect clients instead of kicking when restart is initiated. 
# It's recommended to set it to false with varying entry lists between the presets
EnableReconnect: true
# Enable Preset voting. Set this to false to enable automatic preset cycling
EnableVote: false
# Number of choices available to players in a vote
VoteChoices: 3
# If set to true, current preset/track will be included in the randomized cycling
# and will always be added to a vote as the first choice
EnableStayOnTrack: false
# Will preset/track change randomly with equal odds if no vote has been counted
ChangePresetWithoutVotes: false
# Whether to skip the comparison of the starting entry list to the presets entry lists.
SkipEntryListCheck: false
# Time between votes or automatic preset cycles.
# Minimum 5, Default 90
IntervalMinutes: 60
# How long a vote stays open.
# Minimum 10, Default 300
VotingDurationSeconds: 300
# Time between end of vote and restart notification.
# Minimum 0, Default 10
TransitionDelaySeconds: 30
# Time between restart notification and restart.
# Minimum 2, Default 5
TransitionDurationSeconds: 10
# Preset specific settings
# The cfg/ directory is always ignored for the presets pool.
Meta:
# The name that is displayed when a vote is going on or the preset is changing
Name: "SRP"
# Set to true too make this preset only available for admins.
# Set to false to add this preset into the preset pool for voting
AdminOnly: false

将你的预设放在 presets 文件夹中,其中需要包含通常位于 cfg 文件夹内的所有文件。
文件夹结构示例:

📁presets
├── 📁preset_name_1
│ ├── 📁cm_content
│ ├── 📁reference
│ ├── 📁schemas
│ ├── 📄csp_extra_options.ini
│ ├── 📄data_track_params.ini
│ ├── 📄entry_list.ini
│ ├── 📄extra_cfg.yml
│ ├── 📄plugin_example_name_cfg.yml
│ └── 📄server_cfg.ini
└── 📁preset_name_2
├── 📁cm_content
├── 📁reference
├── 📁schemas
├── 📄csp_extra_options.ini
├── 📄data_track_params.ini
├── 📄entry_list.ini
├── 📄extra_cfg.yml
├── 📄plugin_example_name_cfg.yml
└── 📄server_cfg.ini

命令

大多数命令都有多个别名

显示当前赛道 / 预设

  • /currenttrack
  • /presetshow
  • /currentpreset

为下一个赛道 / 预设投票

服务器会按照配置的时间间隔提示玩家为新地图投票。

  • /votetrack <number>
  • /vt <number>
  • /votepreset <number>
  • /vp <number>
  • /presetvote <number>
  • /pv <number>

管理员命令

列出可用赛道 / 预设

  • /presetlist
  • /presetget
  • /presets

更改赛道 / 预设

具体用法会在赛道列表中显示

  • /presetset
  • /presetchange
  • /presetuse
  • /presetupdate

发起赛道 / 预设投票

  • /presetstartvote
  • /presetvotestart

结束赛道 / 预设投票

  • /presetfinishvote
  • /presetvotefinish

取消赛道 / 预设投票

  • /presetcancelvote
  • /presetvotecancel

以均等概率随机切换赛道 / 预设

  • /presetrandom