
EmakiAttribute | RPG Attributes and Damage
Takes over vanilla combat maths with configurable attributes, staged damage types and traceable results.
Список изменений
Added
- Damage indicators: floating numbers above the target, on by default. Four triggers under
damage_indicator.triggerscovernormalhits,criticalhits,healanddodge. Vanilla combat does not roll for dodges on its own, so a dodge indicator only appears once the target carries a dodge attribute such asdodge_chanceand actually evades a hit; the bundledattributes/dodge_chance.ymldefaults to0. Text templates live in the language file underdamage.indicator, with%damage%for damage and%amount%for healing. - Indicators arc through the air and scale up on entry, down on exit. The animation is client-side interpolation, so the indicator never moves and costs nothing extra.
damage_indicator.motionsetsspeed,gravity, keyframe spacing viastep_ticks, and throw direction viadirection.mode(random,fixed,away_from_attacker). - Per-trigger overrides: the top level of
damage_indicatorholds the defaults and each trigger only writes the keys it changes. In the shipped defaults criticals fly higher and faster, healing drifts straight up. - Anti-spam keys
merge_window_ms(default500), which merges repeated damage on one target into a single number, andmax_per_target_per_second(default4). Matchingmerge_window_mstosame_signature_ignores_invulnerability.window_msmakes a multishot volley show one total instead of three numbers.0disables either limit. damage_indicator.ignored_causes, which defaults to blockingFIRE_TICK,POISON,WITHER,DROWNING,FREEZE,SUFFOCATIONandSTARVATION, since damage over time resolves every tick.damage_indicator.visible_to(involved/all), which applies on CoreLib's packet display backend. On the real-entity backend indicators are real entities visible to everyone nearby and the key has no effect.- Attribute-based shield blocking via
shield.mode(vanilladefault,attribute).vanillakeeps vanilla behaviour: a raised shield removes the hit entirely and calculated attack, critical and penetration values do not apply.attributezeroes the vanilla reduction and resolves blocking through ablockstage in the damage type. - Attributes
block_rate(chance a raised shield blocks) andblock_reduction(percentage of damage a successful block removes), with baselines underdefault_profile.attributesdefaulting to100each, i.e. a guaranteed full block that matches vanilla feel. Shield item attributes stack on top of the baseline.block_rate: 0means blocking never triggers at all. shield.require_facing(defaulttrue) andshield.facing_angle_degrees(default180, equivalent to vanilla). Vanilla blocking checks facing itself, so once the plugin takes over the check must be enabled or blocking works in all directions. Environmental damage has no direction and never counts as frontal.- Bundled
attributes/block_rate.ymlandattributes/block_reduction.yml, plus ablockstage in the bundleddamage_types/physical.ymlanddamage_types/projectile.yml. - A
variables:block on damage stages: define your own variables in a stage and reference them fromexpression. Values can be numbers, expressions or random ranges, for examplesoft_cap: 120withoverflow: "max(0, %input% - %soft_cap%)", thenexpression: "%input% - %overflow% * 0.5". Your names override built-in variables; a random variable rolls once per expression but rerolls per stage and per hit. - BetterHUD 2.0.0 soft dependency, connected automatically when present, with 11 triggers you can bind any popup or HUD element to from BetterHUD's own config:
emaki_melee_hit,emaki_ranged_hit,emaki_sweep_hit,emaki_critical_hit,emaki_kill,emaki_damage_taken,emaki_dodge_success,emaki_shield_block,emaki_resource_consumed,emaki_resource_low,emaki_point_allocated. ResourceDefinitionView, returned bycatalog().resources().
Changed
scaling_curvesnow takes effect, so review your values before upgrading a live server. The section has been inconfig.ymlfor a while but the plugin never read it: the curve list stayed empty and attribute calculation returned the original value, so the feature effectively did not exist. Anything you already wrote will apply for the first time. This is the only change here that alters player numbers. The default is empty, so servers that never configured it are unaffected.- Two
scaling_curvesdescriptions corrected against real behaviour.sqrtis weaker thanlogarithmicat the samefactor, and amplifies rather than decays when the excess is belowfactor.factordiffers per curve:logarithmicandsqrtdivide by it, so0or a negative value is lifted to1, while forpiecewise_linearit is the retained share of the excess, where0legitimately drops the whole excess and is not lifted. - An unrecognised
curve_typefalls back tologarithmicand the config precheck warns which attribute and which value, instead of quietly using the wrong curve.piecewise_linearis the single discount "excess timesfactor" and does not support multiple segments. - Actions use a new syntax, and most of it is rewritten for you. On first startup CoreLib rewrites the config files of every Emaki plugin under
plugins/, once only. Each edited file keeps the original beside it with a.legacy-backupsuffix; a line that cannot be converted leaves your config untouched and goes into a.v2-failedfile, with the file and line listed in the console. attributedamageis renamed toattribute_damageand is not covered by automatic rewriting, so rename it by hand. The old name is gone and a config still using it will not run that action. Skill configs using the action need the same rename.- The other twelve attribute actions keep their names (
attribute_add,attribute_set,attribute_remove,attribute_tag_add,attribute_tag_remove,attribute_tag_clear,attribute_resource_add,attribute_resource_set,attribute_resource_remove,attribute_resource_consume,attribute_sync,attribute_refresh), but the lines holding them are not rewritten either. Old placeholders inside them need changing by hand:%player%/%player_name%to%caster.name%,%player_uuid%to%caster.uuid%,%target_name%to%target.name%, and so on for the remaining%player_*%/%target_*%keys. - The console output of
/emakiattribute dumpprints the signature and attribute values as a heading with indented lines. They previously required a mouse hover, which the console cannot do. Players in game still get the hover version. - Config precheck problem lines are coloured by severity (yellow for warnings, red for errors), and loaded attributes are numbered in the console listing.
- For developers: the
EmakiAttributeApifacade is reworked.available(),readResourceCurrent,readResourceMax,consumeResource,readAttributeValue,scheduleEquipmentSync,applyDamage,registerItemContributionGateandisItemContributionActiveare replaced by three accessors:catalog()(reads),operations()(state changes) andextensions()(extension points and PDC).status()replacesavailable()and returnsApiStatus. The accessors return no-op implementations when the plugin is absent instead of throwing, and business methods returnEmakiResult<T>.catalog()also offersattributeIds(),damageTypeIds(),itemSnapshotandcombatSnapshot;operations()addscalculateDamageandresyncPlayer. - For developers: events moved to
api.event, extension points (AttributeContribution,AttributeContributionProvider,ItemContributionGateand their registration handles) toapi.extension, and models (AttributeSnapshot,DamageContext,DamageContextVariables,DamageResult,PdcAttributePayload,AttributeApiValues) toapi.model.
Fixed
- Maximum health pinned to the plugin's own figure, ignoring health-cap bonuses from every other source. It affected any server running other plugins or health-boost effects: a Health Boost potion that did not lengthen the health bar, max health from another plugin doing nothing, vanilla-mapped health caps swallowed, and health pushed back down to the plugin's figure with no way to heal past it. The ceiling now follows the max health actually in effect on the server.
- External healing being reverted:
/healrestoring full health then dropping back, golden apples having no effect, and health on login reset to the pre-logout value. Current health was derived from the plugin's own stored record, and changes from other plugins, commands or vanilla food regeneration were never observed, so the next sync or regeneration tick wiped them. Current health now follows the player's actual health. - Health sync reviving a dead player and stranding them on the death screen: an unresponsive respawn button, or being alive server-side while the client stays on the death screen until relogging. Between dying and respawning, natural regeneration kept writing a positive health value back. Nothing is written during that window now, and respawning still restores full health.
Removed
- JS scripting, with no automatic conversion, so your own
.jsscripts stop working and need redoing as config actions. For this plugin that covers JS damage hooks, JS-registered attribute definitions and providers, and JS damage types and pipelines. The bundled samplesscripts/examples/attribute_buff.js,scripts/examples/js_fire_mastery.jsandscripts/mythic/mythic_js_damage.jsare gone as well. PdcAttributeApiandPdcAttributeApiProvider, replaced by thePdcAttributeAccessreturned fromEmakiAttributeApi.extensions().pdc().
Notes
- Requires EmakiCoreLib
4.7.0. Update CoreLib first. - Back up your whole
plugins/EmakiAttribute/folder before upgrading. - Three things need doing by hand: renaming
attributedamagetoattribute_damage, updating old placeholders on attribute action lines, and redoing JS attribute extensions and damage hooks as config actions. - Attribute-based shield blocking needs one more manual edit: the plugin does not overwrite your existing
damage_types/physical.ymlandprojectile.yml, so add theid: blockstage yourself. Leavingshield.modeatvanillakeeps current behaviour and needs no changes. - All other new config keys ship with defaults, so an existing config loads as-is and gets filled in. Player attribute data, attribute points and resource state are unaffected and need no migration.
- Damage indicators are on by default; set
damage_indicator.enabledtofalseto turn them off. BetterHUD is optional and the plugin runs normally without it.
Emaki Attribute v4.6.0
MineBBS 更新日志
移除内容与破坏性变更
- 浏览器端 Web Console 层已移除:
web-console.yml、语言文件的 web 扩展与整个前端项目都不再随插件提供。此前用它做属性诊断或配置编辑的服主请改用命令。 - 插件描述文件由
plugin.yml迁移到paper-plugin.yml,commands:段落已移除,命令改为运行期注册;因此只有 Paper 系服务端能加载,纯 Spigot 不再支持。
一级属性系统
- 新增一级属性系统(力量 / 敏捷 / 智力)。一级属性可以来自 Lore、PDC 或玩家点数分配进入快照,并按权重展开为子属性贡献。
- 属性定义新增
parent_attribute: true与child_bonuses: {子属性: 系数}两个字段。
属性点与分配界面
- 新增属性点系统与分配 GUI。玩家命令
/emakiattribute points <view|open|add|reset>,管理员额外可用grant|set|setreset。 - 新增权限
emakiattribute.points(默认所有人)与emakiattribute.points.admin(默认 OP)。 - 新增可配置的分配界面
gui/attribute_points.yml(CHEST、6 行、支持翻页,包含一级属性、汇总、重置、翻页、关闭与边框槽位)。
属性标签与 MythicMobs 机制
- 属性定义新增
tags:(例如 DEBUFF)与临时属性叠加模式temporary_stack_mode: REPLACE|STACK。 - 新增 MythicMobs 机制
emaki_attribute_add、emaki_attribute_remove、emaki_attribute_add_tag、emaki_attribute_clear_tag,可按效果 id 增删,也可按标签批量清除;此前只有emaki_attribute与emaki_damage。
属性来源与伤害配置
- 新增物品属性来源策略
attribute_sources:read_lore_attributes、read_pdc_attributes、require_lore_pdc_match。开启匹配模式后,同一属性 id 必须在 Lore 与 PDC 中同时存在且数值相同,并且只计算一次。 - 新增
projectile_damage_type(默认projectile),可切换为physical以复用物理线属性。 - 新增
same_signature_ignores_invulnerability(enabled: true、window_ms: 500):同一攻击者、同一快照签名与伤害类型的多段攻击(例如多重射击的三支箭)不再因原版无敌帧互相抵消。 - 新增
attack_speed.scope(global/attribute_only):attribute_only只接管带有 EmakiAttribute 攻速属性的物品,其余交回原版处理。 - 新增客户端血量显示缩放
health_display_scaling(enabled: false、target: 20.0),只缩放客户端血条显示,不影响真实最大生命值与伤害结算。 - 新增
release_default_data(默认true);设为false后不再生成随包的属性、伤害类型、读取规则、Lore 格式、平衡系数与脚本示例。
接口与扩展能力
- 新增公开接口门面
EmakiAttributeApi,提供资源读取与消耗、属性读取、装备同步排程、伤害施加以及物品贡献闸门注册。 - 新增扩展点:第三方可以整件否决某个物品的 Lore + PDC 贡献(与既有的只增贡献提供者互补)。
- PDC 属性数据可以整体复制到另一件物品,并排除指定来源。
- 接入动作系统:属性同步、资源消耗、资源修改与临时属性标签动作。
校验与修复
- 属性定义校验更严格,配置错误会明确报出而不是静默失效:非一级属性上写了
child_bonuses、指向不存在的子属性、一级属性指向另一个一级属性,以及伤害类型阶段直接引用一级属性。 - 修复伤害反馈中攻击者显示为原版枚举名(例如
ZOMBIE)的问题,现在会解析为可读名称,玩家显示玩家名。 - 配置预检文本改为本地化(此前为硬编码英文),非英文服主现在能读懂预检结果。
- 追踪 / 调试字段标签本地化。
- 消息前缀更换为新的品牌渐变样式。
升级说明
- 需要 EmakiCoreLib
4.6.0,请先升级 CoreLib 再升级本插件。 api-version由1.21提升到1.21.8,低于 1.21.8 的服务端不再支持;依赖改为 Paper 结构化声明:EmakiCoreLib 为必需,MythicMobs / PlaceholderAPI / MMOItems 为可选。- 构建基线由 spigot-api 改为 paper-api,Java 目标仍为 25;
folia-supported: true与此前一致。 - 所有新增配置键都带默认值,现有配置可以照常加载并自动补齐,不需要手动迁移。
- 建议升级后验证一次
/emakiattribute points open、属性快照与伤害结算,并确认原本通过 Web Console 完成的诊断已改用命令。
SpigotMC Update Log
CENTER[B]◆ Emaki Attribute v4.6.0 Release ◆/B[/CENTER] [CENTER]Parent attributes, an attribute point system with allocation GUI, attribute tags with new MythicMobs mechanics, and Web Console removal.[/CENTER] CENTER━━━━━━━━━━━━━━━━━━━━/B [LIST] []Removed: the browser-based Web Console layer is gone, including web-console.yml, the locale web extension, and the whole frontend project. Use commands for attribute diagnostics and configuration instead. []Removed: the descriptor moved from plugin.yml to paper-plugin.yml and the commands: section is gone, so commands register at runtime. Only Paper-family servers can load the plugin; plain Spigot is no longer supported. []Added a parent attribute system (strength / agility / intelligence). Parent attributes enter the snapshot from lore, PDC, or player point allocation and expand into child attribute contributions by weight, using the new definition fields parent_attribute: true and child_bonuses: {child: factor}. []Added an attribute point system with an allocation GUI: /emakiattribute points <view|open|add|reset> for players, plus grant|set|setreset for admins, with the new permissions emakiattribute.points (default true) and emakiattribute.points.admin (default op). []Added the configurable allocation interface gui/attribute_points.yml (CHEST, 6 rows, paged, with parent-attribute, summary, reset, page, close, and border slots). []Added attribute tags and a temporary-attribute stacking mode: definitions gain tags: (for example DEBUFF) and temporary_stack_mode: REPLACE|STACK. []Added the MythicMobs mechanics emaki_attribute_add, emaki_attribute_remove, emaki_attribute_add_tag, and emaki_attribute_clear_tag for add/remove by effect id and bulk clear by tag. Previously only emaki_attribute and emaki_damage existed. []Added the item attribute source policy attribute_sources with read_lore_attributes, read_pdc_attributes, and require_lore_pdc_match. In match mode an attribute id must exist in both lore and PDC with equal values, and is then counted once. []Added projectile_damage_type (default projectile), switchable to physical to reuse physical-line attributes. []Added same_signature_ignores_invulnerability (enabled: true, window_ms: 500): multi-hit attacks from the same attacker with the same snapshot signature and damage type, such as three arrows from multishot, no longer suppress each other through the vanilla invulnerability window. []Added attack_speed.scope (global / attribute_only); attribute_only only intercepts items carrying an EmakiAttribute attack-speed attribute and leaves everything else to vanilla. []Added client health display scaling health_display_scaling (enabled: false, target: 20.0), which scales only the client-side health bar, not real max health or damage resolution. []Added release_default_data (default true); false stops generating the bundled attribute, damage type, read rule, lore format, balance coefficient, and script samples. []Added the public API facade EmakiAttributeApi with resource read/consume, attribute read, equipment sync scheduling, damage application, and item contribution gate registration. []Added an extension point letting third parties veto an entire item's lore + PDC contribution, complementing the existing add-only contribution provider. []PDC attribute payloads can now be copied wholesale between items with selected sources excluded. []Added action system integration for attribute sync, resource consume, resource modify, and temporary attribute tag actions. []Attribute definition validation is stricter and reports configuration errors instead of failing silently: child_bonuses on a non-parent attribute, pointing at a non-existent child, a parent pointing at a parent, and damage-type stages referencing a parent attribute directly. []Fixed damage feedback showing the attacker as a raw vanilla enum name such as ZOMBIE; it now resolves a readable name and uses the player name for players. []Fixed unreadable config precheck results for non-English owners; precheck text, along with trace and debug field labels, is now localized. []The message prefix uses a new brand gradient. []Requires EmakiCoreLib 4.6.0. api-version was raised from 1.21 to 1.21.8, and servers below 1.21.8 are unsupported. []Dependencies are now declared in Paper's structured form: EmakiCoreLib required, MythicMobs / PlaceholderAPI / MMOItems optional. The build base moved from spigot-api to paper-api, and the Java target stays at 25. []All new config keys ship with defaults, so an existing config loads as-is and gets filled in. [/LIST]
Modrinth Changelog
Added
- Parent attribute system (strength / agility / intelligence). Parent attributes enter the snapshot from lore, PDC, or player point allocation, and expand into child attribute contributions by weight. Definitions gain
parent_attribute: trueandchild_bonuses: {child: factor}. - Attribute point system with an allocation GUI:
/emakiattribute points <view|open|add|reset>for players, plusgrant|set|setresetfor admins. New permissionsemakiattribute.points(default true) andemakiattribute.points.admin(default op). - Configurable allocation interface
gui/attribute_points.yml(CHEST, 6 rows, paged, with parent-attribute / summary / reset / page / close / border slots). - Attribute tags and a temporary-attribute stacking mode:
tags:(e.g. DEBUFF) andtemporary_stack_mode: REPLACE|STACK. - MythicMobs mechanics
emaki_attribute_add,emaki_attribute_remove,emaki_attribute_add_tag,emaki_attribute_clear_tagfor add/remove by effect id and bulk clear by tag. Previously onlyemaki_attributeandemaki_damageexisted. - Item attribute source policy
attribute_sources:read_lore_attributes,read_pdc_attributes,require_lore_pdc_match. In match mode an attribute id must exist in both lore and PDC with equal values, and is counted once. projectile_damage_type(defaultprojectile), switchable tophysicalto reuse physical-line attributes.same_signature_ignores_invulnerability(enabled: true,window_ms: 500): multi-hit attacks from the same attacker with the same snapshot signature and damage type no longer suppress each other via the vanilla invulnerability window.attack_speed.scope(global/attribute_only);attribute_onlyonly intercepts items carrying an EmakiAttribute attack-speed attribute.- Client health display scaling
health_display_scaling(enabled: false,target: 20.0), affecting only the client-side health bar. release_default_data(defaulttrue);falsestops generating the bundled attribute, damage type, read rule, lore format, balance coefficient, and script samples.- Public API facade
EmakiAttributeApiwith resource read/consume, attribute read, equipment sync scheduling, damage application, and item contribution gate registration. - Extension point letting third parties veto an entire item's lore + PDC contribution, complementing the existing add-only contribution provider.
- Wholesale copying of PDC attribute payloads between items with selected sources excluded.
- Action system integration for attribute sync, resource consume, resource modify, and temporary attribute tag actions.
Changed
- Stricter attribute definition validation that reports configuration errors instead of failing silently:
child_bonuseson a non-parent attribute, pointing at a non-existent child, a parent pointing at a parent, and damage-type stages referencing a parent attribute directly. - Config precheck text and trace/debug field labels are localized.
- Message prefix switched to a new brand gradient.
api-versionraised1.21->1.21.8. Dependencies declared in Paper's structured form: EmakiCoreLib required; MythicMobs / PlaceholderAPI / MMOItems optional. Build base moved spigot-api -> paper-api; Java target unchanged at 25.
Fixed
- Damage feedback showed the attacker as a raw vanilla enum name (e.g.
ZOMBIE); it now resolves a readable name, using the player name for players. - Config precheck results were unreadable for non-English owners because the text was hardcoded English.
Removed
- The browser-based Web Console layer (
web-console.yml, the locale web extension, the whole frontend project). Owners who used it for attribute diagnostics or config editing must use commands instead. - The descriptor
commands:section, following theplugin.yml->paper-plugin.ymlmigration; commands register at runtime. - Support for plain Spigot. Only Paper-family servers can load the plugin.
Notes
- Requires EmakiCoreLib
4.6.0. Update CoreLib first. - Servers below 1.21.8 are unsupported.
folia-supported: truewas already declared before this release. - All new config keys ship with defaults, so an existing config loads as-is and gets filled in; no manual migration is required.
- After updating, verify
/emakiattribute points open, attribute snapshots, and damage resolution, and move any Web Console diagnostics over to commands.
