/bind_load_file and relative paths


BayBlast

 

Posted

I'm mucking about in quickchat.mnu file and want to set up a command to load a custom bind file to help set up my new characters with the default layout. Problem is, /bind_load_file seems to need an absolute path to function, and with the spaces in the folder structure, that means I'd have to use quotation marks, something that the quickchat's structure already uses. Is there a way to use bind_load_file relative to the CoH's installation folder?


 

Posted

I don't think that it can use relative paths. Did you try DOS-formatting them?

ie: "C:/this path is too long/and has spaces/"
becomes "C:/THISPA~1/ANDHAS~1/"


 

Posted

Quote:
Originally Posted by Roderick View Post
I don't think that it can use relative paths. Did you try DOS-formatting them?

ie: "C:/this path is too long/and has spaces/"
becomes "C:/THISPA~1/ANDHAS~1/"
That's a nifty trick. I probably wouldn't have thought of that.

On a side note, when I use /bindsavefile or /bindloadfile, it defaulted to the "..\City of Heroes\piggs\" directory, until I created a "..\City of Heroes\data\" directory, then it defaulted there.

In short, if you did something like this:
/bindsavefile binds\testing.txt
the file would be saved as:
"..\City of Heroes\data\binds\testing.txt"
(providing you created the directory first)

Likewise, you can load the file with:
/bindloadfile binds\testing.txt

No spaces or tricks needed.


 

Posted

Quote:
Originally Posted by Roderick View Post
I don't think that it can use relative paths. Did you try DOS-formatting them?

ie: "C:/this path is too long/and has spaces/"
becomes "C:/THISPA~1/ANDHAS~1/"
.\ is a shortcut to the root coh folder as well.

/bindloadfile .\mybind.txt would load mybind.txt from the c:\program files\city of heroes folder (or wherever you installed it)

or even /bindloadfile .\subfolder\mybind.txt


 

Posted

.\ means "The current directory" to be precise.
..\ means "Up one level".

But I've found that in some cases, CoH's /***_load_file commands don't like paths using those directory names. I prefer just going from the root.

EDIT: You can also use "..\..\..\"and so on, to go up multiple levels. Trying to go higher that the root level this way will usually make the entire path invalid, so make sure you know exactly where you are before going up multiple levels.


 

Posted

Quote:
Originally Posted by BayBlast View Post
These will save to and read from the intall directory.
/bindsave
/bindload
yes, but that becomes your full default file, and you can't pick your own filename. I'm assuming they want to load specialty binds of some sort, which would require the other methods above.


 

Posted

What I used to do... (don't tend to use so many bind loads now). **

  1. Create a folder to keep the files in. (eg c:\program files\city of heroes\binds)
  2. Right click the folder in explorer.
  3. Click 'Sharing and Security'.
  4. On the 'Sharing' tab select 'Share this folder on the network' & 'Allow network users to change files' (not sure you need this, I have three computes running clients so did).
  5. Hit OK.
  6. In explorer go to: Tools > Map Network Drive.
  7. Pick a drive letter. (eg Z:\)
  8. In the folder box either browse to the location of the folder you just set the sharing details on, or type something like: \\<computer name>\<folder name> in my case its \\Max_\Binds *
  9. Hit Okay.
  10. In game rather than using /bindloadfile c:\program files\city of heroes\binds\binds.txt you can use Z:\binds.txt
*When Browsing for the directory it will be under: My Network Places > Entire Network > Microsoft Windows Netwok > @workgroup name. eg MSHOME@ > Computer Name > @List of Shared Folders@
**Based on a windows XP system

The above can be achieved with a MSDOS command using the 'Assign' command, probably needs some better tech knowlege than the above nowadays but works without any network issues. (Probably doesn't work on Vista or Higher). ((Might not work on XP could have sworn I have done this in the past... )

Edit to add:
Nowadays I use a single file for every character that has every keybind I need defined... saved in the game root which is then set as the default keys when any new character is created. (I do the same for chat, options and windows too.)