Menu

#724 MekHQ megamek client options are never retaiined

Stable
open
None
Accepted
2015-08-03
2014-12-13
No

Everytime you restart mekHQ, the megamek client options are reset to default. These include things like button orders and keybinds. Editing the megamek config files in the mmconfg does not appear to make a difference.

Discussion

  • Dylan Myers

    Dylan Myers - 2015-02-07
    • assigned_to: Dylan Myers --> Nicholas Walczak
     
  • Dylan Myers

    Dylan Myers - 2015-02-07

    Nick, this just needs the client options pulled into MHQ the same way we do for the Game Options.

     
  • Nicholas Walczak

    I can't reproduce this. First of all, key binds get saved as soon as you click Okay on the dialog, so those should always be getting saved unless you have sometime of permissions problem. Also, whenever the client is closed for whatever reason (and is opened in MHQ), it will save the client settings.

    What does your setup look like? Where are you putting MHQ? What OS are you running? If you're updating the files by hand and the updates aren't taking effect, then you must be updating the wrong location, or maybe there are errors in the file.

     
    • stopcomplaining2

      I have mekHQ in D:\MekHQ on windows 7. Things like re-arranging button layouts in megamek (launched through mekHQ) seem to get saved until i restart mekHQ, at which point they are "lost" and i have to do it again. I'm not sure if it's related, but nothing i do will change the text box's color or transparency either, regardless of what the MM values are set to.

      I'm running on an admin account so i don't think it's a permissions problem, it just seems that mekHQ doesn't "remember" any changes you make to MM once mekHQ is closed.

       
      • Nicholas Walczak

        The client preferences get stored in a static instance of a PreferenceManager class, so they basically get created as soon as the program starts, however every time the MegaMek client is closed it saves the preferences. As long as the client process isn't killed, when it closes MHQ will save the preferences.

        I can think of really only a couple reasons why you would experience what you are experience: either there's an error when writing the file (which you'd see an exception in the logfile), it's not able to write to the properly file (permissions issue), it's writing the file to the wrong location (which, if that were the case, lots of other things also probably wouldn't work), or MHQ is somehow resetting those files after MM saves them, but I don't see anywhere that does this.

        The client settings are stored in two files: mmconf/clientsettings.xml and mmconf/defaultKeyBindings.xml. When you run MM through MHQ and edit settings, you should see mmconf/defaultKeyBindings.xml change as soon as you close the client settings dialog (assuming you changed bindings). You should see mmconf/clientsettings.xml change as soon as you close the MM client window.

         
        • stopcomplaining2

          I tested it again. While the changes do get saved to the clientsettings.xml file, MM launched through mekHQ doesnt seem to actually load that file to retrieve the settings.

          This is what i did :

          1. Changed the walk button's order to be behind the jump button
          2. This change was successfully saved to the xml file
          3. Closed MM, closed mekHQ
          4. Opened mekHQ, started a battle
          5. Button layout returned to defaults even though the xml file still showed the customized button layout

          See screenshot : http://i.imgur.com/5uGWk8C.png

           

          Last edit: stopcomplaining2 2015-02-09
          • Nicholas Walczak

            Do the other settings besides the button layout save? What about keybinds and the other client settings, like muting the sound? When you said client settings, I assumed you were talking about the settings in the first tab of the client settings dialog.

             

            Last edit: Nicholas Walczak 2015-02-09
            • stopcomplaining2

              Most of the rest seems to save, like the chat box transparency (finally got that working). Not sure about keybinds or sound, but the button layout is the major thing i noticed that doesnt save.

               
            • stopcomplaining2

              Also the weapon sort orders in MM are never retained.

               
  • Taharqa

    Taharqa - 2015-08-03
    • Milestone: Development --> Stable
     

Log in to post a comment.