Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoCollectionRobot(自动收集机器人)

Escape from Duckov Mod

让你在地图上遇到并拾取到的“智能机器人”真正派上用场。捡到它后可以保留并使用它来自动收集周围物资。

preview

Note: 图片由 GPT-5 生成

没错就是这家伙

image


主要功能

  • 自动搜索并拾取地图上的道具(根据配置决定拾取范围、目标类型等)。
  • 支持配置收集间隔、收集范围、背包容量等参数
  • 可通过 ModConfig 在游戏内动态调整大多数参数;也支持手动配置文件

QQ20251110-150412


重要提醒

  • 每次进入关卡都需要手动开启机器人的收集功能。
  • !!!在撤离或切换关卡之前,请务必从机器人背包中取出你想要保留的物品。机器人不会自动把东西带回家,它可不是你的狗子!!!

依赖

  • Harmony(必须)
  • ModConfig(推荐)
    • 如果没有 ModConfig,可以通过手动编辑配置文件来自定义参数(修改后需重启游戏生效;通过 ModConfig 更改部分参数可即时生效,见下文说明)。

安装

请确保安装并启用 HarmonyModConfig(若想在游戏中动态调整设置)。
排序提示:请将 Mod 放置在 Harmony 与 ModConfig 的下方。


手动配置(当没有 ModConfig 时)

  • 配置文件目录(相对于游戏根目录):
    ../Escape from Duckov/Duckov_Data/Mods/AutoCollectionRobot
  • 配置文件名称:
    AutoCollectRobotLocalConfig.json

示例配置(有效 JSON)

{
  "collectInterval": 2.0,
  "robotInventoryNeedInspect": false,
  "robotInventoryCapacity": 512,
  "collectGroundItems": false,
  "collectLootBox": true,
  "collectRadius": 10.0,
  "debugDrawCollectRadius": false,
  "configToken": "auto_collection_robot_v1"
}

配置项说明

  • collectInterval (float)

    • 含义:收集间隔(秒)。
    • 有效值:0.5 ~ 10
    • 说明:机器人每隔多少秒尝试一次收集物品。
  • robotInventoryNeedInspect (bool)

    • 含义:机器人背包是否显示搜索动画(在你打开机器人背包查看物资时)。
    • 说明:如果通过 ModConfig 修改此项,需要切换一次关卡才能生效。
  • robotInventoryCapacity (int)

    • 含义:机器人背包容量(最多能捡多少物品或占用单位)。
    • 有效值:10 ~ 2048
  • collectGroundItems (bool)

    • 含义:是否收集地面掉落的物资。
  • collectLootBox (bool)

    • 含义:是否收集容器(箱子)内的物资。
  • collectRadius (float)

    • 含义:收集半径(以玩家为中心)。
    • 有效值:1 ~ 50
  • debugDrawCollectRadius (bool)

    • 含义:是否在游戏中显示收集范围(调试用)。
    • 说明:开启会消耗性能,建议仅在调试或调整范围时启用。
  • configToken (string)

    • 含义:内部使用的配置标识。请勿更改。

关于 ModConfig 与手动配置的生效时机

  • 使用 ModConfig: 大多数参数可以在游戏中动态修改并即时生效。但 robotInventoryNeedInspect 在通过 ModConfig 修改后需要切换关卡以应用更改。
  • 手动编辑配置文件: 修改配置文件后需要重启游戏才能生效。

致谢 & 开源引用(中文)

特别感谢下列开源项目与作者,它们的工作对本 Mod 的实现与灵感非常有帮助:

感谢 B 站 UP 主 理科疯子 的视频教程(对 Mod 制作流程与 API 使用帮助极大):
https://www.bilibili.com/video/BV18p1TBSErv


English Version — AutoCollectionRobot (Auto Collection Robot)

Escape from Duckov Mod

Makes the "Smart Robot" you find on the map actually useful. Once picked up, you can keep it and use it to automatically collect nearby items.

preview

Note:image generated by GPT-5

Yes — that's the one.

image


Key Features

  • Automatic searching and picking up of items on the map (collection behavior depends on configuration).
  • Configurable collection interval, radius, inventory capacity, and other parameters.
  • Most settings can be adjusted in-game via ModConfig; manual configuration file is also supported.

QQ20251110-150412


Important Notes

  • You must manually enable the robot's collection function each time you enter a level.
  • !!! Before extracting or switching levels, make sure to remove any items you want to keep from the robot's inventory. The robot will NOT automatically take items home for you — it is NOT your dog!!!

Dependencies

  • Harmony (required)
  • ModConfig (recommended)
    • If ModConfig is not installed, you can customize settings by editing the configuration file manually (changes require a game restart to take effect; some ModConfig changes apply immediately — see below).

Installation

Ensure Harmony and ModConfig are installed and enabled (if you want to adjust settings in-game).
Placement tip: place the Mod below Harmony and ModConfig in load order.


Manual Configuration (if ModConfig is unavailable)

  • Config directory (relative to game root):
    ../Escape from Duckov/Duckov_Data/Mods/AutoCollectionRobot
  • Config file name:
    AutoCollectRobotLocalConfig.json

Example configuration (valid JSON)

{
  "collectInterval": 2.0,
  "robotInventoryNeedInspect": false,
  "robotInventoryCapacity": 512,
  "collectGroundItems": false,
  "collectLootBox": true,
  "collectRadius": 10.0,
  "debugDrawCollectRadius": false,
  "configToken": "auto_collection_robot_v1"
}

Configuration Options

  • collectInterval (float)

    • Meaning: collection interval in seconds.
    • Valid range: 0.5 – 10
    • Notes: how often the robot attempts to collect items.
  • robotInventoryNeedInspect (bool)

    • Meaning: whether the robot inventory shows a search animation when you inspect it.
    • Notes: Changing this via ModConfig requires switching levels to take effect.
  • robotInventoryCapacity (int)

    • Meaning: robot inventory capacity (how many items or units it can pick up).
    • Valid range: 10 – 2048
  • collectGroundItems (bool)

    • Meaning: whether to collect items dropped on the ground.
  • collectLootBox (bool)

    • Meaning: whether to collect items inside containers (loot boxes).
  • collectRadius (float)

    • Meaning: collection radius centered on the player.
    • Valid range: 1 – 50
  • debugDrawCollectRadius (bool)

    • Meaning: whether to display the collection radius in-game (for debugging).
    • Notes: Enabling this affects performance; use only when adjusting the radius.
  • configToken (string)

    • Meaning: internal configuration token. Do not change.

When changes take effect

  • Using ModConfig: most settings can be changed dynamically in-game and will take effect immediately. Note that robotInventoryNeedInspect requires switching levels after modification to apply.
  • Manual config file: changes require restarting the game to take effect.

Thanks & Open Source Credits (English)

Special thanks to the following open-source projects and authors — their work and examples were very helpful during development:

Thanks to Bilibili up 理科疯子 for the tutorial that greatly helped with mod development:
https://www.bilibili.com/video/BV18p1TBSErv

Note: These links point to third-party open-source projects and a tutorial. Please follow their respective licenses and citation requirements when reusing code or ideas.

About

自动收集机器人——逃离鸭科夫Mod

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages