Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Pref files (http://angband.oook.cz/forum/showthread.php?t=4769)

relic August 7, 2011 20:31

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.

dos350 August 7, 2011 21:28

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

relic August 8, 2011 14:56

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.

Magnate August 8, 2011 15:38

Quote:

Originally Posted by relic (Post 58388)
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.).

relic August 8, 2011 16:38

Quote:

Originally Posted by Magnate (Post 58392)
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.:)

Nomad August 8, 2011 17:20

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!

Max Stats August 9, 2011 00:42

Quote:

Originally Posted by relic (Post 58339)
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).

Zikke August 9, 2011 01:35

Quote:

Originally Posted by Nomad (Post 58404)
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.

Magnate August 9, 2011 08:13

Quote:

Originally Posted by Zikke (Post 58434)
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 ...

Magnate August 9, 2011 08:20

Quote:

Originally Posted by Max Stats (Post 58431)
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.


All times are GMT +1. The time now is 18:14.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.