Conditional Choices?

Raven434

Member
I was trying to figure out if Mafia supports a "this or that" style condition?

Basically it would be something like:

I) Adventure until level 11

Or

II) Stop if you happen to pick up a Dance Card in the Ballroom

I know how to add single conditions, but don't know how to make them "Or".

Thanks!
 

Bale

Minion
The argument is how much functionality mafia should have "out of the box" as opposed to needing to add on functions with scripts. Thanks to ash mafia has nearly limitless versatility, but that doesn't mean it needs to be used for everything.

With that said, I'm on the side of the camp that says mafia doesn't need to do this straight from GUI. Write a script for your ballroom leveling.
 

Catch-22

Active member
The argument is how much functionality mafia should have "out of the box" as opposed to needing to add on functions with scripts. Thanks to ash mafia has nearly limitless versatility, but that doesn't mean it needs to be used for everything.

With that said, I'm on the side of the camp that says mafia doesn't need to do this straight from GUI. Write a script for your ballroom leveling.

Think about how you would do it in a script though, it's still nowhere near as slick as 3 of: item1, item2, item3. Hola went on a killing spree and removed a lot of stuff from KoL, which is probably because he was afraid of it getting bloated. Well those days are over and KoLmafia is still bloated, more and more functions are being added every day that could be achieved with ASH but are just a lot easier to implement once handled "out of the box".

If you're going to say "Oh but we can do that in ASH..." then you have to draw a line somewhere as to what can be done in ASH and what just isn't practical to do in ASH. If we got rid of everything that could be done in ASH then we'd be getting rid of a huge chunk of mafia! Then we could go further and say "well we don't need that built-in ASH function because it can be determined by doing this in ASH", pretty soon you'd have half of the functions in ASH gone too.

The decision to remove that functionality was also made before NS13 and a lot of other content was rolled out, the average Joe has more reason for logical disjunction support now than then. Hola's statement "the people who want that kind of flexibility are in a position to write ASH scripts to accomplish the task" no longer rings true for me.
 

Bale

Minion
Think about how you would do it in a script
I'd do it in a script by checking all conditions after each adventure. That's how I usually script when I do such things. I know other people do "set condition x", but I like the control when I script.

That's not my real reason for opposing it though. I think there's such a thing as making kolMafia too easy to use. Remember that KolMafia can become its own enemy by allowing people to run up huge lag. I think that is part of Hola's reason for disabling the feature. He wanted a majority of people to have to actually play manually for some things, even though a minority could script this.
 

Catch-22

Active member
That's not my real reason for opposing it though. I think there's such a thing as making kolMafia too easy to use. Remember that KolMafia can become its own enemy by allowing people to run up huge lag. I think that is part of Hola's reason for disabling the feature. He wanted a majority of people to have to actually play manually for some things, even though a minority could script this.

Here's an argument that I never quite come to terms with.. A person doing things manually would use the same if not more bandwidth than KoLmafia and the same, if not more hits to the server. The only thing FOR the manual method, is hits/time would be lower. One person isn't going to lag out a server designed (hopefully) to hold thousands of simultaneous connections, sure you might say "a lot of people running Mafia would!" but that is only the case if a lot of people are doing a lot of hits at the same time..

One thing I do is cache images using KoLmafia, which not only preserves bandwidth on the server side, but it decreases load time on the client side. When you run mafia from the GUI (not through a relay) you're not even loading images at all, only interpreting a text response. I'd go as far to say that the average mafia user actually uses less bandwidth than a player that does the same things through a regular browser.

Poorly written scripts are probably more likely to be the cause of excessive hits to the server than KoLmafia itself. I think that an officially implemented method is not only going to be easier for the end-user, but also (likely to be) more efficient than having inexperienced folk attempting to hack together their own script for the task at hand.
 
Last edited:

lostcalpolydude

Developer
Staff member
Being unable to automate stuff with mafia could cause people to not log on with their second and third characters. People not logging in extra characters saves on server load.

I don't know that any server load argument has anything to do with the current conversation though.
 

Catch-22

Active member
Being unable to automate stuff with mafia could cause people to not log on with their second and third characters. People not logging in extra characters saves on server load.

Automation is already possible, the argument is more should we bring back official support for this or just leave it up to those who want to do it on their own.
 

Rinn

Developer
Maybe a solution that would make everyone happy is to allow goals to check against a script. For example, you could do "1 goal.ash" and when goal.ash returns true (it would get called at the end of every adventure, and pass in the page text) automatic adventuring would halt.
 

jasonharper

Developer
Anyone who was willing and able to write an ASH script to determine when adventuring should halt could just as easily write the script such that it actually did the adventuring - that would be at most one more line.

I do see one argument in favor of being able to express things in the goals rather than in a script: zarqon keeps asking for better script access to the goals, so that his consult scripts can make decisions based on them, such as whether olfaction should be used. The current access to goals is limited, but at least there's some access; any conditions that were expressed in a script rather than the goals would be fundamentally inaccessible to consult scripts.
 

Veracity

Developer
Staff member
For what it's worth, I used to use the "disjunction" style of goals frequently. I was not happy when hola removed it, but I shrugged and changed my habits, rather than trying to convince him to put it back. I didn't think entering "disjunction" as a pseudo condition was particularly intuitive, anyway.
 

Rinn

Developer
Anyone who was willing and able to write an ASH script to determine when adventuring should halt could just as easily write the script such that it actually did the adventuring - that would be at most one more line.

I do see one argument in favor of being able to express things in the goals rather than in a script: zarqon keeps asking for better script access to the goals, so that his consult scripts can make decisions based on them, such as whether olfaction should be used. The current access to goals is limited, but at least there's some access; any conditions that were expressed in a script rather than the goals would be fundamentally inaccessible to consult scripts.
Not for things like adventuring for a number of a certain noncombat. I can write a script for that, but I can't call adventure() for that and have to do various hackery using visit_url() which frankly I really dislike doing for something as simple as a string match. I mean you're already keeping track of what adventures are encountered, I'd really like to use that count as a goal. This is probably getting away from the original topic.
 
Top