Jump to content

bind_load_file does not seem to take effect when called from a custom popmenu


Extor Prime

Recommended Posts

Suppose we have a custom popmenu:

 

    Menu "Test"
    {
    option "Load Bindfile 1" "bind_load_file C:\Games\CoH\Binds\Bindfile1.txt"
    option "Load Bindfile 2" "bind_load_file C:\Games\CoH\Binds\Bindfile2.txt"
    option "Load Bindfile 3" "bind_load_file C:\Games\CoH\Binds\Bindfile3.txt"
    option "Load Bindfile 4" "bind_load_file C:\Games\CoH\Binds\Bindfile4.txt"
    }

 

Our Bind files are simple one-line binds:

 

Bindfile1.txt
ALT+C "local "Bindfile 1 loaded!""

Bindfile1.txt
ALT+C "local "Bindfile 2 loaded!""

Bindfile3.txt
ALT+C "local "Bindfile 3 loaded!""

Bindfile3.txt
ALT+C "local "Bindfile 4 loaded!""

 

We start the game and call the popmenu and select any one of the options (let's say option 1). The SYS chat reports: "Keybinds file C:\Games\CoH\Binds\Bindfile1.txt loaded". But when we press ALT+C nothing happens.

 

"OK maybe the bind files are bad." - you'd think that SYS would have say something about that, but it doesn't. Nevertheless, we manually execute:

 

/bind_load_file bind_load_file C:\Games\CoH\Binds\Bindfile1.txt

 

Now we press ALT+C and the character says in Local channel "Bindfile 1 loaded!"

 

OK, progress. We call the popmenu again and select the second option. SYS says that Bindfile 2 has been loaded. We press ALT+C again and the character says "Bindfile 1 loaded!" in local chat again. We double-check by dumping the full keybinds with keybinds_save_file and notice that ALT+C is still bound to "local "Bindfile 1 loaded!"". We test further by manually loading Bindfile 2 (/bind_load_file...), SYS once again reports that it has been loaded, but now when we press ALT+C the character correctly says "Bindfile 2 loaded!". We double-check by dumping the full keybinds again, and indeed we see that ALT+C has been bound to "local "Bindfile 2 loaded!""

 

So, it appears that some kind of issue prevents the keybind files from TAKING EFFECT when loaded via a popup menu even though the game reports that the keybind file has been LOADED.

Link to comment
Share on other sites

Hi,

 

The documentation in ParagonWiki notes that calling /bind_load_file from popMenus doesn't work.. as expected.  It says:

"Bind_load and Bind used as commands do not currently work as expected. Binds made via popmenu will take effect after the client is restarted."

 

Also FYI I've noticed with popmenus and custom windows that often adding new options or commands don't show up until you restart the client, not just those relating to /bind commands.  Hope that helps. 

 

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later

Apologies for the thread necro but I ran into this issue myself recently and just wanted to see if anyone had a decent workaround. In my case, instead of using the 'bind_load_file' command directly, I instead used 'beginchat /bind_load_file' which requires the user to press Enter once or twice after making the popmenu selection to get the bind files to load properly.

 

If anyone has a better solution for it, I would love to know!

Link to comment
Share on other sites

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...