Feature - Rejected Add fallback choice support

Irrat

Member
If your choice preference is choiceAdventure40 = 1 then we know it will pick choice 1, and if choice 1 is not available, your automated turns will abort.

Sometimes you have choices that are not always available, such as the June Cleaver skips which are limited to 5/day, or the Engorged Sausages choice which rarely appears. In those scenarios, mafia either has custom handling for picking an invalid choice which could be replaced with this change, or no handling and we'll be forced to abort automation.

So the change I'm proposing would be adding fallback choices if a choice is not available.

So if I do choiceAdventure40 = 1,3,4 it will pick 1 if its available, otherwise 3, otherwise 4, then finally it will abort and require user interaction.
 

Ryo_Sangnoir

Developer
Staff member
In the adventure tab, under the "Choice Advs" tab, under "Zone" or "Item" there is the option to select a choice from a dropdown, taking the value of the preference as the index.

How would you handle a comma separated list of values here?
 

Irrat

Member
In the adventure tab, under the "Choice Advs" tab, under "Zone" or "Item" there is the option to select a choice from a dropdown, taking the value of the preference as the index.

How would you handle a comma separated list of values here?

Given the difficulties in it, I'd say the GUI largely remains the same for setting the options. So you can only pick one of each, not use the utility of this directly.

As for displaying those, mafia would just turn the property into a comma separated list. 0, 3, 5,6 => "Turn in Stone, or Turn in Big Stone, or Turn..." with a maximum length.

Of course, if that doesn't sastify then if we could possibly mark a choice as "Sometimes unavailable" then it'd be nice to have selecting a choice that's sometimes unavailable, automatically add another row below it or something with already selected choices stripped out.

Though probably want to do something like make the menu when not dropped down compressed to show only 10 letters or something, but the dropdown is full size.
1660545930622.png
 

Irrat

Member
Is there a reason you couldn't just use a choiceAdventure script to accomplish this?
Because the default distribution of mafia doesn't come with said script.

There's a lot of choices that players hit and are highly situational. There's also no purpose built way to pick one then the other without each player having to create and modify a script.

And for some reason, I think the majority of players that would use this do not know how to make a basic script.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Sadly this is something that will require scripting - specifically using the choice adventure script functionality that comes with the default distribution of KoLmafia
 

lostcalpolydude

Developer
Staff member
And for some reason, I think the majority of players that would use this do not know how to make a basic script.
I think those players would mostly find
Code:
choiceAdventure40 = 1,3,4
confusing also, and will simply copy-paste what someone posts in a chat conversation, so it may as well be a script installation command.
 
For the record, I have also wanted almost the exact same thing that Irrat suggests, and I would have proposed the same comma separated list of choices.
 

fronobulax

Developer
Staff member
Would like to get some feedback if this is worthwhile for me to take a poke at

I'd say it's not worth my time, but I will observe that the pushback given to a PR is sometimes different from the pushback to an idea. So if you think it is a great idea and can implement it in a way that doesn't break anything, is opt-in and has some tests then you're likely to get what you'd like anyway.
 

VladYvhuce

Member
Some of the built-in choice adventures options do have multiple results, which might be where the OP was coming from. The fantasy airship, for example, has an option to get the model airship, and then get chests after getting the model airship is no longer an option. While I don't know the coding side of that, it seems like perhaps a few other choice adventures could use similar options. Such as if one is trying to acquire the parts for the boat to give the hippie in the spooky forest by fighting the junk sprites, instead of needing to get first part, stop adventuring, set to get second part, stop adventuring, set to get third part, stop adventuring.
 
Top