Option to change length of manaburning buff?

Isvarka

Member
Is there an option or command for changing how many turns the manaburning buffing will max out at? Currently it seems to max out at roughly 1000 turns, and I'm basically wondering if there is a way to set it to around 200 or 500 or something of that nature.
Thanks.
 

Isvarka

Member
Thanks for the response. I had gone through the mafia preferences and even a few files to see if I could find anything with no luck.

I'll see if there's an existing feature request thread for this (I'm ashamed to admit that I didn't take the time to search before I posted), and if there is (which seems likely given your response) I'll add my vote in.
 

Camber

Member
There is not. People have also asked for a way to make the value larger. (It's currently 1000 + turns remaining.)

According to the kolmafia thread on the main KoL forum, the only way to change the limit is making a change to source code.

If you guys want to change that, this is probably the line you are looking for:

PHP:
int durationLimit = KoLCharacter.getAdventuresLeft() + 1000;

It's in the source code file MoodManager.java, line 519 as of KoLmafia version 14.1.
 

Theraze

Active member
I could see this as something that can be set with command line, defaulting to 1000, but with no GUI menu option. Does that make sense/work? If so, what would you want as the preference name? maxDurationLimit? maxManaBurn? Something else?
 

Isvarka

Member
That would make perfect sense to me. Probably maxManaBurn would be most appropriate since other stuff could have duration limits that would be unrelated.
 

Theraze

Active member
Hmm... easy enough to do as something like (with CLI code)
Code:
int durationLimit = KoLCharacter.getAdventuresLeft() + (Preferences.getInteger("maxManaBurn") > 0 ? Preferences.getInteger("maxManaBurn") : 1000)
or, if you prefer one lookup instead of two, but with a value set...
Code:
int maxburn = Preferences.getInteger("maxManaBurn");
if (maxburn < 1) maxburn = 1000;
int durationLimit = KoLCharacter.getAdventuresLeft() + maxburn;
I think I prefer the first of those, though...

Curious... would this work using the KoLmafia java handling?
Code:
int durationLimit = KoLCharacter.getAdventuresLeft() + ((int maxburn = Preferences.getInteger("maxManaBurn")) > 0 ? maxburn : 1000)

I suppose the question is, SHOULD that be something visible on the graphical preference side? Or are we fine with that being semi-hidden?
 
Last edited:

Isvarka

Member
The way I tend to code, I also prefer the first option, though the third option is also tempting if that works with it. I don't think it's something that needs to necessarily be visible as long as its settable via CLI.
 

Grotfang

Developer
The code is simple to implement. That is not why it hasn't been added.

My concern here is that we have gone from a state of play where the argument was "the GUI is too cluttered with preferences... stop adding them!" to a position where we add the preferences without the GUI component of them. With things like chat PMs beeping, for example, I'm not too concerned since it is a niche issue. With mana burning, I feel that if it is a real concern we maybe need to think more carefully about its implementation.

How often do people really want to go above or below 1,000 (+ adv)? I wouldn't have thought that below is really a concern since a) what else would you do with the mana? and b) buffs are balanced equally, so there really isn't much mafia could be doing that's harmful there. If you are happy with the turns built up, you would probably turn burning off. So really we are looking at folks wanting to go above 1,000 + adv. Which leads me to the question of how many people does this effect?

If it is a decent proportion of the user-base, maybe we need to look at a better presented setting.
 

lostcalpolydude

Developer
Staff member
I think the issue comes up maybe 3 or 4 times per year. I feel like the consequences of it stopping at 1000 turns instead of some higher value that a person wants are low enough that it's okay for the setting to not be too easy to find. Maybe I'm wrong about the number of people that would want it changed, though.
 

Theraze

Active member
Okay... updated the code above to properly use Preferences.getInteger("") instead of get_property("").to_int() (which is the cli-command and obviously not useful code-side), meaning that any of the three above code entries should work. My preference between the three is probably still the first... The second is just nasty, and I don't think you're saving much by skipping one preference lookup.

So, if this is something we want to make more visible, I'm afraid the only place it'd really make sense to have in the preferences is in the main "General" tab, second grouping... probably at the bottom of that. Do we want to make it exist there, or leave it hidden?
 

Grotfang

Developer
Semi-hidden seems fine.

I decided a more sensible line than conditional statements would be to make the 1000 turn aspect a preference in itself -- seemed the simplest and most intuitive approach.
 

Bale

Minion
I like. Now there's an answer to give to people who ask the question, but it won't clutter the interface. I like secret preferences in KoLmafia.

Perhaps we're going to need a page on the wiki to list all the hidden options so that they aren't too secretive.
 
Last edited:

Winterbay

Active member
I like. Now there's an answer to give to people who ask the question, but it won't clutter the interface. I like secret preferences in KoLmafia.

Perhaps we're going to need a page on the wiki to list all the hidden options so that they aren't too secretive.

That would probably be a good idea. And some other commands as well probably, I know I've surprised more than 1 person in chat by telling them that there is a "help"-command in the CLI...
 

StDoodle

Minion
I know I'm a bit late to the game here, but wasn't the original reason for the 1k turn limit to minimize unnecessary server hits? After all, I've yet to hear a valid reason as to why anyone needs more than two full days worth of buffs.
 

Bale

Minion
Let's be honest here, in aftercore it's mostly the same number of server hits regardless of the limit. It will go up to the limit, whatever the limit, and then only cast again to refill it. There's only some extra server hits until it gets there. For people who hang out in aftercore, it will stay at any limit for a long time with the same number of server hits. The limit only really matters in an ascension context where you'll ascend before hitting the limit and have to refill it all over again, however even 1000 was ridiculously high for that context. Mostly I favor the ability to lower it to 300, not raise it to 2000. So if anything, I'll actually use this to reduce hits.
 
Top