adriellyn (adriellyn) wrote,
adriellyn
adriellyn

  • Mood:

"random" sprint binding in CoH

This is sparked off a discussion with syrusb on the LJ global channel. She was asking for a way to toggle random sprint effects. The gist of the request was to be able to toggle on a random prestige sprint, hit the same key again to toggle it off, then next time it'd choose (maybe) a different one.

Unfortunately, there's no way to do 'random' for yourself in CoH. The best you can do with the /bind interface is to cycle through things. Getting multiple powers to toggle on and off with the same key is also something that requires using extra files to handle. (Yes, toggling things on with a button-mash doesn't need that. The requirement was for 'off' as well as 'on'.)

So, here's the scoop. It requires multiple files in the data folder underneath where CoH (or CoV) is installed. In the default case that means the full directory path to these files is C:\Program Files\City of Heroes\data. This is where CoH looks for keybind files when a full path isn't given. There's a limit to how long a binding can be, so I like to keep the keybinding files in that location. Anyway, I'll show the files with their corresponding contents like so:

filename
contents here

At least some of the contents will wrap across multiple lines as displayed here, but it's required that each is really just one line when stored. So, here's the list, using "DECIMAL" as the key to be bound (that's "." on the number pad).

sprint-all-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-surge-on.txt"
sprint-surge-on.txt
DECIMAL "powexectoggleon prestige power surge$$bindloadfile sprint-surge-off.txt"
sprint-surge-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-dash-on.txt"
sprint-dash-on.txt
DECIMAL "powexectoggleon prestige power dash$$bindloadfile sprint-dash-off.txt"
sprint-dash-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-quick-on.txt"
sprint-quick-on.txt
DECIMAL "powexectoggleon prestige power quick$$bindloadfile sprint-quick-off.txt"
sprint-quick-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-rush-on.txt"
sprint-rush-on.txt
DECIMAL "powexectoggleon prestige power rush$$bindloadfile sprint-rush-off.txt"
sprint-rush-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-slide-on.txt"
sprint-slide-on.txt
DECIMAL "powexectoggleon prestige power slide$$bindloadfile sprint-slide-off.txt"
sprint-slide-off.txt
DECIMAL "powexectoggleoff sprint$$powexectoggleoff prestige power surge$$powexectoggleoff prestige power dash$$powexectoggleoff prestige power quick$$powexectoggleoff prestige power rush$$powexectoggleoff prestige power slide$$bindloadfile sprint-basic-on.txt"
sprint-basic-on.txt
DECIMAL "powexectoggleon sprint$$bindloadfile sprint-all-off.txt"

This includes ordinary sprint in the list of powers to be used. If that's not desired, change the filename used at the end of whichever one you want to be last in the rotation to be "sprint-all-off.txt". For example, if you wanted neither sprint nor the slide, you'd change sprint-rush-on.txt like this:

sprint-rush-on.txt
DECIMAL "powexectoggleon prestige power rush$$bindloadfile sprint-all-off.txt"

Of course, that's a lot of files to change if you don't like the binding I chose. Life with bind files is like that. Sorry. Also, to get it going the first time, you'll want to load one of them (probably sprint-all-off.txt), like so:

/bind_load_file sprint-all-off.txt

The main thing to note if you're trying to follow along as that each time we toggle a sprint off, we don't depend on the previous state. This toggles all sprints off. The 'on' variants only need to turn on the desired sprint, since they're mutually exclusive (turning one on automatically turns the others off). Otherwise, the files then also load the next one in sequence to re-bind the key for the next use.

Anyway, I've put a zip archive of these files up for retrieval, just in case anyone cares. Depending on feedback, I might try other topics on keybindings, but I am so not a technical writer, it's not funny.

Tags: coh, cov
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments