Feature - Implemented Spoilers for Twin Peak

Bale

Minion
It would be great if spoilers were added to Choice Adventure 606: Lost in the Great Overlook Lodge. For some reason I always have trouble remembering which test are selected by each option. I recommend the following spoilers to remind me which choice is which.

  • Choice 1: Investigate Room 237
    (Need at least 4 stench resistance)

  • Choice 2: Search the pantry
    (Need at least +50% item drops in addition to familiar)

  • Choice 3: Follow the faint sound of music
    (Need jar of oil)

  • Choice 4: Wait -- who's that?
    (Need at least +40% combat initiative)


The trick is that choices 1-3 disappear after they are cleared and choice 4 only appears after the previous three choices are complete. Button values will need to be checked to verify them. (I'm not sure if mafia normally uses button values or simply the order in which they appear on the page.)

First three choices present:
HTML:
<table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Lost in the Great Overlook Lodge</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="http://images.kingdomofloathing.com/adventureimages/mansion.gif" width=100 height=100></center><p>After what seems like hours, you manage to find your way out of that stupid hedge maze. Teeth chattering, you struggle against the weight of a snowdrift to force open a side door of the Lodge, and finally make it back inside. It isn't quite what you'd call 'warm' inside, but it's warmer, and at least the sort of chills this place gives you aren't the sort where you have to worry about your toes falling off. <p>Now that your brain's defrosted enough to handle a coherent thought, you return to the question of what exactly is going on here. The barman said he'd been killed, and that you knew who killed him, but you don't remember anything of the sort. What's more, he seemed to know you -- and for that matter, you knew him -- but you could swear you'd never been here before. <p>Well, the agency sent you here to solve this mystery, so that's what you intend to do. You clap your hands and rub them together, partly from eagerness, and partly to rub the last remnant of the chill out of your fingers. <p>Wait... agency?<center><form name=choiceform1 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=1><input class=button type=submit value="Investigate Room 237"></form><form name=choiceform2 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=2><input class=button type=submit value="Search the pantry"></form><form name=choiceform3 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=3><input class=button type=submit value="Follow the faint sound of music"></form><form name=choiceform6 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=6><input class=button type=submit value="Leave the hotel"></form></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table>

Choice 2 cleared. Note that button values 1 and 3 are left.
HTML:
<table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Lost in the Great Overlook Lodge</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="http://images.kingdomofloathing.com/adventureimages/mansion.gif" width=100 height=100></center><p>After what seems like hours, you manage to find your way out of that stupid hedge maze. Teeth chattering, you struggle against the weight of a snowdrift to force open a side door of the Lodge, and finally make it back inside. It isn't quite what you'd call 'warm' inside, but it's warmer, and at least the sort of chills this place gives you aren't the sort where you have to worry about your toes falling off. <p>Time to get this investigation back on its metaphorical tracks. The sooner you get this case solved, the sooner you can get back to headquarters and civilization.<center><form name=choiceform1 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=1><input class=button type=submit value="Investigate Room 237"></form><form name=choiceform3 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=3><input class=button type=submit value="Follow the faint sound of music"></form><form name=choiceform6 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=6><input class=button type=submit value="Leave the hotel"></form></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table>

Choice 4: (I got this with the a pair of hedge trimmers so the intro text is slightly different, but the options don't change.)
HTML:
<table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Lost in the Great Overlook Lodge</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><img src="http://images.kingdomofloathing.com/adventureimages/mansion.gif" width=100 height=100></center><p>You force open the hedge trimmers against the layers of rust and frost, and hack your way through the wall of the hedge. It's a damn shame to ruin the greenery this way, not to mention the shame you feel at subverting a good puzzle, but needs must when the devil drives. Teeth chattering, you struggle against the weight of a snowdrift to force open a side door of the Lodge, and finally make it back inside. It isn't quite what you'd call 'warm' inside, but it's warmer, and at least the sort of chills this place gives you aren't the sort where you have to worry about your toes falling off.<p>Time to get this investigation back on its metaphorical tracks. The sooner you get this case solved, the sooner you can get back to headquarters and civilization.<center><form name=choiceform4 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=4><input class=button type=submit value="Wait -- who's that?"></form><form name=choiceform6 action=choice.php method=post><input type=hidden name=pwd value='b48268133e78c3cb5f31270839112d1b'><input type=hidden name=whichchoice value=606><input type=hidden name=option value=6><input class=button type=submit value="Leave the hotel"></form></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table>
 
Last edited:

roippi

Developer
I actually have this implemented locally already:

Code:
Index: src/net/sourceforge/kolmafia/session/ChoiceManager.java
===================================================================
--- src/net/sourceforge/kolmafia/session/ChoiceManager.java	(revision 11820)
+++ src/net/sourceforge/kolmafia/session/ChoiceManager.java	(working copy)
@@ -44,6 +44,7 @@
 import net.sourceforge.kolmafia.KoLConstants;
 import net.sourceforge.kolmafia.KoLConstants.MafiaState;
 import net.sourceforge.kolmafia.KoLmafia;
+import net.sourceforge.kolmafia.Modifiers;
 import net.sourceforge.kolmafia.RequestEditorKit;
 import net.sourceforge.kolmafia.RequestLogger;
 import net.sourceforge.kolmafia.RequestThread;
@@ -57,6 +58,7 @@
 
 import net.sourceforge.kolmafia.persistence.AdventureDatabase;
 import net.sourceforge.kolmafia.persistence.ConcoctionDatabase;
+import net.sourceforge.kolmafia.persistence.FamiliarDatabase;
 import net.sourceforge.kolmafia.persistence.MonsterDatabase.Element;
 import net.sourceforge.kolmafia.persistence.QuestDatabase;
 import net.sourceforge.kolmafia.persistence.QuestDatabase.Quest;
@@ -2588,6 +2590,9 @@
 		case 582:
 			// Fitting In
 			return ChoiceManager.dynamicChoiceSpoilers( 3, choice, "Fitting In" );
+		case 602:
+			// Lost in the Great Overlook Lodge
+			return ChoiceManager.dynamicChoiceSpoilers( 5, choice, "Lost in the Great Overlook Lodge" );
 		case 611:
 			// The Horror...(A-Boo Peak)
 			return ChoiceManager.dynamicChoiceSpoilers( 3, choice, "The Horror..." );
@@ -2866,10 +2871,10 @@
 			result [ 1 ] = "gain mosquito larva or spooky mushrooms, " + coinAction + ", get stats or fight a vampire";
 
 			// gain a starter item, gain Spooky-Gro fertilizer or gain spooky temple map
-			int fertalizer = InventoryManager.getCount( ItemPool.SPOOKY_FERTILIZER );
+			int fertilizer = InventoryManager.getCount( ItemPool.SPOOKY_FERTILIZER );
 			String mapAction = ( haveCoin ? ", gain spooky temple map" : "" );
 
-			result [ 2 ] = "gain a starter item, gain Spooky-Gro fertilizer (" + fertalizer + ")" + mapAction;
+			result [ 2 ] = "gain a starter item, gain Spooky-Gro fertilizer (" + fertilizer + ")" + mapAction;
 
 			return result;
 
@@ -2939,6 +2944,34 @@
 
 			return result;
 
+		case 602:
+			// Lost in the Great Overlook Lodge
+
+			result = new String[ 5 ];
+
+			result[ 0 ] = "need +4 stench resist, have " + KoLCharacter.getElementalResistanceLevels( Element.STENCH );
+
+			// annoyingly, the item drop check does not take into account fairy bonus.
+			// This is just a one-off implementation, but should be standardized somewhere in Modifiers
+			// if kol adds more things like this.
+			double bonus = 0;
+			if ( FamiliarDatabase.isFairyType( KoLCharacter.getFamiliar().getId() ) )
+			{
+				double eff = KoLCharacter.getCurrentModifiers().get( Modifiers.FAIRY_EFFECTIVENESS );
+				int weight = KoLCharacter.getFamiliar().getWeight();
+
+				bonus = eff * ( Math.sqrt( 55 * weight ) + weight - 3 );
+			}
+			result[ 1 ] =
+				"need +50 item drop, have " + Math.round( KoLCharacter.getItemDropPercentAdjustment() - bonus ) + "%";
+
+			int oil = InventoryManager.getCount( ItemPool.JAR_OF_OIL );
+			result[ 2 ] = "need Jar of Oil (" + oil + ")";
+			result[ 3 ] = "need +40% init, have " + KoLCharacter.getInitiativeAdjustment() + "%";
+			result[ 4 ] = "flee";
+
+			return result;
+
 		case 611:
 			// The Horror... (A-Boo Peak)
 			result = new String[ 2 ];

but it needs to be tested.
 

Bale

Minion
I'm not exactly sure how that works, but... flee has a value of 6, not 4. Is that relevant?
 

roippi

Developer
Heh. Well, arrays are 0-indexed and buttons are 1-indexed, so flee really has a "value" of 5. But for whatever reason there's no 5 button, there's just a 4 and a 6 button. Okaaaay. Trivial fix.

Anyway, random little stuff like that keeps me from blind implementing it. I won't be ascending for a few weeks, and then into oxy, so we'll either have to be patient or someone else needs to test/tweak/commit.
 

Bale

Minion
And that is why I like to post the page's html. :D

I'm guessing that an early unimplemented version of that adventure had an additional choice which the playtesters thought made the adventure too darn long and complicated.
 

xKiv

Active member
I am guessing 5 is the "burn it down" option that appears if you don't complete the quest within 50 turns.
 

Winterbay

Active member
The burn it down option is a completely different choice adventure though. It has only two options at least (continue and burn the shit down)
 

Soluzar

Member
Spoilers for Twin Peak?

Is it possible we could get some spoilers / reminders for Twin Peak? I play through this area in the Relay Browser, and it would be nice to have some advisory text such as

40% Item Drop Required (35%)

Where the parenthetical was what the player actually has. Could show it in green if they have enough, red if they don't maybe? The other tests could have similar explanatory text regarding the Jar of Oil, level of Stench Resistance or Initiative.

What also would be nice is a reminder of whether the adventure text is actually a "success" message or "failure", since it's not entirely clear at least to me. I always just compare the text I got to the wiki.
 

slyz

Developer
I'm going to reject this as a Mafia feature request, but people are welcome to write relay override scripts to fill this need.
 

Soluzar

Member
Well, I just figured that since you have spoilers for pretty much every other quest... no harm in asking.

If there could be a relay override that would be great, though.
 

Soluzar

Member
Interesting. I might enable it and roll my own build of Mafia for my next ascension. No way to test it until then, I guess.
 

slyz

Developer
Oh, I had misunderstood the Feature Request. I thought you were talking about Mafia adding spoiler information in the container page, like for the Cyrpt.

You were talking about spoilers for the noncombat choices? Those should definitively be added. You can't do much about your current gear once you are in the NC, but at least you will know for the next time.
 

Bale

Minion
Now that the misunderstanding is cleared up, I've merged the threads since it turns out that they are the same.
 

Soluzar

Member
Oh, I had misunderstood the Feature Request. I thought you were talking about Mafia adding spoiler information in the container page, like for the Cyrpt.

You were talking about spoilers for the noncombat choices? Those should definitively be added. You can't do much about your current gear once you are in the NC, but at least you will know for the next time.
Maybe you can't do much about your gear once you're in the NC, but I guess you can take a different choice if you abruptly remember that you haven't buffed items but do have a jar of oil... or for example in AoB you're likely to have the required item without even trying, as food drop bonus also counts. That would be good to be reminded of.

I was talking about spoilers for the noncombat choices, primarily. The idea of spoilers on the container page never occurred to me. Now that it has, I might actually try to write that up as a relay override. Seems doable. It could maybe also remind me whether the 'results' adventure is the success or fail variation. It's not entirely clear from the text. Sorry for any confusion caused. If I write up any future feature requests, I'll be sure to be more clear.
 

slyz

Developer
I uncommented Roippi's code in r11984, with a slight tweak. Untested.

For automation, more intelligent code would be needed.
 
Top