Player Abilities 是一个用于为玩家添加能力的框架。它支持玩家按需使用的主动能力、常驻的被动能力,以及在满足条件时自动触发的触发式能力。能力拥有等级、冷却时间和可选的前置要求,所有内容均可通过数据包进行调整。此外,还提供了大量的配置选项。
请查阅 网站 以获取有关如何使用此模组的详细说明。你也可以查看 Player Abilities: Reverie 模组,了解一些实际的应用案例。
本模组不附带任何具体能力,仅提供 API 和框架,供你创建并向游戏中添加自定义能力。它旨在让你为自己的用途制作专属能力。如果你想体验一些现成的能力,可以下载我为此制作的配套模组 Player Abilities: Reverie,其中实现了适用于我的整合包的能力。
三种类型的能力
主动 (Active) 能力由玩家选择并使用。能力可以瞬间释放、蓄力(按住充能,然后松开)或引导(效果在你维持期间持续运行)。使用某些能力可能要求玩家保持静止,并可能因受到伤害而被打断,屏幕上会显示进度条和倒计时。
当前选中的能力将显示在 HUD 上。

要切换新的能力,你可以打开能力轮盘(默认为 'z' 键)。它将显示你拥有的所有可用能力。如果你拥有的能力超过 10 个(或者配置了按类型分离能力),你可以在打开轮盘时使用鼠标滚轮在不同的能力轮盘页面间滚动。

被动 (Passive) 能力在你拥有它们时始终生效。它们可以提供属性加成,如生命值、速度、攻击距离或跳跃高度,也可以运行自定义的常驻行为。被动能力可以在能力书 (Ability Book) 中开启或关闭。

触发式 (Triggered) 能力会在其特定条件发生时自动触发。示例包括:承受了本该杀死你的伤害但幸存下来、受到伤害后获得加速。触发条件涵盖击杀、死亡、暴击、盾牌格挡、坠落、跳跃、进食、睡眠、获得经验值、重生、生命值低于阈值等。每个触发式能力都有独立的冷却时间,并在触发和重新就绪时显示通知。

*这些均为测试能力,不包含在本模组内。
undefined
核心系统
- 能力等级:能力可以根据等级缩放其效果、冷却时间和蓄力时间。
- 冷却时间与前置要求:能力可以拥有冷却时间以及诸如击杀数或承受伤害量等前置要求。必须满足所有这些条件后才能再次使用该能力。
- 效果:能力在使用时可以应用限时效果,可以是标准的药水效果,也可以是开发者编写的完全自定义的持续行为。
- 冷却缩减属性:装备和效果可以修改此属性。
能力典籍
每个注册的能力(包括其他模组添加的能力)都会自动生成一个“能力典籍”物品。使用该典籍可以让玩家学会该能力。典籍根据能力类型进行颜色编码,并收集在独立的创造模式标签页中。它们非常适合用于战利品表和任务奖励。
控制设置
四个按键绑定,均可在控制菜单中重新绑定。默认设置不与任何原版按键冲突:
- Z:能力轮盘(打开径向选择器;滚动以浏览分类)。
- X:使用选中能力。
- C:循环切换选中能力。
- N:查看能力(能力书)。
用户界面
- 用于选择主动能力的径向轮盘,按类别分组为多个页面。
- 能力书:列出你所掌握的所有能力,按类型分标签页,工具提示显示描述、冷却时间、等级和前置要求。在此处可切换被动能力的开关。
- HUD 组件:显示选中的能力、其冷却时间、活跃的效果计时器以及就绪通知。它有四种显示模式(始终显示、上下文相关、最小化、隐藏),并可放置在屏幕的任何角落。
数据包配置
每个游戏数值都可以通过数据包针对每个能力进行覆盖:冷却时间、蓄力时间、前置要求、最大等级、效果持续时间、属性和效果授予、分类,以及下方的模组兼容性连线。无需为任何能力编写配置文件。数据包的数值将覆盖默认值。
模组兼容(全部可选)
- Project MMO:将能力的使用限制在技能等级之后,并根据技能进度授予能力等级。
- Pufferfish's Skills:技能树节点可以授予能力并提升其等级。授予状态与技能树保持同步,包括重置技能点后的情况。
- Iron's Spells 'n Spellbooks:能力的法力消耗(计划中)。
本模组可以独立运行。当安装其他兼容模组时,兼容性功能会自动激活。
对于开发者
Player Abilities 是作为一个 API 构建的。能力通过注册表进行注册。属性和效果授予在单一方法中声明。触发式能力订阅内置的触发点,模组也可以定义并触发自己的事件。框架处理授予、等级、冷却时间、前置要求、持久化、同步和用户界面。可取消的事件允许其他模组限制或观察能力的使用。
路线图
- 原型:自定义种族与职业,定义为具有等级能力的组合,并以整体形式授予。
- Iron's Spellbooks 法力值整合。
- 更多的触发点和需求类型。
- 包含完整详情的文档站点。
需要 NeoForge 用于 Minecraft 1.21.1。
Player Abilities is a framework for adding abilities to players. It supports active abilities the player uses on demand, always-on passives, and triggered abilities that fire on their own when a condition is met. Abilities have levels, cooldowns, and optional requirements, and everything can be tuned from datapacks. There are also many configuration options.
Please check out the website for detailed instructions on how to use this mod. You can also look at the Player Abilities: Reverie mod to see some implementations.
This mod adds no abilities, it just adds the API and framework to create and add abilities to the game. It's intended for you to make your own abilities for your own use. If you want to try out some abilities you can download my companion mod to this one that implements abilities for my modpack, Player Abilities: Reverie.
Three kinds of abilities
Active abilities are selected and used by the player. An ability can fire instantly, charge up (hold to wind up, then release), or channel (the effect runs while you maintain it). Using an ability can require standing still and can be interrupted by damage, with a progress bar and countdown on screen.
The current selected ability will show up on the HUD.

To select a new ability you can open up the ability wheel (default 'z'). It will show each ability you have access to. If you have more than 10 abilities (or the config to separate abilities by type) you can scroll between ability wheels with the wheel open by using the mouse scroll.

Passive abilities are on while you have them. They can grant attribute bonuses like health, speed, reach, or jump strength, or run custom always-on behavior. Passives can be turned off and on from the Ability Book.

Triggered abilities fire automatically when their condition happens. Examples: survive a hit that would have killed you, gain speed after taking damage. Triggers exist for kills, deaths, crits, shield blocks, falls, jumps, eating, sleeping, gaining XP, respawning, dropping below a health threshold, and more. Each triggered ability has its own cooldown and shows a notification when it fires and when it is ready again.

*These are all test abilities and are not included in the mod.
undefined
Core systems
- Ability levels. Abilities can scale their effects, cooldowns, and wind-up times by level.
- Cooldowns and requirements. An ability can have a cooldown plus requirements like kills or damage taken. All of them must be met before it can be used again.
- Effects. Abilities can apply timed effects when used, either standard potion effects or fully custom ongoing behavior written by a developer.
- A cooldown reduction attribute that gear and effects can modify.
Ability Tomes
Every registered ability, including abilities added by other mods, automatically gets an Ability Tome item. Using the tome teaches the player that ability. Tomes are color coded by ability kind and collected in their own creative tab. They work well in loot tables and as quest rewards.
Controls
Four keybinds, all rebindable in the controls menu. The defaults do not conflict with any vanilla key:
- Z: Ability Wheel (open the radial selector; scroll to page through categories).
- X: Use Selected Ability.
- C: Cycle Selected Ability.
- N: View Abilities (the ability book).
UI
- A radial wheel for selecting active abilities, grouped into pages by category.
- An Ability Book listing everything you know, tabbed by kind, with tooltips showing descriptions, cooldowns, levels, and requirements. Passives are toggled here.
- A HUD widget showing the selected ability, its cooldown, active effect timers, and ready notifications. It has four display modes (always, contextual, minimized, hidden) and can be placed in any corner of the screen.
Datapack configuration
Every gameplay value can be overridden per ability from a datapack: cooldowns, wind-up times, requirements, max levels, effect durations, attribute and effect grants, categories, and the mod compat wiring below. No config file is required for any ability. Datapack values override the defaults.
Mod compat (all optional)
- Project MMO: gate ability use behind skill levels, and grant ability levels from skill progression.
- Pufferfish's Skills: skill tree nodes can grant and level abilities. Grants stay in sync with the tree, including respecs.
- Iron's Spells 'n Spellbooks: mana costs for abilities (planned).
The mod works standalone. Compat activates automatically when the other mods are installed.
For developers
Player Abilities is built as an API. Abilities are registered through a registry. Attribute and effect grants are declared in a single method. Triggered abilities subscribe to built-in trigger points, and mods can define and fire their own. The framework handles grants, levels, cooldowns, requirements, persistence, syncing, and UI. Cancelable events let other mods gate or observe ability use.
Roadmap
- Archetypes: custom races and classes, defined as leveled bundles of abilities and granted as a unit.
- Iron's Spellbooks mana integration.
- More trigger points and requirement types.
- A documentation site with full details.
Requires NeoForge for Minecraft 1.21.1.
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
下载 Player Abilities
1.0.9
- 使书籍具有使用时间。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
新增 50+ 个独特生物群系,为你的世界增添新树木、花卉等更多元素!
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
模组
让你能够在世界中的任何位置定位结构。
模组
添加睡袋和吊床,分别用于便携性和昼夜转换,同时不会设置新的出生点。共有16种颜色可选!
模组
TerraFirmaCraft (TFC) 是一个全面转换模组,对生存模式进行了彻底的改造与重新设计。

评论 0
登录后参与评分
还没有评论,来抢沙发吧