When saving macros and keymaps, I find that it is much more useful to save them to a class pref file instead of one named for my character. This is because macros and keymaps tend to have references to spells, like 'maa' or 'm1a' to cast Magic Missile for mages. I decided to change the default filename when saving macros or keymaps to use the character class.
Here is the change I made. I edited function dump_pref_file in ui-options.c and changed the line:
to this:
This is kind of quick-and-dirty. There might be a more elegant way to test for dumping macros or keymaps, but I didn't want to change more than necessary. Would this be a useful change to make? Do most experienced users do like I do and save macros/keymaps to class-specific pref files?
Here is the change I made. I edited function dump_pref_file in ui-options.c and changed the line:
Code:
strnfmt(ftmp, sizeof ftmp, "%s.prf", op_ptr->base_name);
Code:
if (strcmp(title,"Dump macros")==0 || strcmp(title,"Dump keymaps")==0) strnfmt(ftmp, sizeof ftmp, "%s.prf", cp_ptr->name); else strnfmt(ftmp, sizeof ftmp, "%s.prf", op_ptr->base_name);
Comment