一键导入
weapons
nzm-wiki 武器数据维护指南。用于修改 data/weapons/*.mdx、武器类型、图鉴排序、射击间隔、换弹时间、伤害字段、ASCTypeID、武器衰减字段,以及从 refs/Exports/NZM/Content 下的官方 JSON 表提取武器配置。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
nzm-wiki 武器数据维护指南。用于修改 data/weapons/*.mdx、武器类型、图鉴排序、射击间隔、换弹时间、伤害字段、ASCTypeID、武器衰减字段,以及从 refs/Exports/NZM/Content 下的官方 JSON 表提取武器配置。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | weapons |
| description | nzm-wiki 武器数据维护指南。用于修改 data/weapons/*.mdx、武器类型、图鉴排序、射击间隔、换弹时间、伤害字段、ASCTypeID、武器衰减字段,以及从 refs/Exports/NZM/Content 下的官方 JSON 表提取武器配置。 |
data/weapons/*.mdx。NZM/Content/... 路径在本项目中对应 refs/Exports/NZM/Content/...。file_rate。武器单发耗时存 fire_interval。60 / fire_interval 计算每分钟射速。fire_interval: null,除非用户明确要求写入。scripts/update-weapon.ts 的默认模式是 fill-missing:已存在 MDX 只补缺失/空值,不覆盖已有人工填写值;需要覆盖脚本负责的字段时使用 --overwrite。scripts/update-weapon.ts --write 武器名 会创建 data/weapons/{武器名}.mdx,并复制武器图/技能图。武器数据层只保存射击间隔:
fire_interval: 0.3
展示层再计算射速:
rpm = 60 / fire_interval;
相关代码位置:
types/index.ts: Weapon.fire_intervalconstants/schema.ts: 编辑器字段顺序和字段类型components/WeaponCard.tsx: 射速展示components/DamageCalculator.tsx: 套用武器数据时把 fire_interval 转成 RPMscripts/generate-search-index.ts: 生成 public/weapon-stats.json 时输出 fire_interval不要从旧的 file_rate 反推 fire_interval,除非用户明确要求临时迁移。官方数据可用时必须以官方 JSON 为准。
提取 fire_interval、弹夹容量、总备弹数、asc_type_id 和武器衰减前,先检查这些文件是否存在:
refs/Exports/NZM/Content/DataTables/WeaponPrototypeConfig.json
refs/Exports/NZM/Content/Attributes/AutoGenerate/attr_weapon_asc.json
如果缺任意文件,停止提取并提示用户缺少哪个 JSON 文件,让用户重新导出或放到项目对应目录。不要猜测,不要用手写数据补。
可选文件:
refs/Exports/NZM/Content/DataTables/WeaponFeelParamTable.json
该文件用于后坐力、换弹等手感参数;如果任务只涉及 fire_interval 或衰减,它不是必需文件。
换弹时间规则:
LuaDataTable/WeaponItemConfigTable.json 的 WeaponMODConfigID 找到 WeaponFeelParamTable.json 中同 ID 的行。WeaponChangeClipTimeBase 是实际换弹动作时间,跑完后基本可以射击。WeaponChangeClipEndToFireTime 是换弹后的后摇/到可开火间隔。reload_time 先和游戏内显示统一,写 ceil(WeaponChangeClipTimeBase + WeaponChangeClipEndToFireTime)。JSON 表常见结构是:
const rows = Array.isArray(data) ? data[0]?.Rows : data.Rows;
WeaponPrototypeConfig.json 的 Rows 通常以武器中文名为 key,不是以 PrototypeID 为 key。优先遍历 Rows,用 row.PrototypeID === frontmatter.prototype_id 查找;也可以用 MDX 的 title 或文件名对应的中文名直接匹配 Rows key,作为 fallback 或交叉校验。
提取流程:
prototype_id。WeaponPrototypeConfig.json 中优先按 PrototypeID 查找行;如果缺少 prototype_id 或匹配失败,再按武器中文名匹配 Rows key。PrototypeID 有多行,优先选择 Mode === 0 的行;否则选择第一条有 ASCTypeID 的行。按中文名匹配时,如果该行的 PrototypeID 与 MDX 中已有 prototype_id 冲突,停止并报告,不要静默覆盖。ASCTypeID,并写入 MDX 的 asc_type_id。attr_weapon_asc.json 中按 ASCTypeID 查找行。既支持 row key 是 ASC ID,也支持行内字段 ASCTypeID。FireIntervalBase -> fire_intervalClipAmmoCountBase -> magazineMaxAmmoCount -> total_ammoDistanceBeginAttenuationBase / 100 -> attenuation_beginDistanceEndAttenuationBase / 100 -> attenuation_endAttenuationMinScale -> attenuation_scalePrototypeID、ASCTypeID、ASC 行或需要的字段时,不要静默跳过;汇总并报告给用户。注意:
weapon_type_id 当成 ASCTypeID。ASCTypeID 只能来自 WeaponPrototypeConfig.json 的匹配行。WeaponPrototypeConfig.json 的 Rows key,得到的仍然是该行里的 ASCTypeID;不要直接拿中文名去查 attr_weapon_asc.json。DistanceEndAttenuationBase,不要使用不存在或含义不明的 DistanceMinScaleBase。DistanceBeginAttenuationBase 和 DistanceEndAttenuationBase 都要除以 100,单位才是米。AttenuationMinScale 是最小伤害系数,直接写入 attenuation_scale。例子:飓风之龙的 prototype_id 是 20003000011,在 WeaponPrototypeConfig.json 查到 ASCTypeID: "143",再到 attr_weapon_asc.json 查 143。该 ASC 行中 DistanceBeginAttenuationBase: 1000、DistanceEndAttenuationBase: 2000、AttenuationMinScale: 0.3,所以 MDX 写入 attenuation_begin: 10、attenuation_end: 20、attenuation_scale: 0.3。
scripts/update-weapon.ts 的默认模式是 fill-missing:已存在 MDX 只补缺失/空值,不覆盖已有人工填写值;需要覆盖脚本负责的字段时使用 --overwrite。scripts/update-weapon.ts --write 武器名 会创建 data/weapons/{武器名}.mdx,并复制武器图/技能图。data/weapons 中没有 file_ratefire_interval、magazine、total_ammo 与官方 ASC 表一致asc_type_id、attenuation_begin、attenuation_end、attenuation_scalepublic/weapon-stats.json 同步输出 asc_type_id 和衰减字段fire_interval: null常用验证命令:
pnpm index
pnpm exec eslint components/WeaponCard.tsx components/DamageCalculator.tsx scripts/generate-search-index.ts constants/schema.ts types/index.ts lib/weapons.ts
如果只改数据,至少运行 pnpm index,并抽查 public/weapon-stats.json 是否包含 asc_type_id、attenuation_begin、attenuation_end、attenuation_scale,且不包含 file_rate。