Skip to content

checks.md

checks.yml 是 Matrix 所有检查的规则文件。

TIP

在阅读本文之前,请确保您已阅读 Matrix 的核心概念

您可以:

  • 启用/禁用检查/子检查
  • 更改检查的惩罚
  • 更改检查的阈值
  • 更改检查的魔法值

入门

打开 checks.yml,您将看到如下内容:

yaml
# 检查 A
check-name-a:
  enable: true

  other-settings: ...

  decay:
    interval: 15
    amount: 5

  commands:
    10: '...'
    20: '...'

# 检查 B
check-name-b:
  enable: true

  other-settings: ...

  decay:
    interval: 15
    amount: 5

  commands:
    10: '...'
    20: '...'

# 检查 C
check-name-c:
...

让我为您解释一下,在 checks.yml 中,根节点是检查类型,冒号后面是一系列的设置。

  • enable 表示是否启用此类型的检查
  • other-settings 表示此类型检查的其他设置,通常,您可以在此定义一些子检查(模块)的设置或开关
  • decay 表示此类型检查的违规等级衰减设置
  • commands 表示当此类型检查的违规等级达到某个值时要执行的命令

以 KillAura 检查为例

yaml
killaura:
  # 启用 KillAura 检查?
  enable: true

  # Matrix 的各种 KillAura 检查模块列表
  modules:
    # 检查玩家在战斗中是否表现出缺陷
    flaw:
      type_a:
        enable: true
        vl: 3
      type_b:
        enable: true
        vl: 10
      type_c:
        enable: true
        vl: 10
      type_d:
        enable: true
        vl: 10
      type_e:
        enable: true
        vl: 5
    # 检查玩家攻击时是否有正确的旋转
    rotation:
      type_a:
        enable: true
        vl: 2
      type_b:
        enable: true
        vl: 2
    # 检查玩家是否表现出类似 aimbot 的瞄准特征
    aimbot:
      vl_weight: 7
      cancel_hit: true

      check_aimbot_sync: true
      check_aimbot_shake: true
      check_aimbot_snap: true
      check_aimbot_sensitivity: true
      check_aimbot_acceleration: true
      check_aimbot_bad_rotation: true

    # KillAura NPC 检查,它会在玩家身后生成一个假玩家以检测
    # 玩家是否在使用 KillAura,不用担心,玩家只能看到自己的 NPC
    npc:
      enable: true
      vl_weight: 5

      # NPC 的位置计算是否应异步运行,因为这可能会消耗一些资源
      async: true

      # NPC 是否使用真实的实体 ID 而不是随机生成的?
      # 一些作弊客户端可以绕过随机实体 ID
      real_entity_id: true

      # NPC 是否仅通过命令生成?如果设置为 false,NPC 将在玩家战斗时自动生成。
      # 如果设置为 true,您只能通过 "matrix npc" 命令为玩家生成 NPC。(默认:true)
      only_command_trigger: true

      # 玩家是否应该看到这个 NPC?(true = 可见)
      visible: true

      # 强制随机名称(默认:false)
      # 如果打开此选项,Matrix 生成的 NPC 将强制使用随机名称
      # 而不是在线玩家的随机名称,这可以解决一些客户端绕过“重复”名称 NPC 的问题。
      # 但 Matrix 不会为随机名称的 NPC 应用团队,您可能需要使用 API 自行应用 NPC 团队,
      # 否则一些客户端会基于 NPC 名称是否有颜色来绕过
      force_random_name: false

      # NPC 存在时间设置(ticks)
      check_ticks:
        base: 100
        attack_add: 20
        hit_bot_add: 50

      # NPC 运动设置
      movement:
        distance_base: 3.2
        distance_random_size: 0.75
        distance_attack_base: 3.0
        move_up_after_attack: false

    # Critical Hit 检查,防止玩家进行异常的暴击攻击
    critical:
      # 启用此模块?
      enable: true

      # 玩家在被此模块标记后应获得多少 VL?
      vl_weight: 5

      # Matrix 在检测到玩家作弊后是否应取消玩家的攻击?
      cancel_attack: true

    # Strafe 检查
    strafe:
      enable: true
      vl_weight: 3
      cancel_move: true

    # 组合检查
    combine:
      aimbot_with_reach:
        time: 5000
        condition:
          - 'ka.abt.magic'
          - 'hb.reach'
          - 'hb.reach'
        action: 5 # +5 VL

  # 自定义 vl 衰减间隔(秒)和 vl 衰减步长
  decay:
    interval: 15
    amount: 5

  # 违规阈值
  # number_of_violations: '<command>'
  commands:
    10: 'matrix npc %player% 100'
    20: 'matrix notify %player% 可能在使用战斗作弊 (KillAura)'
    35: 'matrix notify %player% 正在使用战斗作弊 (KillAura) #2'
    45: 'matrix delay 5 matrix kick %player% KillAura'

decay 部分特别重要,因为它控制玩家的违规等级(VL)如何随时间减少。interval 设置确定每次衰减操作之间的时间(以秒为单位),amount 设置确定每次衰减的 VL 数量。这允许玩家的 VL 在停止作弊后逐渐减少,防止因暂时的作弊行为导致永久的高 VL。

commands 部分用于定义当玩家的 VL 达到某些阈值时应采取的行动。左侧的数字表示 VL 阈值,右侧的字符串是达到这些阈值时要执行的命令。

例如,当玩家的 VL 达到 10 时,将执行命令 matrix npc %player% 100。此命令生成一个 NPC 100 ticks 以进一步检查玩家是否在使用 KillAura。

当 VL 达到 20 和 35 时,会向服务器管理员发送通知,提醒他们玩家可能在使用战斗作弊。

最后,当 VL 达到 45 时,玩家将在 5 秒延迟后被踢出服务器,原因是 "KillAura"。

此配置文件允许服务器管理员根据需要自定义 KillAura 检查,调整检查的敏感度和惩罚的严重程度。

占位符

  • %player%: 触发检查的玩家的名称。
  • %message%: 检测详情的消息。
  • %tooltips%: 检测详情的工具提示消息。
  • %add_vl%: 要添加到玩家总 VL 的 VL 点数。
  • %vl%: 玩家总 VL 点数。
  • %ping%: 玩家延迟。
  • %tps%: 服务器的 TPS。
  • %component%: 检查的组件。
  • %version%: 玩家版本。
  • %world%: 玩家所在的世界。

您还可以安装 PlaceholderAPI 以获取更多占位符。

Made with ❤️ by RE