Skill Engine
Skill Engine 并非一个独立的进度模组。
它本身不添加任何游戏玩法、属性或能力。
相反,Skill Engine 是一个框架,旨在让其他模组能够创建自己的高度可定制的技能树,包含:
- 节点解锁
- 属性需求
- 自定义图标
- 技能点处理
- 服务器同步
- 需求说明与工具提示
- 与其他进度系统(如 Ascend)的交互
如果你正在寻找一个_添加_技能的模组,那不是这个。
功能特性
JSON 驱动的 Skill Tree 系统
模组只需在以下位置添加 JSON 文件,即可注册自己的技能节点:
data/<yourmodid>/skillnodes/*.json
自动节点渲染
节点在 Skill Tree GUI 中的定位、显示、缩放、平移和绘制均由系统自动完成。
图标支持
使用你自己的纹理或原版物品纹理作为节点图标。
需求系统
节点可以指定:
- 链接节点
- 前置属性
- 技能消耗
- 自定义标签
用户界面会自动在工具提示和覆盖层中显示这些需求。
解锁逻辑与同步
解锁完全由服务端处理并同步至客户端。
完整的 API 支持
Skill Engine 包含一个公共 API 类,允许其他模组:
- 给予技能点
- 解锁技能节点
- 检查解锁状态
- 访问玩家技能数据
- 注册或引用节点
在你的模组中使用 Skill Engine
Skill Engine 的设计目标是极易于集成。
1. 将 Skill Engine 添加为依赖项
在你的 mods.toml 中:
[[dependencies.yourmodid]]
modId="skillengine"
type="required"
versionRange="[1.0.0,)"
在你的 Gradle 构建脚本中:
implementation fg.deobf("net.fretux.skillengine:SkillEngine:<version>")
2. 创建你的技能节点 (JSON)
示例:
{
"title": "Basic Strength",
"description": "You feel your muscles tighten.",
"cost": 1,
"position": { "x": -150.0, "y": -50.0 },
"links": ["skillengine:welcome"],
"tags": ["yourmodid:strength_1"],
"icons": "minecraft:textures/item/iron_sword.png",
"prerequisites": {
"strength": 10,
"agility": 5
}
}
将此文件放置在:
data/yourmodid/skillnodes/basic_strength.json
Skill Engine 将自动检测它并将其添加到树中。
3. 在代码中使用 API
Skill Engine 提供了一个简单的 API:
SkillEngineAPI.unlockNode(player, SkillEngineAPI.rl("yourmodid", "basic_strength"));
SkillEngineAPI.addSkillPoints(player, 3);
boolean unlocked = SkillEngineAPI.isUnlocked(player, SkillEngineAPI.id("welcome"));
你可以直接与系统进行交互,而无需触碰内部类。
Skill Engine 自身不执行任何操作。
它本身不会添加技能树或能力。
你仅在以下情况下需要安装此模组:
- 你游玩的某个模组依赖于 Skill Engine
- 你想安装用于创建技能树的附加组件
Skill Engine
Skill Engine is not a standalone progression mod.
It does not add gameplay, attributes, or abilities by itself.
Instead, Skill Engine is a framework designed to let other mods create their own highly customizable skill trees, complete with:
- Node unlocking
- Attribute requirements
- Custom icons
- Skill point handling
- Server synchronization
- Requirements & tooltips
- Interaction with other progression systems (like Ascend)
If you're looking for a mod that adds skills, this is not it.
Features
JSON-driven Skill Tree System
Mods can register their own skill nodes simply by adding JSON files under:
data/<yourmodid>/skillnodes/*.json
Automatic Node Rendering
Nodes are positioned, displayed, zoomed, panned, and drawn automatically in the Skill Tree GUI.
Icons Support
Use your own textures or vanilla item textures as node icons.
Requirements System
Nodes can specify:
- Linked nodes
- Prerequisite attributes
- Skill costs
- Custom tags
The UI automatically displays requirements in tooltips and overlays.
Unlock Logic & Sync
Unlocking is fully handled server-side and synced to the client.
Full API Support
Skill Engine includes a public API class that allows other mods to:
- Give skill points
- Unlock skill nodes
- Check unlock state
- Access player skill data
- Register or reference nodes
How to Use Skill Engine in Your Mod
Skill Engine is designed to be extremely easy to integrate.
1. Add Skill Engine as a Dependency
In your mods.toml:
[[dependencies.yourmodid]]
modId="skillengine"
type="required"
versionRange="[1.0.0,)"
In your Gradle build:
implementation fg.deobf("net.fretux.skillengine:SkillEngine:<version>")
2. Create Your Skill Nodes (JSON)
Example:
{
"title": "Basic Strength",
"description": "You feel your muscles tighten.",
"cost": 1,
"position": { "x": -150.0, "y": -50.0 },
"links": ["skillengine:welcome"],
"tags": ["yourmodid:strength_1"],
"icons": "minecraft:textures/item/iron_sword.png",
"prerequisites": {
"strength": 10,
"agility": 5
}
}
Place this in:
data/yourmodid/skillnodes/basic_strength.json
Skill Engine will automatically detect it and add it to the tree.
3. Use the API in Your Code
Skill Engine exposes a simple API:
SkillEngineAPI.unlockNode(player, SkillEngineAPI.rl("yourmodid", "basic_strength"));
SkillEngineAPI.addSkillPoints(player, 3);
boolean unlocked = SkillEngineAPI.isUnlocked(player, SkillEngineAPI.id("welcome"));
You can interact with the system without touching internal classes.
Skill Engine does nothing by itself.
It does not add a skill tree or abilities on its own.
You only need this mod if:
- A mod you play depends on Skill Engine
- You want to install addons that create skill trees
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
下载 Fretux's Skill Engine
- 节点现在在缩放时能更好地调整大小
- 优化了技能树的用户界面,包括改进配色、路径高亮显示、节点消耗数值以及一些小修复
- 修复了在退出游戏、死亡以及与来自 Ascend 的神龛交互时保存属性值的问题
- 修复了多个杂项错误和崩溃问题
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧