Skip to main content

Library to help create City of Heroes binds as simple or advanced as you'd like.

Project description

A Python library for creating advanced key binds for City of Heroes. Whether you want simple macros or complex rotating power sequences, this library helps you generate the bind files automatically.

Perfect for City of Heroes players who want:

  • Automated toggle management (keep your shields/travel powers on automatically)

  • Complex power rotations through simple movement keys

  • Multiple auto-cast powers cycling as you play

  • Custom bind file generation without manual editing

🎮 New to Programming?

Don’t worry! You don’t need to be a programmer to use this. If you’re new to Python, check out these beginner-friendly resources:

📦 Installation

Install from PyPI using pip:

pip install CityOfBinds

🚀 Quick Start

Here’s how to create a basic WASD bind that automatically keeps your travel powers on:

from CityOfBinds import WASDRotatingBind

# Create a rotating bind system
wasd_bind = WASDRotatingBind()

# Add powers you want automatically turned on
wasd_bind.wasd_bind_template.add_toggle_on_power("sprint")
wasd_bind.wasd_bind_template.add_toggle_on_power("super speed")

# Generate the bind files
wasd_bind.publish_bind_files(
    parent_folder_name="travel_powers",
    directory="my_binds"
)

# Load in game with: /bindloadfile my_binds/travel_powers/0.txt

This creates bind files that automatically turn on your travel powers whenever you move with WASD keys!

💡 Real Examples

Automated Toggle Management (Great for Warshades, Peacebringers, etc.)

from CityOfBinds import WASDRotatingBind

wasd_bind = WASDRotatingBind()

# Keep human form (turn off transformations)
wasd_bind.wasd_bind_template.add_toggle_off_power("dark nova")
wasd_bind.wasd_bind_template.add_toggle_off_power("black dwarf")

# Always keep these on
wasd_bind.wasd_bind_template.add_toggle_on_power("sprint")
wasd_bind.wasd_bind_template.add_toggle_on_power("super speed")

# Rotate through different shields
wasd_bind.wasd_bind_template.add_toggle_on_power_pool([
    "gravity shield", "penumbral shield", "twilight shield"
])

wasd_bind.publish_bind_files("warshade_binds", "binds")

Multiple Auto-Cast Powers (Perfect for Dominators)

from CityOfBinds import WASDRotatingBind

wasd_bind = WASDRotatingBind()

# Rotate through multiple auto powers
wasd_bind.wasd_bind_template.add_auto_power_pool([
    "hasten", "domination", "inner inspiration"
])

wasd_bind.publish_bind_files("dominator_autos", "binds")

📋 Dependencies

  • Python 3.9 or higher

  • networkx (automatically installed)

🔧 Development Setup

If you want to contribute or modify the library:

# Clone the repository
git clone https://github.com/yourusername/city-of-binds.git
cd city-of-binds

# Install in development mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
isort .

🎯 Core Features

Bind Types - Bind: Single key binds with commands - WASDBind: Movement key binds with power management - WASDRotatingBind: Advanced rotating power sequences - RotatingBind: Custom rotation sequences - RandomBinds: Randomized power selection

Power Management - Toggle powers on/off automatically - Auto-cast power rotation - Power pools for cycling through options - Persistent power states through movement

File Generation - Automatic bind file creation - Proper file linking for rotations - Customizable folder organization - Ready-to-use in City of Heroes

🎮 How It Works in Game

  1. Generate bind files using this library

  2. Copy files to your City of Heroes directory

  3. Load in-game with /bindloadfile path/to/your/0.txt

  4. Play normally - powers activate automatically as you move!

The library creates multiple bind files that link to each other, creating smooth rotations and automations that work seamlessly in City of Heroes.

📖 Advanced Usage

Custom Triggers and Conditions

from CityOfBinds import Bind, BindFile

# Create custom binds
bind = Bind(
    key="F1",
    slash_commands=["team Hello team!", "powexec_auto hasten"]
)

# Add to bind file
bind_file = BindFile()
bind_file.add_bind(bind)

File Organization

# Organize binds in folders
wasd_bind.publish_bind_files(
    parent_folder_name="my_character_name",
    directory="C:/Games/City of Heroes/binds"
)

📄 License

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

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

🐛 Issues and Support

If you encounter any issues or have questions:

  1. Check the examples in the tests/examples/ directory

  2. Open an issue on GitHub with your bind configuration

  3. Include the error message and your Python version

🎊 Acknowledgments

Created for the City of Heroes community. Special thanks to all the players who helped test and provide feedback on complex bind scenarios.

City of Heroes is a trademark of NC Interactive, LLC. This project is not affiliated with or endorsed by NC Interactive, LLC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cityofbinds-0.1.0.tar.gz (56.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cityofbinds-0.1.0-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

Details for the file cityofbinds-0.1.0.tar.gz.

File metadata

  • Download URL: cityofbinds-0.1.0.tar.gz
  • Upload date:
  • Size: 56.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cityofbinds-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1a2d01dfe0d6f1688971a12bb5f081b6dff0c73331680981612b3c6d8e8ea73
MD5 325d006d465933c90daceb7b5b5e86ab
BLAKE2b-256 9052c1688c3aa76e7471d01a2783ed1005aae6f670b649b0efa7869827ae36f4

See more details on using hashes here.

File details

Details for the file cityofbinds-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cityofbinds-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 66.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cityofbinds-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29267863cb9787629a2057a547e4bb858cb6edbc077bb1cecd609d0cf7172f8c
MD5 5e798ef8d926d8945c0f99899211dbb2
BLAKE2b-256 22dff54b79f80de4a5f8bf590875dd7df2dce89391a7bf766b260975ea9204da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page