Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old April 4, 2019, 11:37   #1
Shalinar
Rookie
 
Join Date: Apr 2019
Posts: 11
Shalinar is on a distinguished road
Noob Question About User Pref Files

Hi All! First post here.

Just getting back into Angband after playing it as a kid. Exciting stuff!

Anyways, there are several changes that I always want to make to the birth options (the "=" menu during character creation), so I wanted to set those to always be what I want by default.

I couldn't find the default settings for those anywhere in the /lib/gamedata or /lib/customize files. In customize.txt, it says we can create our own user pref files to be sourced into the game. However, it's not terribly clear exactly how to accomplish this (or maybe I'm just being dense).

It says that "all of the files are kept in the /lib/user directory", but that directory does not exist. It's also not clear how the user pref files should be named. From reading some of the other forum posts here, it seems that naming the file "MyName.prf" should allow that file to be loaded every time I start a new character named "MyName". Is there a better system than that? I like all of my characters having different names for the flavor

I'd also like clarity on how to get Angband to read these files, as I've had zero luck getting this to work so far. What directory should they go in? What should the files be called? What's the format for the birth option (for example, "birth_randarts:1")?

I've tried everything I can think of and have not gotten my custom settings to be read correctly by the game. This includes:
- Creating /lib/user directory
- Creating "MyName.prf" file with desired settings in /lib/user
- Creating "MyName.prf" file with desired settings in /lib/customize
- Adding my custom settings to "pref.prf"
- Adding my custom settings to "user.prf"
...and more!

Some clarity on user pref files would be much appreciated. Thanks!
Shalinar is offline   Reply With Quote
Old April 4, 2019, 15:29   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,795
Derakon is on a distinguished road
If you only play one character at a time, then when that character dies, you can load their savefile to create a new character whose options and birth settings are all the same as the previous character. That's the easiest way to get those settings set, in my opinion.
Derakon is online now   Reply With Quote
Old April 4, 2019, 15:36   #3
Shalinar
Rookie
 
Join Date: Apr 2019
Posts: 11
Shalinar is on a distinguished road
Quote:
Originally Posted by Derakon View Post
If you only play one character at a time, then when that character dies, you can load their savefile to create a new character whose options and birth settings are all the same as the previous character. That's the easiest way to get those settings set, in my opinion.
But I don't usually want to play the same character. I just want the birth options set the same every game, no matter what character I'm in the mood to roll.
Shalinar is offline   Reply With Quote
Old April 4, 2019, 15:41   #4
Shalinar
Rookie
 
Join Date: Apr 2019
Posts: 11
Shalinar is on a distinguished road
Starting a new game with Terminal #1 open, I discovered a parsing error is occurring when it reads MyName.prf file. So, this tells me two important things! First, it is actually reading my custom file when I play character named MyName (woohoo!), and second, that the format for my pref file is incorrect.

Currently it reads like the following:

Code:
# Birth options
birth_randarts:0
birth_connect_stairs:1
birth_force_descend:0
birth_no_recall:0
etc...
What's wrong with this syntax?

Side note, currently MyName.prf is living in /lib/customize, NOT /lib/user where customize.txt says it should.
Shalinar is offline   Reply With Quote
Old April 4, 2019, 15:49   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,795
Derakon is on a distinguished road
Quote:
Originally Posted by Shalinar View Post
But I don't usually want to play the same character. I just want the birth options set the same every game, no matter what character I'm in the mood to roll.
You don't have to play the exact same character type. When you load a dead character you can choose to either play with the same settings or start chargen over -- but in either case your birth settings and other options stay the same.
Derakon is online now   Reply With Quote
Old April 4, 2019, 17:29   #6
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,923
Donated: $40
takkaria is on a distinguished road
You can save your settings to a file on the options menu. Then you can examine the syntax.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old April 4, 2019, 17:29   #7
Shalinar
Rookie
 
Join Date: Apr 2019
Posts: 11
Shalinar is on a distinguished road
Quote:
Originally Posted by Derakon View Post
You don't have to play the exact same character type. When you load a dead character you can choose to either play with the same settings or start chargen over -- but in either case your birth settings and other options stay the same.
Ah, I see! That's great, that's probably what I'll end up doing.

I'd still like to know what's wrong with my pref file, for future reference.
Shalinar is offline   Reply With Quote
Old April 4, 2019, 17:42   #8
Shalinar
Rookie
 
Join Date: Apr 2019
Posts: 11
Shalinar is on a distinguished road
Quote:
Originally Posted by takkaria View Post
You can save your settings to a file on the options menu. Then you can examine the syntax.
Ok, I tried this. When I opened the file, the relevant part at the top of the file reads like so (copy-pasted here):
Code:
SaveVNLAdescription#Shalinar, L1 Human Warrior, at DL0xrng≠J†*
*p‰∂£;ï#Œà
⁄ T6ÃÊ`…òøÈ9!.N‰ŒLœ√∞Ω∫ìå'êΩ ÑueATʉey*'}L±€,»¬†zn‘∏ˆyø¶/t¡eÒÆ◊†·òÒjÌ¢[~ZΩÑ√W‚£E$Òèn≈Ñ˚‰5bŒMÑc¡1Ò‡zNŒMoptions≠•ˆ(nonerogue_like_commandsuse_soundshow_damageuse_old_targetpickup_alwayspickup_invenshow_flavorsshow_targethighlight_playerdisturb_nearsolid_wallshybrid_wallsview_yellow_lightanimate_flickercenter_playerpurple_uniquesauto_morehp_changes_colormouse_movementnotify_rechargeeffective_speedcheat_hearscore_hearcheat_roomscore_roomcheat_xtrascore_xtracheat_livescore_livebirth_randartsbirth_connect_stairsbirth_force_descendbirth_no_recallbirth_no_artifactsbirth_stackingbirth_lose_artsbirth_feelingsbirth_no_sellingbirth_start_kitbirth_ai_learnbirth_know_runesbirth_know_flavorsbirth_levels_persistxxxmessagesAΩj   ====================   Parse error in /Applications/Angband.app/Contents/Resources/lib/customize/Shalinar.prf line 3 column 1: birth_connect_stairs: uParse error in /Applications/Angband.app/Contents/Resources/lib/customize/Shalinar.prf line 3 column 1: birth_connect_stairs: undefined directivexxxmonster memory-No more monstersxxobject memoryÕå
Seeing the giant string of options there, I noticed there were no "1" or "0" values, so I thought perhaps they should be "yes" and "no" values, since that is literally what the birth options menu sets them to, but that didn't work either. I also tried not setting values and instead just including the options that I desired to be "on". Still no dice.

Looking at the parser error, it says column 1 is where it's running into an error, which means the very first non-comment character. So this tells me that the syntax is different from what I thought. However, I can't find any documentation on this.

Does anyone know what the correct syntax is for birth options user preferences?
Shalinar is offline   Reply With Quote
Old April 4, 2019, 17:46   #9
Sky
Veteran
 
Join Date: Oct 2016
Location: somewhere on the south coast
Age: 46
Posts: 1,252
Sky is on a distinguished road
Quote:
Originally Posted by Derakon View Post
You don't have to play the exact same character type. When you load a dead character you can choose to either play with the same settings or start chargen over -- but in either case your birth settings and other options stay the same.
that is ... great, but totally counterintuitive. I genuinely had no idea this was a thing.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old April 4, 2019, 21:19   #10
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,923
Donated: $40
takkaria is on a distinguished road
I had a look through the code and there is no way to load options from a savefile anymore. If I recall it was taken out because it made managing pref files too complex. You will need to just use the savefile technique.

PS What you pasted was the beginning of your savefile, not a pref file - that's why it's got all that weird-looking stuff in it.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone use race-specific pref files? & pref file UI changes takkaria Vanilla 9 August 1, 2013 04:27
Request for pref files takkaria Vanilla 7 May 1, 2012 07:05
Pref files relic Vanilla 11 August 9, 2011 20:40
Noob Question for 3.0.9 Arphod Vanilla 4 November 8, 2008 03:36
Question about "flvr" pref files. Zero Vanilla 1 January 14, 2008 19:13


All times are GMT +1. The time now is 15:20.


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