Lost's mafia builds

For stuff related to KoLmafia, KoLproxy, Ascension Log Visualizer, and greasemonkey scripts. Maybe other stuff too.
Post Reply
User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Lost's mafia builds

Post by lostcalpolydude » Fri Feb 10, 2012 9:40 pm

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.

Code: Select all

Index: src/net/sourceforge/kolmafia/session/LeafletManager.java
===================================================================
--- src/net/sourceforge/kolmafia/session/LeafletManager.java	(revision 10937)
+++ src/net/sourceforge/kolmafia/session/LeafletManager.java	(working copy)
@@ -35,6 +35,7 @@
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import net.sourceforge.kolmafia.AdventureResult;
 
 import net.sourceforge.kolmafia.KoLCharacter;
 import net.sourceforge.kolmafia.KoLConstants;
@@ -43,10 +44,14 @@
 
 import net.sourceforge.kolmafia.objectpool.ItemPool;
 
+import net.sourceforge.kolmafia.request.CampgroundRequest;
 import net.sourceforge.kolmafia.request.LeafletRequest;
+import net.sourceforge.kolmafia.request.UseItemRequest;
 
 import net.sourceforge.kolmafia.swingui.CouncilFrame;
 
+import net.sourceforge.kolmafia.utilities.InputFieldUtilities;
+
 public abstract class LeafletManager
 {
 	private static final LeafletRequest LEAFLET_REQUEST = new LeafletRequest();
@@ -501,6 +506,20 @@
 		if ( !LeafletManager.chest )
 		{
 			LeafletManager.executeCommand( "open chest" );
+			AdventureResult BLACK_BLUE_LIGHT = ItemPool.get( ItemPool.BLACK_BLUE_LIGHT, 1 );
+			AdventureResult PLASMA_BALL = ItemPool.get( ItemPool.PLASMA_BALL, 1 );
+			AdventureResult LOUDMOUTH_LARRY = ItemPool.get( ItemPool.LOUDMOUTH_LARRY, 1 );
+			if ( 
+				( CampgroundRequest.getCurrentDwellingLevel() < 4 && 
+				KoLConstants.campground.indexOf( BLACK_BLUE_LIGHT ) == -1 &&
+				KoLConstants.campground.indexOf( PLASMA_BALL ) == -1 &&
+				KoLConstants.campground.indexOf( LOUDMOUTH_LARRY) == -1 
+				) ||
+				InputFieldUtilities.confirm( "Using a Frobozz House will destroy a better dwelling or furnishings inside your dwelling.  Do you want to use it anyway?" ) 
+			   )
+			{
+				UseItemRequest.getInstance( ItemPool.get( ItemPool.HOUSE, 1 ) );
+			}
 		}
 	}
The leaflet solver will automatically use the house if you don't have a superior dwelling or Tasteful Items inside your dwelling.

Code: Select all

Index: src/net/sourceforge/kolmafia/swingui/MaximizerFrame.java
===================================================================
--- src/net/sourceforge/kolmafia/swingui/MaximizerFrame.java	(revision 10454)
+++ src/net/sourceforge/kolmafia/swingui/MaximizerFrame.java	(working copy)
@@ -1166,7 +1166,7 @@
 		int hands = 0;
 		int melee = 0;
 		boolean requireShield = false;
-		boolean noTiebreaker = false;
+		boolean noTiebreaker = true;
 		HashSet posOutfits, negOutfits;
 		TreeSet posEquip, negEquip;
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.

Code: Select all

Index: src/net/sourceforge/kolmafia/webui/ValhallaDecorator.java
===================================================================
--- src/net/sourceforge/kolmafia/webui/ValhallaDecorator.java	(revision 10454)
+++ src/net/sourceforge/kolmafia/webui/ValhallaDecorator.java	(working copy)
@@ -413,17 +413,21 @@
 		int count = InventoryManager.getCount( ItemPool.INSTANT_KARMA );
 		if ( count > 0 )
 		{
-			int banked = Preferences.getInteger( "bankedKarma" );
+			
 			buffer.append( "<nobr><a href=\"javascript:if(confirm('Are you sure you want to discard your Instant Karma?')) singleUse('inventory.php?which=1&action=discard&pwd=" );
 			buffer.append( GenericRequest.passwordHash );
 			buffer.append( "&whichitem=");
 			buffer.append( ItemPool.INSTANT_KARMA );
 			buffer.append( "&ajax=1');void(0);\">discard karma</a> (have " );
 			buffer.append( count );
-			buffer.append( ", banked " );
-			buffer.append( banked );
 			buffer.append( ")</nobr><br>" );
 		}
+		
+		int banked = Preferences.getInteger( "bankedKarma" );
+		buffer.append( "<nobr>" );
+		buffer.append( banked );
+		buffer.append( " banked karma" );
+		buffer.append( "</nobr><br>" );
 
 		if ( KoLCharacter.hasChef() )
 		{
The first part of this change makes discardable karma and banked karma separate entries (on the screen before you ascend).

Code: Select all

Index: src/net/sourceforge/kolmafia/RequestEditorKit.java
===================================================================
--- src/net/sourceforge/kolmafia/RequestEditorKit.java	(revision 10454)
+++ src/net/sourceforge/kolmafia/RequestEditorKit.java	(working copy)
@@ -749,6 +749,11 @@
 
 		String link = " <font size=1>[<a href=\"council.php\">council</a>]</font>";
 		buffer.insert( index + test.length(), link );
+		
+		if ( FightRequest.getCurrentRound() == 0 && Preferences.getBoolean( "autoVisitCouncil") )
+		{
+			RequestThread.postRequest( new GenericRequest( "council.php" ) );
+		}
 	}
	 	private static final void addTransponderLink( final StringBuffer buffer )
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.

Code: Select all

Index: src/net/sourceforge/kolmafia/request/UseItemRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/UseItemRequest.java	(revision 10454)
+++ src/net/sourceforge/kolmafia/request/UseItemRequest.java	(working copy)
@@ -1869,7 +1869,7 @@
 
 			if ( responseText.indexOf( "middle of a journey of reincarnation" ) != -1 )
 			{
-				if ( UseItemRequest.retrying ||
+				if ( //UseItemRequest.retrying ||
 					KoLConstants.activeEffects.contains(
 						EffectPool.get( EffectPool.FORM_OF_BIRD ) ) ||
 					KoLConstants.activeEffects.contains(
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.

Code: Select all

Index: src/data/defaults.txt
===================================================================
--- src/data/defaults.txt	(revision 10744)
+++ src/data/defaults.txt	(working copy)
@@ -17,6 +17,7 @@
 global	autoSatisfyWithNPCs	false
 global	autoSatisfyWithStash	false
 global	autoSatisfyWithStorage	true
+global	autoVisitCouncil	false
 global	breakfastHardcore	Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting
 global	breakfastSoftcore	Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting
 global	browserBookmarks
@@ -109,7 +110,7 @@
 global	logReverseOrder	false
 global	logStatGains	true
 global	logStatusEffects	true
-global	logStatusOnLogin	false
+global	logStatusOnLogin	true
 global	macroDebug	false
 global	macroLens	false
 global	mementoListActive	false
@@ -142,7 +143,6 @@
 global	relayMaintainsHealth	false
 global	relayMaintainsMana	false
 global	relayOverridesImages	false
-global	relayRunsAfterAdventureScript	false
 global	relayRunsBeforeBattleScript	false
 global	relaySkillButtonCount	5
 global	relayTextualizesEffects	false
@@ -191,7 +191,7 @@
 
 user	addingScrolls	-1
 user	afterAdventureScript
-user	arcadeGameHints	false
+user	arcadeGameHints	true
 user	autoAbortThreshold	-0.05
 user	autoAntidote	0
 user	autoBuyPriceLimit	20000
@@ -630,7 +630,7 @@
 user	recentLocations	5
 user	recoveryScript
 user	relayCounters
-user	relayShowSpoilers	false
+user	relayShowSpoilers	true
 user	rememberDesktopSize	false
 user	requireBoxServants	false
 user	requireSewerTestItems	false
@@ -776,7 +776,6 @@
 user	_interviewIsabella	false
 user	_interviewMasquerade	false
 user	_ironicMoustache	false
-user	_jukebox	false
 user	_kloopDrops	0
 user	_jackassPlumberGame	false
 user	_klawSummons	0
@@ -1145,8 +1144,6 @@
 user	choiceAdventure532	0
 user	choiceAdventure533	0
 user	choiceAdventure534	0
-user	choiceAdventure535	0
-user	choiceAdventure536	0
 user	choiceAdventure538	1
 user	choiceAdventure539	1
 user	choiceAdventure542	1
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.
Index: src/net/sourceforge/kolmafia/request/GalaktikRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/GalaktikRequest.java (revision 10874)
+++ src/net/sourceforge/kolmafia/request/GalaktikRequest.java (working copy)
@@ -86,7 +86,7 @@
{
this.restoreAmount = restoreAmount;
}
- else if ( type.equals( GalaktikRequest.HP ) )
+ /*else if ( type.equals( GalaktikRequest.HP ) )
{
this.restoreAmount =
Math.max( KoLCharacter.getMaximumHP() - KoLCharacter.getCurrentHP() + restoreAmount, 0 );
@@ -95,7 +95,7 @@
{
this.restoreAmount =
Math.max( KoLCharacter.getMaximumMP() - KoLCharacter.getCurrentMP() + restoreAmount, 0 );
- }
+ }*/
else
{
this.restoreAmount = 0;
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...
Index: src/net/sourceforge/kolmafia/request/RelayRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/RelayRequest.java (revision 11342)
+++ src/net/sourceforge/kolmafia/request/RelayRequest.java (working copy)
@@ -216,6 +216,11 @@
{
this.contentType = "text/html";
}
+ else if ( Preferences.getBoolean( "connectThroughKolproxy" ) )
+ {
+ // Should really not add any content-type here
+ this.contentType = "text/html";
+ }
else
{
this.contentType = "text/plain";
@@ -264,6 +269,10 @@
@Override
public void formatResponse()
{
+ if ( Preferences.getBoolean( "connectThroughKolproxy" ) )
+ {
+ return;
+ }
this.statusLine = "HTTP/1.1 200 OK";
String path = this.getBasePath();
StringBuffer responseBuffer = new StringBuffer( this.responseText );
@@ -1744,7 +1753,20 @@

return;
}
+
+ // If we're connected through kolproxy, pass the file
+ // through normally. However, there are some special local
+ // KoLmafia files that should be sent directly.

+ // Currently detecting that by checking whether there's a
+ // file extension.
+
+ if ( Preferences.getBoolean( "connectThroughKolproxy" ) && !path.contains( "." ) )
+ {
+ super.run();
+ return;
+ }
+


Index: src/net/sourceforge/kolmafia/request/GenericRequest.java
===================================================================
--- src/net/sourceforge/kolmafia/request/GenericRequest.java (revision 11342)
+++ src/net/sourceforge/kolmafia/request/GenericRequest.java (working copy)
@@ -345,8 +345,12 @@

try
{
- if ( Preferences.getBoolean( "connectViaAddress" ) )
+ if ( Preferences.getBoolean( "connectThroughKolproxy" ) )
{
+ GenericRequest.KOL_ROOT = new URL( "http", "localhost", 18481, "/" );
+ }
+ else if ( Preferences.getBoolean( "connectViaAddress" ) )
+ {
GenericRequest.KOL_ROOT = new URL( "http", GenericRequest.KOL_IP, 80, "/" );
}
else
@@ -1510,6 +1514,18 @@

this.formConnection.setRequestProperty( "User-Agent", GenericRequest.userAgent );
this.formConnection.setRequestProperty( "Connection", "close" );
+
+ if ( Preferences.getBoolean( "connectThroughKolproxy" ) )
+ {
+ if ( this instanceof RelayRequest )
+ {
+ this.formConnection.setRequestProperty( "X-Kolproxy-Target", "KoLmafia relay" );
+ }
+ else
+ {
+ this.formConnection.setRequestProperty( "X-Kolproxy-Target", "KoLmafia" );
+ }
+ }

if ( !this.data.isEmpty() )
{
@@ -2060,7 +2076,7 @@
long responseTimestamp =
this.formConnection.getHeaderFieldDate( "Date", System.currentTimeMillis() );

- if ( !CharPaneRequest.processResults( responseTimestamp, this.responseText ) )
+ if ( !CharPaneRequest.processResults( responseTimestamp, this.responseText ) && !Preferences.getBoolean( "connectThroughKolproxy" ) )
{
this.responseCode = 304;
}

Index: src/net/sourceforge/kolmafia/swingui/LoginFrame.java
===================================================================
--- src/net/sourceforge/kolmafia/swingui/LoginFrame.java (revision 11342)
+++ src/net/sourceforge/kolmafia/swingui/LoginFrame.java (working copy)
@@ -487,6 +487,7 @@
private final String[][] options =
{
{ "useDevProxyServer", "Use devproxy.kingdomofloathing.com to login" },
+ { "connectThroughKolproxy", "Connect through kolproxy" },
{ "useSecureLogin", "Switch to HTTPS for login (development in progress)" },
{ "connectViaAddress", "Use IP address to connect instead of host name" },
{ "useNaiveSecureLogin", "Do not have Java try to validate SSL certificates" },

Index: src/data/defaults.txt
===================================================================
--- src/data/defaults.txt (revision 11342)
+++ src/data/defaults.txt (working copy)
@@ -40,6 +41,7 @@
global combatHotkey9
global commandLineNamespace
global compactChessboard false
+global connectThroughKolproxy false
global connectViaAddress false
global cookies.inventory
global copyAsHTML false
This stuff allows you to have KoLmafia log in through kolproxy using a checkbox on the Connections tab.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

User avatar
NardoLoopa
Market Manipulator
Posts: 1201
Joined: Tue Jun 19, 2007 10:37 pm

Re: Lost's mafia builds

Post by NardoLoopa » Sat Feb 11, 2012 8:50 am

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!
Image

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Sat Feb 11, 2012 9:20 am

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.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

User avatar
thacon
Fiendishly At Large
Posts: 1553
Joined: Wed Dec 02, 2009 1:13 pm
Location: New York

Re: Lost's mafia builds

Post by thacon » Sat Feb 11, 2012 1:34 pm

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. :)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Sat Feb 11, 2012 1:37 pm

I was thinking about doing this anyway, but that post gave me motivation to actually do it.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

Veracity
Just Plain Old Pie
Posts: 7
Joined: Mon Nov 23, 2009 6:30 pm

Re: Lost's mafia builds

Post by Veracity » Sun Feb 12, 2012 11:06 pm

NardoLoopa wrote:Too bad the Mafia devs aren't interested in including the patches into the trunk.
Are you sure they're not interested? How, pray tell, do you know? Have you asked them?

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.

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Mon Feb 13, 2012 4:34 am

Veracity wrote:- telescope command. I suppose. This could easily be a script - which is a good reason to not build it in.
I don't really know why I went with java instead of ash for that.
- "stocking script". Why not just use the existing "preAscensionScript" hook?
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.
- Auto-visit council on level gain. I guess. I just click on the "visit council" link in the relay browser, as needed.
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.

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.
I expect these will migrate into the mainline, by and by. Perhaps with modifications. ;)
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.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

Veracity
Just Plain Old Pie
Posts: 7
Joined: Mon Nov 23, 2009 6:30 pm

Re: Lost's mafia builds

Post by Veracity » Mon Feb 13, 2012 9:57 pm

lostcalpolydude wrote:
Veracity wrote:- "stocking script". Why not just use the existing "preAscensionScript" hook?
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.
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.
- Auto-visit council on level gain. I guess. I just click on the "visit council" link in the relay browser, as needed.
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.
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.

Mr Purple
Pie of the Sky
Posts: 35
Joined: Wed Apr 14, 2010 3:54 am

Re: Lost's mafia builds

Post by Mr Purple » Tue Feb 14, 2012 4:51 am

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.
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.

The other changes look pretty neat :)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Wed Feb 15, 2012 9:02 am

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)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Fri Feb 24, 2012 11:08 am

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)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Fri Mar 23, 2012 9:26 pm

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)

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Mon Apr 02, 2012 9:29 am

"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)

User avatar
Verdigris97
Colonel Contest
Posts: 739
Joined: Thu Jan 21, 2010 6:14 pm
Location: Northern CA

Re: Lost's mafia builds

Post by Verdigris97 » Mon Apr 02, 2012 11:08 am

These are nice changes, lost. Thanks!

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Thu Apr 26, 2012 8:40 am

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)

User avatar
infern0
Pie in the Sky
Posts: 197
Joined: Thu Oct 22, 2009 8:42 am

Re: Lost's mafia builds

Post by infern0 » Tue Jul 10, 2012 9:59 am

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?

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Wed Jul 11, 2012 8:27 am

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?
Fixed now.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

User avatar
Sleeping Beast
Inscrutable Pi
Posts: 225
Joined: Mon Nov 07, 2011 3:05 pm
Location: Buenos Aires, Argentina
Contact:

Re: Lost's mafia builds

Post by Sleeping Beast » Thu Jul 19, 2012 11:54 pm

Hey lost
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
Yields

Code: Select all

Unable to invoke -DuseCWDasROOT=true
Am I doing something wrong?
Why so serious? A smile tastes better! =^..^= d:
Image

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Fri Jul 20, 2012 4:20 am

I have no idea what the issue is with that.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

User avatar
NardoLoopa
Market Manipulator
Posts: 1201
Joined: Tue Jun 19, 2007 10:37 pm

Re: Lost's mafia builds

Post by NardoLoopa » Fri Jul 20, 2012 7:05 am

switch the order. -D comes before -jar
Image

User avatar
Sleeping Beast
Inscrutable Pi
Posts: 225
Joined: Mon Nov 07, 2011 3:05 pm
Location: Buenos Aires, Argentina
Contact:

Re: Lost's mafia builds

Post by Sleeping Beast » Mon Jul 23, 2012 10:14 am

NardoLoopa wrote:switch the order. -D comes before -jar
Thanks, Nardo!

I believe I should be removing "java developer" from my resume. Damn you, Eclipse!
Why so serious? A smile tastes better! =^..^= d:
Image

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Wed Aug 01, 2012 7:17 am

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)

User avatar
Suendenbock
My Pie Blown Sky High
Posts: 565
Joined: Wed Jun 27, 2007 5:51 pm
Location: Indiana
Contact:

Re: Lost's mafia builds

Post by Suendenbock » Wed Aug 01, 2012 3:20 pm

How do I make that work? I mean Mafia logging in through Kolproxy?

User avatar
Eleron
Has a thing!
Posts: 870
Joined: Tue Jun 03, 2008 1:52 pm

Re: Lost's mafia builds

Post by Eleron » Thu Aug 02, 2012 6:01 am

Suendenbock wrote:How do I make that work? I mean Mafia logging in through Kolproxy?
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.

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.)

User avatar
Suendenbock
My Pie Blown Sky High
Posts: 565
Joined: Wed Jun 27, 2007 5:51 pm
Location: Indiana
Contact:

Re: Lost's mafia builds

Post by Suendenbock » Thu Aug 02, 2012 5:09 pm

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. =)

User avatar
nworbetan
AFH
Posts: 80
Joined: Tue Nov 15, 2011 6:01 pm

Re: Lost's mafia builds

Post by nworbetan » Sat Aug 11, 2012 11:02 pm

Eleron wrote:I'm patching issues as I find/hear about them, so let me know if something goes wrong.
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?

User avatar
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

Post by top1214 » Tue Aug 14, 2012 3:01 pm

I don't know if it matters, but lost's build has a problem with the outfit switching of slime.ash.

User avatar
lotsofphil
Leader of rum ham
Posts: 4075
Joined: Mon Mar 01, 2010 3:56 pm

Re: Lost's mafia builds

Post by lotsofphil » Tue Aug 14, 2012 6:00 pm

top1214 wrote:I don't know if it matters, but lost's build has a problem with the outfit switching of slime.ash.
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.

/shot in the dark

User avatar
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

Post by top1214 » Tue Aug 14, 2012 6:01 pm

I d/l'ed the latest slime.ash and zlib. It worked fine in non-Lost mafia.

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Wed Aug 15, 2012 4:57 am

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)

User avatar
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

Post by top1214 » Wed Aug 15, 2012 10:39 am

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.
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.

User avatar
transplanted_entwife
Oh my! Guy with Pie!
Posts: 1577
Joined: Tue Jun 22, 2010 6:49 pm
Location: Nebraska

Re: Lost's mafia builds

Post by transplanted_entwife » Fri Aug 31, 2012 6:28 pm

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. =)
Image

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Sun Sep 02, 2012 1:17 am

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.
bmaher: Softcore character
lostcalpolydude: Hardcore character (abandoned)

User avatar
nworbetan
AFH
Posts: 80
Joined: Tue Nov 15, 2011 6:01 pm

Re: Lost's mafia builds

Post by nworbetan » Sun Sep 02, 2012 11:54 pm

lostcalpolydude 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.
I've always (well, always for the last year anyway) wondered why

Code: Select all

~/kolmafia-b$ patch -p 0 <patchname.patch
would never work unless it was a patch that I had made myself. I just for the first time was able to apply your patch without having to copy/paste the changes into the source files. 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.

Veracity
Just Plain Old Pie
Posts: 7
Joined: Mon Nov 23, 2009 6:30 pm

Re: Lost's mafia builds

Post by Veracity » Sun Sep 09, 2012 11:17 am

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.
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.

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.
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.
Yes. That is exactly why I did it. People kept submitting patches and they never, ever went in successfully via "patch" for me.

User avatar
lostcalpolydude
Forum Maestro
Posts: 2940
Joined: Wed Apr 23, 2008 6:54 pm

Re: Lost's mafia builds

Post by lostcalpolydude » Sun Sep 09, 2012 12:00 pm

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)

Post Reply