Feature Make libram use a character setting, not a global one

I was reading this thread to try and find a way, but I don't see the defaults.txt Slyz references in any of Mafia's folders, so I'm not sure how to execute that suggestion. Theraze suggested to me that I simply include a line in my scripts that toggled the preference appropriately for each character, which worked well until I ran both characters at once, causing one character to not use mana burning on libram summons because it doesn't have a Gygax libram. We're now up to six librams, one in particular that people are most likely to want to use if they have it, but aren't nearly as likely to have purchased for their multis due to the cost (Gygax), and so the odds are higher than ever of having different librams they'd like to be used on different characters. Plus for five out of the last six years, a libram has arrived in Mr. Store in January or February, so there's a good chance a seventh is on the way.

While it's convenient that you don't need to individually set breakfast preferences for everything else (everybody is going to want to summon dry noodles in aftercore, for instance), I'd say librams are a unique enough situation that warrant some special attention, as not everyone is going to be savvy enough to find a solution to multi-book summoning across characters. Also, I have no idea if others would find this useful, but I'd love it if there were a built in way to get librams to not fire on breakfast by default, or only fire down to a certain level of MP. I generally disable libram summoning for breakfast for my characters, because I don't want to start the day with not enough MP to cast ode. I then have my adventuring script toggle libram summons on, so that mana burning will summon dice, and then be turned off at the end of the script.
 

jwylot

Member
The settings folder in your mafia directory contains global_preferences.txt with breakfast settings affecting all characters launched from that folder. Slyz was suggesting that copying breakfast lines to the charname_prefs.txt file in the same folder should work without breaking mafia and allow you to change settings for that character.

I suspect this thread doesn't belong in the bug reports thread.
 
The settings folder in your mafia directory contains global_preferences.txt with breakfast settings affecting all characters launched from that folder. Slyz was suggesting that copying breakfast lines to the charname_prefs.txt file in the same folder should work without breaking mafia and allow you to change settings for that character.

I suspect this thread doesn't belong in the bug reports thread.

So the global preference wouldn't override that? Regardless, I still think my idea is worth implementing, as not every user is going to be savvy enough to do that, or know to ask, as mentioned. I believe it to be a common enough issue with the proliferation of librams that catering to the great unwashed would be a nice thing to do.

For the record this is not a mode that we officially support running mafia in.

Do you have mp restoration turned off entirely?

That doesn't really change my point, anyone that doesn't know how ASH works or how to make breakfast scripts will still be affected if they run characters one at a time.

And generally, yes. Adventuring always generates the MP I need throughout the day (much more than I need, in fact, hence mana burning), with limited exceptions, such as during ascension. Therefore using any resources to restore MP would be a waste. I prefer to reserve 1/day free restorers (PYEC, soda, etc.) for after eating, drinking, and other daily preparation activities that wouldn't be handled by a breakfast script.
 

lostcalpolydude

Developer
Staff member
Do you have mp restoration turned off entirely?
The only auto-restoring I allow mafia to do is casting cocoon, and that is only for aftercore and the skeleton game. On the other hand, I also don't see why it's so important to drink immediately after running breakfast.

The main thing I wonder about this change is whether it would lead to the current value being ignored and the default value being used again until people change the setting. It would make the setting inaccessible until after logging in (when breakfast has likely already been run, if it is going to be run).
 

fronobulax

Developer
Staff member
defaults.txt is a file that is packaged in the mafia jar file. So you either know how to extract, edit and restore or you wait for a dev to do it. So slyz's comments were more of an investigation and not a solution.

The workaround is to have a login script (and possibly complementary logout script) that does different things based upon the character. We are not looking at something that cannot be done, rather we are looking at something that can be done "easier" and without a knowledge of ash, correct? This presupposes that multiple characters are not being run simultaneously from the same instance of mafia, but as noted that is somewhere between "unsupported" and "discouraged" anyway.

There have been many discussions over the years (at least among the devs) concerning GLOBAL vs. per character settings. From a technical standpoint there are settings that are needed and used before login and so by definition cannot be per character. (Breakfast related settings do not appear to be of this type). A case could be made that the whole settings subsystem needs to be cleaned up but there is not a lot of enthusiasm for doing that or for tweaking just one item in hope that doing so will delay the inevitable.

I think the idea has some merit but I'd like to use it as the trigger to reconsider settings and preferences in general. IMO. YMMV.
 
Out of curiosity what the other perceived problems with settings in general? I just took a spin through them, I didn't see anything else that I'd like changed from a user perspective. The interface isn't that pretty I guess, but for how often I'm in there I don't really care.
 

fronobulax

Developer
Staff member
Out of curiosity what the other perceived problems with settings in general? I just took a spin through them, I didn't see anything else that I'd like changed from a user perspective. The interface isn't that pretty I guess, but for how often I'm in there I don't really care.

The discussions I recall tended to focus on technical and code maintenance issues which is probably why the enthusiasm isn't there. My recollection, which may be mine alone since I seem to be in a place where I remember things wrong and post anyway, is that the distinctions between mafia provided and used GLOBAL preferences, mafia provided and used USER preferences and user created and used USER preferences could be cleaner especially in cases where default values are provided. There, as noted in this discussion, GLOBAL preferences that are not used until after a character logs in and so should be be USER. There are (?) also preferences that should be renamed to have a leading underscore because they are reset daily but predate the convention. Finally there was talk about a preference editor that was built "on the fly".

But not of the concerns are really visible to the user so...
 

Theraze

Active member
Also, item/skill preference renaming because they don't meet the current standard convention... or at least, the standard that was proposed at the time.
 
Top