Scripting the birth of a new life.

Bale

Minion
[size=+1]newLife 1.14.4[/size]

I began work on this script largely in response to a bug report concerning choice adventures at the Barrr granting different results according to character class. Since then it has grown more useful. It is a fact that many choice adventures have different optimal decisions based on your current class. It is tedious to manually change all those settings every time you ascend, so I used to ignore them until I was the appropriate level. Then I'd hope not to forget about them or miss one.

Wouldn't it be nice if all your ascension relevant choice adventures were automatically set every time you ascended?

Fortunately mafia has the ability to automatically run a script after ascending. I made use of that ability to write a script that will take care of all the little things I want to do whenever I ascend. It will set those niggling choice adventures at the Barrr to keep you from getting drunk. It will ensure the castle wheel is turned in the direction of your mainstat if you're moxie or mysticality. It even ensures you get your mainstat at Whitey's Grove from the one choice adventure that helps your mainstat while the others give an item. There are many more such choice adventures and I think I found them all.

This script will also reset a few other choice adventures that might get changed in aftercore and are important to ascension like your song choice in the ballroom. It will set automatic recovery to a level appropriate for level 1. It will get the free hat for your Bugged Baby Bugbear from the Arena and it even gets your cowboy boots to save you the trouble. (It's a free pull!) Finally it visits the Toot Oriole, since that is just annoying to click through.

You can use the script manually or set it to activate automatically every time you ascend. No muss, no fuss. Here's how to do that:
  1. The script is installed through and updated by SVN. Please copy/paste the following line into KoLmafia's CLI and press enter:
    svn checkout https://svn.code.sf.net/p/bale/new-life/code/
  2. To make mafia automatically run it upon ascension, in the CLI type:
    set postAscensionScript = newLife.ash

Note that there are a few user configurable options in the script to suit your play style. These can be changed for specific characters from the CLI command line. Each character will need to change their preferences separately so you can have character specific behaviors. :)

  • Normally, this script will not call for the Guy Made of Bees in the Haunted Bathroom. If you like to set up the guy made of bees use the CLI command (capitalization counts, so use copy/paste):
    zlib newLife_SetupGuyMadeOfBees = true
  • If you want the script to smash your hippy stone (it is best to break it before your first rollover) use the CLI command (use copy/paste):
    zlib newLife_SmashHippyStone = true
  • There is an option to have the script sell off pork gets to ensure you acquire a detuned radio, seal tooth and stolen accordion. If you do want this, then use the CLI command (use copy/paste):
    zlib newLife_SellPorkForStuff = true


Enjoy the script.
 
Last edited:

Bale

Minion
Here's a sample output from my recent ascension as a Disco Bandit, to show you some of what it does:

Code:
Pulling items from storage...
You acquire an item: Clan VIP Lounge key
[COLOR="Olive"]Resetting HP/MP restoration settings to minimal[/COLOR]
hpAutoRecovery => 0.1
mpAutoRecovery => -0.05
mpAutoRecoveryTarget => 0.2
manaBurningThreshold => -0.05
[COLOR="#808000"]Library's Rise of the House of Spookyraven: Unlock stairs[/COLOR]
choiceAdventure80 => 99
Setting choice adventures for Moxie class.
[COLOR="#808000"]Whitey's Grove: Get wedding cake and rice[/COLOR]
choiceAdventure73 => 3
[COLOR="#808000"]Whitey's Grove: Get Moxie stats[/COLOR]
choiceAdventure74 => 1
[COLOR="#808000"]Ballroom Curtains: get moxie[/COLOR]
choiceAdventure90 => 2
[COLOR="#808000"]Defiled Alcove: skip adventure[/COLOR]
choiceAdventure153 => 4
[COLOR="#808000"]Defiled Niche: get Moxie stats[/COLOR]
choiceAdventure155 => 1
[COLOR="#808000"]A Test of Testarrrsterone in Barrrney's Barrr: get lots of Moxie[/COLOR]
choiceAdventure186 => 3
[COLOR="#808000"]Chatterboxing in F'c'le: get Moxie stats[/COLOR]
choiceAdventure191 => 1
[COLOR="#808000"]Bathroom, Don't Hold a Grudge: Get Moxie stats[/COLOR]
choiceAdventure402 => 3
[COLOR="#808000"]Hippies on the Verge of War, Bait and Switch: Fight a cadet[/COLOR]
choiceAdventure139 => 3
[COLOR="#808000"]Hippies on the Verge of War, Thin Tie-Dyed Line: Get Moxie stats[/COLOR]
choiceAdventure140 => 2
[COLOR="#808000"]Frats on the Verge of War, Catching Some Zetas: Fight a pledge[/COLOR]
choiceAdventure143 => 3
[COLOR="#808000"]Frats on the Verge of War, One Less Room Than In That Movie: Get moxie stats[/COLOR]
choiceAdventure144 => 1
[COLOR="#808000"]Frats on the Verge of War, Fratacombs: Get food[/COLOR]
choiceAdventure145 => 2
[COLOR="#808000"]At the Poop Deck, take the Wheel and Sail to Moxie stats[/COLOR]
oceanDestination => moxie
[COLOR="Blue"]Optimal ascension choices set.[/COLOR]
[COLOR="#808000"]Getting your baby buggy bugbear balaclavaed.[/COLOR]
Putting Lllama the Llama Lama back into terrarium...
Taking spartacus! the Baby Bugged Bugbear out of terrarium...
You acquire an item: bugged beanie
You acquire an item: lead necklace
You acquire an item: lead necklace
You acquire an item: lead necklace
Autoselling items to NPCs...
Items sold.
Using 1 bugged beanie...
You acquire an item: bugged balaclava
Finished using 1 bugged beanie.
Putting on bugged balaclava...
Equipment changed.
Putting spartacus! the Baby Bugged Bugbear back into terrarium...
Taking Lllama the Llama Lama out of terrarium...
[COLOR="olive"]The Oriole welcomes you back at Mt. Noob.[/COLOR]
You acquire an item: letter from King Ralph XI
Opening letter from King Ralph XI.
Using 1 letter from King Ralph XI...
You acquire an item: stainless steel shillelagh
You acquire an item: pork elf goodies sack
You acquire an item: disassembled clover
Finished using 1 letter from King Ralph XI.
[COLOR="Blue"]You are free to autosell pork elf stones now, if you wish.
[COLOR="Green"]Welcome to your new life as a Disco Bandit![/COLOR][/COLOR]
 
Last edited:

Bale

Minion
I haven't actually used ascend.ash, but I cannot imagine how they might conflict since they don't interact at all. When you ascend this will set your choice adventures, pull VIP Key and so forth. Then you would call ascend.ash so that it can do its thing.

Naturally I would like dj_d to correct me if I'm somehow mistaken, but I doubt it.
 

lostcalpolydude

Developer
Nice script. The commands to equip starting gear will be wasted server hits in softcore since most people will pull something better.
 

codster62

New member
Well, I am not dj_d, but I guess since I use the script I can chime in. You're right bale, since the two scripts don't interact, there is not much harm that can be done. The only forseeable problem I can find is just from pullcrap.ash, which is called by ascend.ash. Because your script pulls the key if available, this may interfere with somebody's customizable pull list that ascend.ash uses, but if somebody pays attention and knows this script pulls the key, it will not be a problem. Otherwise, only 1 pull wasted. Other then that, like I said, no conflict should occur. Hope that helps. :)


Cody/CoolBufferBot(In-game)
 

lostcalpolydude

Developer
VIP key is a free pull, and no one should have two of them anyway (DC collection maybe, but then it isn't in hagnk's to pull). There's nothing wrong with two scripts trying to pull it, especially since pullcrap.ash should be able to handle the case where someone doesn't have the key at all to pull it.
 

Bale

Minion
VIP Key does not cost a pull so there's never a reason not to pull it.

Nice script. The commands to equip starting gear will be wasted server hits in softcore since most people will pull something better.
Good point. Fixed that. Now it only does that if you're in hardcore. New version can be downloaded from the first post.
 
Last edited:

halfvoid

New member
i just wasn't sure if ascend.ash set choice adventures on its own. i know a couple other scripts change them. which would counteract the hard work of your script as soon as one of the others ran.
 

Bale

Minion
I hope that ascend.ash sets choice adventures or else it won't work very well. I'd suspect it would change the same ones in which case there'd be a bit of redundancy, but that's not really a problem.
 

dj_d

New member
This looks super cool! Ascend.ash does set some choiceadvs. I just checked and it's nothing that would conflict with this (although a few might be redundant).

There is one big problem though: Pullcrap auto-registers itself as your preascension script, which will break this. I suggest including and running this script from pullcrap, which should solve the problem.
 

Bale

Minion
If you'd like, you could add this to ascend.zip and include newLife in pullcrap. If you like this script, then I think that would be a perfect solution for anyone who uses ascend. It would also allow you to remove any redundancies.
 

dj_d

New member
I'll definitely do that when I get back to ascending- but that's a ways away. I need to get a hamster first. :)
 

Bale

Minion
Found a bug. I was selecting the wrong choice for mysticality classes if you encountered "Don't Hold a Grudge".

Uploaded new version.
 

illarion

New member
Love the idea. Typically, I'd just started writing my own version of this the other day, and now I stumble across your (rather more complete/comprehensive) version :)

Couple of questions/opinions though:
1 - It looks like you're choosing to gain food from Fratacombs and Blockin' Out the Scenery, rather than starting the war? I can't see that ever being the desired choice.

2 - (HC perspective) I would never want hp/mp autorecovery set at the start of a run, personally. Granted, you only set hp recovery, but every resource is so precious early on that I think manual control is essential. Obviously I can turn it off myself - I'm just surprised this is the default.

Otherwise, nice job! Certainly saved me some time :)
 
Top