MMOCore
概览
MMOCore 扩展将 MMOCore RPG 插件接入 TypeWriter。它把玩家的 MMOCore 档案(职业、等级、点数、属性、专业、技能、技能树、传送点、队伍和公会)公开为 TypeWriter 的事实和变量,使你的对话、任务和受众都能据此作出反应。
它还添加了跟随 MMOCore 事件的任务目标(专业经验、专业等级、技能释放)、用于驱动传送点系统和专业经验的动作,以及两个分组条目,让队伍或公会可以共享任务进度。
大多数条目只读取数据。扩展本身不存储任何内容:每个值都是在 TypeWriter 请求时实时从 MMOCore 获取的。
功能
- 档案事实 — 通过单个可选值读取等级、经验、点数、生命值、法力值、体力值和 stellium。
- 职业与专业事实 — 检查当前职业、职业等级,以及任意专业的等级或经验。
- 技能事实 — 读取职业技能的等级、是否已解锁,以及技能槽位是否已绑定。
- 技能树事实 — 读取技能树节点的等级,或检查其是否已解锁或已满级。
- 传送点 — 解锁、锁定或将玩家传送到 MMOCore 传送点,并检查某个传送点是否已解锁。
- 任务目标 — 用于 TypeWriter 任务的专业经验、专业等级和技能释放目标。
- 队伍与公会 — 成员数量作为事实,公会名称、标签、id、所有者和成员作为变量。
- 分组 — 在 MMOCore 队伍或公会之间共享 TypeWriter 事实。
- 列表变量 — 已解锁的技能、已解锁的节点、传送点、已绑定的技能、好友以及当前的施法链。
安装
- 在服务器上安装 MMOCore 及其依赖库 MythicLib。
- 确认已安装 TypeWriter 官方的 Quest 扩展。这三个目标需要它。
- 从商店获取该扩展(见上方摘要面板中的按钮),并将 JAR 放入
plugins/Typewriter/extensions/。 - 重启服务器。启动时,控制台会输出
[MMOCoreExtension] MMOCoreExtension enhancements initialized successfully.
快速上手
创建一个任务步骤:当玩家的采矿专业达到 10 级时完成,然后解锁一个传送点:
- 在 TypeWriter 网页面板中,打开一个**序列(sequence)**页面,添加一个 Unlock Waypoint 动作。将
waypointId设为 MMOCore 传送点的 id,例如spawn_town。 - 打开(或创建)一个存放你任务的**静态(static)**页面,添加一个 Profession Level Objective。
- 在
quest中填入你的任务条目,在display中填入显示在任务追踪器中的文本,在profession中填入专业 id(例如mining),在level中填入10。 - 将
onComplete设为第 1 步中的 Unlock Waypoint 动作。 - 发布。当拥有该激活任务的玩家达到该等级时,传送点就会被解锁。
若要在对话条件中使用玩家的职业,请添加一个 Class Fact,并将 classId 设为 MMOCore 的职业 id。当玩家拥有该职业时它读取为 1,否则为 0,因此你可以在条件中将 value 设为 1 来使用它。
在 Profession Level Objective 或 Add Profession Experience 上将 profession 留空,即可改为针对主职业的等级和经验,而不是某个专业。
工作原理
事实和变量按需读取。目标会监听 MMOCore 事件(获得经验、升级、技能释放),并且只对符合该目标 criteria 且任务处于激活状态的玩家计数。经验和技能释放目标会把进度存储在你链接的 fact 中,该事实必须是可持久化(可缓存)的事实,例如永久事实或会话事实。
占位符
传送点动作的 waypointId 字段接受 PlaceholderAPI 占位符。在查找传送点之前,它们会针对该玩家进行解析。
| 字段 | 接受 |
|---|---|
Unlock Waypoint、Lock Waypoint 和 Warp Waypoint 的 waypointId | 传送点 id,或返回传送点 id 的占位符。 |
条目
38 个条目,由扩展源码生成。
动作5
- Add Profession ExperienceAdd experience to a MMOCore profession
- Mmocore Leave Skill CastingForce the player to exit MMOCore's casting mode
- Mmocore Lock WaypointRemove access to a MMOCore waypoint
- Mmocore Unlock WaypointUnlock a MMOCore waypoint for the player
- Mmocore Warp WaypointWarp the player to a MMOCore waypoint using stellium
目标3
- Mmocore Profession Exp ObjectiveGain MMOCore profession experience
- Mmocore Skill Cast ObjectiveCast specific MMOCore skills
- Profession Level ObjectiveReach a certain MMOCore profession level
事实15
- Class Level FactPlayer's MMOCore class level
- Guild Members FactNumber of members in the player's guild
- Guild Online Members FactNumber of online members in the player's guild
- Mmocore Attribute Value FactNumber of points invested in a specific MMOCore attribute
- Mmocore Class FactCheck the player's current MMOCore class
- Mmocore Player Boolean FactExpose boolean values from a player's MMOCore profile
- Mmocore Player Number FactExpose various numeric values from a player's MMOCore profile
- Mmocore Profession FactRetrieve information about a MMOCore profession
- Mmocore Skill FactRead state about a specific MMOCore class skill
- Mmocore Skill Slot Bound FactCheck whether a MMOCore skill slot currently holds a skill
- Mmocore Skill Tree Node FactInspect a specific MMOCore skill tree node
- Mmocore Stat Value FactExpose MMOCore stat values, either total or base
- Mmocore Waypoint Unlocked FactCheck if the player unlocked a specific MMOCore waypoint
- Party Members FactNumber of members in the player's party
- Profession Level FactPlayer's level in a MMOCore profession
变量13
- Mmocore Active Casting Skills VariableReturns the list of skill identifiers available in the current casting chain
- Mmocore Bound Skill VariableReturns the skill identifier bound to a specific MMOCore slot
- Mmocore Friends List VariableReturns the UUIDs of the player's MMOCore friends
- Mmocore Guild ID VariableReturns the identifier of the player's MMOCore guild if any
- Mmocore Guild Members VariableReturns the UUIDs of the members in the player's MMOCore guild
- Mmocore Guild Name VariableReturns the name of the player's MMOCore guild if any
- Mmocore Guild Owner VariableReturns the owner UUID of the player's MMOCore guild if any
- Mmocore Guild Tag VariableReturns the tag of the player's MMOCore guild if any
- Mmocore Player Class VariableReturns the identifier of the player's current MMOCore class
- Mmocore Unlocked Nodes VariableReturns every skill tree node identifier the player has unlocked
- Mmocore Unlocked Skills VariableLists the MMOCore skills unlocked for the player's current class
- Mmocore Waypoints VariableLists every waypoint identifier unlocked by the player
- Player Class VariablePlayer's MMOCore class name
组2
- Guild GroupGroup for the whole guild
- Party GroupGroup for the whole party
故障排查
扩展没有加载。 必须已安装并启用 MMOCore 和 MythicLib,并且 TypeWriter 的 Quest 扩展必须存在。请查看启动时控制台中的第一个错误。
事实始终读取为 0。 该玩家没有 MMOCore 档案(例如 Citizens NPC),或者 id 有误。classId、professionId、skillId、fullId 和 waypointId 必须与 MMOCore 的配置一致。Class Fact 对 classId 不区分大小写;其他 id 会按原样传给 MMOCore。
运行动作时没有任何反应。 当 id 在 MMOCore 中不存在时,传送点动作会记录类似 Attempted to unlock unknown waypoint '...' for <player> 的警告。请在 MMOCore 的传送点配置中检查该 id。当专业 id 未知时,Add Profession Experience 会静默地不执行任何操作。
经验或技能释放目标始终不推进。 请在 fact 中链接一个持久化事实,确保 quest 中的任务对该玩家处于激活状态,并且玩家符合 criteria。对于技能释放目标,skillIds 接受 MMOCore 技能处理器的 id,requireSuccess 会忽略失败的释放。
专业目标把所有专业都计算在内。 在 Profession Exp Objective 上,profession 为空时会接受任何专业的经验。请填写它以追踪某一个专业。
传送没有效果或花费过高。 Warp Waypoint 使用 MMOCore 自带的传送,并带有 stelliumCost。费用由 MMOCore 处理,因此玩家需要有足够的 stellium,并且适用传送点的规则。
相关扩展
- MMOItems — 面向 MMOItems 物品和制作的配套集成。