Pref files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • relic
    Apprentice
    • Oct 2010
    • 76

    Pref files

    I started a new character in 3.3.0, changed options as I want them, and saved them. In order to get these options for all characters, I figured that I would name the file something that would be loaded by Angband at startup, you know like it used to do. So I named it pref-mac.prf which has worked before. But starting another new character these prefs were not loaded. Am I doing something wrong? The pref file is saved in /user/library/preferences/Angband in OSX. Are pref files there read and loaded by Angband?


    I could manually copy from one file to another but I refuse to believe that such a clumsy method should be necessary.
    If you cannot answer a man's argument, all is not lost; you can still call him vile names. ~Elbert Hubbard
  • dos350
    Knight
    • Sep 2010
    • 546

    #2
    id like 2 say that b4 this version pref files were bad
    ~eek

    Reality hits you -more-

    S+++++++++++++++++++

    Comment

    • relic
      Apprentice
      • Oct 2010
      • 76

      #3
      I also notice that saving options don't include birth options! Why not? I think that those are the options that one first of all would want to have the same for all characters. At least I do.

      Am I the only one that thinks it is tedious to change birth options for every new character?

      Thanks for any thoughts on this matter.
      If you cannot answer a man's argument, all is not lost; you can still call him vile names. ~Elbert Hubbard

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by relic
        I also notice that saving options don't include birth options! Why not? I think that those are the options that one first of all would want to have the same for all characters. At least I do.

        Am I the only one that thinks it is tedious to change birth options for every new character?
        You shouldn't need to do this. A new character should start with the birth options of the previous character. Did you mean for every new savefile? If so, we kind of assume that people stick with the one savefile (to build up monster memory etc.).
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • relic
          Apprentice
          • Oct 2010
          • 76

          #5
          Originally posted by Magnate
          You shouldn't need to do this. A new character should start with the birth options of the previous character. Did you mean for every new savefile? If so, we kind of assume that people stick with the one savefile (to build up monster memory etc.).
          I see. Unfortunately I usually start with a new save-file every time, but I may have to change my habits here.
          If you cannot answer a man's argument, all is not lost; you can still call him vile names. ~Elbert Hubbard

          Comment

          • Nomad
            Knight
            • Sep 2010
            • 958

            #6
            Yeah, I tend to use different save files for each class/race combination, and I'm forever forgetting to switch randarts on at the birth options when I start a new one. I'm not that bothered by lacking the monster memory when I start out; it makes encounters with uniques more exciting!

            Comment

            • Max Stats
              Swordsman
              • Jun 2010
              • 324

              #7
              Originally posted by relic
              I started a new character in 3.3.0, changed options as I want them, and saved them. In order to get these options for all characters, I figured that I would name the file something that would be loaded by Angband at startup, you know like it used to do.
              There are two pref files that are loaded by default for all players: user.prf and pref.prf. However, the pref file loading code looks for pref files first in the lib/pref directory before trying the user pref directory. Since both of these files ship with the distribution, they will be found in lib/pref and even if you save your prefs to one of these names, they won't load. AFAIK, there are no other global pref filenames. Unless this has changed in 3.3, you can use a class name as a pref filename (Warrior.prf, Mage.prf, etc.) and it will be loaded every time you play a character of that class, but that is about the best you can do.

              If you want global pref settings, I can think of three options:
              • Modify process_some_user_pref_files in dungeon.c and add a call to process_pref_file with a static filename of your choosing (like global.prf).
              • Save your options to a new file and copy the relevant lines into user.prf in your lib/pref directory.
              • Bug the maintainers to add a new global user pref filename (or open a ticket requesting it).
              If beauty is in the eye of the beholder, then why are beholders so freaking ugly?

              Comment

              • Zikke
                Veteran
                • Jun 2008
                • 1069

                #8
                Originally posted by Nomad
                Yeah, I tend to use different save files for each class/race combination, and I'm forever forgetting to switch randarts on at the birth options when I start a new one. I'm not that bothered by lacking the monster memory when I start out; it makes encounters with uniques more exciting!
                I use different save files every time I make a new character also. At this point I usually remember all of the pertinent info about monsters (usually from dying to them in the past) so I don't worry about monster memory. I wish the monster memory did save locally so that any character on that computer would add to the same memory.
                A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
                A/FA W H- D c-- !f PV+++ s? d P++ M+
                C- S+ I- !So B ac++ GHB? SQ? !RQ V F:

                Comment

                • Magnate
                  Angband Devteam member
                  • May 2007
                  • 5110

                  #9
                  Originally posted by Zikke
                  I use different save files every time I make a new character also. At this point I usually remember all of the pertinent info about monsters (usually from dying to them in the past) so I don't worry about monster memory. I wish the monster memory did save locally so that any character on that computer would add to the same memory.
                  That's been planned for a while, and is closer now we have the new savefile format. Any year now ...
                  "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #10
                    Originally posted by Max Stats
                    There are two pref files that are loaded by default for all players: user.prf and pref.prf. However, the pref file loading code looks for pref files first in the lib/pref directory before trying the user pref directory. Since both of these files ship with the distribution, they will be found in lib/pref and even if you save your prefs to one of these names, they won't load.
                    Thank you - I didn't know that was the problem! It seems to me that the obvious short term fix is to ship only pref.prf in lib/pref, and allow the user to save user.prf in their private dir as their private global pref file (let's not forget that on multi-user systems, pref.prf would be loaded for all players). I can't imagine there's a need for both of them to be in lib/pref.

                    In the longer term we want to rationalise this whole issue with a single player-specific "settings" file, with window positions, colours, keymaps, autoinscriptions etc. etc. When you save any of these things, the game should ask you whether you want them applied for all chars, or for this class only, or this char only - etc.
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • Max Stats
                      Swordsman
                      • Jun 2010
                      • 324

                      #11
                      Originally posted by Magnate
                      Thank you - I didn't know that was the problem! It seems to me that the obvious short term fix is to ship only pref.prf in lib/pref, and allow the user to save user.prf in their private dir as their private global pref file (let's not forget that on multi-user systems, pref.prf would be loaded for all players). I can't imagine there's a need for both of them to be in lib/pref
                      If you wanted to keep the user.prf in lib/pref, you could just bypass the test for whether a file was found there and always load from both locations if found. You could then have a system default user.prf in lib/pref and an "all characters for this account" user.prf in the user's directory. I guess it depends on whether there is a reason to want both files shipped with the distribution.

                      In the longer term we want to rationalise this whole issue with a single player-specific "settings" file, with window positions, colours, keymaps, autoinscriptions etc. etc. When you save any of these things, the game should ask you whether you want them applied for all chars, or for this class only, or this char only - etc.
                      Can we add starting squelch settings to this list as described here?
                      If beauty is in the eye of the beholder, then why are beholders so freaking ugly?

                      Comment

                      • relic
                        Apprentice
                        • Oct 2010
                        • 76

                        #12
                        Well, what I did was to copy option preferences from my pref file to pref.prf manually, so that is fixed. And I will remember to set birth options for new characters during birth.

                        Another thing, I remember that in some variants (or maybe even Vanilla), one had the choice to append option-preferences to a file, (so as to not overwrite the file of course). Maybe something to consider?
                        If you cannot answer a man's argument, all is not lost; you can still call him vile names. ~Elbert Hubbard

                        Comment

                        Working...
                        😀
                        😂
                        🥰
                        😘
                        🤢
                        😎
                        😞
                        😡
                        👍
                        👎