Jump to content

Recommended Posts

Posted

So I've got a character who uses an assortment of different pistols, and I want to do semi-random costume changes to swap out his guns.

 

I found an old post on doing costume changes via bind_load_file_silent and a rotating selection of text files, and copied/modified the advice there. But I'm stuck on how to actually make them work!

 

Here's an example of the file I'm using. File name is costume0.txt

1 emote none$$cc 0$$pow_exec_slot 1$$bind_load_file_silent "D:\Gaming\City of Heroes\Binds and Macros\costume1.txt"

 

This should, in theory, bind the 1 key to do a costume change, shoot some guns, and load up the next text file in the series. I have similar files up to costume5.txt which cycles back to the file costume0.txt.

 

That all said, I don't know how to prep this to work in the first place.

 

I tried using bind_load_file_silent "D:\Gaming\City of Heroes\Binds and Macros\costume0.txt" which I believe should have gotten the chain started? But it keeps on giving me errors about using 5 arguments instead of 1. I can still shoot (the power in slot 1 fires) but there's no associated costume change.

 

Help please!

@Cutter

 

So many alts, so little time...

Posted
33 minutes ago, Cutter said:

Help please!

I think the quotes around your drive path might be the issue. Try the code below instead. Note that I have not tested this so I am not 100% sure if it will work, but based on some of my rotating bind files I think the whole bind string needs to be in quotes.

 

1 "emote none$$cc 0$$pow_exec_slot 1$$bind_load_file_silent D:\Gaming\City of Heroes\Binds and Macros\costume1.txt"

 

Posted
15 minutes ago, AboveTheChemist said:

I think the quotes around your drive path might be the issue. Try the code below instead. Note that I have not tested this so I am not 100% sure if it will work, but based on some of my rotating bind files I think the whole bind string needs to be in quotes.

 


1 "emote none$$cc 0$$pow_exec_slot 1$$bind_load_file_silent D:\Gaming\City of Heroes\Binds and Macros\costume1.txt"

 

Thanks for the suggestion but it still won't cooperate. I looked back at the old thread I found, and it had the quotes at the beginning as yours does, so that's my original transcription error & in theory shouldn't be the issue? Here's the error I get:

image.png.6c44451f1ab23b8e4f47bd7d96b46dc7.png

 

@Cutter

 

So many alts, so little time...

Posted

It seems to be reading everything seperated by \ as an argument...did you try just costume1.txt?

 

Also try flipping the \ to / some things are funky that way.

  • Like 1
Posted
5 minutes ago, EmmySky said:

Also try flipping the \ to / some things are funky that way.

Good catch, I missed that and I bet that is it. Also, relative paths work too if that is an option. If you are using the new launcher, it looks for files relative to the <HC Root Dir>\settings\live (or settings\beta if you need binds on Beta).

  • Like 1
Posted
33 minutes ago, Cutter said:

Thanks for the suggestion but it still won't cooperate. I looked back at the old thread I found, and it had the quotes at the beginning as yours does, so that's my original transcription error & in theory shouldn't be the issue? Here's the error I get:

image.png.6c44451f1ab23b8e4f47bd7d96b46dc7.png

 

Try this:

1 "emote none$$cc 0$$pow_exec_slot 1$$bind_load_file_silent "D:\Gaming\City of Heroes\Binds and Macros\costume1.txt""

It actually has 2 sets of quotes - 1 to consolidate the file path in to a single argument and 1 to consolidate the entire line into a single bind for the '1' key.

I had a similar issue and this worked for me, so hoping it fixes you up too.

 

  • Like 1
Posted

Hmm, this is a puzzler! And I appreciate the suggestions offered!

 

Checking on some MM binds that I've used (and confirmed still work), it's definitely meant to be \ in the file path.

 

As far as the quotes go, I'm not sure what's right. For example, one of the MM commands is numpad0 bindloadfilesilent "D:\Gaming\City of Heroes\mmbinds\all.txt" (where all.txt contains a number of single keypress commands). There is no extra set of quotes enclosing the whole thing, only quotes around the path. Of course this doesn't have all the additional cc and powexec bells and whistles, and I don't know how those change things.

 

I wonder if I need to have a master file (similar to the "all.txt." in the MM case), and that file has the first command to start the cycling via pressing 1?

@Cutter

 

So many alts, so little time...

Posted
13 minutes ago, Cutter said:

Hmm, this is a puzzler!

I agree, but it is an interesting puzzle! I read on the wiki that pathnames must be enclosed in quotes if it contains spaces, so yours does need quotes since it contains spaces. I am running some bind tests to see if I can shed more light on it, but you might try putting your costume1.txt into a temporary folder somewhere that it has no spaces anywhere in the path, and then remove the quotes around the path and see if that works.

 

22 minutes ago, Cutter said:

Checking on some MM binds that I've used (and confirmed still work), it's definitely meant to be \ in the file path.

I use / in all my paths so it works too.

 

Posted (edited)
2 hours ago, JAMMan0000 said:

Try this:


1 "emote none$$cc 0$$pow_exec_slot 1$$bind_load_file_silent "D:\Gaming\City of Heroes\Binds and Macros\costume1.txt""

It actually has 2 sets of quotes - 1 to consolidate the file path in to a single argument and 1 to consolidate the entire line into a single bind for the '1' key.

I had a similar issue and this worked for me, so hoping it fixes you up too.

 

OK based on my testing (which wasn't exhaustive, but it was thorough), I think the above quoted post contains the correct usage. You need quotes around the file path because there are spaces in your path, and you also need the second set of quotes around the entire set of commands because without them, the commands are executed as soon as the file is loaded, rather than when 1 is pressed.

 

The only way I was able to reproduce the 'too many arguments' error is if I tried to feed it a file path containing spaces, without enclosing that file path in quotes.

 

If you try the above and still get errors, try deleting your quotes and retyping them manually. I know that sounds silly, but if you copy/pasted the code from another source, it might be using a different type of double quote that isn't recognized. I ran into that problem in another thread and while I am not sure it is the issue here, it's another thing to try.

Edited by AboveTheChemist
Posted

Tried something different (more in line with the MM binds). Rather than fighting with rotating keybinds, I thought I'd see if it's easier to assign the costume changes to different powers. (spoiler: it's not)

 

First, I moved the binds into a different folder with no spaces in the name. To eliminate that as a variable.

 

I created a file, costumes.txt. Within that file are the following key assignments:

1 "pow_exec_slot 1$$cc 0"
2 "pow_exec_slot 2$$cc 1"
3 "pow_exec_slot 3$$cc 2"
4 "pow_exec_slot 4$$cc 3"
5 "pow_exec_slot 5$$cc 4"
6 "pow_exec_slot 6$$cc 5"

 

Then, I typed bindloadfile "D:\Gaming\cohbinds\costumes.txt" in chat to add it to the character. What should happen now is 1 fires Pistols and changes to the next costume, 2 fires Dual Wield and changes to the next costume (or yells at me that I have to wait for costume change), and so on. What actually happens is 1 fires Pistols. 2 Fires Dual Wield. I'm not getting any costume changes. The system doesn't give me any error messages, no "you have to wait X seconds to change your costume", nothing.

 

(note that I've also tried this without the quotes in each line, and with the two actions reversed in order e.g. cc 0$$pow_exec_slot 1)

 

As an aside, when I change costumes manually from the Menu, each correctly shows the different guns. But I noticed that when I view his costumes at the Tailor / a trainer, each time I go to a new costume it carries over the gun styles of the preceding one & has to be changed. Could there be something glitchy there?

 

11 minutes ago, AboveTheChemist said:

OK based on my testing (which wasn't exhaustive, but it was thorough), I think the above quoted post contains the correct usage. You need quotes around the file path because there are spaces in your path, and you also need the second set of quotes around the entire set of commands because without them, the commands are executed as soon as the file is loaded, rather than when 1 is pressed.

 

The only way I was able to reproduce the 'too many arguments' error is if I tried to feed it a file path containing spaces, without enclosing that file path in quotes.

 

If you try the above and still get errors, try deleting your quotes and retying them manually. I know that sounds silly, but if you copy/pasted the code from another source, it might be using a different type of double quote that isn't recognized. I ran into that problem in another thread and while I am not sure it is the issue here, it's another thing to try.

I tried this, but sadly no such luck. Quotes have been deleted and added a number of times. I'm using Notepad for everything, which shouldn't care about styles or types of characters.

 

Maybe it just hates me.

@Cutter

 

So many alts, so little time...

Posted

Hmm, well I think I am stumped. Are you still getting the '5 arguments' error, or is it just that it is not working as you hoped? If the cc command is screwy, you could try swapping that command out for something simple (like sending a tell to yourself: 'tell $name, Hello') and see if things work like they should then. I've seen some cases where certain commands don't play well with others, but honestly I never change costumes on the fly so I have little to no experience with the cc command.

 

And just to clarify a little from my previous post, I think the quotes are only needed around the commands in the bind file if you are chaining more than one command together. I think single commands don't require enclosing quotes, but there is no harm in using them regardless.

  • Like 1
Posted

I copied and pasted your bind lines in above and they seemed to work as you expect. I wonder if your bindloadfile command actually worked. Did you type a '/' in front of the command? Like '/bindloadfile....'. Its required if you just type directly in to the chat, but not if you load the command from a file. If it did load properly, then you should have gotten a confirmation in the chat dialogue. Something like

 

 Keybinds file loaded: D:\Gaming\cohbinds\costumes.txt

 

 

  • Like 1
Posted
18 minutes ago, JAMMan0000 said:

I copied and pasted your bind lines in above and they seemed to work as you expect. I wonder if your bindloadfile command actually worked. Did you type a '/' in front of the command? Like '/bindloadfile....'. Its required if you just type directly in to the chat, but not if you load the command from a file. If it did load properly, then you should have gotten a confirmation in the chat dialogue. Something like

 

 Keybinds file loaded: D:\Gaming\cohbinds\costumes.txt

 

 

I'm sure i've typed in the leading / but that said, I don't recall every getting a confirmation message. But even without that, I still get errors which would only be associated with the bind being loaded. I'll try just binding the keys one by one instead of trying to load a file. If I'm not going for rotating changes off the same keypress that might be the simplest approach.

@Cutter

 

So many alts, so little time...

Posted
1 hour ago, Cutter said:

Tried something different (more in line with the MM binds). Rather than fighting with rotating keybinds, I thought I'd see if it's easier to assign the costume changes to different powers. (spoiler: it's not)

 

First, I moved the binds into a different folder with no spaces in the name. To eliminate that as a variable.

 

I created a file, costumes.txt. Within that file are the following key assignments:

1 "pow_exec_slot 1$$cc 0"
2 "pow_exec_slot 2$$cc 1"
3 "pow_exec_slot 3$$cc 2"
4 "pow_exec_slot 4$$cc 3"
5 "pow_exec_slot 5$$cc 4"
6 "pow_exec_slot 6$$cc 5"

 

Then, I typed bindloadfile "D:\Gaming\cohbinds\costumes.txt" in chat to add it to the character. What should happen now is 1 fires Pistols and changes to the next costume, 2 fires Dual Wield and changes to the next costume (or yells at me that I have to wait for costume change), and so on. What actually happens is 1 fires Pistols. 2 Fires Dual Wield. I'm not getting any costume changes. The system doesn't give me any error messages, no "you have to wait X seconds to change your costume", nothing.

 

(note that I've also tried this without the quotes in each line, and with the two actions reversed in order e.g. cc 0$$pow_exec_slot 1)

 

As an aside, when I change costumes manually from the Menu, each correctly shows the different guns. But I noticed that when I view his costumes at the Tailor / a trainer, each time I go to a new costume it carries over the gun styles of the preceding one & has to be changed. Could there be something glitchy there?

 

I tried this, but sadly no such luck. Quotes have been deleted and added a number of times. I'm using Notepad for everything, which shouldn't care about styles or types of characters.

 

Maybe it just hates me.

Isn't it cce 0 etc rather than cc 0?

Bopper: "resistance resists resistible resistance debuffs"

Posted
6 minutes ago, Cutter said:

I'm sure i've typed in the leading / but that said, I don't recall every getting a confirmation message.

You wouldn't get a confirmation if you are still using the bind_load_file_silent variant. You could swap back to the non-silent bind_load_file command and see if anything in the confirmation message gives any clues. I actually did that when I was testing and forgot to mention it.

  • Like 1
Posted
1 minute ago, CaptainLupis said:

Isn't it cce 0 etc rather than cc 0?

cce is for when you want to perform one of the costume change emotes with the costume change. cc changes the costume without an emote.

Posted
4 minutes ago, AboveTheChemist said:

cce is for when you want to perform one of the costume change emotes with the costume change. cc changes the costume without an emote.

Ah, yeah, on the rare occassions I used costume changes it was with an emote attached right enough.

Bopper: "resistance resists resistible resistance debuffs"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...