Actually Ed Request, method to stop auto-aborting?

This has been resolved in r15582: Track Ed defeats in _edDefeats, resets to 0 when fight is won or aborted. Add preference edDefeatAbort, defaulting to 2. When _edDefeats >= edDefeatAbort, abort at Like a Bat Into Hell for manual continuation. Remove Ka Coins if there is a cost to return to the fight.


Original Message below


So, I've been playing around with scripting Ed stuff and have encountered an issue with auto-aborting at 0 HP in order to utilize Ed's Undying powers. While it is possible to set the auto-recovery to not cause an abort, it doesn't seem possible to prevent the abort at HP == 0 that occurs specifically in src/net/sourceforge/kolmafia/moods/RecoveryManager.java::runBetweenBattleChecks lines 168-171

Code:
        if ( KoLmafia.permitsContinue() && KoLCharacter.getCurrentHP() == 0 ) 
        {
            KoLmafia.updateDisplay( MafiaState.ABORT, "Insufficient health to continue (auto-abort triggered)." );
        }

Can be replaced with:

Code:
        if ( KoLmafia.permitsContinue() && KoLCharacter.getCurrentHP() == 0 && !KoLCharacter.isEd()) 
        {
            KoLmafia.updateDisplay( MafiaState.ABORT, "Insufficient health to continue (auto-abort triggered)." );
        }
 
Last edited:
I'd second the request to exempt Ed from the 0-hp auto-abort. However, if that doesn't happen, for people (like me) who are not comfortable with compiling mafia from source code, one way to get around this error seems to be to buy the healing scarabs.
 

lostcalpolydude

Developer
Staff member
A better workaround is probably to add !KoLCharacter.isEd() to the check there, rather than removing the block completely. However, that means that mafia won't stop you from trying to adventure if you reach 0 HP out of combat as Ed.
 
It's surpringly easy (they did an awesome job with the build.xml layout) to compile the source.

So, I've got this working. I'm wondering though - is there a straightforward way to speed up the process? Right now I am following the Windows steps on the wiki - svn downloading the entire set of mafia directories, manually editing the pertinent line of code, compiling the code, and then copying the executable into my typical mafia folder. Should I be doing something differently?
 

fronobulax

Developer
Staff member
So, I've got this working. I'm wondering though - is there a straightforward way to speed up the process? Right now I am following the Windows steps on the wiki - svn downloading the entire set of mafia directories, manually editing the pertinent line of code, compiling the code, and then copying the executable into my typical mafia folder. Should I be doing something differently?

That's the process. It is what it is. After the initial checkout and getting things set up it takes me about 5 minutes to update mafia, compile and generate a new Jar. I have played file system link games so the jar file ends up where it needs to be to run with my scripts, settings and so on which means I don't have to do your last stem and it goes without saying that you should leave the mafia SVN files on your system to speed things up for your next build.
 
it goes without saying that you should leave the mafia SVN files on your system to speed things up for your next build.

I'm not exactly sure what this means, sorry. Are you saying I should leave the svn downloaded files intact? Will the svn checkout system just overwrite the files that have changed?
 

lostcalpolydude

Developer
Staff member
I'm not exactly sure what this means, sorry. Are you saying I should leave the svn downloaded files intact? Will the svn checkout system just overwrite the files that have changed?

That is correct. It actually merges changes rather than overwriting things, so you could make changes if you really wanted to, but then other changes to the same code tend to lead to conflicts.
 
After you've checked out the Mafia source code once, you may use the "svn update" procedure. This will:

- determine what has been changed in the Sourceforge repository by the Mafia devs
- apply those changes to your local copy of the source code
- inform you if those changes conflict with a change that you made

If there was no conflict, you can be reasonably sure that you may recompile the source code that you have now, and it will act as if you had freshly checked out the latest version and applied your changes again. Only that it's much faster and has to transfer much less data.

EDIT: Apparently I took quite some time to reply ...
 
Last edited:

fronobulax

Developer
Staff member
I'm not exactly sure what this means, sorry. Are you saying I should leave the svn downloaded files intact? Will the svn checkout system just overwrite the files that have changed?

Sorry. I meant that once you had set up local directories to hold the checked out source code you should leave them for future use. On a Windows machine, I once was dealing with someone who did not understand SVN and build systems and they would check things out into C:\KoLMafia, make their changes, build, save the jar file and then delete C:\KoLmafia.
 

Theraze

Active member
Yeah... I just change to my C:\kolmafia folder and run:
ant update & ant
That will update to the latest version of mafia source and compile in one easy run. On a fast day it'll finish everything in <30 seconds. On a slow day it may take 12 minutes. But the average is in the 1-2 minute range for updating and compiling.
 

Darzil

Developer
Some stuff to make this easier was just added.

Track Ed defeats in _edDefeats, resets to 0 when fight is won or aborted.
Add preference edDefeatAbort, defaulting to 2.
When _edDefeats >= edDefeatAbort, abort at Like a Bat Into Hell for manual continuation.
It also shouldn't abort on 0 Hp if Ed otherwise.
 
Top