Feature - Implemented Buying Spooky Saplings

bumcheekcity

Active member
When I adventure in the spooky forest with my options set to buy a spooky sapling, mafia keeps buying them until I run out of meat, which is annoying of course.

I suggest the option should be "buy a spooky sapling if I don't have one and I haven't done the temple quest".

It's possible that this error is with my ascending script, but I've tested it with just a tiny snippet and it seems to reproduce. I'll confirm when I'm back home.
 

Theraze

Active member
I experienced (and reported in the choice-adventure implementation thread) this bug as well. Additionally, goals will not properly set choice adventures to work fully through.
 

Veracity

Developer
Staff member
The code is behaving precisely as you requested it to. You told it "when I encounter choice adventure #504, take choice #3", and that is what it does. The problem is, unlike any previous choice adventures, when you take the choice, you are given the same choice again. (Well, some Game Grid games are coded like that, but we don't provide choice adventure settings for those.)

I am really, really tired of people describing Feature Requests as "bugs". Heck, isn't it obvious that if you want "buy a spooky sapling if I don't have one and I haven't done the temple quest", that requires special code?

And, gee, I am really, really sorry that the current behavior is "annoying, of course". We obviously worked hard to write code that would "annoy" you. I mean, that's the purpose of KoLmafia and the end-goal of all our hard work: to "annoy" users.

Edit: You say in post one that you had "options set to buy a spooky sapling". Here is your code:
Code:
		if (item_amount($item[spooky sapling]) == 0) {
			set_property("choiceAdventure502", "1");
			set_property("choiceAdventure503", "3");
			set_property("choiceAdventure504", "3");
			cli_execute("goal clear");
			cli_execute("goal add 1 choiceadv");
			print("BCC: Let's get the sapling", "purple");
			bumAdv($location[Spooky Forest]);	
		}

Yes, a side effect of setting the choice adventures like that is to acquire a spooky sapling, but you did not tell KoLmafia to "acquire a spooky sapling". You told it to respond to specific choice adventures in specific ways, and to adventure in the Spooky Forest until it sees a choice adventure, passes through a chain of choices, and exits from the choice.

KoLmafia does not have the FEATURE that you desire, which is that the Spooky Forest mega-choice behave more like the Louvre, with an associated "goal" preference to determine how to navigate through it.
 
Last edited:

Theraze

Active member
I considered that setting the goal/condition of acquiring a spooky sapling or mosquito larva and not having it manipulate the choices as they come to provide for that goal as a bug, not a feature... as it's not accomplishing the goal I've set, unlike anything else allowable to be acquired through choice adventures... But maybe that's just me. :)
 

bumcheekcity

Active member
Bumping this up to re-request it. As a feature :p I tried to have a bash at making a patch myself but was ultimately unsuccessful :(
 

Bale

Minion
What mafia really needs is a single drop down for Arboreal Respite that includes all possible outcomes instead of a dozen drop downs with options for each step. That'd take some actual work though.
 
Last edited:

Theraze

Active member
And the first two choice adventures should get removed, since they don't exist anymore... That can happen already if someone wants to do it.
 
What mafia really needs is a single drop down for Arboreal Respite that includes all possible outcomes instead of a dozen drop downs with options for each step. That'd take some actual work though.

This would be best. Single choice for Satisfy Temple Requirements. Also, thanks so much to everyone who takes part in updating mafia. It's really a godsend for many people and anything it can't or doesn't do pales in comparison to what it does.
 

Theraze

Active member
Well, I think that my monster delevel/healing tracking patch is nearly done, so... let's start looking into this. Files that the word Louvre is found in:
request/AdventureRequest
session/ChoiceManager
session/LouvreManager
session/ValhallaManager
swingui/menu/GlobalMenuBar
swingui/panel/ChoiceOptionsPanel

As well, it's also found in KoLCharacter, but that didn't show up to this check for some reason.

Okay, we can discount anything regarding mapping and preferences, because Spooky isn't randomized. That means we can knock out KoLCharacter, session/ValhallaManager, and swingui/menu/GlobalMenuBar. We will need to capture adventure requests, choice adventures, have a handler, and be able to change the choices. That means, if I'm thinking clearly, that the files modified would be:
request/AdventureRequest
session/ChoiceManager
session/SpookyForestManager
swingui/panel/ChoiceOptionsPanel

Final result should be four choiceadventures for the entire SF: Loot corpse, Spooky Forest, Interesting Choice, and Vampire Hunter G.

Edit: Slight change to my prior thoughts... Interesting Choice (the vampire choiceadv) is another one that would probably be best handled by itself, both because it's still there currently, and outside the new range of 502-507.
Also, Vampire Hunter G. Same reasons.

Edit2: Eh... can't figure out why it doesn't want to properly initialize the goal table currently, causing the adventure tab to not load. Was trying to repurpose VioletFogManager for it as it has more static actions than the Louvre, but... failed on buildRoutingTable. Ah well. Maybe I'll pick it up again later, maybe someone else will take care of it first.
 
Last edited:
A possible workaround

Lack of buying control aside, this is a bit annoying... You can't interrupt the buying loop by declaring world peace, nor does logging out and back in help because Mafia just gets back into the loop. One has to get into the Kingdom using the standard browser interface and leave Tree's Last Stand by hand. Therefore, I would like to suggest a temporary workaround of limiting the number of saplings in inventory to one, which hopefully (with the Halloween content, I haven't had a chance to test it yet) can be implemented by applying the attached patch. It could be made better of course, for instance by preventing Mafia from buying another sapling once the first one was consumed by unlocking the Temple - but given the temporary nature of this workaround, I wanted to keep things as simple and non-intrusive as possible.
 

Attachments

  • sapling-limit.patch
    1.1 KB · Views: 55

Bale

Minion
I was looking at old threads and came across this. I thought I'd remind you that you wanted to look at it when the Biggs stuff was over.

Of course this is just a fix for the most obvious problem since Arboreal Respite really needs goal based choices in a single-drop down. A preference to indicate if you've unlocked the temple this ascension would be nice also. I probably should have stopped typing after that first paragraph, eh?
 
I don't know if it makes it easier or harder, but as an alternative "solution" could mafia recognize if you set a goal of "1 spooky sapling, 1 spooky-gro fertilizer, 1 spooky temple map" that it meant (in any given order) to do the 4 sets of choices to attain these goals (coin, map, fertilizer, sapling)?

I know this wouldn't solve the infinite loop side-effect of the new uber-choice adventure, but might be an easier way to implement the "get all the quest items" piece?

just a suggestion.
 

Veracity

Developer
Staff member
I was looking at old threads and came across this. I thought I'd remind you that you wanted to look at it when the Biggs stuff was over.

Of course this is just a fix for the most obvious problem since Arboreal Respite really needs goal based choices in a single-drop down. A preference to indicate if you've unlocked the temple this ascension would be nice also. I probably should have stopped typing after that first paragraph, eh?
Revision 9073 gives you a single drop-down with the choices you want. It also fixes the Tree's Last Stand choice handling to first buy a spooky sapling if you have none, then sell all bar skins, if you have any, and then exit.

If we had a setting to indicate that the Spooky Temple has been unlocked, we could skip buying an extra Spooky Sapling. That (the temple unlock setting) probably deserves a feature request of its own.

I don't know if it makes it easier or harder, but as an alternative "solution" could mafia recognize if you set a goal of "1 spooky sapling, 1 spooky-gro fertilizer, 1 spooky temple map" that it meant (in any given order) to do the 4 sets of choices to attain these goals (coin, map, fertilizer, sapling)?

I know this wouldn't solve the infinite loop side-effect of the new uber-choice adventure, but might be an easier way to implement the "get all the quest items" piece?

just a suggestion.
I just fixed the infinite loop, but this is a nice idea, too. For another day. Or yet another feature request.

I feel like closing this one, finally. :)
 
Top