View Full Version : stannius' semi-automatic spaaace script
stannius
06-13-2011, 10:07 PM
stannius_spaaace 1.1
stannius' semi-automatic spaaace script 1.1
A script to complete the "Repair_the_Elves'_Shield_Generator" quest for "Slyz's KoLMafia Scripting contest".
Prerequisite: zlib (http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library).
Please report bugs here so I can fix them, thus making the world a better place. CLI output would be helpful. I am also open to feedback.
What it Does:
* Completes the Repair the Elves' Shield Generator Quest
* Burns adventures.
* Changes your equiment and effects.
* Uses items (see SETTINGS). Buys transponders (if needed, and mall is accessible and allowed by mafia settings) and cheap wind-up clocks.
* Changes familiars (unless the zlib var is_100_run is set)
What it Does Not/What you Should Do:
* See USER SETTINGS below
* It is up to you to create a custom combat script that will handle scaling monsters, preferably without taking damage. Might I suggest entangling noodles + an auto-hit skill (spell, shieldbutt, etc). Also, olfact "survivor" if you have olfaction.
* Leave an AT song slot free. (And keep in mind that the script changes equipment, so don't count on having four songs)
* Have in inventory: transponders, deodorant/pine needles, yellow candy hearts, and cheap wind-up clocks.
USER SETTINGS
spaaace_useitems (defaults to true) Use some items giving helpful effects (see "Have in inventory:" above).
spaaace_escortmanually (defaults to false) Set to true if you want to handle the "Escort Axel Otto around the moons" part of the quest yourself. It is the trickiest part.
Changelog (more detail given in individual version++ posts)
0.1 Initial version
0.2 Fix problems with the hamburglaris/porko code (I didn't get to test it the first time through.)
0.3 Fix off-by one error in Porko playing code. Add automatic version checking.
0.4 Fix abort when escorting Axel Otto. Attempt to deliberately shrug the buffs cast by the script (so as to not randomly shrug user's buffs.)
0.5 Allow restart after loss of spooky little girl. Abort Porko if the probability isn't 1.0, just in case.
0.6 Get the right porko probs by hitting choice.php an extra time. Keep track of Axel's courage level and warn user if it goes down too fast.
0.7 Add familiar switching. Add user preferences. Abort if Beaten Up.
0.8 Transpondentify when using maps from inventory.
1.0 Rename script to "spaaace.ash". Remove On the Trail when switching zones. Support farming of distention/dog hair pills.
1.1 Incorporate some code from slyz to make shieldbutt-substitution method more robust.
Theraze
06-13-2011, 10:33 PM
Two suggestions. One, don't put attachments inline, it makes it harder to evaluate, especially if you keep different versions. Second, once there's a new version, changelogs are awesome. :)
stannius
06-13-2011, 10:37 PM
Two suggestions. One, don't put attachments inline, it makes it harder to evaluate, especially if you keep different versions. Second, once there's a new version, changelogs are awesome. :)
My existing version is obviously perfect and shall never change. However, on the off chance that it does, I have changed the attachment method, and I will be sure to include a changelog for 0.2 :)
Theraze
06-13-2011, 11:23 PM
Standard note regarding Spooky Little Girl and 2 handed weapons... To be more specific, if your best weapon for "DA, DR, -moxie, +equip spooky little girl" involves 2 hands, your maximize/equip will fail, and the rest of the script will fail to continue running properly...
Your script will keep trying to run forever if you run out of adventures on certain steps, since your main loop is just while (true) and not all adventure/visit_urls involve another check to validate you have enough/any adventures. It's possible that the abort at the end of the PerformStep will avoid this though.
stannius
06-13-2011, 11:31 PM
Standard note regarding Spooky Little Girl and 2 handed weapons... To be more specific, if your best weapon for "DA, DR, -moxie, +equip spooky little girl" involves 2 hands, your maximize/equip will fail, and the rest of the script will fail to continue running properly...
Is there a way to force 1-handed weapons? This seems arguably a mafia bug... I remember a discussion about it somewhere, but I looked in the "Bug Reports" forum and didn't see anything...
I have ascended so I can't re-test too thoroughly, but
maximize +shield -melee
seems to work without error.
I'll add a "1 hand, " in there. Also I noticed that muscle classes will try to equip a shield in the same equipment slot, which probably won't work too well.
Is there a way to force 1-handed weapons?
There is, if you check the Maximizer's help button.
Theraze
06-14-2011, 12:06 AM
Yes... I'd have pointed out the specifics, but that's part of the fun of doing it yourself. :D Seems you did find it though, so that should help avoid problems. And yes, maybe avoid trying to set both a shield and offhand. That should help decrease frustration.
Specifically, the "1 hand" means only 1 handed weapons... you can force it to moxie weapons instead if you prefer, but what exactly it equips depends completely on what equipment is available to you and what you've prioritized and requested. If you don't have handed-ness explicitly stated, that's your fault, not mafia's. :)
Veracity
06-14-2011, 01:30 AM
This seems arguably a mafia bug.
I love it when people say that, since, when you look at the particular "bug" closely, it is almost always a user misunderstanding, not a "mafia bug". Not always, certainly, but way more often than not.
stannius
06-14-2011, 05:18 AM
I love it when people say that, since, when you look at the particular "bug" closely, it is almost always a user misunderstanding, not a "mafia bug". Not always, certainly, but way more often than not.
Well, I did say "arguably." Though I'm not interested in being on the opposite side of an argument from you. :)
I would edit the word "bug" out of my post, if it weren't for the fact that doing so would make it look like you quoted something I didn't say...
stannius
06-20-2011, 08:19 PM
I have uploaded version 0.2. This version is more likely to work correctly. Especially given that v0.1 has a 100% chance of not working correctly - it had an infinite loop in it, in a part of the script I wasn't able to test the first time through. (once-an-ascension scripts can be a little tricky...)
The new version includes the no-shield-collision and 1-hand equipment maximization as discussed above.
stannius
06-22-2011, 09:37 PM
Someone ran my script! Awesome!
(Unfortunately they ran v0.1, which doesn't work... how do I add automatic version checking?)
Weatherboy
06-23-2011, 05:18 AM
So, I knew that the version checking stuff was part of zlib, and I knew that Bale's newLife.ash script used it. So I copied the line from Bale's script...
check_version("newLife", "Bale_newLife", "1.72", 2769);
Ok, four parameters... so in zlib i found the check_version() function and see
string check_version(string soft, string prop, string thisver, int thread)
Now I know what those parameters are. btw, your thread number for this thread is 6969.
Now, I'm not sure what the difference between soft and prop are. Looking more into the zlib function, it looks like the current version is saved in a property named "_version_"+prop.
Also, I know it's scraping something from the forum thread's main post.. so I found the matcher
matcher find_ver = create_matcher("<b>"+soft+" (.+?)</b>",page);
And snap, that's what it's looking for in the forums... so I pop over to the newLife thread and I see right at the top newLife 1.73 (which means mine need updating ;) ) So that's where you update the version in the first post every time you post a revision.
So, in your first post add a line
spaaace 0.2. Then in your script, after importing zlib, add
check_version("spaaace","spaaace","0.2",6969);
Should work!
I presumptuously edited Weatherboy's post to remove a rather subtle error. In case anyone had already read that post, you'll see that now he suggests that the first post should contain spaaace 0.2.
Weatherboy was almost right, but confused about the difference between bbcode and html. Since html does not work in a forum post, using it will not produce the result he expected.
Weatherboy
06-23-2011, 05:43 AM
Ahhhhhh. You are right, I did not think about that.
I actually just expected him to use the cool little B button. :p
stannius
06-23-2011, 04:30 PM
Thanks guys!
The good news is, while adding this to my script, I noticed this
script "stannius_spaaace_0.1.ash";
... so it seems that my (now 2!) customers were probably running the latest version after all.
My ultimate goal is to be the go-to spaaace script. How long do I have to wait before I incorporate the good ideas from others' scripts?
Winterbay
06-23-2011, 04:32 PM
In this case you should probably wait to post a version incorporating work from others until after the competition has been settled...
stannius
06-23-2011, 05:27 PM
Version 0.3 uploaded.
Winterbay
06-27-2011, 11:07 AM
Ran v0.2 (started just before you uploaded version 0.3) and it went fine and it said it was finding the generator to activate it with the EMU unit when I had to go on vacation for a few days so had to abort. When I got back the quest log said that I needed to find the generator and fix it while my inventory only had two parts of the EMU unit and no unit. This understandably made the script confused and it aborted.
Having done the parts to get the last two parts, the spooky girl and the escort mission manually the script finished off just fine.
No idea what happened to let the quest log move forward faster than the quest though...
stannius
06-27-2011, 02:31 PM
Ran v0.2 (started just before you uploaded version 0.3) and it went fine and it said it was finding the generator to activate it with the EMU unit when I had to go on vacation for a few days so had to abort. When I got back the quest log said that I needed to find the generator and fix it while my inventory only had two parts of the EMU unit and no unit. This understandably made the script confused and it aborted.
Having done the parts to get the last two parts, the spooky girl and the escort mission manually the script finished off just fine.
No idea what happened to let the quest log move forward faster than the quest though...
Hmm, interesting. When I finish my current run I'll remove the loop and check the quest log between each step. Thanks for the feedback!
Winterbay
06-28-2011, 08:09 AM
Apparently when you lose the game of Porko to activate the shield you lose yoru Unit and regain two of its parts. I'm going to guess that this was what happened. A a recent bug report states that if you do this mafia doesn't recognise that you lost it and the scritp will thus keep on running with no possibility of redemption, checking the quest log in this case will be moot since that will be on the latest stage due to you having reached that point at least once.
It might thus be a better idea to check for the parts of the unit (and the unit) rather than relying on the quest log.
Ferdawoon
06-28-2011, 02:30 PM
When going for the Unit, the script only ran with 1 adv. Restarting the script it also ran with just 1 adv. I ended up manually doing the adv until I got the Porko-minigame.
stannius
06-28-2011, 04:27 PM
It might thus be a better idea to check for the parts of the unit (and the unit) rather than relying on the quest log.
I already have code to do that (sort of)
if (contains_text(questLogPage1,"Find and repair the shield generator on Hamburglaris."))
{
AssertHasItem($item[E.M.U. Unit]);
AssertHasItem aborts if the item is missing. Not graceful but it shouldn't burn all your adventures.
The problem, as per the bug report, is that mafia's internal state thinks you have the Unit, so this check will pass. I'll see if I can check for lack of the constituent items. (Assuming mafia detects the gain thereof.)
When going for the Unit, the script only ran with 1 adv. Restarting the script it also ran with just 1 adv. I ended up manually doing the adv until I got the Porko-minigame.
Odd... I'll check it out when the kingdom comes back up...
Winterbay
06-28-2011, 05:33 PM
Yeah, and now it should detect the loss again so that code should work. The problem is if the script somehow manages to lose three times in the porko game the quest log will still show that you have gotten that far and if you don't have the unit the script will then exit rather than try again.
Also: I think a better solution might be to make sure it doesn't lose three times :)
stannius
06-28-2011, 05:35 PM
Yeah, and now it should detect the loss again so that code should work. The problem is if the script somehow manages to lose three times in the porko game the quest log will still show that you have gotten that far and if you don't have the unit the script will then exit rather than try again.
Also: I think a better solution might be to make sure it doesn't lose three times :)
Version 0.2 had an off-by-one error in the porko code, but that was hopefully fixed in 0.3.
I will manually lose Porko and try to make my script recover.
I will manually lose Porko and try to make my script recover.
Try to catch the game text you get the first two times you loose.
stannius
06-28-2011, 05:54 PM
Try to catch the game text you get the first two times you loose.
Will do!
stannius
06-28-2011, 09:17 PM
Sadly, I was unable to lose at Porko. If I understand correctly, there was a 6% chance of success, and I hit it :(
I will have to create a mutli to try this further. In the meantime, I have uploaded v0.4, which at a minimum fixes the bug Ferdawoon found.
Winterbay
07-06-2011, 11:50 AM
Not sure if this is a Scritp bug or a Mafia bug but here we go:
[1441] Hamburglaris Shield Generator
Encounter: Big-Time Generator
Encounter: Big-Time Generator
Probablities: 1.00:1.00:1.00:1.38:1.38:0.83:0.09:0.09:0.09
best choice is 4 at 1.38 ev.
Encounter: Big-Time Generator
Encounter: Big-Time Generator
Programmer error: Lost Porko. This should not happen and probably indicates a bug.
> prefref porko
lastPorkoBoard (user, now '2222331313311211323213211323112333331133133112211 11111212221212121221313123133322333233132111321233 2113123331221221333212332212333212222', default )
lastPorkoExpected (user, now '1.00:1.00:1.00:1.38:1.38:0.83:0.09:0.09:0.09', default )
lastPorkoPayouts (user, now '022120013', default )
I have no idea how the 1.38's showed up there. They shouldn't (max chance should be 1). I would suggest putting in a sanity-check to make sure the choosen value isn't >1 and if it is abort and let the user poke at it.
I loaded it up in the relay browser and now the preferences say:
lastPorkoBoard (user, now '1213323322223111211122233113111233213131232312321 31111332211111312111331112113332323312212233123121 2112311311133321211121122122211111113', default )
lastPorkoExpected (user, now '1.00:1.00:0.62:0.59:0.28:0.00:0.00:0.00:0.00', default )
lastPorkoPayouts (user, now '000010000', default )
So it appears that the preferencce wasn't updated from the last time I played Porko last ascencion?
I have no idea how the 1.38's showed up there.
"ev" is expected value (in this case, it should be sum of probability(ends in slot i)*payout(slot i) over all bottom slots). This can be as high as 3 (100% probability of getting 3 isotopes) and is important - 50% of getting 3 is way better than 51% of getting 1.
Veracity
07-06-2011, 04:56 PM
Except this is the Big-Time Generator - the thing you slide down in your EMU Unit. The expected values should be between 0 and 1.
stannius
07-11-2011, 08:49 PM
Weird. I was unable to test the porko code this run because I hit a 6% chance to succeed. In fact, given that every porko game is probabilistic, it's hard to tell if the script chose the right choice or if it just got lucky. Anyways I am spinning up a test multi and will try to fix this asap.
stannius
07-12-2011, 01:39 AM
I ran with a multi and found (and fixed) a couple problems.
1) Even as a pastamancer (yay noodlecannon) I can lose the SLG if I lose init. Not sure what a low-skilled player can do about that, but I can recommend boosting init at least. At least I was able to find a bug in the code "what happens if you lose the SLG" - it won't run again because the quest log still says "Escort Axel Otto" even though you don't have her. Fixed in 0.5.
2) If a user has arcadeGameHints=false then lastPorkoExpected is an empty string. Added a check for that case and abort. Also, I added a CYA check that if the best porko prob is anything other than 1.0, abort.
V 0.5 uploaded with the changes. The porko code still isn't as tested as I would like. I am trying to ascend my testing multi for another run at it.
Veracity
07-12-2011, 03:57 AM
2) If a user has arcadeGameHints=false then lastPorkoExpected is an empty string. Added a check for that case and abort. Also, I added a CYA check that if the best porko prob is anything other than 1.0, abort.
How strange. KoLmafia only looks at the property to decide if it should decorate the Porko game in the relay browser; the actual solving has already happened when you visited the board - regardless of that property.
stannius
07-12-2011, 04:40 AM
How strange. KoLmafia only looks at the property to decide if it should decorate the Porko game in the relay browser; the actual solving has already happened when you visited the board - regardless of that property.
Hmm, that is strange. I could definitely be wrong about why lastPorkoExpected was an empty string. That's why I defensively added a check for the max prob == 1.0. It's just so hard to test this with only one try per ascension...
Winterbay
07-12-2011, 12:46 PM
What is the rationale behind using "-moxie" in this maximizer call?
outfit = "DA, DR, -moxie, 1 hand, +equip spooky little girl";
That makes it so that, at least during my myst runs, I end up wearing the Furry outfit with its wonderful effect on my moxie (last run I was down at 10 I think, this town it was "only" 39). Removing that keyword works excellent for mystclasses (well at least mine).
stannius
07-12-2011, 12:48 PM
What is the rationale behind using "-moxie" in this maximizer call?
outfit = "DA, DR, -moxie, 1 hand, +equip spooky little girl";
That makes it so that, at least during my myst runs, I end up wearing the Furry outfit with its wonderful effect on my moxie (last run I was down at 10 I think, this town it was "only" 39). Removing that keyword works excellent for mystclasses (well at least mine).
The goal is to lower the the attack stat of the scaling monsters in the area, hypothetically minimizing damage taken.
Theraze
07-12-2011, 01:30 PM
But since it lowers your moxie (and resistance to damage) as well, won't that only help players that currently have, and are using by virtue of muscle and shield combination, Hero of the Half Shell?
stannius
07-12-2011, 01:38 PM
But since it lowers your moxie (and resistance to damage) as well, won't that only help players that currently have, and are using by virtue of muscle and shield combination, Hero of the Half Shell?
My hypothesis was that lowering moxie would lower the amount of absolute damage taken, which is my guess at what counts for that part of the quest.
Winterbay
07-12-2011, 01:55 PM
With a maximization without that (which lead to me getting lots of more spelldamage for whatever reason) I didn't get hit at all, with the -moxie thing I got hit all the time. After 4 adventures she was down to 35 from 50.
stannius
07-12-2011, 02:01 PM
With a maximization without that (which lead to me getting lots of more spelldamage for whatever reason) I didn't get hit at all, with the -moxie thing I got hit all the time. After 4 adventures she was down to 35 from 50.
At the very least I need to weight it way lower than the other keywords. I'll put that into the next version.
Theraze
07-12-2011, 06:10 PM
If you want a significantly better maximization, I'd reduce muscle instead of moxie. And only if your stats are below the cap, since if you're above the cap, you'll take less damage and do more by keeping your stats high.
But anyways, reducing muscle also reduces the monsters' hp, making them easier to kill with guaranteed damage skills and spells... Reducing moxie just drops the monster attack by the same amount it drops your ability to resist it.
lostcalpolydude
07-13-2011, 08:26 AM
Part of the damage formula is 10-20% of the monster's attack (affected by DA), which is separate from the part that depends on the difference between their attack and your moxie (or muscle with hero). This portion is lowered even if your moxie decreases along with their attack.
Weatherboy
07-13-2011, 03:43 PM
I've been using the same maximizer call (mine does have +initiative as well though) for that section and was wondering about its effect on other people. It works fine for my myst runs, I think because, I always get initiative, cast noodles, then spam stuffed or storm.
The maximizer is yet another area I'm sadly deficient in. So is the suggestion to replace -moxie with -muscle or to add -muscle to the mix?
Fortunately (?), the script I've been working on strongly suggests the user have some kind of combat spell and noodles permed, cuz that makes the whole thing quite trivial immediately post-prism. It also lends itself readily to the "-moxie -muscle" I suppose. My normal character is breaking prism later this afternoon. I'll play around with maximizer more myself then.
Editorializing for a moment... now that I've got the freakin' porko working, I've gone back to how I'm implementing combat. As I mentioned, I'm actually setting battleAction = <a spell the player has chosen from a shortlist of spells> and setting autoEntangle = true. While I have absolutely no problem personally with writing an aftercore script that infers the player has at least some kind of spell permed, I would like, for the sake of the contest, to implement something more... robust. Unfortunately, short of importing freakin' BatBrain (which is entirely beyond my abilities I think), I'm not sure I can come up with something universal. I mean, I haven't even figured out how a muscle class even gets thru the escort mission without noodles. :)
Theraze
07-13-2011, 05:23 PM
Well, -muscle means that the scaling monster will have less health and defence, so that helps for spells, moxious maneuver, and other such skills...
DanceCommander6
07-14-2011, 06:03 PM
Since this is where the discussion is - any idea when alielf and stuff formulas will be implemented?
stannius
07-14-2011, 06:19 PM
Editorializing for a moment... now that I've got the freakin' porko working, I've gone back to how I'm implementing combat. As I mentioned, I'm actually setting battleAction = <a spell the player has chosen from a shortlist of spells> and setting autoEntangle = true. While I have absolutely no problem personally with writing an aftercore script that infers the player has at least some kind of spell permed, I would like, for the sake of the contest, to implement something more... robust.
Dealing with scaling combats is hard enough. And then on top of that there's a limit to how much damage you can take.
OTOH, noodles seems to be a mostly sufficient solution to the problem. I ran the script on stanniusTestingMulti and while I did lose the SLG on the first attempt, I succeeded on the second. In between I used some yellow hearts from the mall and bought entangling noodles. I added "+initiative" to the SLG maximization after that, and even a check specifically for yellow hearts.
Unfortunately, short of importing freakin' BatBrain (which is entirely beyond my abilities I think), I'm not sure I can come up with something universal. I mean, I haven't even figured out how a muscle class even gets thru the escort mission without noodles. :)
Don't sell yourself short...
Server-friendly consult scripts with capabilities far exceeding both a normal CCS and a BALLS macro are now within even a mediocre ASH scripter's grasp.
I might actually give it a try for my next version.
any idea when alielf and stuff formulas will be implemented?
As soon as someone gives us the alielf and stuff formulas.
stannius
07-14-2011, 06:34 PM
What is the "best practice" for naming and versioning scripts? Right now as you can see from post #1 I have separate files for each version. At the top of my script I also have
// note to self: make sure to update the version number in all relevant places
script "stannius_spaaace_0.6.ash";
notify stannius;
import "zlib.ash";
check_version("stannius_spaaace", "stannius_spaaace", "0.6", 6969);
Of course, that means that different versions are in some ways different scripts. I am thinking about starting to use Registry.ash (http://kolmafia.us/showthread.php?1178-Script-Registry-for-script-authors-track-your-script-usage) but that would work best with a single filename. (Though I don't know if it requires an actual filename - e.g. zlib's check_version accepts any string for the "file" argument as far as I can tell)
Your check_version() will work (as soon as you change the first post to reflect that you are now on version 0.6).
If you want to make older versions available in the first post, I don't think it's a problem either, unless the forum starts having disk space issues.
EDIT: I see now what you mean about naming conventions. You should probably change
script "stannius_spaaace_0.6.ash";
to
script "stannius_spaaace.ash";
stannius
07-14-2011, 06:46 PM
Your check_version() will work (as soon as you change the first post to reflect that you are now on version 0.6).
That was from my v.Next file. notify and check_version() seems to be working ok. I guess my question was more about Registry.ash. So I cross-posted the question in the thread for that script.
I mean, I haven't even figured out how a muscle class even gets thru the escort mission without noodles. :)
I had to do that recently with a brand new character. Turns out that it is possible once you purchase lunging thrust-smack and boost initiative with cheap wind-up clocks. That killed them quickly enough that I didn't come close to losing the escort.
Weatherboy
07-15-2011, 12:25 AM
I had to do that recently with a brand new character. Turns out that it is possible once you purchase lunging thrust-smack and boost initiative with cheap wind-up clocks. That killed them quickly enough that I didn't come close to losing the escort.
Yeah, I had the same experience as a TT and found that head + knee combo works sufficiently well to be supported. I was gonna try Thrust Smack as a Seal and see how that worked. BTW, is there a quick and dirty way to buy a skill from the Trainer? He should be a Coinmaster! ;)
Theraze
07-15-2011, 12:31 AM
I personally use the get_skill script (http://kolmafia.us/showthread.php?4302-Get_skill.ash-CLI-accessible-skill-acquisition&p=42136&viewfull=1#post42136), but it (or mafia) does have a bug... when you purchase skills using it, it double-decrements your money visibly, until the next charpane update. Basically, I don't see any reason why its visit_url should make mafia think that it's being hit twice, but apparently it does... can fix it by forcing a refresh char after you run the skill purchase though. Until I actually know why it's doing it though, it doesn't seem right to write up a mafia bug report. Suppose I could do that if anyone else actually started to use it though. Heh. I've updated it some as well since then, so if people want an update, I'll post one. With 3 total downloads though, doesn't really seem like much interest in CLI access to skill purchasing. :)
stannius
07-15-2011, 12:34 AM
Yeah, I had the same experience as a TT and found that head + knee combo works sufficiently well to be supported. I was gonna try Thrust Smack as a Seal and see how that worked. BTW, is there a quick and dirty way to buy a skill from the Trainer? He should be a Coinmaster! ;)
I assume there is some visit_url() call you can make. One of the other contestant's scripts does it. It seems like an odd choice to me, but I have enough skills such that buying a skill in-run is the exception rather than the rule.
DanceCommander6
07-15-2011, 04:32 PM
Yeah, I do that. It's optional, though... perhaps Mr. Joe Noobcakepants will like the fact that there's a premanufactured combat strategy waiting for him if he needs it.
Damn the guild change, I'm not sure if I didn't screw something up morphing my code to work with it.
stannius
07-18-2011, 12:31 AM
I am working on 0.6. The script plays porko, except with one problem - it uses whatever probability matrix is leftover from previous encounters. That is, somehow in the ways I do everything, lastPorkoExpected doesn't get set. I didn't notice for so long because Porko is so easy - as far as I've seen, a random choice has better than even odds of success. In fact, losing on purpose can be difficult (The lowest probability on my most recent attempt was 44% (chance of passing at least one trial = 83%). Which is making diagnosing this problem a challenge.
EDIT:
I looked at bumpork and saw
visit_url("choice.php");
I added that to my script (along with setting lastPorkoExpected = "") and it seems to work now.
stannius
07-18-2011, 04:56 AM
Version 0.6 Changelog
Porko finally works fully.
Parse axel courage counter.
Change internal script name (for notify) to simply spaace.ash.
stannius
07-21-2011, 05:38 PM
Version 0.7 released. Changes:
Abort if beaten up
Change familiars (using zlib's best_fam. honors is_100_run)
Save some user settings at start of execution. Restore them when complete.
Add user preferences for: item use; abort when it's time for escort mission;
Use cheap wind-up clocks, if available (buys them if muscle class)
Expand message upon losing SLG
stannius
07-27-2011, 09:12 PM
I found one small bug: using a map from inventory (e.g. there from previous runs, or run out of Transpondent just as you get a map) fails. I added a check for transpondency and (if item use is enabled) re-transpondency as necessary.
stannius
08-17-2011, 05:55 PM
I'm going to remove the much debated ", -0.001 moxie, -0.001 muscle" from maximization during the escort part. After adding courage counter parsing, I'm still not sure what the Axel Courage formula is, but it's definitely not "1 hp lost = 1 courage lost". so the minimization probably doesn't do anything useful.
stannius
11-08-2011, 07:49 PM
Version 1.0 Changes:
Removed ", -0.001 moxie, -0.001 muscle" from SLG maximization; not sure what the Axel Courage formula is but it's definitely not "1 hp lost = 1 courage lost" so the -etc probably doesn't do anything useful.
Renamed file to a simple "spaaace.ash" now that the contest is over
De-olfact when switching zones. (Olfaction is still left as an exercise for the user)
Minimize switching of zones.
Add code for farming distention pills or dog hair pills. Use the spaaace_othergoal setting. Supported are distention pill, synthetic dog hair pill, map to safety shelter ronald prime, map to safety shelter grimace prime.
stannius
11-14-2011, 04:43 PM
Version 1.1 Changes:
Incorporated code from slyz to make SubstituteOutShieldbutt method more robust. The code also works towards eventually handling combat within the script.
CRennings
02-13-2012, 08:53 AM
I'm not sure if you have any intention of releasing a 0.3, but if so, would it be possible to have the script consider the best familiar for the situation. In my case, I've noticed that the script takes my baby gravy fairy for items, and my potato for, well, being a spud, when most of the time, for my purposes, my scarecrow could more effectively work both roles. If you've no intention of modifying it, no problem, I'll probably sift through it at some point when I'm less busy and edit out the familiar swapping lines. Finally, thanks a lot for a very nice script, I have gotten to the point where finishing the shield quest manually every aftercore is tedious, so this was much appreciated, and I have otherwise seen no flaws with it.
roippi
02-13-2012, 09:23 AM
That is a function of zlib's best_fam() function. Zarqon has said that he doesn't really plan on adding hatrack/scarecrow support to it.
Stannius could add special handing that would check those, of course, but that's up to him. I don't think it would cut more than a single turn out of a given run, so it hardly seems worth the effort.
stannius
02-13-2012, 04:11 PM
What roippi said. In general, figuring out "what is the best familiar for <x>" is actually pretty difficult.
I could also experiment with the "switch <familiar>" setting of mafia's modifier maximizer; but I've never used it before, so i don't know how (or how well) it works.
You could always use the 100% run zlib variable (preference):
zlib is_100_run = Scarecrow
Though, that's shared with other scripts, which you might run, so you might want to set it back afterwards.
Powered by vBulletin® Version 4.2.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.