[DIY] Customizable Weapons & Recipes / 自定义武器与配方
一个轻量化的模版模组,用于给不想写代码的玩家制作自定义武器模组。
A lightweight template mod that lets non-coders create custom weapon mods.
此模组参考并引用了 Kamakoto 的模组代码。
This mod references and was inspired by code from Kamakoto’s
mods.
谨慎与我的另一个模组 UMP-45 仿制狡狐 / Replicated Sly Fox同时使用,物品 ID 冲突。(本质上,这是因为在两个mod中添加的 UMP45 系列枪械均使用了 404001-404006 这些ID)
最好不要在内置yaml文件(UMP-45及其配方的配置文件)中新增或修改内容。请创建独立文件——Mod 更新(万一呢)可能会覆盖这些默认文件并造成数据丢失(当然,新建文件是否有用我也不确定,总之,做好备份)。然后,如果你希望你的 Mod 不包含 UMP-45,可以在上传之前移除 items.yaml 和 recipes.yaml (我将它们作为模版和注释)
关于武器属性,有人在评论区贴出了更多的属性键值及其中文翻译(英文可由字段直接推测);如果你不想修改某个属性,只需要移除该键就会使用复制来源的属性;理论上说,如果你能找到目标属性的key,你就可以修改。 关于配件,我没有细想,也没有测试过是否可以使用此模版自定义配件,可能会有slot上的冲突,不确定。
Please use with caution alongside my other mod UMP-45 仿制狡狐 / Replicated Sly Fox; the item IDs conflict. (Essentially, both mods add UMP-45 series weapons using the same IDs: 404001–404006.)
Please do not add or edit content in the default YAML files (for UMP-45). Create separate files instead—my mod updates (really?) can overwrite those defaults YAML and cause data loss (I can’t guarantee new files are fully safe either, so please keep backups.). Also, if you don’t want your mod to include the UMP-45 example, remove items.yaml and recipes.yaml before uploading (they’re provided as template/comment examples).
Regarding weapon attributes: a commenter has posted additional attribute keys along with their Chinese translations (the English names are straightforward from the field names). If you don’t want to change a particular attribute, simply remove that key and the value from the source item will be used. In theory, if you can identify any target attribute’s key, you can modify it.
Regarding attachments: I haven’t thought this through in detail or tested whether this template can customize attachments. There may be slot conflicts—I’m not sure yet.
现在兼容 武器&改装拓展。请将本
Mod 在加载顺序中置于该 Mod 之下;如未生效,可能需要返回主菜单或重启游戏(大退)。
Now compatible with Vanilla
Attachments Expanded. Place this mod below “Vanilla Attachments Expanded” in your load order. If changes don’t apply, try returning to the main menu or restarting the game.
English description below ↓
- 新功能:支持复制并自定义武器与合成配方。
- 默认内容:内置 UMP-45「仿制狡狐」。
- 目标:给模组作者与玩家一个轻量、可拓展的武器模板。
- 可配置:通过 items.yaml 与 recipes.yaml 管理内容。
- 可升级:支持等级/品质等数值拓展。
- 兼容友好:命名空间隔离、可与其他模组并存。
- 快速上手:提供示例与校验日志。
你可以依照包含的 items.yaml 和 recipes.yaml(示例来自我的另一个模组)创建任何以 items.yaml 或 recipes.yaml 结尾的文件,来定义你的自定义物品与配方。
在任何以 items.yaml 结尾的文件中添加武器条目;支持基础属性与自定义扩展字段。
在任何以 recipes.yaml 结尾的文件中定义合成方式、材料与产物数量。
- New feature: copy and add custom weapons and crafting recipes.
- Default content: includes the UMP-45 “Sly Fox” replica.
- Goal: a lightweight, extensible weapon template for creators and players.
- Configurable: manage content via items.yaml and recipes.yaml.
- Upgradeable: supports upgrade tiers and quality scaling.
- Compatible: namespaced to reduce conflicts and coexist with other mods.
- Quick start: ships with examples and validation logs.
You may create additional files that end with items.yaml or recipes.yaml (following the included samples from my other mod). Any such files will be loaded to define your custom items and recipes.
Add weapon entries in any file that ends with items.yaml. Base stats and optional custom fields are supported.
Define crafting methods, materials, and output counts in any file that ends with recipes.yaml.