Mafia Wiki Preference work

Fluxxdog

Active member
Update: I've gotten everything done to Z and I think I picked out a few bugs, as well as dressed it up a bit.

Also, I found an interesting preference. _userMods
This allows you... well, if you read it, you'll figure it out ^^
 

Fluxxdog

Active member
Glad to help somehow. It's huge and it's gonna get bigger. I want to tackle choice adventures next, because the actual setting doesn't always correspond to choice numbers. The only thing that's is entirely consistent is 0: abort
Any suggestions?
 

roippi

Developer
My suggestion there would just be to open ChoiceManager.java and go to town. There's a few overlapping methods that do similar things, which can be confusing, but anything special-cased is going to be found there. The class is generally well-commented.
 

Fluxxdog

Active member
Thanks for the pointer. Any other files you want to point me at, gimme a holler. And, uh, path to said files please ^^ My knowledge of locations isn't as extensive as yours.
 

slyz

Developer
A simpler place to find choice adventures whose options have a meaning for Mafia but not for KoL is:
Code:
src\net\sourceforge\kolmafia\swingui\panel\ChoiceOptionsPanel.java
 

Fluxxdog

Active member
Thanks all :)

Question: As I can not currently test this, hopefully someone can point me in the right direction to read the code:
For the eXtreme slope, choice 4 is "complete the outfit", however I cannot determine what exactly it does if you already have the 2 outfit pieces already.
 

Fluxxdog

Active member
No option to skip those adventures. That's why I wanted to know what mafia would do. It should lead me to other code snippets that'll let me figure out other selections.

Another question: Where does mafia save the Spooky Forest? I found how it changes the setting through switch ( this.spookyForestSelect.getSelectedIndex() ) but I can't tell where it picked up the last setting.
EDIT: Never mind, I figured it out. It uses an extremely complex method of setting the default rather than one simple choice, meaning anyone who wants to automatically adjust has to adjust multiple choice adventures instead.

EDIT EDIT: OK, through the first 100 choices. Take a look.
 
Last edited:

Bale

Minion
OMG, you documented _userMods! I'd completely forgotten about that feature!

EDIT EDIT: OK, through the first 100 choices. Take a look.

whoa. That's utterly amazing. I'm surprised you're even documenting adventures where mafia does zero special handling.

You should mention on that page, near the beginning, that all choices have an option 0 which aborts.
 

Fluxxdog

Active member
OK, new question: For choice adventure 155 (Skull, Skull, Skull(, option 4 no longer skips the adventure, but gets the debonair deboner instead. If the deboner isn't there, what would mafia do? Continually fail the choice adventure or is there handling for that?
 

Theraze

Active member
Currently it's a continual fail. The eventual goal is doing something else, but... what? That's why it hasn't happened yet. :D
 

Fluxxdog

Active member
I guess the best suggestion would be to do like Engorged Sausages. If the deboner is there, grab it. Else, choose one of the other options.

Another question: Does mafia have a built-in beer pong solver? I know it'll show the right answer in the relay browser if you have it, but what about automation?
 
Last edited:

Fluxxdog

Active member
Question: As I can not currently test this, hopefully someone can point me in the right direction to read the code:
For the eXtreme slope, choice 4 is "complete the outfit", however I cannot determine what exactly it does if you already have the 2 outfit pieces already.
Found the answer. Finally got my head around the code well enough that, if all other outfit pieces are obtained, it will default to choice 1. I may not be reading the code right, but I think it just ends up here at line 5998 in ChoiceManager.java:
Code:
		// If they have everything and it's an ignore choice, then use
		// the first choice no matter what.

		return "1";
I hate to ask this, but can someone confirm?
 

slyz

Developer
Oh my. When I first posted in this thread I thought you were simply going through the non-obvious settings that Mafia uses for some choice adventures. It turns out you were re-creating the KoL Wiki :(
 

Fluxxdog

Active member
I'm going through the gamut before looking at pruning anything. It's helping me get a better understanding of what I need, as opposed to just the bare minimum. Also, what I'm doing should help scripters make better decisions. For example, the debonair deboner infinite fail. It doesn't. It took a lot of digging, but I found it just simply skips the adventure if the deboner isn't there, rather than letting you pick another option if you want. Which reminds me, I should go correct that while it's on my mind.
 
Top