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.2.tar.gz (56.3 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.2-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cityofbinds-0.1.2.tar.gz
  • Upload date:
  • Size: 56.3 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.2.tar.gz
Algorithm Hash digest
SHA256 d4b20cb9efc839bbfe137bf04bef9f18f12090ceaad7065b5dad40ed0e10fc72
MD5 7cc18860a0a47888ea8dc1f5fbf139f7
BLAKE2b-256 8a865802ffc8d1578accbb61f98492172ec43befada496eb058bc24a3671ad5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cityofbinds-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6a51c13fdbb6c8fd37e4694b38bfbf9d0ed260aa469bbe3935a7dd2da66d60f
MD5 5c3ae61135d03d3dcf6bdb5d6e45a776
BLAKE2b-256 4726b9fe05b7fa70fef68a2b1094f78aaae3aeac719a33e8557614cfcb844619

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