跳到主要内容

配置文件

config.yml 里与 MMOCore 同名的选项意思相同,/sv admin import mmocore config 会自动搬过来。施放相关见技能槽与施放,经验相关见等级与经验。

数据库​

database:
type: sqlite # sqlite(单服)或 mysql(多个子服共用)
file: data.db
host: 127.0.0.1
port: 3306
database: starvocation
username: root
password: ''
parameters: 'useSSL=false&characterEncoding=utf8&serverTimezone=UTC'
table-prefix: sv_
pool-size: 6

MySQL 8 与 MariaDB 都可以。数据表会自动建立:sv_players(每位玩家一行,所有职业的进度存成 JSON)与 sv_boosters(经验加成)。

跨服​

sync:
server-id: '' # 本服名称,留空自动生成(多个子服不要重复)
wait-seconds: 6 # 换服时最多等待上一个子服保存几秒
lock-timeout-seconds: 90 # 多久没更新的锁视为失效(子服崩溃时)
health: true # 换服时同步生命值

玩家在 A 服时数据被 A 服锁住;换到 B 服时,B 服等 A 服保存完、释放锁才读取,不会读到旧数据而回档。A 服崩溃时,锁超过 lock-timeout-seconds 自动失效。

读取失败时玩家会收到提示,而且这次不会保存,避免空数据覆盖数据库里的正确数据。

auto-save:
enabled: true
interval: 1800 # 秒,最少 60
log: false

初始数据​

default-playerdata: # 新玩家 / 第一次使用某个职业时
level: 1
class-points: 1 # 换职业的次数(MMOCore 默认 0)
skill-points: 0
skill-realloc-points: 0
skill-tree-realloc-points: 0
attribute-points: 0
attribute-realloc-points: 0
skill-tree-points: 0 # + 初始全局天赋点
health: 20
mana: 20
stamina: 20
stellium: 20

选择职业​

class-select:
cost: 1 # 选择职业消耗几点职业点(MMOCore 固定 1)
first-choice-free: false # + 从默认职业第一次选择时免费
keep-progress: true # 换回以前的职业时保留进度
confirm: true # 先打开确认界面
save-default-class-info: false
force-class-selection: false # 还是默认职业时进服打开选择界面

其他​

global-skill-cooldown: 10 # 主动技能公共冷却(tick)
passive-skill-need-bound: true
can-creative-cast: false
allow-duplicate-binding: false

combat-log: # 战斗状态:被这些伤害打到或攻击别人后 timer 秒
timer: 10
causes: [ENTITY_ATTACK, PROJECTILE, MAGIC, ...]

skill-tree-scroll-step-x: 1
skill-tree-scroll-step-y: 1
enable-global-skill-tree-gui: true # /sv tree 可以切换技能树
enable-specific-skill-tree-gui: true # /sv tree <技能树> 可用
shift-click-player-profile-check: false # 潜行 + 右键玩家查看他的角色信息

resource-bar-colors: # %mmocore_stamina_bar% 的颜色
stamina-whole: GREEN
stamina-half: DARK_GREEN
stamina-empty: WHITE

command-verbose: # 管理指令执行后显示结果:true / player / console / false
attribute: true
skill: true
class: true
experience: true
level: true
points: true
reset: true
resource: true

health-regeneration: true

command-aliases: # 别名: 界面(class / skills / attributes / profile / skilltree)
c: class
att: attributes
st: skilltree

兼容​

compat:
mmocore-placeholders: true # 注册 %mmocore_xxx%(装了 MMOCore 时不注册)
mmocore-command: true # 注册 /mmocore(装了 MMOCore 时不注册)
mmocore-permissions: true # 认得 mmocore.class.<职业>
mmoitems: true # 成为 MMOItems 的 RPG 核心
mythicmobs-placeholders: true # MythicMobs 的 <mana> <stamina> <stellium> <attribute.xxx>
mythiclib-config: true # 没装 MMOCore 时修正 MythicLib 的 MMOCORE 设定(见安装与获取)

其他文件​

文件说明
stats.yml所有职业共用的基础属性(MMOCore 格式),职业 attributes: 没写的属性用这里的值
exp-sources.yml经验组,见等级与经验
triggers.yml触发组,见触发动作
messages.yml全部消息
token.yml授权码,见安装与授权