Feature Any Plank too inclusive

fronobulax

Developer
Staff member
A possible goal (as selected from KoLmafia's suggestions) in the smut orc camp is "30 any plank". I set it, automated and KoLmafia stopped. I tried to build my bridge and it was incomplete even with fasteners remaining. It turns out there were balsa planks in my inventory because I am in KOLHS. The feature request would be for the goal in the Smut Orc Logging Camp to only count planks that can be used to build the bridge and not balsa planks, dingy planks or any other non-bridge building plank that KoL might introduce in the future. Thank you.
 
You could change it to "+30 any plank" ?

Although I never use it straight up because if I have a makeshift bridge (I always have one), then you only need approximately 15 planks.
 
I just closeted the balsa wood planks.

I'm not sure it is worth the effort but what I really want is a location aware goal. Perhaps there are pseudo-items called Bridge Part Plank and Bridge Part Fastener. Both are lists of items that can satisfy the goal and balsa wood and dingy planks are the plank types in teh game that are not in the first set.

A case could be made that the real goal is the "Chasm Bridge" in which case mafia would know or figure out what was needed and adventure until the bridge was built.
 
chasmBridgeProgress is a number from 0 to 31 indicating how much of the bridge is built. No idea how and when it gets updated, but I assume it at least gets updated every time we see the bridge page.
 
Seems related to this feature request. In it, zarqon specifically recommends using "30 any plank" as a goal.

Although, that one is for the Relay Browser and this one seems to be for those who automate the bridge building. I've never done that. But, I shouldn't be surprised that people who automate their turns want to automate the bridge, too...

I notice that the "conditions add" command has a sort of pseudo item in it - "castle map items" is the equivalent of furry dur, giant needle, and awful poetry journal. We could probably delete that. :) You can also add "outfit" as a condition.

I oppose adding pseudo items. I'd rather add a special "chasm bridge" condition - a la "pirate insults" or "autostop" - which would stop when the bridge is built. Note that you'd have to have an after battle script to autouse planks or connectors, if there's at least one of each, in order to advance the bridge progress. But, that's similar to requiring that your CCS attempt to gain pirate insults in order for the "pirate insult" condition to work.

Huh. I see Java code that I am completely unfamiliar with in ConditionsCommand to override a method for a single new-ly constructed object. Sneaky! Yes - that same technique could be used to look up chasmBridgeProgress to decide when the bridge is finished.
 
Revision 12535 adds "chasm bridge" (a synonym for "31 chasm bridge progress") as a condition.

I have no idea how or if chasmBridgeProgress is updated except via visiting the Orc Chasm in the relay browser and attempting to build a bridge using whatever materials you happen to have in inventory. A script could do that with visit_url. Or, somebody could write a cli command to attempt to do that, I suppose. Simply running an OrcChasmRequest will do that.
 
I have no idea how or if chasmBridgeProgress is updated except via visiting the Orc Chasm in the relay browser and attempting to build a bridge using whatever materials you happen to have in inventory. A script could do that with visit_url. Or, somebody could write a cli command to attempt to do that, I suppose. Simply running an OrcChasmRequest will do that.

Since chasm progress can only change when you actually visit the bridge (or from actions done outside of mafia, but that isn't worth considering here), there's no other time to consider updating it. The initial reason for tracking that was simply to be able to give a useful URL when a bridge part drops, so it really can't include unused fasteners and planks, or any other possible interpretation.
 
Right. So, as I indicated, you can use "30 chasm bridge progress" as a condition and adventure with the orcs and it will count down usefully iff you have an after adventure script or something which visits the bridge and uses the fasteners and planks.

I don't see that that needs to be built-in to KoLmafia itself - compare to "pirate insults" being a goal which requires you to take special action (setting a CCS to use the insult book) if you want to benefit from it.

About the only thing I can envision to help with that would be a "chasm" command, which will visit the chasm to add to the bridge, which will update chasmBridgeProgress, and give a one-line report based on the new value of that setting. You could then set that command as your after battle command and it will satisfy the condition at exactly the right time.

Heck, it could visit only if the current progress is less than 30 AND you have at least one fastener and at least one plank in inventory. Save a useless server hit.

I've been waiting for the OP to comment on what I have done - and what I have proposed - in response to this Feature Request, but no joy so far.
 
Last edited:
I think this is the behavior the users will expect:

- adventure until you get the items
- Mafia stops
- you have to visit the bridge yourself.

We could consider:
PHP:
Preferences.getInteger( "chasmBridgeProgress" ) + min( number of planks, number of fixations )
instead of simply considering the preference.
 
- you have to visit the bridge yourself.
You sure about that? You see, I don't automate turns. I run in the Relay Browser. Every time I get a fastener or a plank in the Relay Browser, it gives me a link to try to make the bridge. I click on it, and when the bridge is complete, great!

The OP wants to automate turns. I have no clue about how he wants to handle this, but I'm fairly sure that "you have to visit the bridge yourself" doesn't fit in with the "automate turns" model.

As I said, I am waiting for a response from those who DO want to "automate turns" without any manual actions of the sort you propose.

I wish there was a "Feature - Waiting for Information" tag I could put on this. I suppose the expectation is that the person submitting the Feature Request will pay attention and interact with the developers who are working on it but, obviously, that's not always how it works...
 
I would love to not have to click on anything or add a visit to my afterAdventureScript if possible, but the current solution works fine. However compared to say the insults, that once I have a CCS set up to handle it, will update the preference automatically I need to, in this case, set up the updating of the preference myself which is a bit of a faff even though it's no big trouble. Getting Mafia to use planks/fasteners as I got them to update the preference and thus stop when the bridge is finished would be so wonderful :)
 
Visiting the bridge every time you have 1 plank and fastener is a waste of server hits compared to turning in lots of them at a time. Ideally you only visit the bridge to place the dictionary bridge and when visiting will complete the bridge.
 
I've been waiting for the OP to comment on what I have done - and what I have proposed - in response to this Feature Request, but no joy so far.

My apologies. I have been following and realized there were several things intertwined and I wanted to see how the solutions developed. That said, in my world successful automation trumps optimal play (so long as some kind of progress is made). So my core issue was that automating using the default goal suggested by KoLmafia stopped too soon, and it did so because what I presume is a match on "plank" finds things that do not contribute towards bridge progress. Pseudo-items would be one solution but that was a suggestion. "chasm bridge" combined with a chasm command or the equivalent in a between battle script should satisfy my automation desires. So this is good for me. Thank you.

I'm not sure I would ask for KoLmafia to implement a chasm command or execute it automatically because the former is a five line script or so and the latter can have side effects, but the suggestion to use a BBS really means getting BestBetweenBattleScript to support it, modifying BBBS locally and trusting SVN's merge or making a wrapper BBBS which calls "my" stuff and then BBBS. Makes me wonder if there should be a FR to expand some of the automation options to handle a list of scripts rather than just one. Probably not a good idea, but...
 
Last edited:
P.S. - As noted this would work for me. But it turns out that mafia plus built in goals (with no scripting) is a fairly robust way of getting things done. So there are times when players that I know will just select the goal mafia suggests and automate. In this case chasm progress by itself would never stop because the naive user would select the goal but not necessarily use any components that would update the goal. So at the very least it is probably not a user friendly idea to list chasm progress as a goal in the dropdown. Assume that anyone who knows about it also knows to set something up to use the items.

I wonder if the user friendly option is a built in script such as unlocking the Guild or the tavern options or the tower? "Span the Chasm" would use any of the bridge "helpers" (dictionary, suspension bridge) available, any available parts, save the outfit, equip axe and/or loadstone, adventure until there were enough components to complete the bridge and then do so. At completion or end due to lack of turns, restore the outfit.

I do not think this should actually obtain a bridge from the dictionary. There are too many prerequisites required for that to happen and inevitably someone will test a strategy that doesn't unlock the Untinkerer or wants to to the Chasm before the pirates.
 
Visiting the bridge every time you have 1 plank and fastener is a waste of server hits compared to turning in lots of them at a time. Ideally you only visit the bridge to place the dictionary bridge and when visiting will complete the bridge.
Interestingly enough, since I play (in-run, anyway) exclusively from the Relay Browser, I visit the bridge every time I have at least one each of planks and fasteners. Which is to say, I am "wasting server hits", according to your characterization.

I guess it would be nice for automation to not be as wasteful as I am when I'm playing in the browser.

What about perverts? The first however many times I encountered them, I decided to keep the keepsake box, rather than open it and use the parts. I'm not sure what I was thinking; perhaps I thought that if I ever did softcore, I might want to pull a box or something. I no longer save them; I simply open them and use the parts immediately.

That points out, however, that there is no one "correct" thing for KoLmafia to do if you get a keepsake box while automating. Sounds like another thing that a user might want to customize via their after battle script: if you have a keepsake box, open it - or not.

I'll ponder some more on this.
 
Putting aside the question of the Pervert's keepsake box.

I guess it would be nice for automation to not be as wasteful as I am when I'm playing in the browser.

Best behavior would be to count up planks and fasteners and if the count (of both of them, individually) plus chasmBridgeProgress is >= 30, then visit the bridge. It's troublesome, but not too troublesome.
 
Back
Top