New Content - Implemented choiceAdventure182 in the airship now has a 4th option for model airship

AlbinoRhino

Active member
You obtain a model airship (item 6299) which can be used to complete the L10 quest at Copper Feel (choice 677). When I set choiceAdventure182 = 4, mafia seems to actually use choice 2, (indicated by the arrow which decorates the buttons in the relay browser.)
 

AlbinoRhino

Active member
Dang, just went through there about an hour ago. It is absolutely choice 4 without hidden choices if that's what you're concerned about. (I have a GM script which labels the buttons with choice # and option numbers, and it is immediately apparent to me when they have skipped a possible option.)
 

Veracity

Developer
Staff member
No HTML, but I can confirm the choice from my session log:

[636] Fantasy Airship
Encounter: Random Lack of an Encounter
Took choice 182/4: unknown
choice.php?pwd&whichchoice=182&option=4
You acquire an item: model airship
 

AlbinoRhino

Active member
I'm fairly certain that the 4th option is removed after you have gotten the airship, as well. In case that makes a difference.
 

Veracity

Developer
Staff member
The issue appears to be in ChoiceManager.pickOutfitChoice(), which will pick the first choice option which results in an item if either that item is in your list of goals or if there are fewer options in the choice list than whatever your setting says. Since we have options 1, 2, and 3 built-in, when you set the choiceOption to 4, that latter test kicks in and we return 2 - an item (Penultimate Fantasy chest) rather than what you had it set to.

Code:
				if ( possibleDecisions.length < StringUtilities.parseInt( decision ) && !InventoryManager.hasItem( item ) )
				{
					return String.valueOf( i + 1 );
				}
I don't know why that check is there. We could probably do SVN archaeology to find out when it was inserted.

In any case, adding the fourth option to the definition of this choice adventure:

Code:
		// Random Lack of an Encounter
		new ChoiceAdventure(
			"Beanstalk", "choiceAdventure182", "Fantasy Airship",
			new String[] { "enter combat", "Penultimate Fantasy chest", "stats" },
			new String[] { null, "604", null } ),
would fix it.

However, adding special handling for choice 182 in ChoiceManager.specialChoiceDecision() would probably be better, since it is pointless to take option 4 once you have taken it before. Since ChoiceManager.specialChoiceDecision() takes the responseText as an option, it'd be simple enough to detect that option 4 is or is not present.
 

AlbinoRhino

Active member
I like it when you post your analysis of the problem. I have gotten as far as to install all of the stuff listed at http://wiki.kolmafia.us/index.php?title=Compiling_from_Source, so I guess I am able to create patches now, but I am still far too unsure of my java skills to actually attempt making any changes. I had gotten as far as to locate the code in your second code box above, but I was unsure of what the use of that 2nd new String[] was. And, as it turns out, adding the 4th option there wasn't the real solution anyway. Thanks for taking the time to post that.
 

slyz

Developer
The second string consists of item number. Mafia adds "you currently have X" (I forgot the exact wording) in the relay spoilers for choices where a number is specified.
 

Ioeth

Member
Random Lack of an Encounter in The Penultimate Fantasy Airship now has 4 choices

The Random Lack of an Encounter choice adventure in The Penultimate Fantasy Airship now has 4 choices, with the last ("Gallivant down to the head") being to obtain a model airship, which is very handy for the completion of the level 10 quest. It only appears if you do not yet have a model airship and have not completed the level 10 quest. Could we have this option added to Mafia as something like "Model airship, then Penultimate Fantasy chest"?
 

Ioeth

Member
Thanks for merging my request in here. Sorry I didn't realize that there was already an open thread for this.
 

Magus_Prime

Well-known member
Fantasy Airship choice adventure - missing model airship choice

Running r11992, when setting the choice adventure for the Penultimate Fantasy Airship, "Galavant down to the head" to pick up the model airship isn't on the pick list for the choice.

According to the HTML for the page the missing choice is number 4.
 
Last edited:

Winterbay

Active member
It also only shows up if you do not already have a model airship in your inventory, in case that matters in any way.
 

Bale

Minion
LoL! Yep, that's probably the reason. Even I liked to automate it. I have a nice preBattleScript that sets the choice adventure for me based on NC rate and mainstat exp bonus. Now I don't automate it until I get my model airship. I would be very happy if this was fixed.
 
Top