Skip to content

E9C50/ecbot

Repository files navigation

EcBot - My Screeps AI Bot

Overview

This is a bot project for the game Screeps, a massively multiplayer online game where you program units (creeps) to gather resources, build structures, and defend your territory. This bot is designed to automate various tasks in the game, such as resource gathering, construction, and defense, using JavaScript.

Features

  • ✅️ Energy Mining: Automatically assigns creeps to harvest energy from sources.
  • ✅️ Building Construction and Repair: Manages the construction and repair of structures such as extensions, roads, and walls.
  • ✅️ Controller Upgrading: Ensures the room controller is continuously upgraded to maintain control over the room.
  • ✅️ Lab Clustering: Optimizes lab operations for resource processing and boosting.
  • ✅️ Active Defense: Implements a defense mechanism to protect your territory from enemy creeps.
  • ✅️ Resource Balancing: Balances resource distribution across rooms and structures.
  • ✅️ Market Trading: Automates buying and selling resources on the in-game market.
  • ✅️ Two-Person Squad: Coordinates two creeps to work together on tasks like combat or resource gathering.
  • ❌️ Automatic Room Expansion and Support: (Not implemented) Automatically expands to new rooms and supports allied rooms.
  • ❌️ External and Central Room Mining: (Not implemented) Harvests resources from external rooms and central nine-room clusters.
  • ❌️ Corpse and Ruin Collection: (Not implemented) Collects resources from dead creeps and ruins.
  • ❌️ Four-Person Squad: (Not implemented) Coordinates four creeps for advanced combat or resource tasks.
  • ❌️ Nuke Defense: (Not implemented) Defends against incoming nuclear strikes.
  • ❌️ Automated Factory: (Not implemented) Automates factory production chains for advanced resources.

Installation

  1. Clone the Repository:

     git clone https://github.com/your-username/screeps-bot.git
  2. Install Dependencies:

    npm install
  3. Configure the Bot:

    Copy screeps.sample.json to screeps.json, then fill in your Screeps credentials.

  4. Deploy the Bot:

    npm run push-main

Usage

  1. Run the Bot:
  • The bot will automatically start managing your creeps and structures.
  1. Monitor Performance:
  • Use the in-game console and visual tools to monitor the bot's performance and make adjustments as needed.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.


概述

这是一个为游戏 Screeps 编写的机器人项目。Screeps 是一款大型多人在线游戏,玩家通过编写代码来控制单位(creeps)进行资源采集、建筑建造和领地防御。这个机器人旨在通过 JavaScript 自动化游戏中的各种任务,如资源采集、建筑管理和防御。

功能

  • ✅️ 采集能量矿: 自动分配 creeps 采集能量矿。
  • ✅️ 建造建筑与维修: 管理建筑物的建造和维修,如扩展、道路和城墙。
  • ✅️ 升级控制器: 确保房间控制器持续升级,以保持对房间的控制。
  • ✅️ Lab 集群: 优化 lab 操作,用于资源处理和 boosting。
  • ✅️ 主动防御: 实现防御机制,保护领地免受敌方 creeps 的侵袭。
  • ✅️ 资源平衡: 平衡房间和建筑物之间的资源分配。
  • ✅️ 市场交易: 自动化游戏内市场的资源买卖。
  • ✅️ 二人小队: 协调两个 creeps 一起执行任务,如战斗或资源采集。
  • ❌️ 自动开房与援建: (未实现)自动扩展到新房间并支援盟友房间。
  • ❌️ 外矿以及中央九房采集: (未实现)从外部房间和中央九房集群采集资源。
  • ❌️ 捡尸体和捡废墟: (未实现)从死亡的 creeps 和废墟中收集资源。
  • ❌️ 四人小队: (未实现)协调四个 creeps 执行高级战斗或资源任务。
  • ❌️ 防御核弹: (未实现)防御即将到来的核弹攻击。
  • ❌️ 自动化工厂: (未实现)自动化工厂生产链,用于高级资源生产。

安装

  1. 克隆仓库

     git clone https://github.com/your-username/screeps-bot.git
  2. 安装依赖

    npm install
  3. 配置机器人

    复制 screeps.sample.jsonscreeps.json,然后填写你的 Screeps 凭据。

  4. 部署机器人

    npm run push-main

使用

  1. 运行机器人
  • 机器人会自动开始管理你的 creeps 和建筑物。
  1. 监控性能
  • 使用游戏内的控制台和可视化工具监控机器人的性能,并根据需要进行调整。

贡献

欢迎贡献代码!请 fork 本仓库并提交 pull request。

许可证

本项目采用 MIT 许可证。详情请见 LICENSE 文件。

About

An ai bot for game screeps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published