自动购买材料并最大化升级

自动购买材料并最大化升级

升级武器时,可选择自动从商店购买缺少的材料。 Adds an option to automatically buy missing materials from the shop when upgrading weapons.

补料并最大升级

在《影之刃零》的武器升级界面新增「补料并最大升级」选项。它会优先使用背包里已有的材料,再计算哪些缺少的材料可以从商店补购,把购买材料和升级需要的尘埃一起算进去,预览当前能升到的最高等级。确认后,Mod 会按预览执行购买和升级。

v0.1.0 测试版 · 当前游戏内界面为简体中文

如何使用

  1. 进入武器升级界面,选中要升级的武器。
  2. 按 F8,或点击界面底部的 「补料并最大升级」。
  3. 查看当前等级和目标等级、需补购的材料及数量、补购费用、升级费用,以及总费用和当前持有的尘埃。
  4. 确认后开始执行。如果触发游戏原版的突破确认,还需要在原版弹窗中确认一次。在费用预览或突破确认处取消,均不会开始购买或扣费。

材料和费用怎么算

  • 优先用背包材料。 背包材料足够时,预览会说明本次仅使用背包材料,只需支付升级费用。
  • 只购买当前可售的缺料。 商店未解锁时,仅用背包材料计算。商店已解锁时,会考虑商品是否上架、库存和周目限购。以物换物的商品暂不纳入自动补购。
  • 根据预算确定目标等级。 补购费用和升级费用都计入预算。尘埃或材料只够升一部分时,预览会显示当前能达到的等级。已经达到当前等级上限时,会直接提示。
  • 支持单级和多级升级。 两种情况分别调用游戏原版的升级流程。如果预览后武器、材料或价格发生变化,请重新预览。
  • 保留原版突破提示。 预览中的跨档提醒涉及日后回退可能产生的消耗,具体以游戏原版确认弹窗为准。

前置与安装

两个 ZIP 是同一个 Mod 的不同加载器版本,只安装其中一个。 加载器需单独安装。

  1. 退出游戏,按前置页面的说明安装对应加载器。
  2. 解压所选 ZIP,把里面的 ProjectPBZ 文件夹合并到已经含有 ProjectPBZ 的游戏根目录。
  3. 确认 main.js 位于对应的 PBZAutoUpgrade 文件夹中。
    • PBZModLoader 版:ProjectPBZ/PBZModLoader/mods/PBZAutoUpgrade/
    • Mods Menu 版:ProjectPBZ/Content/JavaScript/PBZModsMenu/Mods/PBZAutoUpgrade/
  4. 启动游戏,打开武器升级界面,检查底部是否出现 Mod 入口。

改键、更新与卸载

  • 改键:编辑 Mod 目录下的 config.js,修改 keyboardKey,保存后重启游戏。默认键为 F8。请避开已被游戏或其他 Mod 占用的按键,例如 Mods Menu 默认使用的 F9。目前可用键盘和鼠标触发,暂无专用手柄快捷键。
  • 更新:退出游戏,备份自定义的 config.js,再用同一加载器版本的新文件覆盖。更新后按需重新应用改键设置。
  • 卸载:退出游戏,移走对应的 PBZAutoUpgrade 文件夹。此前已经完成的购买与升级会保留在存档中。

测试范围与已知限制

  • 已测试:Steam build 26367565。Mods Menu 版验证过二周目主武器补购及升级。PBZModLoader 版在与 Mods Menu 共存的环境中验证过加载和升级。也测试过单级升级、影之武装、两处确认取消、商店未解锁、商店售罄,以及重进游戏后保留升级结果。
  • 仍待验证:单独启用 PBZModLoader、材料尚未上架、有限库存的实际扣减和重复购买后的库存一致性。售罄场景已经测过,本版更新后的售罄提示仍待实机复验。改键后的触发、手柄与键盘混用及不同分辨率和 UI 缩放也待验证。
  • 关于交易异常:自动补购会先扣除尘埃,再把材料加入背包。如果途中发生异常,Mod 会停止后续操作。已完成的购买会保留,当前版本没有自动退款或完整回滚。如果看到操作停止提示,请勿重复确认,先检查背包、尘埃和交易日志。

问题反馈

如果入口没有出现,请先确认加载器能正常工作、ZIP 版本与加载器匹配,以及 main.js 位于上面的路径。如果购买或升级异常,欢迎在 Posts 里附上游戏版本、加载器及版本、当前周目、武器和等级、操作步骤,以及相关截图或日志片段。

交易日志位于 %LOCALAPPDATA%\ProjectPBZ\Saved\PBZAutoUpgrade-transactions.json。

致谢与 AI 使用说明

感谢 PBZModLoader 与 Mods Menu 的开发者。两款加载器均需单独下载。

本 Mod 的主要脚本使用 OpenAI Codex 生成,并由作者进行游戏内测试。本页中英双语说明也使用了 Codex 起草。


Auto Buy Materials and Max Upgrade

Adds an optional Auto Buy Materials and Max Upgrade action to the weapon upgrade screen in Phantom Blade Zero. It uses materials already in your inventory first, checks which missing materials are available in the shop, and previews the highest level you can reach with your current materials and Dust. Confirm to buy the listed materials and apply the upgrade.

v0.1.0 test release · In-game UI is currently Simplified Chinese only

How to use

  1. Open the weapon upgrade screen and select a weapon.
  2. Press F8 or click 「补料并最大升级」 at the bottom of the screen.
  3. Review the current and target levels, materials to buy, purchase cost, upgrade cost, total cost, and your current Dust balance.
  4. Confirm to proceed. If the game shows its standard breakthrough prompt, confirm there as well. Cancelling either prompt before the transaction starts leaves your materials and Dust untouched.

How the upgrade is calculated

  • Inventory first. If you already have the required materials, the preview shows an inventory-only upgrade and you only pay the upgrade cost.
  • Shop availability. The mod accounts for available listings, stock, and purchase limits for the current playthrough. If the shop is locked, it calculates the upgrade using your inventory. Barter items are excluded from automatic purchases.
  • Budget-based target. Both the purchase cost and upgrade cost count toward the same Dust budget. The preview shows how far you can go with the resources available, and the mod tells you if the weapon is already at its current level cap.
  • Single- and multi-level upgrades. The mod uses the game's corresponding upgrade actions and retains the standard breakthrough confirmation. If the weapon, materials, or prices change after the preview, open a new preview before proceeding.

Requirements and installation

Install only one ZIP. Each package is for a different loader. Install the matching loader separately.

  1. Close the game and follow the instructions on the matching loader's page.
  2. Extract the ZIP and merge its ProjectPBZ folder into the game root that already contains ProjectPBZ.
  3. Check that main.js is in the matching PBZAutoUpgrade folder.
    • PBZModLoader: ProjectPBZ/PBZModLoader/mods/PBZAutoUpgrade/
    • Mods Menu: ProjectPBZ/Content/JavaScript/PBZModsMenu/Mods/PBZAutoUpgrade/
  4. Launch the game and look for the new action at the bottom of the weapon upgrade screen.

Configuration, updating, and uninstalling

  • Change the hotkey: Edit keyboardKey in the mod's config.js and restart the game. The default is F8. Avoid keys already in use, such as F9 for Mods Menu by default. The action can also be clicked with a mouse. There is currently no dedicated controller shortcut.
  • Update: Close the game and back up any custom config.js before replacing the mod files. Use the package for the same loader and reapply your custom hotkey if needed.
  • Uninstall: Close the game and remove the corresponding PBZAutoUpgrade folder. Completed purchases and upgrades remain in your save.

Testing and known limitations

  • Tested on Steam build 26367565. The Mods Menu package was tested with a main weapon purchase and upgrade in NG+. The PBZModLoader package was tested for loading and upgrading with Mods Menu also present. Tests also covered a single-level upgrade, Phantom Edges, cancelling both prompts, a locked shop, a sold-out shop, and upgrade persistence after reloading the game.
  • Still to be verified: PBZModLoader running by itself, materials that have yet to appear in the shop, and limited-stock deductions and consistency across repeated purchases. The sold-out scenario was tested before the wording change. The revised message in this release still needs an in-game check. Custom hotkeys, mixed controller and keyboard input, and different resolutions and UI scales also remain unverified.
  • If a transaction fails: The mod deducts Dust before adding purchased materials to your inventory. It stops on an error. Completed purchases are retained, and this version has no automatic refund or full rollback. If the mod reports that an operation stopped, check your inventory, Dust balance, and the transaction log before trying again.

Reporting issues

If the action is missing, check that the loader is working, that you installed the matching ZIP, and that main.js is in the expected folder. For purchase or upgrade issues, please include the game build, loader and version, playthrough cycle, weapon and level, steps to reproduce, and a relevant screenshot or log excerpt in Posts.

Transaction log path is %LOCALAPPDATA%\ProjectPBZ\Saved\PBZAutoUpgrade-transactions.json.

Credits and AI disclosure

Thanks to the developers of PBZModLoader and Mods Menu. Both loaders are available as separate downloads.

The mod's primary scripts were generated with OpenAI Codex and tested in-game by the author. Codex was also used to draft this bilingual description.