https://github.com/kevindanne/screepsai
AI for https://screeps.com/
https://github.com/kevindanne/screepsai
javascript screeps typescript
Last synced: 3 months ago
JSON representation
AI for https://screeps.com/
- Host: GitHub
- URL: https://github.com/kevindanne/screepsai
- Owner: KevinDanne
- Created: 2024-01-12T18:43:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-25T19:43:09.000Z (about 1 year ago)
- Last Synced: 2025-01-18T07:11:58.584Z (5 months ago)
- Topics: javascript, screeps, typescript
- Language: TypeScript
- Homepage:
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ScreepsAI
Custom ScreepsAI based on the [screeps-typescript-starter](https://github.com/screepers/screeps-typescript-starter) template.
## Basic Usage
You will need:
- [Node.JS](https://nodejs.org/en/download) (10.x || 12.x)
- A Package Manager ([Yarn](https://yarnpkg.com/en/docs/getting-started) or [npm](https://docs.npmjs.com/getting-started/installing-node))
- Rollup CLI (Optional, install via `npm install -g rollup`)```bash
# npm
npm install# yarn
yarn
```### Rollup and code upload
The project uses rollup to compile your typescript and upload it to a screeps server.
Move or copy `screeps.sample.json` to `screeps.json` and edit it, changing the credentials and optionally adding or removing some of the destinations.
Running `rollup -c` will compile your code and do a "dry run", preparing the code for upload but not actually pushing it. Running `rollup -c --environment DEST:main` will compile your code, and then upload it to a screeps server using the `main` config from `screeps.json`.
You can use `-cw` instead of `-c` to automatically re-run when your source code changes - for example, `rollup -cw --environment DEST:main` will automatically upload your code to the `main` configuration every time your code is changed.
Finally, there are also NPM scripts that serve as aliases for these commands in `package.json` for IDE integration. Running `npm run push-main` is equivalent to `rollup -c --environment DEST:main`, and `npm run watch-sim` is equivalent to `rollup -cw --dest sim`.
#### Important! To upload code to a private server, you must have [screepsmod-auth](https://github.com/ScreepsMods/screepsmod-auth) installed and configured!
## Typings
The type definitions for Screeps come from [typed-screeps](https://github.com/screepers/typed-screeps). If you find a problem or have a suggestion, please open an issue there.