/bindcontrol

Keybind manager for City of Heroes

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

BindControl

BindControl is a helper app for creating and maintaining keybinds for City of Heroes.

It is an enhanced port of Konoko and Monorail's CityBinder 0.76, using Python and the WxWidgets UI toolkit.

During City of Heroes' original run, CityBinder was the go-to app for keybinds. It's written in lua, using the IUP toolkit, and the required versions of those can be difficult to set up for development on modern OSes. I wanted to add features and clean up the UI, so in a stunningly unwise act of hubris, I instead started work on BindControl.

I worked on it on-and-off for the remainder of the original run of the game, then shelved it, ostensibly forever. Now here in the age of the SCORE, Homecoming, and other servers, it once again has value, so I've dusted it off and continued to add features and modernize it.

With Homecoming recently securing the licensing for City of Heroes from NCSoft, development of the game and its ecosystem, BindControl included, is likely to remain very Homecoming-centric in the near to medium term. Recent changes to BindControl's Speed on Demand code incorporate changes made specifically in Homecoming Issue 27, and while it will probably continue to work elsewhere, I don't currently have a presence on these other servers to test and validate. Please feel free to open issues for non-Homecoming servers, but know that they might not receive as much attention as Homecoming-specific ones do.

Features

  • Runs on Windows, MacOS, and Linux

  • Separate profiles for different characters, archetypes, or situations

  • Controller support (WIP, binds created with a controller work perfectly, but BindControl itself sometimes has trouble detecting controller input to create such binds)

  • Basic Gameplay Binds

    • One-key next-teammate / previous-teammate selection, with support for setting team size and optionally skipping the player in the next/previous rotation
    • Rebind the keys for the in-game power tray buttons
    • Various helpful shortcut binds, "Quit to Desktop", "Invite Target", "Show FPS", "Show Netgraph" - more to come
    • Chat binds with optional 'typing' notifier and custom chat colors
  • Custom Binds

    • Create simple binds using PowerBinder, a flexible tool for stringing together arbitrary commands for keybinding
    • Complex binds, chains of PowerBinder actions that fire sequentially on multiple presses of a keybind
    • Buffer binds, allowing quick one-key buffing of each teammate and/or pet
  • Movement / Speed-on-Demand

    • Speed-on-Demand based on citybinder and the original Gnarly's SoD keybinds
    • Supports all formal travel powers: Fly, Mystic Flight, Group Fly, Super Jump, Mighty Leap, Super Speed, Speed of Sound, Teleport, and Team Teleport
    • Secondary travel powers like Mystic Flight's "Translocation" are starting to be better integrated
    • Supports Homecoming travel power changes - WIP but functional
    • Homecoming's powexec_location cursor feature incorporated into Teleport binds, with "teleport immediately" and "teleport on key release" options available
    • Kheldian form toggles; Kheldian movement powers incorporated into Speed-on-Demand
    • One-key reset in case SoD binds get tangled up
  • Inspiration Popper

    • By-type; dual and team inspirations supported
    • Option to use or skip "super" inspirations
    • Largest-first or smallest-first
    • Optional /say feedback with per-inspiration custom colors
  • Mastermind / Pet Binds

    • Select pets by power level: all, minions, lieutenants, and boss
    • Orders for aggressive / defensive / passive stances; attack, follow, go to, and stay, for all or selected pets
    • Pets can give feedback on each order; chattiness can be toggled via keybind
    • "Bodyguard mode" shortcut -- you can define which pets should be treated as bodyguards, and turn Bodyguard Mode on for them with a single keypress
    • By-name pet selection
    • Next-pet / previous-pet binds

TODO

  • Attempt to make every slash command in the game available in some way, typically via PowerBinder
  • Access to MacOS for testing is via a MacOS VM several OS versions old. I don't want to buy an actual Mac just for this wee vanity project, so mileage may vary on how it acts in an actual recent Mac environment
  • Bodyguard mode, as implemented in citybinder, doesn't work as intended, and might not be able to due to game restrictions
  • Investigate improvements to Mastermind binds to clarify and expand the behavior
  • More error detection and handling
  • Temporary powers in speed-on-demand
  • Roll standalone binaries for Windows, MacOS, Linux - partially implemented
    • Windows binary distribution of Python apps can trigger anti-malware warnings
    • MacOS binaries need signing and notarization; I release them anyway for the brave
    • Linux binaries might be possible with some container scheme
  • More and better help text and documentation
  • Fix bugs as found

Using Binary Releases

Windows users: try the ZIP file from the latest release, and give feedback. If that works for you, it's the quickest path to victory.

MacOS users: an experimental binary release has been made available. It is not signed and/or notarized, and might or might not work at all. Any feedback is encouraged.

Linux users: an extremely experimental binary release is now available. You should be able to unzip the zipfile anywhere, and run the "BindControl" binary from within it.

If you receive malware warnings, please read my comments on that issue.

Running From Source

Dependencies

  1. Python version 3.10 or later
  2. wxPython version 4.2 or later
  • Windows users, follow the instructions on the above sites' download pages to install Python and wxPython.

  • MacOS users, I recommend following the instructions in this article at opensource.com to get Python 3 installed and working by default. Once everything is working, you will want to run pip3 install wxPython.

  • Linux users, install your distribution's packages for Python 3 and wxPython.

Getting and running the code

  • Clone this repo, or download the source as a ZIP file

  • Windows (and possibly Mac) users: Double-click BindControl.py in the top-level folder

  • Mac / Linux users: In a terminal, cd to where you put the BindControl source, then python BindControl.py. Some distributions might need python3 instead of python.

Credits

BindControl is in many places a direct port of CityBinder code, and in most other places was extremely influenced by it. Keybinding code drew from similar code in PADRE.

Various newer functionality was added to CityBinder for Homecoming by tailcoat, who kindly provided his source code and permission to adapt for use with BindControl, as well as offered suggestions and advice for improvements.

Citybinder's acknowledgements are reproduced below:

    Obviously, without Cryptic and NCSoft to have created/funded/published
    City of Heroes and City of Villains, there would be no point to this
    program.  Thanks to Gnarly and the numerous people who contributed to the
    creation of the Speed on Demand System.  Thanks to Sandolphan/Khaiba and
    the many people who posted Mastermind binds in the CoV Beta forums.
    Again thanks to Sandolphan for the Bodyguard mode binds.  Also thanks
    to the following people, who directly contributed to CityBinder, either
    with bug reports, feature suggestions, or contirbuted binds.
    PerezPersuader, Blue_Daze, Back_Blast, IronVulture, Darkelven,
    Shadowhand, Knight_Marshal, Nilt_, Psygon, DuskA, CyberKnight7, ErieFF,
    Darc_Reign, Beerninja, BarfBag, Oronis, TrystarMojo, Pyrobard,
    Ang_Rui_Shen, Konoko, Draznar, Local_Man, tyrose, Caustic, 80sboi,
    DarknessEternal, reiella, Robotech_Master, Ground_Zeroo, Stylina, and
    ShieldBearer.

The improved Inspiration Popper design was gratefully adapted from an unreleased version of CityBinder for Homecoming by Tailcoat.

Github Actions for automated building of binary releases graciously provided by JamzTheMan.

Additional feedback and suggestions provided in the Homecoming Forums thread and in Github issues by:
DevoDog68, BlackSpectre, Premmy, kenlon, Lumenia, xizar, autobotpinto

License

BindControl is licensed under the GPL version 3 or later.

emerson@hayseed.net