Skip to content

数据包自定义

面向服主与整合包作者。通过数据包 / 资源包调参与扩展;不能凭空发明新机制逻辑(效果与法术 type 须为已注册类型)。权威样例:MOD jar 内 data/fatepath/

载体内容生效
数据包talents/skills/spells/recipe/tags/destiny_lines/passive_effect_types//reload
资源包assets/<ns>/lang/*.json重载资源包
config/fatepath-common.tomlTXP / 魔力 / 天赋抽取数量等重启

id 后加载覆盖先加载;日志见 Loaded N … / Failed to load …


目录约定

data/<ns>/
├── talents/**/*.json          # 出生天赋;禁止写 type
├── skills/<category>/*.json   # 可学技能
├── spells/*.json
├── recipe/*.json              # 含 fatepath:talent_gated
├── destiny_lines/*.json
├── passive_effect_types/*.json  # 仅属性类扩展
└── tags/block|item/<name>.json  # 覆盖时用 fatepath 命名空间

建议自建命名空间;覆盖内置内容时保持原 id,文件放在对应 data/fatepath/...


天赋 talents/

字段说明
idmypack:talent/foo
max_level必填
effects{ type, value?, scope?, range? }
weight / grade抽取权重;common / extra / unique / ultimate
mutually_exclusive互斥天赋 ID
hidden / toggleable / grant_on_join隐藏 / 可开关 / 入服授予等级
grant_skills[{ "id", "level"? }] 或技能 ID 字符串
prerequisites[{ "id", "level" }]
growth_*发育型专用(见抗毒 / 耐热 JSON)

禁止字段 type(放 talents/ 即天赋)。未知 effects[].type加载失败


技能 skills/<category>/

categorycombat | mining | farming | fishing | crafting | exploration

字段说明
idmypack:combat/foo
max_level / cost_per_level费用数组长度须 ≥ max_level(多级时)
prerequisitesid + level
effects同天赋;未知 type → 加载失败
on_death{ lose_levels, min_level }{ lose_all: true }
mutually_exclusive / hidden / toggleable / grant_on_join同义
summon_mastery军团解锁表(见内置 summon_mastery.json
evoker_fangs{ base_fang_count, base_row_count, fang_spacing, start_distance }

解锁法术:技能 effects 声明对应解锁 type,并配对 spell 的 required_skill

json
{
  "id": "mypack:combat/arcane_bolt",
  "category": "combat",
  "max_level": 3,
  "cost_per_level": [25, 50, 100],
  "prerequisites": [],
  "effects": [{ "type": "fatepath:fireball" }]
}

法术 spells/

字段说明
id / type法术 ID;type ∈ 下表
required_skill关联技能(多数类型必填)
tierbeginnergod
color / icon / hidden轮盘
radius / duration_ticks / cast_ticks / angular_speed / mana_cost顶层参数(按 type 选用)
levels[]每级至少 damagecooldown_ticksmana_cost
summon召唤配置(见 summon_undead.json

levels[] 常用:scalesets_firepiercespeedexplosion_radiustarget_rangesplash_radiussplash_ratioundead_multiplierdebuff_duration_ticksduration_tickscast_ticks

Spell type

type备注
projectile_fireball火球
projectile_ice_cone冰锥
cast_projectile吟唱弹(辉光梭)
channel_beam引导(激流)
thunder_strike雷击
lightning_bolt闪电箭
flame_dash烈焰冲击
area_firestorm火雨
swift_surge迅涌
encourage鼓舞
wither_mist凋零迷雾
evoker_fangs尖牙
summon_undead / summon_creature召唤
ignite空手交互,不上轮盘
infinite_gacha隐藏向

命名空间均为 fatepath:。新逻辑需 Java(RegisterSpellTypesEvent)。

json
{
  "id": "mypack:arcane_bolt",
  "type": "fatepath:projectile_fireball",
  "tier": "intermediate",
  "required_skill": "mypack:combat/arcane_bolt",
  "color": "#AA44FF",
  "icon": "minecraft:ender_pearl",
  "levels": [
    { "damage": 5.0, "scale": 0.4, "cooldown_ticks": 40, "speed": 1.5, "mana_cost": 10, "explosion_radius": 0.0 }
  ]
}

被动效果 effects[].type

属性类:attack_damagearmormax_healthluckmining_speedmovement_speed(后两者为乘数)。

事件类(节选):night_visionwater_breathingfire_resistancemining_fortunefarming_fortunefishing_speedfishing_loot_tierauto_reelcrop_plant_chancecrop_plant_growthcatalyst_smeltingcobblestone_refineimbued_ashmagma_armorblock_counterview_others_talentsscope / range)、发育 poison_resistance_* / heat_tolerance_*、诅咒 damage_taken / mana_regen_penalty / neutral_aggro / villager_trade_*,以及各法术解锁 type(fireballhydro_jetsummonthunder_strike_lock …)。

完整列表以 PassiveEffectType 为准。属性类可通过 data/*/passive_effect_types/*.json 扩展(application + attribute);事件类须 Java 注册。


门控配方

type: fatepath:talent_gated(序列化名历史遗留)。字段 required_skill:玩家须拥有且未关闭该技能。

json
{
  "type": "fatepath:talent_gated",
  "group": "cobblestone_refine",
  "category": "building",
  "required_skill": "fatepath:crafting/cobblestone_refine",
  "ingredients": [{ "item": "minecraft:blackstone" }],
  "result": { "id": "minecraft:cobblestone", "count": 1 }
}

标签

模组固定读取 fatepath: 标签 ID。扩展请写:

data/fatepath/tags/block|item/<name>.json

标签用途
#fatepath:mining_txp_blocks / mining_txp_excluded挖矿 TXP
#fatepath:catalyst_smelting_ores / catalyst_smelting_meat催化熔炼
#fatepath:poison_resistance_training_food抗毒发育

命运线

data/<ns>/destiny_lines/*.jsonidroll_chancegrant_talentsspawn_at 等。详见 命运线


本地化

对象
天赋talent.<ns>.<path点分隔> + .description
技能skill.<ns>.<path点分隔> + .description
法术spell.<ns>.<path> + .description
效果模板effect.fatepath.<name>(内置;可覆盖)

调试

  • /reload 后查日志
  • /fatepath talent list|give · /fatepath skill list|give · /fatepath spell cast <id> · /fatepath txp give
  • 完整命令:命令参考;数值与 TXP:配置

覆盖同 id 可改数值或设 "hidden": true;全新事件效果 / 法术逻辑需改 MOD 或 addon。