Feature Make infinite recursion in Castle Top Floor Impossible

Is it possible to make it impossible for use to choose settings that make KoLmafia loop between Raver Giants and Punk Rock Giants, and between Steampunk Giants and Goth Giants?

I finally realized what I had done.
Choice Advs:
Top Punk Rock: Raver Choice
Top Raver: Punk Rock Choice

But for a while, I couldn't figure out why KoLmafia was "locking up," or "going crazy." Poor thing.

I know: No system can be made foolproof, because fools are so ingenious. :)
Thanks.
 

Crowther

Active member
I've looped on these and other choice adventures enough times and for long enough to be embarrassed about hammering the server. Even something like "You just hit 50 choice adventures in 1 second without spending an adventure, so we aborted" would be nice.
 

Veracity

Developer
Staff member
The linkage between the various choice adventures changes once you have completed the quest.
 

Fluxxdog

Active member
Before quest we have 2 choice groups, Steampunk/Goth and Punk/Raver.

What make decisions confusing is there are 2 overall goals, one for the trash quest, the other for the rocketship. There are 4 different ways to complete the trash quest.
1: Have a mohawk wig (from the airship) equipped and go fight a Punk Rock Giant (676/4 => 678/1). Issue with this is you must have the wig equipped before the choice adventure.
2: Have a model airship (from the airship) and go pick a fight with the Steampunk Giant (675/4 => 677/1). Usually easier because you just need it in your inventory. Not guaranteed.
3: Swipe a record (678/4 => 676/2) then play it for the Goth Giant (677/4 => 675/2). Always available but requires NCs to happen in a certain order.
4: Mousehole. Nobody wants this.

1 and 2 both have a 50/50 chance of getting the needed NC, then your quest is done and the next NC can take you to the rocketship thanks to the Punk Rock Giant flinging his trash can. With 1, if you get the Steampunk option first, you can grabs the rocketship and try again. No major loss, plus this allows you to skip the steampunk in the future.
3 takes a twist. I've looked at it several ways, and if you must take this route, you need to get 2 choice groups back to back, Raver record then Goth giant. You have a 25% chance of getting these in the order you need them. If you get the Steampunk chance first, though, you can get the rocketship and not lose out on a turn, similar to 1. If you get the Raver option after getting the record, you can skip it in the future.

Perhaps an option can be made to intelligently complete this quest, depending on gear and inventory, letting mafia pick the best option available from the choices. The difficult part comes in if you don't have a mohawk equipped but have a model airship. The only way to skip the Punk/Raver is to grab the Raver's record so you can skip it in the future. Only helpful if you get another P/R choice.
-------
After the quest is done and you have the rocket ship, there are 2 sets of real choices that can be made.
Set one, fight the Steampunk or Goth Giant, farm brass gears or thin black candles, or skip the adventure.
Set two, fight the Punk Rock or Raver Giant, farm money, heal HP & MP, or go to the Steampunk's room, which then automates based on their preference.

After quest, this is looking similar to the Louvre choice settings except you don't need to figure out what goes where.

**I know the rocketship is technically optional if you pull 2-4 star key lime pies and a star chart, star hat, and star weapon.
 
Last edited:

roippi

Developer
I'd rather make a general solution that stops too much recursion rather than hard-coding extra logic every time this comes up.
 

lostcalpolydude

Developer
Staff member
The general solution needs to allow things like playing dungeon fist and exploring a violet fog and the louvre. I suppose if it's something like aborting after 100 choice switches it could work. 100 server hits is a lot better than going until the user wonders what's wrong, at least.
 

Theraze

Active member
If we're talking about stopping infinite loops, would be good to stop when combat goes above 100 rounds as well. Since I came back from my in-laws to find that it had made it up to round 293 thousand before rollover hit. Not completely sure why WHAM failed the fight, but... sadness. And way too many wasted server hits.
 

Fluxxdog

Active member
Dungeon Fist can be ignored because you CAN'T go infinitely. Your health drops with each step so you must finish. There are other choice adventures that can go infinitely. Interview With You (Vlad) restarts every time you botch your choices. The Safety Shelter on the moons can also be looped infinitely.

That said, of those loopable choices, they have to be done so intentionally. The plastic vampire fangs has a weird choice set up, but it's still pretty specific. The Louvre has to be hand selected to use a specific route that will cause looping. The fog and the shelters don't give that option. So if someone is going to loop infinitely, they have to deliberately set it up themselves.

As Storella points out, this is not the case with the top floor. I think this is simply from perceiving the NCs as 4 separate choice adventures when they're really 2 sets of choice adventures. After quest, this changes so that no matter what NC you get, you can always access the Steampunk/Goth choices. Consolidating the choice adventures options would be a better solution than "Let's see if something loops forever." A lot of the stuff I stated above is more fluff than solution, but I wanted to point out considering sets of choice adventures as one choice. I tend to over think things and say what I think.

tl;dr Combine Top Floor choice adventures into fewer option would fix the cause.
 

Veracity

Developer
Staff member
You can loop forever in the Wumpus cave and the Ruined City, too.

I agree that setting up the Top Floor choice adventures as two lists of things to choose from with options on each list being from a linked pair of choice adventures - and depending on which option you choose, we set the two choice options to go to the appropriate choice and select the appropriate prize - would be good.

The wrinkle would be the extra post-quest-completion choice that links one of the lists to the other one.
 

Fluxxdog

Active member
Well, the Frat House has two separate entries, once for pre-stone age and one for post. Granted it's for the same kind of NC, that being the around the world drinks, but those aren't actually the same areas, let alone the same NCs.

Perhaps a pre- and post- selection might serve better. Pre-quest, you may want to get the record. Post-quest, definitely not. So differences that might warrant such a split? One has get the record, the other has go to steampunk.
 
Top