Purtmars Plugins
插件️Chemdah开始创建任务任务组件

追踪

追踪

track 组件为任务提供目标追踪功能,玩家追踪某个任务后,会在屏幕上获得视觉引导。组件由四个独立子系统组成:信标(beacon)、地标(landmark)、导航(navigation)、记分板(scoreboard),可以按需组合开启。

玩家同时只能追踪一个任务。输入 /chemdahtrackcancel 取消当前追踪。

追踪目标

center 字段指定追踪的目的地,所有视觉效果都会指向这里。

格式说明
world x y z固定坐标,如 world 100 64 100
adyeshach <实体ID>Adyeshach NPC,追踪目标跟随 NPC 移动,需安装 Adyeshach
quest_example:
  addon:
    track:
      center: "world 100 64 100"   # 追踪固定坐标
quest_example:
  addon:
    track:
      center: "adyeshach npc_elder"  # 追踪 NPC

track 可以写在任务(quest)或条目(task)上。写在任务上时,未接取任务的玩家追踪整个任务;接取后则追踪各条目各自的目标。

显示文本

字段类型说明
namestring追踪显示名称,支持语言文件
descriptionlist追踪描述文本(纯文本,不做变量替换),在 scoreboard-option.content 中通过 {description} 引用展开
messagelist开始追踪时发送给玩家的提示信息,支持 {name} 变量
quest_example:
  addon:
    track:
      center: "world 100 64 100"
      name: "寻找村长"
      description:
        - "前往村庄中心"
        - "与村长对话"
      message:
        - "&a开始追踪:{name}"

信标

信标在目标位置显示一道粒子光柱,帮助玩家远距离确认目标方向。

字段类型默认值说明
beaconboolean是否启用信标
beacon-option.typestringHAPPY_VILLAGER粒子类型
beacon-option.sizenumber粒子宽度
beacon-option.countnumber粒子数量
beacon-option.distancenumber最大显示距离(方块)
beacon-option.fixedbooleanfalsetrue 固定在目标位置;false 在玩家前方动态显示方向
beacon-option.periodnumber粒子刷新间隔(tick)
quest_example:
  addon:
    track:
      center: "world 100 64 100"
      beacon: true
      beacon-option:
        type: "FLAME"      # 火焰粒子
        size: 0.5
        count: 3
        distance: 64       # 64 格内可见
        fixed: false       # 在玩家前方显示指引方向
        period: 10         # 每 10 tick 刷新一次

fixed: false 时,信标始终显示在玩家与目标连线方向的前方,即使目标超出可见距离也能给出方向提示。fixed: true 时信标固定在目标坐标上方。

地标

地标在目标位置显示全息文字,可以展示距离、名称等信息。

字段类型默认值说明
landmarkboolean是否启用地标
landmark-option.distancenumber最大显示距离(方块)
landmark-option.hide-nearbooleanfalse靠近目标时自动隐藏地标
landmark-option.contentlist显示内容,支持 {distance}{name} 变量
quest_example:
  addon:
    track:
      center: "world 100 64 100"
      name: "村长"
      landmark: true
      landmark-option:
        distance: 128        # 128 格内可见
        hide-near: true      # 走到目标旁边时隐藏
        content:
          - "&e{name}"
          - "&7距离:{distance}m"

导航

导航通过寻路算法计算玩家到目标的路径,并沿路径播放粒子效果,引导玩家绕开障碍物。

字段类型默认值说明
navigationboolean是否启用导航
navigation-option.syncbooleanfalse是否在主线程寻路,建议保持 false 使用异步
navigation-option.distancenumber最大寻路距离(方块)
navigation-option.typestring显示类型:POINTARROW

POINT 模式

沿路径每个节点播放一颗粒子。

字段类型说明
point.periodnumber粒子发送间隔(tick)
point.typestring粒子类型
point.ynumberY 轴偏移量
point.size.xnumber粒子 X 轴散布范围
point.size.ynumber粒子 Y 轴散布范围
point.countnumber每个节点的粒子数量
point.speednumber粒子播放速度(节点间延迟 tick)
quest_example:
  addon:
    track:
      center: "world 100 64 100"
      navigation: true
      navigation-option:
        type: "POINT"
        distance: 64
        point:
          period: 20
          type: "CRIT"
          y: 0.5
          size:
            x: 0.1
            y: 0.1
          count: 1
          speed: 2

ARROW 模式

沿路径每隔两个节点绘制一个箭头形状。

字段类型说明
arrow.periodnumber效果发送间隔(tick)
arrow.typestring粒子类型
arrow.ynumberY 轴偏移量
arrow.densitynumber箭头密度(粒子点数)
arrow.lengthnumber箭头长度
arrow.anglenumber箭头张角
arrow.speednumber箭头播放速度(节点间延迟 tick)
quest_example:
  addon:
    track:
      center: "world 100 64 100"
      navigation: true
      navigation-option:
        type: "ARROW"
        distance: 64
        arrow:
          period: 20
          type: "CRIT"
          y: 1.0
          density: 3
          length: 0.5
          angle: 0.5
          speed: 2

记分板

记分板在玩家屏幕右侧显示任务信息,内容支持变量替换。

字段类型默认值说明
scoreboardboolean是否启用记分板
scoreboard-option.lengthnumber每行最大字符数,超出自动换行
scoreboard-option.contentlist显示内容,支持 {name}{description} 变量

content 中的每一项可以是普通文本(静态行),也可以是包含 {description} 的模板行(会展开为多行描述文本)。

quest_example:
  addon:
    track:
      center: "world 100 64 100"
      name: "寻找村长"
      description:
        - "前往村庄中心"
        - "与村长对话"
      scoreboard: true
      scoreboard-option:
        length: 20
        content:
          - "&e{name}"           # 静态行:显示追踪名称
          - "{description}"      # 展开行:显示所有描述行

完整示例

quest_find_elder:
  addon:
    track:
      center: "adyeshach npc_elder"   # 追踪 NPC
      name: "寻找村长"
      description:
        - "前往村庄中心广场"
        - "找到村长并对话"
      message:
        - "&a开始追踪:{name} &7(点击取消)"

      beacon: true
      beacon-option:
        type: "VILLAGER_HAPPY"
        size: 0.3
        count: 2
        distance: 128
        fixed: false
        period: 10

      landmark: true
      landmark-option:
        distance: 128
        hide-near: true
        content:
          - "&e{name}"
          - "&7{distance}m"

      navigation: true
      navigation-option:
        type: "POINT"
        distance: 64
        sync: false
        point:
          period: 20
          type: "CRIT"
          y: 0.5
          size:
            x: 0.1
            y: 0.1
          count: 1
          speed: 2

      scoreboard: true
      scoreboard-option:
        length: 20
        content:
          - "&e{name}"
          - "{description}"

On this page