A web-based upgrade cost calculator for Bloons Tower Defense games with Discord Bot integration.
- Web Interface: Interactive calculator to select towers and upgrades (runs locally)
- Cost Breakdown: Detailed breakdown of tower base costs and upgrade expenses
- Total Cost Calculation: Automatically calculate total cost for selected upgrades
- Discord Bot Integration: Use
/towersand/calculatecommands in Discord - No Backend Required: Fully static website - works on GitHub Pages or locally
- Expandable Design: Easily add more towers and games from the Bloons series
- Node.js (v14 or higher) - only for Discord Bot
- npm or yarn
- Discord Bot Token (for Discord bot functionality)
-
Clone the repository
git clone https://github.com/user043-tech/bloons-upgrade-manager.git cd bloons-upgrade-manager -
For Discord Bot only - Install dependencies
npm install
-
Create environment file
cp .env.example .env
-
Add your Discord Bot Token
- Go to Discord Developer Portal
- Create a new Application
- Go to "Bot" section and click "Add Bot"
- Copy the token and paste it in
.envfile:DISCORD_TOKEN=your_bot_token_here - Enable "Message Content Intent" in Bot settings
- In OAuth2 → URL Generator, select
botscope andSend Messagespermission - Use the generated URL to invite the bot to your server
Option 1: Open locally
- Open
public/index.htmlin your browser - Or use a simple HTTP server:
# Python 3 python -m http.server 8000 # Then open http://localhost:8000/public/
Option 2: View on GitHub Pages
npm install
node src/discord-bot.js- Open the interface (locally or via GitHub Pages)
- Select towers by checking their boxes
- Choose upgrades for each tower (Top, Middle, Bottom paths)
- Click "Calculate Total Cost" to see the breakdown
- View the cost breakdown and total cost
- Click "Reset" to start over
/towers - List all available towers
/towers
/calculate - Get detailed upgrade costs for a specific tower
/calculate tower:Dart Monkey
bloons-upgrade-manager/
├── public/ # Static website
│ ├── index.html # Web interface HTML
│ ├── styles.css # Web interface styling
│ ├── app.js # Web interface JavaScript
│ └── data/
│ └── towers.json # Tower data
├── src/
│ ���── discord-bot.js # Discord bot (local only)
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── package.json # Project dependencies
└── README.md # This file
To add more towers from BTD6 or other Bloons games:
- Edit
public/data/towers.json - Add a new tower object with:
id: Unique identifier (e.g., "glue-gunner")name: Display namebaseCost: Base tower costupgrades: Object withtop,middle,bottompaths
- Each upgrade needs:
tier(1-5),cost, andname
Example:
{
"id": "glue-gunner",
"name": "Glue Gunner",
"baseCost": 1400,
"upgrades": {
"top": [
{ "tier": 1, "cost": 450, "name": "Bigger Globs" },
...
],
...
}
}Feel free to contribute! To add support for more towers or Bloons games:
- Fork the repository
- Create a feature branch
- Add your changes (new towers, improvements, etc.)
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Bloons Tower Defense is a tower defense game series created by Ninja Kiwi. This calculator is a fan-made tool to help players optimize their tower upgrades.
For issues, questions, or suggestions, please open an issue on GitHub!
Made with ❤️ for BTD Players | v1.0.0