If you're using my builds, and something isn't working the way you think it should (feature or bug), either read the stuff below to make sure it isn't due to my changes or ask me about it. Please do not waste the time of other people at the mafia forum by posting about problems I created, because then it makes me question whether these builds are a good idea after all.
Lost's mafia builds
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Lost's mafia builds
A lot of you probably know that I have custom mafia builds. If you didn't know about it, they're at [link removed because it's useless now] . The purpose of this thread is to split out the various changes and explain their purpose.
If you're using my builds, and something isn't working the way you think it should (feature or bug), either read the stuff below to make sure it isn't due to my changes or ask me about it. Please do not waste the time of other people at the mafia forum by posting about problems I created, because then it makes me question whether these builds are a good idea after all.
The leaflet solver will automatically use the house if you don't have a superior dwelling or Tasteful Items inside your dwelling.
This makes the default option for the maximizer include -tie. Whether using my builds or the main branch, you can specifically include -tie or +tie to make sure you get the result you want.
The first part of this change makes discardable karma and banked karma separate entries (on the screen before you ascend).
When you gain a level, if you set autoVisitCouncil = true, this makes you visit the council in the background so you can automatically pick up any new quests. It won't happen if you're in the middle of a fight when it happens (hipster or divine items, maybe) since the request would fail anyway.
Mafia has some code to prevent trying to use a gong multiple times (including visiting, by default, the Noob Cave to get Welcome Back). Unfortunately, getting a wandering monster instead of Welcome Back causes mafia to abort. So do astral flashbacks. This was the simplest way to get mafia to (basically) adventure repeatedly until getting Welcome Back and then use the gong, regardless of how many things show up first.
Add information to the log to help the visualizer, and display all spoilers that mafia gives the option to hide for people that want mafia to help them without changing the interface too much.
This makes it so you can't accidentally do "galaktik mp" and fill your MP when you didn't mean to (spending lots of meat). It also means you can't intentionally do that...
This stuff allows you to have KoLmafia log in through kolproxy using a checkbox on the Connections tab.
If you're using my builds, and something isn't working the way you think it should (feature or bug), either read the stuff below to make sure it isn't due to my changes or ask me about it. Please do not waste the time of other people at the mafia forum by posting about problems I created, because then it makes me question whether these builds are a good idea after all.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- NardoLoopa
- Market Manipulator
- Posts: 1201
- Joined: Tue Jun 19, 2007 10:37 pm
Re: Lost's mafia builds
All cromulent changes, Lost. Too bad the Mafia devs aren't interested in including the patches into the trunk. Thanks for providing this service.
All hail Open Source!
All hail Open Source!

- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
Not everything is good enough to be in something official. The telescope command can have a trailing comma under the right conditions, which looks tacky but I didn't bother fixing it because it's functional. That information also doesn't come from the telescope, so having it in that command is a little questionable. And while the depleted grimacite patch basically works, if you switch from being able to wear the hammer to not being able to wear it (or vice versa), the item manager doesn't update until you force it to, and I don't actually know how to fix it.
Then there's stuff like the leaflet, where post-valhalla I think my way is just as wrong as the main branch but I can't think of a good way of doing that.
Then there's stuff like the leaflet, where post-valhalla I think my way is just as wrong as the main branch but I can't think of a good way of doing that.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
Re: Lost's mafia builds
This is great, thanks for explaining everything. Is this thread the result of me admitting on the mafia forums that I had no idea what you had changed in your builds? The timing is impeccable. :)
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I was thinking about doing this anyway, but that post gave me motivation to actually do it.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
Re: Lost's mafia builds
Are you sure they're not interested? How, pray tell, do you know? Have you asked them?NardoLoopa wrote:Too bad the Mafia devs aren't interested in including the patches into the trunk.
FYI, I discovered lost's diff file a few weeks ago and have already incorporated - or reimplemented - several of his patches. Had I not done so, his note would have been rather longer.
I like some of his patches. I expect these will migrate into the mainline, by and by. Perhaps with modifications.

- grimacite crafting
- semirare lower counter is a hard stop
- wine cellar spoilers
- banked karma + discardable karma
and perhaps the "Welcome Back" change. I don't understand the problem being solved. Perhaps there needs to be a Bug Report discussing it. Perhaps there already is.
There are some that I think are inappropriate for the mainline, since they are a matter of taste which conflicts with an intentional decision we made for the benefit of the newbie mafia user - who is probably not an AFH speed ascender. For you, maybe lost's changes are better. On the other hand, as thacon discovered, maybe not.

- blatant spoilers
- maximizer -tie
- session log defaults
And some are sort of "eh", in my opinion. Not bad, but not necessarily exactly what I want - or where I want it.
- leaflet options. This was discussed recently on the kolmafia forums. No good solution was found.
- telescope command. I suppose. This could easily be a script - which is a good reason to not build it in.
- "stocking script". Why not just use the existing "preAscensionScript" hook?
- Auto-visit council on level gain. I guess. I just click on the "visit council" link in the relay browser, as needed.
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I don't really know why I went with java instead of ash for that.Veracity wrote:- telescope command. I suppose. This could easily be a script - which is a good reason to not build it in.
I did that at first, but I think the script would fail to get some items due to my mafia settings (the market is far too unreliable for me to let mafia use the mall), and then ascend anyway even when the script aborted. I could test this with an abort() in a preAscensionScript next time I ascend, but I've changed my stocking script so that failing to get items doesn't stop it anyway.- "stocking script". Why not just use the existing "preAscensionScript" hook?
I changed that because I went and tried to start the war one time without accepting the quest first. Though now that I'm used to it, having to actually click the link is an extra step I don't like having to take (I tried kolproxy for a run and missed that change). This could also be a relay override I guess.- Auto-visit council on level gain. I guess. I just click on the "visit council" link in the relay browser, as needed.
Stuff like this generally starts out in my personal mafia builds (not posted anywhere), then gets transferred over when people in chat agree that they make sense.
Yeah, anything that I don't bother to post on the mafia forum is only worked on until it's functional, doesn't create a risk of negatively impacting a speed run, and not too ugly.I expect these will migrate into the mainline, by and by. Perhaps with modifications.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
Re: Lost's mafia builds
That's fair enough. I'm pretty sure that the preAscension script doesn't stop you from ascending if it aborts. It should - and that would be an easy fix.lostcalpolydude wrote:I did that at first, but I think the script would fail to get some items due to my mafia settings (the market is far too unreliable for me to let mafia use the mall), and then ascend anyway even when the script aborted. I could test this with an abort() in a preAscensionScript next time I ascend, but I've changed my stocking script so that failing to get items doesn't stop it anyway.Veracity wrote:- "stocking script". Why not just use the existing "preAscensionScript" hook?
I don't mind the IDEA of automatically visiting the council at the end of the battle or whatever got you to the next level, but I do think that the "newbie mafia user" would be confused to go visit the Council after gaining a level and be told "stop slacking! get on with the quest we gave you!". I also think maybe visiting or maybe not, depending on whether you were in the middle of a battle or not is not good enough for mainline code. So, this is a change that would require a fair amount of thought and refinement before I'd accept it.I changed that because I went and tried to start the war one time without accepting the quest first. Though now that I'm used to it, having to actually click the link is an extra step I don't like having to take (I tried kolproxy for a run and missed that change). This could also be a relay override I guess.- Auto-visit council on level gain. I guess. I just click on the "visit council" link in the relay browser, as needed.
Re: Lost's mafia builds
Given that starting the war requires you to have seen the palindome, sending people to the council upon reaching level 12 might do nothing - that'd be a minor nuisance. You'd also encourage players to get into the habit of expecting mafia to trigger new quests, which makes it a little more likely that they might forget to accept the level 12 quest.lostcalpolydude wrote:I changed that because I went and tried to start the war one time without accepting the quest first. Though now that I'm used to it, having to actually click the link is an extra step I don't like having to take (I tried kolproxy for a run and missed that change). This could also be a relay override I guess.
The other changes look pretty neat

- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
Updated the first post by removing a chunk of stuff Veracity incorporated. Set your stocking script as a preAscensionScript now, and make sure it aborts somehow if you fail to get any items. My stocking script at https://www.sugarsync.com/pf/D128766_6866454_70275 has a confirmation box come up if you're missing stuff, so you can skip items if you want or you can stop ascending to get them.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I removed the changes to the telescope command. You can get those features (except better, because it checks your current path) from http://kolmafia.us/showthread.php?9381-Tower-Checker now.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
Auto-visiting the council when you gain a level is now off by default. set autoCouncilVisit = true if you want it back.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
"galaktik mp" and "galaktik hp" will no longer spend your meat filling up your MP/HP. "galaktik mp X" still works.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- Verdigris97
- Colonel Contest
- Posts: 739
- Joined: Thu Jan 21, 2010 6:14 pm
- Location: Northern CA
Re: Lost's mafia builds
These are nice changes, lost. Thanks!
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
The leaflet now lets you pick whether you want stats. It auto-uses the house if there's nothing detrimental about doing so; otherwise it asks you if you want to use it.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
Re: Lost's mafia builds
Hey lost - the last few builds have been reporting themselves as r11234 rather than the current r1127x's that kolmafia.us is on.
Is this intended?
Is this intended?
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
Fixed now.infern0 wrote:Hey lost - the last few builds have been reporting themselves as r11234 rather than the current r1127x's that kolmafia.us is on.
Is this intended?
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- Sleeping Beast
- Inscrutable Pi
- Posts: 225
- Joined: Mon Nov 07, 2011 3:05 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: Lost's mafia builds
Hey lost
I've been trying to use this sugestion for running your builds from dropbox.
Yields
Am I doing something wrong?
I've been trying to use this sugestion for running your builds from dropbox.
You can work around this also by making a little launcher that starts KoLmafia with the -DuseCWDasROOT=true option. This is exactly what my program MafiaUpdate does if the setting "optimize for flash drive use" is turned on.
Code: Select all
java -jar <dropbox_folder>\KoLmafia-11305M.jar -DuseCWDasROOT=true
Code: Select all
Unable to invoke -DuseCWDasROOT=true
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I have no idea what the issue is with that.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- NardoLoopa
- Market Manipulator
- Posts: 1201
- Joined: Tue Jun 19, 2007 10:37 pm
- Sleeping Beast
- Inscrutable Pi
- Posts: 225
- Joined: Mon Nov 07, 2011 3:05 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: Lost's mafia builds
Thanks, Nardo!NardoLoopa wrote:switch the order. -D comes before -jar
I believe I should be removing "java developer" from my resume. Damn you, Eclipse!
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I just added some stuff to allow KoLmafia to log in through kolproxy. It lets you combine the features of both programs, and I expect Eleron will make a thread with more info on that.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- Suendenbock
- My Pie Blown Sky High
- Posts: 565
- Joined: Wed Jun 27, 2007 5:51 pm
- Location: Indiana
- Contact:
Re: Lost's mafia builds
How do I make that work? I mean Mafia logging in through Kolproxy?
Re: Lost's mafia builds
You start up kolproxy, then start up lost's version of mafia and use that. Go to connection options on the login screen and turn on "Connect through kolproxy", then log in. The mafia GUI works like usual, and when you click the relay browser button, you get kolproxy in your relay browser.Suendenbock wrote:How do I make that work? I mean Mafia logging in through Kolproxy?
It's currently just an experimental prerelease and not really ready for prime-time yet though. Mafia sometimes gets confused, and bad things can happen when mafia gets confused. It should be perfectly OK to adventure in the relay browser, but mafia's GUI might not always update, and I'd be very cautious about automating turns from the mafia GUI if you care about the results. (I'd suggest that in vanilla mafia as well, but this can make mafia confused *a lot* more easily. I'm patching issues as I find/hear about them, so let me know if something goes wrong.)
- Suendenbock
- My Pie Blown Sky High
- Posts: 565
- Joined: Wed Jun 27, 2007 5:51 pm
- Location: Indiana
- Contact:
Re: Lost's mafia builds
Thank you. Because I liked Kolproxy, but I was missing some of the things that mafia provides. But I do want the things in the relay browser that Proxy had. So I am going to try it tomorrow and see how it works. =)
Re: Lost's mafia builds
It looks like that problem I was having last night stopped happening after I finally tricked it into logging in successfully that one time. I'm super enthusiastic about this kolmafoxy hybrid now that I've actually got it running. What's your preferred way of letting you know about things that don't quite work as expected?Eleron wrote:I'm patching issues as I find/hear about them, so let me know if something goes wrong.
- top1214
- Oh my! Guy with Pie!
- Posts: 1959
- Joined: Mon Mar 15, 2010 1:10 am
- Location: St Louis, MO, USA
Re: Lost's mafia builds
I don't know if it matters, but lost's build has a problem with the outfit switching of slime.ash.
- lotsofphil
- Leader of rum ham
- Posts: 4075
- Joined: Mon Mar 01, 2010 3:56 pm
Re: Lost's mafia builds
Do you maybe have an old version of slime.ash? It pre-dates moon sign/MCD changes so there is a change you have to make where it looks to see if it can set MCD to 11 or just 10. This happens at the same time as outfit switching.top1214 wrote:I don't know if it matters, but lost's build has a problem with the outfit switching of slime.ash.
/shot in the dark
- top1214
- Oh my! Guy with Pie!
- Posts: 1959
- Joined: Mon Mar 15, 2010 1:10 am
- Location: St Louis, MO, USA
Re: Lost's mafia builds
I d/l'ed the latest slime.ash and zlib. It worked fine in non-Lost mafia.
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
I can't see how any of the changes should cause a problem with that, so I'm going to need more details.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
- top1214
- Oh my! Guy with Pie!
- Posts: 1959
- Joined: Mon Mar 15, 2010 1:10 am
- Location: St Louis, MO, USA
Re: Lost's mafia builds
It was extraordinarily weird. It would switch to my high ML outfit if I was wearing the low one, but it would not switch to the low ML outfit. Actually, initially it wouldn't do either. I renamed the high ML one in the script and in my custom outfit and it would switch to it then.lostcalpolydude wrote:I can't see how any of the changes should cause a problem with that, so I'm going to need more details.
- transplanted_entwife
- Oh my! Guy with Pie!
- Posts: 1579
- Joined: Tue Jun 22, 2010 6:49 pm
- Location: Nebraska
Re: Lost's mafia builds
I'm wondering if perhaps the build names aren't being incremented at the moment? I've gone to download what is currently listed (11430) and I find that I have it already.
And, as always, please know that your work is immensely appreciated. I really would be lost KoL-wise without Lost. =)
And, as always, please know that your work is immensely appreciated. I really would be lost KoL-wise without Lost. =)
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
There were a bunch of recent changes that didn't merge well with any file that had changes of its own, so I'm not surprised.
I don't think I'm going to be maintaining this any more. The latest diff for a version that compiled is here if anyone wants to copy it and take over. Some of that stuff should make its way into the main branch (a functional version of auto-using the frobozz house at least). Other stuff can be done with an alias if needed (galaktik protection).
kolproxy integration won't be added to the main branch in the near future (at least not by me), so that seems like a reason someone else might want to host something. I don't know how much of that works besides logging in, or how many people were using it.
I don't think I'm going to be maintaining this any more. The latest diff for a version that compiled is here if anyone wants to copy it and take over. Some of that stuff should make its way into the main branch (a functional version of auto-using the frobozz house at least). Other stuff can be done with an alias if needed (galaktik protection).
kolproxy integration won't be added to the main branch in the near future (at least not by me), so that seems like a reason someone else might want to host something. I don't know how much of that works besides logging in, or how many people were using it.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)
Re: Lost's mafia builds
I've always (well, always for the last year anyway) wondered whylostcalpolydude wrote:There were a bunch of recent changes that didn't merge well with any file that had changes of its own, so I'm not surprised.
Code: Select all
~/kolmafia-b$ patch -p 0 <patchname.patch
Re: Lost's mafia builds
KoLmafia does have a history of integrating with other worthy third-party apps and extensions. At least, ones which interested the dev who added the support. For example, we connected to the old "Simulator of Loathing", One Ton Tomato's custom item database, and the koldb lucrecore system. I think those are all obsolete at this time and support has been withdrawn from the KoLmafia source.lostcalpolydude wrote:kolproxy integration won't be added to the main branch in the near future (at least not by me), so that seems like a reason someone else might want to host something. I don't know how much of that works besides logging in, or how many people were using it.
This seems like a reasonable thing to add to the main branch - assuming there is a KoLmafia dev who is willing to try it out and own it. Since I have retired from KoL, I am not that dev.
Perhaps start a Feature Request over at kolmafia.us and a patch with what you have. That will be a place to collect reports on what might not work, if anything.
Yes. That is exactly why I did it. People kept submitting patches and they never, ever went in successfully via "patch" for me.nworbetan wrote:I had never even thought about line breaks as a thing that would confuse patch, but apparently changing all of them to Unix line feeds in r11431 fixed things for me.
- lostcalpolydude
- Forum Maestro
- Posts: 2943
- Joined: Wed Apr 23, 2008 6:54 pm
Re: Lost's mafia builds
At least I found an add-on for NetBeans that will show me what type of line breaks are used in a file and makes it easy to change all of them (apparently it makes them all the same for a file, not sure what it does when a file is opened with multiple types to start).
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)
lostcalpolydude: Hardcore character (abandoned)