Git Product home page Git Product logo

the-international-open-source's Introduction

Badge Badge Badge

Badge

About

The International is my bot for Screeps, thematically based after communist aesthetics. Owned rooms are called communes, offensive and defensive forces are called the Red Army, economic workers are known as the Proletariat, and the Revolutionaries establish new communes and rebuild destroyed ones.

This bot can provide experienced and new players a reference for when they get stuck, need inspiration, or want to laugh at some terrible code. Comments are used commonly, and code is structured so it can be easily understood, replicated, and expanded upon. Please follow similar guidelines if you make a pull request ๐Ÿ™‚.

Feel welcome to fork it and otherwise use it, however do not be overly aggressive on the Screeps world, especially to newer players. The bot is intended to be automated, but can perform manual actions via the console. It has an information panel showing progress, events, economy, military, and more.

If you have specific questions or want to discuss the bot, please join our discord server.

Discord link

image map visuals Information panel

Progress and Design

Grafana board

Videos

MarvinTMB's screeps profile

Plans and bugs

Wiki

Requirements

Please read the about section before installing and using this bot.

First you'll want to download or fork the repository. Start by selecting a branch: Main is more stable but is often behind on features and improvements, while Development has more bugs, features and optimizations.

NPM

Ensure you have downloaded Node

Consider using Node version if 20.10.0 if you have issues

You can check your node version with:

node -v

If your node version is too recent, you can change it with NVM:

Linux/MacOS nvm

Windows nvm-windows

After making sure you have correct node version go to the project folder (not in src), you'll want to install the dependencies like so:

npm i

And that's it. Join our discord server if you need help.

Usage

Before you use this bot, please consider two things. First, if you're a new player and especially one that wants to learn programming, JS, or TS, then this is not the place to start. I strongly encourage you to start your own bot and achieve a decent economy before using or contributing to this bot.

Secondly, DO NOT USE THIS BOT TO BULLY. Do not attack noobs, taking their remotes or claimed rooms. This is a fun game where people often program their own bots from scratch, so it is entirely fun-ruining and incredibly rude to pick on those who aren't using an open source bot like this one. If you find yourself against another open source bot, or a bot that can put up a fair fight against you, then best of luck. Please feel welcome to share experiences or ask questions in the discord server.

To begin, you need to decide what branch to use. Main is generally old but stable, while Development is less stable but more up to date. If you want to find bugs or test new features, Development is for you.

Using rollup we will translate the code into a single js file, which will be used in environments set in .screeps.yaml file (see below if you don't have one yet). This compiles the code so it can be run by Screeps while we develop using folders and typescript.

First, you'll need to set up your settings. In /src you'll find the settings.example.ts file. Please copy the file and rename its clone to settings.ts. Then change the settingsExample definition to settings. You can then add your own prefences, including checks based on the name of the shard for server-specific settings. These same instructions with an example are included in the file.

Head to src/other/userScript/userScript.example.ts and follow the instructions at the top of the file. It will be very similar to settings up settings.ts.

Next, rename .screeps.yaml.example to .screeps.yaml and fill in the required information for each environment you want to run the bot in. For the official server, replace the token with an API token for your account. On private servers, edit (or copy and rename) the pserver section with host set to your server domain or IP then complete username and password with your credentials on this server. For more information about this file, check the screeps unified credentials file spec.

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:mmo will compile your code, and then upload it to a screeps server using the mmo config from .screeps.yaml.

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 mmo 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-mmo is equivalent to rollup -c --environment DEST:mmo, and npm run watch-pserver is equivalent to rollup -cw --dest pserver.

Important! To upload code to a private server, you must have screepsmod-auth installed and configured!

For more information, please go to the wiki

Grafana

Use https://pandascreeps.com for Stats hosting

Private server

To run the bot on an performance checking server, run npm run server and check out localhost:21025 (server) and localhost:3000 (grafana) in your browser. Alternatives with in-depth instructions can be found at Using a Private Server

For the performance server users, its always RoomName as email and password is password.

If you'd like to use rollup to compile to a private server, you'll need to download and configure screepsmod-auth to push your code.

I'd also suggest using this less-laggy tool steamless-client to watch your private server run from the comfort of your browser.

Advanced usage

If you want to run custom code without conflicting with the project's source - say, if you want to commit or make pull requests - it's recommended you use the userScript folder.

Contribution

We're a huge fan of teamwork, and many useful features of this bot have been added by contributors.

If you want to join us in development for this bot, please join our discord server and share what you're working on, or hoping to add. We're happy to review issues, merge pull requests, and add collaborators!

Please use the development branch for pull requests, commits, etc.

An extra special thanks to Panda Master, Allorrian, Plaid Rabbit, Aerics, and DefaultO, SimplyAlex, shu for their essential contribution to this project.

Support

If you'd like to support the project, Carson Burke (AKA MarvinTMB) is happy to accept single time or monthly donations through the following links.

Paypal

Patreon

the-international-open-source's People

Contributors

carsonburke avatar pieterbrandsen avatar araele avatar shup1 avatar allorrian avatar schealex avatar realacesu avatar aerics84 avatar shanemadden avatar joshwegener avatar plaidrabbit avatar defaulto avatar morningtea7 avatar daschechtman avatar lokenwow avatar officialaudite avatar infinitydevtech avatar maxsupermanhd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.