Edscension - Your #1 Karma Farming Script

jeff

Member
Hi Chown,

First of all, thanks for continuing to maintain this script. Hopefully we'll see a new forum post with a fork from you where we can discuss it in depth without confusing it with Zen00's work. I've completed 3 ascensions with your script, at 5/1069, 4/944 and 4/889. I'm hoping to cut down to 3 days soon, having just purchased a Dinseyland charter for 2 Mr. A (45M)

Workaround for ML being too high - turn off the Blessing of Serqet spell
I spoke via PM to you in game about the issues with too-high ML wasting Ka coins, especially with an astral belt at the early levels. If anyone else is having issues with this, I worked around it by removing the casting of "Blessing of Serqet" from ed_preadventure.ash & ed_util.ash. I then restored these scripts to their original version after around level 10. Rename your original scripts into ed_util-orig.ash etc, add these to your scripts/Edscension folder and rename them to ed_util.ash etc in order to use them.

View attachment ed_preadventure-nobless.ash
View attachment ed_util-nobless.ash

--
Issues using script with Dinseyland

Anyway, I've started HCEd Ascension #4 today and I've run into a new issue.

Previous Ed Ascensions: 3 Hardcore, 0 Softcore
Valhalla: Astral Ring, Astral Hot Dogs, Wallaby
IoTMs: VIP Key, Dinseyland

The script will powerlevel me at the start, but it fails once it hits level 7 and starts trying to access the Island. (Turn 53 in my log.) Because the pirates at Dinseyland don't drop any meat, the script gets stuck in a loop trying to open the island, which I had to manually fix by completing the Spooky Forest Mosquito & Tavern quests myself. This let me buy the dinghy plans and planks.

From there on in the script seemed to just start grinding at the Hippy Camp, to the point where I was getting 50% less substat per adventure vs the pirates at Dinseyland. It's as if the script forgot that I had access to Dinseyland, as it just ignored it. It didn't seem like it was going for a specific quest requirement, as I had already gotten the hippy outfit in the first few turns. Once I manually powerlevelled at Dinseyland to level 9 this stopped it, but I am wary of the script returning me to the Hippies to powerlevel in the future once the current quests are done.

Is there any way to tell the script to never powerlevel at Hippies of Dinseyland/Conspiracy Island/etc is available? I'll attach a log of day 1 below.

View attachment 20150906 - ascension 4 day 1 only.txt

Summary
New Issue 1 - At level 7 - With Dinseyland, gets stuck in a loop trying to access Hippy Stand due to no meat to create dinghy dinghy
New Issue 2 - With Hippy Stand / Mysterious Island open, ignores Dinseyland for Ka & stat farming, takes 2x as long as hippies give 50% less exp
 
Last edited:

fronobulax

Developer
Staff member
I think I saw one test4 and a bunch of test5, It kept wanting to adventure in the outskirts of the Goblin Knob. I finally stopped it, manually got the Goblin King, restarted and it found something else to do. if it thought it was Ka farming there then shouldn't 350+ have been enough?
 

fronobulax

Developer
Staff member
The something else it decided to do was go help the friars. Alas the script neglected to talk to them first and so the items were (obviously) not dropping. Manually talking to them in the browser seems to have addressed the issue.
 

chown

Member
Yikes. 350 Ka is more than enough Ka. Excellent feedback, guys.

I'm actually glad that Dinseyland isn't hopelessly broken, since I have no way of testing it! It should be a fairly easy fix to get the script to powerlevel there. (It adventures there at the outset to gather Ka, but there is no logic at all to go there when grinding xp.) My guess is, add:

Code:
else if (elementalPlanes_access($element[stench])) L1_edDinsey();

...above the "else if(my_level() <= 10)" section in ed_LX_xp(). (although, that section should perhaps just have an "else"... but that's a different matter)

I'll look into pushing out some changes that should work better with the astral belt. Although, I won't be able to test those for a little while, because I want to do some Community Service with chown, and my other accounts haven't unlocked the belt. Sorry.

fronobulax, if I understand correctly, the script repeatedly went to the Outskirts of the Knob, when it already had the encryption key. I took a quick look at the code, and can't fathom how it could do that, unless Mafia wasn't detecting the key on a "refresh inventory" command. Strange. The failure to talk to the friars leads me to think that maybe some of the "ed_*" settings that track quest statuses were messed up. Even that wouldn't explain the Knob thing, though. Would you care to share a log? (or a relevant snippet?) I should note that the script does go to the outskirts of the knob during the first semi-rare window, but in any case it only goes there when it does not have the encryption key. How did you wind up with 350 Ka? Was that from the actions of the script, or manual adventuring?
 
Last edited:

fronobulax

Developer
Staff member
fronobulax, if I understand correctly, the script repeatedly went to the Outskirts of the Knob, when it already had the encryption key. I took a quick look at the code, and can't fathom how it could do that, unless Mafia wasn't detecting the key on a "refresh inventory" command. Strange. The failure to talk to the friars leads me to think that maybe some of the "ed_*" settings that track quest statuses were messed up. Even that wouldn't explain the Knob thing, though. Would you care to share a log? (or a relevant snippet?) I should note that the script does go to the outskirts of the knob during the first semi-rare window, but in any case it only goes there when it does not have the encryption key. How did you wind up with 350 Ka? Was that from the actions of the script, or manual adventuring?

I started the script and got concerned after tens of adventures in the outskirts. I confirmed via the relay browser that it was actually open and it was. I had a Bale's counter script enabled an some point. counterScript=CounterChecker.ash is in the preferences now so perhaps there was interference. But when I manually defeated the king it decided to go elsewhere which suggests there was more than the semi-rare. I am trying to do this run via the script so the excess Ka is almost certainly from the script.

Today's session log is attached. If I didn't want to do that I hope someone will delete it and tell me why.
 

Attachments

  • cafebabe_20150906.txt
    723.5 KB · Views: 26

chown

Member
By the way, my intended behavior for the script, is for it to automatically disable any counterChecker setting, since it is likely to interfere. If the script runs to completion, (i.e., "bedtime", or recovering the MacGuffin) I believe it sets it back to whatever you had it set to. I can probably even put that in a "finally" block, to set it back even if we abort....

Oh, and duh. The encryption key goes away when you use it. You swallow it, or whatever. I understand now. Thanks!
 
Last edited:

fronobulax

Developer
Staff member
By the way, my intended behavior for the script, is for it to automatically disable any counterChecker setting, since it is likely to interfere. If the script runs to completion, (i.e., "bedtime", or recovering the MacGuffin) I believe it sets it back to whatever you had it set to. I can probably even put that in a "finally" block, to set it back even if we abort....

Oh, and duh. The encryption key goes away when you use it. You swallow it, or whatever. I understand now. Thanks!

First sounds like a feature that i confirmed is working as expected. Second sounds like a bug that has been squashed. Thanks. Off to burn today's turns...
 

fronobulax

Developer
Staff member
Saw test3 and test5 in red today.

Took over a wall clock hour to burn the turns which is at least 5x longer than expected in this environment. Just watching things I think some of that is outfit building and swapping and some of that is probably optimization for something other than execution time. I watched the adventure counter remain unchanged for at least five minutes. I think what was happening was that the script was extending/repeating combats in the Bowling Alley (which it needed to do) because there was an opportunity to flyer.

Zerg rush knocked me to 0 hp and the script aborted. I healed and restarted and it when fine but I can imagine a future when the script could have figured out that itself :)

Thank you.
 

chown

Member
Yeah, the script currently does do a bunch of unnecessary maximize commands. It may be a little while before I can address that properly. On the other hand, I have some easy fixes to macro-ify combat in some simple cases. So you won't have to wait for 30 network trips each time Ed wants to visit the underworld. You can instead wait for your CPU to figure out that you're already wearing all of the +exp equipment you can. :/ Anyway, coming soon.

edit: oh, also, I don't really care about the "test4" stuff. I'm more interested in messages like "Hi, I'd like to use a Talisman of Renenutet in this combat, but I can't get one in edgewise! Should I really be adventuring here right now?" I added stuff like that to help draw my attention to places where I may want to make some changes to make the runs more efficient, but since there's nothing that's likely to prevent the script from successfully completing the run, I don't want it to abort or anything like that.
 
Last edited:

fronobulax

Developer
Staff member
Didn't see any red prints but wasn't watching that closely. Was a little confused because it stopped because it could not find the jerk adventurer because I wasn't at level 13. The message made me think it was my job to power level (rather than my option) but I restarted and found out otherwise. When I went into aftercore I forgot to reset my CCS and my HP and MP recovery settings which discovered when burning turns failed. No big deal but the script is very good about restoring non-Ed values so these are a couple it might have missed. Pretty smooth. About to start another run and maybe I'll get the astral item and sign better aligned to the script :)
 

fronobulax

Developer
Staff member
First adventure did not "work". +30ML was too much and Bat Into Hell had to be done manually. I am thinking that Blessing of Serqet just should not be cast at lower levels.

Edit: Red message "You're a little short on time or cash to do this, come back once you've fixed this?

It is trying to adventure at the Hippy Camp but has not opened the island. I suspect the two are related but it might be worth aborting rather than infinite looping when the camp is unavailable :)
 
Last edited:

chown

Member
Hey, sorry I haven't had any time to look into those last couple of issues. And, I probably won't for the next couple of days. Although, quick question: did the script actually go into an infinite loop? I thought I had eliminated that in most cases. As in, the top level loop never runs more than 20 (iirc) times without detecting a change in # of adventures. Or, do you mean that it hit that limit, and would clearly have kept going were it not for that check? There could be some other loop, somewhere, too.
 

jeff

Member
The latest revision won't handle more than 1 UNDYING for me. Had about 30 interrupts on day 1 already.


[175] Hippy Camp
Encounter: dirty hippy jewelry maker
Strategy: C:\Users\X\Documents\kolmafia\player2\ccs\null.ccs [default]
Round 0: player2 wins initiative!
Round 1: You lose 1 hit point
ed_combatHandler: 0
ed_edCombatCount => 148
ed_edStatus => dying
test4
combat stage 0, round 0: 1 more 'til underworld, 1 more 'til we need to spend Ka.
opponent has about 60 HP. Ed has 31. Fist does 98, Storm does (?) 446, opponent does 49.0
ed_edStatus => UNDYING!
test5
Round 1: player2 casts MILD CURSE!
Round 2: dirty hippy jewelry maker takes 2 damage.
Round 2: You lose 40 hit points

Encounter: Like a Bat Into Hell
You gain 33 hit points
Ed has UNDYING once!
Encounter: dirty hippy jewelry maker
Round 0: player2 loses initiative!
Round 1: You lose 1 hit point
Round 1: You lose 41 hit points
ed_edCombatStage => 1
Ed returning to battle Stage 1

[175] Hippy Camp
Encounter: Like a Bat Into Hell
You gain 33 hit points
Manual control requested for choice #1023
choice 1: Enter Underworld
choice 2: Go right back to the fight!
Click here to continue in the relay browser.

Also found that sometimes the script will choose to use MILD CURSE on round 1 of combat in order to heal, but then fails to win initiative in subsequent combats and then ends up using Ka. Should we prioritise not wasting Ka at earlier stages when we don't have such a large reserve rather than healing?
 

chown

Member
The latest revision won't handle more than 1 UNDYING for me. Had about 30 interrupts on day 1 already.




Also found that sometimes the script will choose to use MILD CURSE on round 1 of combat in order to heal, but then fails to win initiative in subsequent combats and then ends up using Ka. Should we prioritise not wasting Ka at earlier stages when we don't have such a large reserve rather than healing?

Yeah, definitely! The log snippet you posted appears to be an excellent example of that. You might be able to delete the whole "test5" if block around line 540 in ed_combat.ash. I wrote separate logic for visiting the underworld that ought to be less susceptible to that.

Regarding the 'Manual control requested' thing, I'd be curious to know if doing a 'set choiceAdventure1023 = 2' has any effect. Oh, and before you do that, what is it set to now?
 

jeff

Member
Yeah, definitely! The log snippet you posted appears to be an excellent example of that. You might be able to delete the whole "test5" if block around line 540 in ed_combat.ash. I wrote separate logic for visiting the underworld that ought to be less susceptible to that.

Regarding the 'Manual control requested' thing, I'd be curious to know if doing a 'set choiceAdventure1023 = 2' has any effect. Oh, and before you do that, what is it set to now?

I'm not too familiar with scripting for kolmafia. Where would I go about checking? Going to run again with it set to 2 now.
 

fronobulax

Developer
Staff member
I probably could not have distinguished between a true infinite loop and something that ran longer than it should have but less than 20. I'll be patient but might I suggest that whatever you are trapping on that 10 or even 5 might be a better choice?

I had several unexpected choice aborts for Undying. Session snippet for one below. The consistent thing seems to be that I die, return and lose again immediately.

Encounter: Like a Bat Into Hell
You gain 33 hit points
Ed has UNDYING once!
Encounter: P imp
Round 0: cafebabe loses initiative!
Round 1: You lose 1 hit point
Round 1: You lose 37 hit points
ed_edCombatStage => 1
Ed returning to battle Stage 1

[157] The Dark Heart of the Woods
Encounter: Like a Bat Into Hell
You gain 33 hit points
Manual control requested for choice #1023
choice 1: Enter Underworld
choice 2: Go right back to the fight!
Click here to continue in the relay browser.

I understand you won't get to everything immediately. I'm just reporting for when you do.

The only thing that bothered me so much that I fixed it locally was I do not maintain Blessing of Serqet in my copy.
 

fronobulax

Developer
Staff member
I am seeing
Invalid setting 5 for choiceAdventure670
repeated in the command window. I expect it is KoLmafia itself generating the message (and it may be going to STDERR) but Edscension is in control so I presume the core issue is that EdA is setting something wrong or newLife did and it a while for the setting to be needed. or maybe it is a hangover from something else entirely and I should actually look at 670 before speculating.

Several issues where it stops with 0 HP. I think the combat ends successfully, but leves Ed with 0 HP and the script does not detect that and try and use a restore.

It seems to be trying to adventure in the Castle (Ground) when something (mafia?) thinks that area is not available. I'll dig some.
 

jeff

Member
Optimisation issue
* Serpentine shield and snake sword (+20ML together only if both are equipped) not equipped as script favours hot plate or spiked femur as weapons/off-hand. Also not re-equpped after clearing dense lianas with machete.

Some IoTMS can help a lot, which could be nice if included into the script.
* Dinseyland powerlevelling 2x exp vs hippies level 1-10
* VIP lounge access should give a DRINK me, which gives +40% meat for 30 adventures per day with filthy knitted dread sack > good for Nun's quest.
* VIP fax machine > can yellow ray mountain man
* Deck of every card > +500 myst substat daily, +1 of each ore daily, + 10k daily (level 1-5 with 0 turns from 500 substat)
* Can get a +20ML buff day 1 (60 turns) by doing Dinseyland quest, which will be helpful for day 1 turn 1 powerlevelling anyway.
 
Last edited:

pasta angel

New member
so does this script work fully autonomously? I used to love my Ed runs but just don't have the time any more so automating the process would really really help :)

I only have Deck and Chateau ITOMS
 
Top