PDA

View Full Version : The Unofficial Ascend.ash support thread.



Pages : [1] 2

fronobulax
05-18-2010, 02:53 PM
I'm starting a separate thread so it is clearer who is doing what. dj_d knows I am doing this and expects to incorporate any changes I make into the official version. I'm doing this for my own amusement. I am not receiving nor expecting any kind of compensation. I am going to try and limit my changes to things that are broken or just plain don't work. There are numerous tweaks that could be made to make Ascend more optimal in some fashion but I am unlikely to contribute much in that area. My intention is to post changes in zip files that are password protected with the same password as the original download.

I will try and keep this page up to date with the latest package that I have prepared and with pointers to updates of other scripts that have changed since the package was built.

2010_08_24.zip is (hopefully) a complete package with the latest versions of all needed files, even those that are maintained by others and have their own thread.

Compared to the "official" Ascend, 2010_08_04

Works with the latest zLib, macguffin and wossname
Fixes some infinite loops in EatDrink
Imposes a daily budget on EatDrink by closeting and uncloseting meat
A few other things that I have forgotten but are probably mentioned in the thread


For reference I have included the latest versions of several dj_d scripts that are used by Ascend but have their own threads. I am annoyed by the duplication but I am more annoyed by the hassle associated with telling people where the latest version is. Hopefully doing so will address the latter as I get over the former ;-) (I have run into some kind of attachment limit so ver.ash, used by *Crap.ash is not included. Should probably make it go away anyway since zLib now handles versions).

Jan. 20, 2011 - EatDrink updated to include Theraze's improved handling for milk and a wrapper to test zLib variables without creating them if they don't exist.

10 MAR 2011 - I have moved EatDrink and associated support back to the official thread here (http://kolmafia.us/showthread.php?1519-EatDrink.ash-Optimize-your-daily-diet-%28and-see-how-your-old-diet-stacks-up%29.&p=8740#post8740).

19 MAR 2011 - I packaged my changes to Ascend et. al. and posted them in the main Ascend thread as 2011_03_19.zip.

mhopkins321
05-18-2010, 04:29 PM
I was having the loop problem with eat/drink. Is there ANY way to fix this? I realize that it is a rare occasion to not have enough meat to buy those things, but I definitely ran into that situation.

fronobulax
05-18-2010, 04:46 PM
I was having the loop problem with eat/drink. Is there ANY way to fix this? I realize that it is a rare occasion to not have enough meat to buy those things, but I definitely ran into that situation.

Right now what I have done has been to manually eat and drink to fullness, using mafia's display to help me make intelligent choices. Then i run ascend. When Ascend gets to the point where it starts the spleen stuff I just abort the script, manually over-drink and log out. I'm still trying to figure out what a solution might be because EatDrink is not especially intuitive to me. It is pretty near the top of things I want fixed so I hope to come up with something soon.

Winterbay
05-18-2010, 08:27 PM
One way to fix it would be to make the price increase higher for each iteration. Atm it rises 1 every step on the way and if the difference is 2-300 or more than you have a problem, so if it increases by say 50 meat per iteration the convergence would be faster, or at least that's what it feels like should happen :)

tgetgel
05-18-2010, 10:28 PM
Caveat: I run eatdrink from my own script, not from Ascend.

This eatdrink behavior has not happened to me for a while. As I recall, I aborted the eatdrink script when this loop happened. I then restarted eatdrink and eatdrink did not repeat the same behavior. As I said, it has been a while since I remember having seen this - or maybe my behavior has been modified so that when it does happen, I respond automatically now and do not remember doing it.

Of course, I also run a couple of characters from a batch file when I run out of time. The session logs over the last month seem like eatdrink ran fine. I guess I am not really any help on this topic.

fronobulax
05-19-2010, 12:42 AM
I believe the loop is more likely when characters lack resources. Not much meat (less than 1,000), low inventory, no Hangks and so on. I am seeing it all the time on my test multi who was newly created to test Ascend. I saw it once in a while in a HC run where I had my restore settings set so that Universal Recovery spent more meat than I considered prudent.

My test fix, which will be tested tomorrow, uses an increment much bigger than 1 when there is a problem with acquisition.

Winterbay
05-19-2010, 05:18 AM
My experience is that it pops up when the item it wants to buy has a price set to lower value than market averages with a limit on and when that limit is used up the scripts enters its lovely loop.

zarqon
05-19-2010, 06:27 AM
Have you also made this work with the current MacGuffin script? That generated about 36 error reports over in the Ascend thread a while ago. :)

fronobulax
05-20-2010, 12:58 PM
Are you feeling adventurous? Willing to bleed a little on the cutting edge? Then I have a deal for you. The attachment is a version of EatDrink.ash that, in my very limited testing, does not have the looping problem. I did two things. First, when the script attempts to buy something and fails, instead of increment a target price by one, I set the target price to the maximum budget for eating and drinking. In hindsight, I'm not sure that actually made any difference, but since it was in the script that I tested and worked I figure I am better off leaving it there for the moment.

The second change is far more interesting. The script builds a map named grub, slices it and dices it and then keeps trying the "best" item. However each time through the loop, it rebuilds grub. As a consequence if there is some kind of failure with the best item, the item will nevertheless reappear for consideration and most likely be chosen again. I added a map, fail, and added items that had been selected for consumption but were not consumed to the fail map. I then deleted such items from grub before the best was selected.

The changes worked for me in both simulation mode and live as called from Ascend. I am running a brand new character who is poor. I turned off Hangk's and favorites.

If you are so inclined, you might consider backing up your copy of EatDrink.ash, downloading my version and running it. If it "misbehaves" let me know. I will probably want to see the eatdrink section of the vars_CharName.txt file in the data subdirectory and the EatDrink output from the session log.

This is an Ascend thread. However, EatDrink was released to the public for free so there should be no concerns about giving something away that is not mine to give.

UPDATE: This isn't the version of EatDrink you are looking for. Try following the link in the first post (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=29924&viewfull=1#post29924).

Chish
05-25-2010, 10:31 PM
It's good to see another developer picking up where dj_d left off! I expect this project to have a long lifetime. I am excited to wait for the latest versions of everything to be reintegrated into the suite.

Deathless Assassin
05-25-2010, 10:36 PM
fronobulax, I've been testing your update to EatDrink for a few days with a couple junk multis, and it seems to work great. As for ascend.ash, I'll wait 'til more of its been made to work with updated versions of its companion scripts.

Pazleysox
05-26-2010, 04:52 PM
Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 94)

I also have the eatdrink_modifed.ash, and renamed it to eatdrink.ash, I have the latest version of zlib.ash.

I should have kept backup copys of the old script, because they worked fine with an old version of mafia. :(

I downloaded v8463 today, and got this error. I've tried all other versions of mafia already too.

Any help with this would be great.

-Paz

fronobulax
05-26-2010, 05:50 PM
Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 94)

I downloaded v8463 today, and got this error. I've tried all other versions of mafia already too.

Any help with this would be great.

-Paz

I could be mistaken, but that doesn't sound like line 94 in the version of Ascend I have. First thing to do would be to make sure that EatDrink.ash is in your scripts directory. The best option would be the one I posted in the current thread, Post #9. (Someday, I'll figure out how to link to a specific post). The only feedback I have received on that one is that it does work better than the old version.

Alternatively, you could backup your scripts directory, download the original Ascend from here (http://kolmafia.us/showthread.php?1894-Ascend.ash-hands-off-ascension-script) put the files in your scripts directory, then unload and unzip my first set of fixes from post #1 of this thread and add and replace the files in your scripts directory with those and then finally, if you have not already done so replace EatDrink with the previously mentioned version.

Eventually this will get simpler but I need to get some testing done by others on a few things and I need to clearly separate the scripts people paid for from the ones that were free.

lostcalpolydude
05-26-2010, 05:53 PM
Someday, I'll figure out how to link to a specific post.
There's a link at the top right (with the post number as the text).

Pazleysox
05-27-2010, 11:46 AM
I could be mistaken, but that doesn't sound like line 94 in the version of Ascend I have. First thing to do would be to make sure that EatDrink.ash is in your scripts directory. The best option would be the one I posted in the current thread, Post #9. (Someday, I'll figure out how to link to a specific post). The only feedback I have received on that one is that it does work better than the old version.

Alternatively, you could backup your scripts directory, download the original Ascend from here (http://kolmafia.us/showthread.php?1894-Ascend.ash-hands-off-ascension-script) put the files in your scripts directory, then unload and unzip my first set of fixes from post #1 of this thread and add and replace the files in your scripts directory with those and then finally, if you have not already done so replace EatDrink with the previously mentioned version.
.

Ok, I've done all this, and now I am having THIS problem. (haha, seems like nothing but problems for me now)

Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)

fronobulax
05-27-2010, 12:54 PM
Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)
That is defined in hiddencity.ash which should have been in the original zip file here (http://kolmafia.us/showthread.php?1894-Ascend.ash-hands-off-ascension-script&p=11748&viewfull=1#post11748). Is it in your scripts directory? If not then perhaps re-extracting it might help.

My test multi is only Level 8 so I am several days away from experience this problem personally.

@lost - thanks. I believe I correctly linked to a particular post.

fronobulax
05-29-2010, 02:58 PM
An update.

I found another loop in EatDrink and fixed it. For those who care, retrieve_item followed by use was generating some kind of unexpected flow control when retrieve_item returned false and that was followed by an unconditional call to use. The net result was that the code to detect a lack of success with an item was bypassed and consequently an infinite loop occurred. Also, and this is not fixed, if EatDrink decides you need either of the boxen, it will try and obtain both.

Update: This isn't the version of EatDrink you are looking for. This (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30725&viewfull=1#post30725) is.

fronobulax
05-29-2010, 06:01 PM
Another update. The attached zip file contains the files included here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=29924&viewfull=1#post29924) in 2010_05_18.zip PLUS updated versions of canadv, EatDrink and farm. Canadv is used by farm and should be the version from the CanAdv thread with the unofficial change noted in this (http://kolmafia.us/showthread.php?2027-CanAdv-check-whether-you-can-adventure-at-a-given-location&p=26043&viewfull=1#post26043) post. EatDrink fixes the two looping conditions noted so far, as discussed upstream in the current thread. farm was changed to address some "delete from map" errors. Winterbay actually did the work and I just did limited testing. I am including it here in anticipation of the time when dj_d blesses the changes and updates Ascend.

As far as I can tell farm was sold by dj_d which is why it is included in the encrypted zip file. If farm is a publicly released, free script let me know and I will post the changes "for all".

For convenience the latest versions ofFirstThingsFirst and SmartStasis are included.

Xenthes
05-30-2010, 05:38 AM
got this when I ran the simulation for farm.ash


Best location is Daily Dungeon with the command line 'maximize item drop;familiar Baby Gravy Fairy;'. Expected value is 1069. The best monster there is Vampire Clam, who is worth 9700 meat.

Monster Apathetic Lizardman has 0 drops. Worth is 0; frequency is 11.
Monster Dairy Ooze has 0 drops. Worth is 26; frequency is 11.
Monster Dodecapede has 0 drops. Worth is 0; frequency is 11.
Monster Giant Giant Moth has 0 drops. Worth is 0; frequency is 11.
Monster Mayonnaise Wasp has 0 drops. Worth is 0; frequency is 11.
Monster Pencil Golem has 0 drops. Worth is 0; frequency is 11.
Monster Sabre-Toothed Lime has 0 drops. Worth is 0; frequency is 11.
Monster Tonic Water Elemental has 0 drops. Worth is 0; frequency is 11.
Monster Vampire Clam has 1 drops. Worth is 9700; frequency is 11.
Total of 9 monsters; meat per adventure is 1069
Best monster is Vampire Clam, worth 9700.

Submission failed: java.io.FileNotFoundException: http://zachbardon.com/mafiatools/updateprices.php
All done! Goodnight.
Requests complete.



It seems way screwy that a monster from the DD would be deemed the best for meat drops.
If you need more info let me know.

Winterbay
05-30-2010, 06:55 AM
Did you run the one from this thread? Because that have been modified to use item_drops_array() in order to avoid giving that high value to the Vampire Clam (an dother monsters with pickpocket only items).

What is your class and level?

Edit: Also, try an "update clear" in the CLI to force it to fetch new prices. I had a problem a while with it putting too high value on some items due to the historical price my mafia had was higher than the market value actually was.

In order to help with that you should probably do a search and replace for "http://zachbardon.com/mafiatools/updateprices.php" and change it to "http://kolmafia.us/scripts/updateprices.php" since that feature has moved.

dragonslayere
05-30-2010, 07:39 AM
//update prices
cli_execute("update prices http://zachbardon.com/mafiatools/updateprices.php?action=getmap");
cli_execute("update prices http://nixietube.info/mallprices.txt");


do we change that one too? or just the spading one?

slyz
05-30-2010, 11:21 AM
You can completely removed those lines and simply check "Share recent Mall price data with other users" in Preferences -> General.

Winterbay
05-30-2010, 05:53 PM
do we change that one too? or just the spading one?

Either change both or remove them and tick the preference indicated by slyz.

fronobulax
05-31-2010, 01:06 AM
got this when I ran the simulation for farm.ash
FWIW, my test of farm decided that the Haunted Conservatory was just the place for a level 62 Pastamancer. I note that canadv was reporting what may have been mis-information. Hopefully Winterbay will have some thoughts since I suspect my next exercise will be getting macguffin to behave.

halfvoid
05-31-2010, 05:09 AM
yeah. mines been doing the conservatory for a month or so now. i've cancelled out a couple times and just farmed the castle instead.

Winterbay
05-31-2010, 05:26 AM
Mine was running around in the conservatory, the DD and the dungeon of doom for quite some while. I did manage to make some meat from it by actually using the pile of dusty animal bones and getting a bunch of skulls and so on and the boxen has sold quite well...

But, it was some days ago and I then did an "update clear" which seems to have removed some erroneously high mall prices for some items which may have been what was throwing it off. Try that and see if it helps.

halfvoid
05-31-2010, 05:53 AM
i've tried update clear several times and it still goes there. i've even tried just deleting the mallprices.txt from the data folder. still loves the conservatory.

morgad
05-31-2010, 09:39 AM
I can't get the new farm.ash to work. It keeps stopping in the same place.
I have uncommented some of the print statements, and added a +rec.type to the end of the abort message

(running r8465)


Location 36/117: Haunted Bedroom
Item and meat reset performed
1
DROP: old coin purse worth 535. Drop rate is 25% with a modifier of 232% so actual freq is 83%
2
DROP: old leather wallet worth 545. Drop rate is 25% with a modifier of 232% so actual freq is 83%
3
An error has occurred, aborting.
mon was 0
mob was Animated Nightstand (Mahogany)
rec.drop was half of a memo
rec.rate was 0
rec.type was q

KoLmafia declares world peace.

any suggestions on how to track down the problem?

Dave

fronobulax
05-31-2010, 12:59 PM
@Morgad - since I am being especially dense, did farm decide to abort or was there an error that made mafia abort the execution of farm?

morgad
05-31-2010, 05:13 PM
as far as I can tell it was farm aborting

default:
print("An error has occurred, aborting.");
print("mon was "+ mon);
print("mob was "+ mob);
print("rec.drop was "+ rec.drop);
print("rec.rate was "+ rec.rate);
print("rec.type was "+ rec.type);
abort(); <--here

HTH
Dave

fronobulax
05-31-2010, 05:46 PM
OK. Not a solution but a couple pointers while I deal with Real Life. farm is doing what it is supposed to. It does not recognize rec.type of q and so it aborts. As far as I can tell the record comes from item_drops_array which is defined and managed by zlib. If I am correct then then a band-aid would be to ignore that record type without aborting. A better solution would be to find out what it means and have farm handle it appropriately. So someone with more time than I have at the moment may want to follow up with research.

heeheehee
05-31-2010, 06:27 PM
Presumably "quest item", since it's applied to $item[half of a memo]. That's really weird, as it should be "c" instead for conditional. Okay, the simplest solution would be to insert
if(rec.type=="q") rec.type = "c"; right before the switch statement that ends with the bit that you posted.

Or insert
case "q": on its own line, right before
case "c":

(Untested, as I have no idea what the code looks like, or what the switch statement even is. Just an educated (sorta) guess.)

[And while we're reporting errors with monsters.txt, snakehead charrrm (dropped by gaudy pirate) should be "c", not "".]

morgad
05-31-2010, 06:49 PM
dumb question - I am using Zlib version 20, is that the correct version for farm.ash?

added the following path to ignore it, does not quite work, keeps looping on the same monster :-(

case "q":
output("DROP: " + rec.drop + " not evaluated as type is Q");
wait(5);
continue;


but the new mafia release that has just come out might fix things ... will know in a hour :-)

many thanks
Dave

Winterbay
05-31-2010, 09:12 PM
I didn't know that there was a "q" category. It's not listed under the item_drops_array entry in the wiki. The script was behaving as intended since it is set to abort if item_drops_array returns an unknown value which it did in this case.

Duplicating any of the b, 0 or c entries and changing to a q really should solve that problem (unless the change to conditional drops instead of q in the recent update solved that problem).

The "print("Item and meat reset performed");" was mainly there for my debugging purposes when I redid the loops and really doesn't do anything (it can be safely removed).

On the "running to strange places" I can't really do anything since my script, which should be the same that is here (apart from a few modifications to canadv), does not do that. It currently farms the dooks for 15 turns and the goes to the castle for the rest. The changes to canadv has nothing to do with the conservatory.

As an attempt to debug this issue could you check your session log for the top 5 entries on where to go to farm?

Mine shows the following:


> McMillicancuddy's Farm: 903 meat; use maximize meat drop;familiar Leprechaun;{Wasabi Sinuses};.
> Giant's Castle: 831 meat; use maximize meat drop;familiar Leprechaun;{Wasabi Sinuses};.
> Haunted Conservatory: 799 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.
> The Middle Chamber: 722 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.
> Knob Goblin Kitchens: 675 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.

morgad
05-31-2010, 09:26 PM
fixed by version 8467 :-)

I a going to back out that q: switch patch, aborting was the right thing to do (it just needed a bit more info printing)

Many thanks to Fronobulax, Veracity and the rest of you on this thread.

Dave

Ranrar
06-02-2010, 05:35 AM
Hey ya Fronobulax. Thank you for taking a crack at fixing eatdrink. Much appreciated. Your v3.0 did overdrink me tonight. Here is the log. Let me know if anything else would be helpful.

Mafia version 8470

eatdrink was called from an .ash script with "eatdrink(13,inebriety_limit(),spleen_limit(),false ,1400,0,0,1400,false);"


remove from stash: 1 tiny plastic sword
You acquire an item: tiny plastic sword
> Checking for updates (running EatDrink ver. 3.0)...
> You have a current version of EatDrink.
> Skipping favorites.
> Starting EatDrink.ash (version 3.0).
> Consuming up to 13 food, 19 booze, and 15 spleen
> Considering food from inventory Hagnk's the mall. Per-item budget cap is 312500.0.
> Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 1400 meat each.
> An adventure has the value of &lt;b>1400 meat&lt;/b>. Moxie subpoint is 0.0. Nonprime stat subpoint is 0.0.
> Pass 1: food.
> food: At 0, consuming to 13.
> Loading food map from Mafia's datafiles
> Filtering by type
> Filtering by level
> Finding prices
> Setting values
> Choosing food to consume.
> &lt;b>rat appendix chow mein&lt;/b> lev:7 gain:5.0 adv:25.0 musc:0.0 myst:0.0 mox:72.5 meat:4750 own:0 value:6050
> Waiting to consume...

Everything goes as expected with the eating... now the drinking


> Loading drink map from Mafia's datafiles
> Filtering by type
> Filtering by level
> Finding prices
> Setting values
> Choosing drink to consume.
> &lt;b>grogtini&lt;/b> lev:6 gain:6.0 adv:24.0 musc:18.0 myst:0.0 mox:0.0 meat:2418 own:0 value:6130
> Waiting to consume...
> Shopping for a grogtini in 3 seconds
> budgeting 2896 for 2 additional lime. You have 384317 meat. You have 0 in inventory already.

buy 2 lime for 1159 each from 294980 on 20100602
You acquire lime (2)
> Purchased 2 lime for 2318 meat.
> budgeting 125 for 1 additional bottle of rum. You have 381999 meat. You have 0 in inventory already.

buy 1 bottle of rum for 100 each from 1165313 on 20100602
You acquire an item: bottle of rum
> Purchased 1 bottle of rum for 100 meat.

Mix 1 bottle of rum + 1 lime
> budgeting 3022 for 1 additional grogtini. You have 381899 meat. You have 0 in inventory already.
> Purchased 0 grogtini for 0 meat.
> Tried to get 1 grogtini but got 0. Pricing error.
> Setting new effective price to 3022
> Failed to get grogtini for a max price of 1.25*2418=3022.5
> FAIL: &lt;b>grogtini&lt;/b> lev:6 gain:6.0 adv:24.0 musc:18.0 myst:0.0 mox:0.0 meat:2418 own:0 value:6130
> Choosing drink to consume.
> &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Waiting to consume...
> Shopping for a sangria del diablo in 3 seconds
> budgeting 2962 for 2 additional cherry. You have 381899 meat. You have 0 in inventory already.

buy 2 cherry for 1185 each from 294980 on 20100602
You acquire cherry (2)
> Purchased 2 cherry for 2370 meat.
> Already got that many, calling that success

Mix 1 cherry + 1 tiny plastic sword
You acquire an item: skewered cherry
Crafting used 1 each of tiny plastic sword and cherry

Mix 1 boxed wine + 1 cherry
You acquire an item: sangria
Crafting used 1 each of boxed wine and cherry

Mix 1 sangria + 1 skewered cherry
You acquire an item: sangria del diablo
Crafting used 1 each of skewered cherry and sangria

drink 1 sangria del diablo
You gain 30 Adventures
You gain 19 Enchantedness
You acquire an item: tiny plastic sword
You gain 6 Drunkenness
> 1: &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Choosing drink to consume.
> &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Waiting to consume...
> Shopping for a sangria del diablo in 3 seconds
> budgeting 2962 for 2 additional cherry. You have 379529 meat. You have 0 in inventory already.

buy 2 cherry for 1185 each from 294980 on 20100602
You acquire cherry (2)
> Purchased 2 cherry for 2370 meat.
> Already got that many, calling that success

Mix 1 cherry + 1 tiny plastic sword
You acquire an item: skewered cherry
Crafting used 1 each of tiny plastic sword and cherry

Mix 1 boxed wine + 1 cherry
You acquire an item: sangria
Crafting used 1 each of boxed wine and cherry

Mix 1 sangria + 1 skewered cherry
You acquire an item: sangria del diablo
Crafting used 1 each of skewered cherry and sangria

drink 1 sangria del diablo
You gain 32 Adventures
You gain 19 Enchantedness
You acquire an item: tiny plastic sword
You gain 6 Drunkenness
> 2: &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Choosing drink to consume.
> &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Waiting to consume...
> Shopping for a sangria del diablo in 3 seconds
> budgeting 2962 for 2 additional cherry. You have 377159 meat. You have 0 in inventory already.

buy 2 cherry for 1185 each from 294980 on 20100602
You acquire cherry (2)
> Purchased 2 cherry for 2370 meat.
> Already got that many, calling that success

Mix 1 cherry + 1 tiny plastic sword
You acquire an item: skewered cherry
Crafting used 1 each of tiny plastic sword and cherry

Mix 1 boxed wine + 1 cherry
You acquire an item: sangria
Crafting used 1 each of boxed wine and cherry

Mix 1 sangria + 1 skewered cherry
You acquire an item: sangria del diablo
Crafting used 1 each of skewered cherry and sangria

drink 1 sangria del diablo
> FAIL: &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Choosing drink to consume.
> &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Waiting to consume...
> You have at least one sangria del diablo in inventory.

drink 1 sangria del diablo
> 3: &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Choosing drink to consume.
> &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Waiting to consume...
> Shopping for a sangria del diablo in 3 seconds
> budgeting 2962 for 2 additional cherry. You have 374789 meat. You have 0 in inventory already.

buy 2 cherry for 1185 each from 294980 on 20100602
You acquire cherry (2)
> Purchased 2 cherry for 2370 meat.
> Already got that many, calling that success
> budgeting 3093 for 1 additional sangria del diablo. You have 372419 meat. You have 0 in inventory already.
> Purchased 0 sangria del diablo for 0 meat.
> Tried to get 1 sangria del diablo but got 0. Pricing error.
> Setting new effective price to 3093
> Failed to get sangria del diablo for a max price of 1.25*2475=3093.75
> FAIL: &lt;b>sangria del diablo&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2475 own:0 value:6120
> Choosing drink to consume.
> &lt;b>cherry bomb&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2569 own:0 value:6105
> Waiting to consume...
> Shopping for a cherry bomb in 3 seconds
> Already got that many, calling that success
> Already got that many, calling that success
> budgeting 3211 for 1 additional cherry bomb. You have 372419 meat. You have 0 in inventory already.
> Purchased 0 cherry bomb for 0 meat.
> Tried to get 1 cherry bomb but got 0. Pricing error.
> Setting new effective price to 3211
> Failed to get cherry bomb for a max price of 1.25*2569=3211.25
> FAIL: &lt;b>cherry bomb&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:18.0 mox:0.0 meat:2569 own:0 value:6105
> Choosing drink to consume.
> &lt;b>bodyslam&lt;/b> lev:6 gain:6.0 adv:24.0 musc:18.0 myst:0.0 mox:0.0 meat:2816 own:0 value:6064
> Waiting to consume...
> Shopping for a bodyslam in 3 seconds
> Already got that many, calling that success
> Already got that many, calling that success
> budgeting 3520 for 1 additional bodyslam. You have 372419 meat. You have 0 in inventory already.
> Purchased 0 bodyslam for 0 meat.
> Tried to get 1 bodyslam but got 0. Pricing error.
> Setting new effective price to 3520
> Failed to get bodyslam for a max price of 1.25*2816=3520.0
> FAIL: &lt;b>bodyslam&lt;/b> lev:6 gain:6.0 adv:24.0 musc:18.0 myst:0.0 mox:0.0 meat:2816 own:0 value:6064
> Choosing drink to consume.
> &lt;b>dirty martini&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:0.0 mox:18.0 meat:2827 own:0 value:6062
> Waiting to consume...
> Shopping for a dirty martini in 3 seconds
> budgeting 3296 for 2 additional jumbo olive. You have 372419 meat. You have 0 in inventory already.

buy 1 jumbo olive for 1309 each from 2102477 on 20100602
You acquire an item: jumbo olive

buy 1 jumbo olive for 1319 each from 294980 on 20100602
You acquire an item: jumbo olive
> Purchased 2 jumbo olive for 2628 meat.
> Already got that many, calling that success
> budgeting 3533 for 1 additional dirty martini. You have 369791 meat. You have 0 in inventory already.
> Purchased 0 dirty martini for 0 meat.
> Tried to get 1 dirty martini but got 0. Pricing error.
> Setting new effective price to 3533
> Failed to get dirty martini for a max price of 1.25*2827=3533.75
> FAIL: &lt;b>dirty martini&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:0.0 mox:18.0 meat:2827 own:0 value:6062
> Choosing drink to consume.
> &lt;b>vesper&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:0.0 mox:18.0 meat:2838 own:0 value:6060
> Waiting to consume...
> Shopping for a vesper in 3 seconds
> Already got that many, calling that success
> budgeting 250 for 1 additional bottle of vodka. You have 369791 meat. You have 0 in inventory already.

buy 1 bottle of vodka for 100 each from 717350 on 20100602
You acquire an item: bottle of vodka
> Purchased 1 bottle of vodka for 100 meat.
> budgeting 3547 for 1 additional vesper. You have 369691 meat. You have 0 in inventory already.
> Purchased 0 vesper for 0 meat.
> Tried to get 1 vesper but got 0. Pricing error.
> Setting new effective price to 3547
> Failed to get vesper for a max price of 1.25*2838=3547.5
> FAIL: &lt;b>vesper&lt;/b> lev:6 gain:6.0 adv:24.0 musc:0.0 myst:0.0 mox:18.0 meat:2838 own:0 value:6060
> Choosing drink to consume.
> &lt;b>rockin' wagon&lt;/b> lev:4 gain:4.0 adv:12.0 musc:0.0 myst:0.0 mox:35.0 meat:2000 own:0 value:5800
> Waiting to consume...
> Shopping for a rockin' wagon in 3 seconds
> budgeting 2500 for 1 additional rockin' wagon. You have 369691 meat. You have 0 in inventory already.

buy 1 rockin' wagon for 1675 each from 1873474 on 20100602
You acquire an item: rockin' wagon
> Purchased 1 rockin' wagon for 1675 meat.

equip shirt tuxedo shirt

drink 1 rockin' wagon
You gain 17 Adventures
You gain 36 Cheek
You gain 4 Drunkenness

equip shirt General Sage's Lonely Diamonds Club Jacket
> 4: &lt;b>rockin' wagon&lt;/b> lev:4 gain:4.0 adv:12.0 musc:0.0 myst:0.0 mox:35.0 meat:2000 own:0 value:5800
> Choosing drink to consume.
> &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Waiting to consume...
> Shopping for a canteen of wine in 3 seconds
> budgeting 4125 for 1 additional canteen of wine. You have 368016 meat. You have 0 in inventory already.

buy 1 canteen of wine for 3300 each from 1571872 on 20100602
You acquire an item: canteen of wine
> Purchased 1 canteen of wine for 3300 meat.

drink 1 canteen of wine
> FAIL: &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Choosing drink to consume.
> &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Waiting to consume...
> You have at least one canteen of wine in inventory.

drink 1 canteen of wine
> FAIL: &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Choosing drink to consume.
> &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Waiting to consume...
> You have at least one canteen of wine in inventory.

drink 1 canteen of wine
> FAIL: &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Choosing drink to consume.
> &lt;b>canteen of wine&lt;/b> lev:5 gain:3.0 adv:10.5 musc:31.0 myst:31.0 mox:31.0 meat:3300 own:0 value:5666
> Waiting to consume...
> You have at least one canteen of wine in inventory.

Would have looped the canteen until rollover.. because I'm already 22 drunk. 3 TPSs and rocking wagon.

Deathless Assassin
06-02-2010, 05:53 AM
I had the same occurrence as Ranrar =(

Winterbay
06-02-2010, 06:50 AM
On the "running to strange places" I can't really do anything since my script, which should be the same that is here (apart from a few modifications to canadv), does not do that. It currently farms the dooks for 15 turns and the goes to the castle for the rest. The changes to canadv has nothing to do with the conservatory.

As an attempt to debug this issue could you check your session log for the top 5 entries on where to go to farm?

Mine shows the following:


> McMillicancuddy's Farm: 903 meat; use maximize meat drop;familiar Leprechaun;{Wasabi Sinuses};.
> Giant's Castle: 831 meat; use maximize meat drop;familiar Leprechaun;{Wasabi Sinuses};.
> Haunted Conservatory: 799 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.
> The Middle Chamber: 722 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.
> Knob Goblin Kitchens: 675 meat; use maximize item drop;familiar Baby Gravy Fairy;{Peeled Eyeballs};.


Ok. Today mine was trying to run around in the conservatory. In order to see why I stopped it and checked my historical_price() of "pile of dusty animal bones" which turned out to be ~1600. Doing a mall_price() instead gave the result ~650 and rerunning the script after that put the conservatory way down in the list of places to try. So it seems that the reason it goes to the conservatory is due to the mall price of the dusty animal bones (which is as should be), what I can't understand is why it would vary that quick up and down. Seeing as the price seems to diminish by 1 each time I guess ti could be an effect of enough people using the farm script and thus pushing the price downwards.

If you wish to solve this I suggest typing the following into the CLI:


zlib vars farm_minAgeLookup = 0.25


That should hopefully recheck the price of your dusty animal bones. If that does not work then the following alias for farm might be a good idea:



alias farmer => ash mall_price($item[pile of dusty animal bones]); cli_execute("call /scripts/farm.ash");


where you need to change the path of your famr.ash to what it is.

fronobulax
06-02-2010, 03:54 PM
Would have looped the canteen until rollover.. because I'm already 22 drunk. 3 TPSs and rocking wagon.
Yep. That's what it looks like. Presumably it didn't recognize you had overdrunk and stop. I'll dig into it.
(Fun fact 1 - I don't run this on my character with a TPS because sangia del diablo is cheaper to make than a cherry bomb, but I am on the cherry bomb consumption leader-board. I'd link to that but http://www.noblesse-oblige.org is showing up as a malware host at the moment. Fun fact 2 - HelpDesk support can buy lots of time and smooth feathers just by responding to a customer and restating what the customer said the problem was).

fronobulax
06-04-2010, 12:08 PM
Update to EatDrink

I am trying to be fully automated and was getting annoyed about being asked to drink milk when I don't have any and can't get any. So change number one is a new preference eatdrink_suppressNoMilk. It defaults to false so nothing will happen unless you set the variable to true in your data\vars_USER.txt file in which case, if you are like me, you will no longer be annoyed.

The second change may address the problem Ranrar was reporting above. If you fail to drink and are already over the limit then it will stop looking for more things to drink. I think it will address the problem but I can't personally test it.

dj_d will probably spin a new release Real Soon Now with my changes. However, since my test character has yet to do the Level 11 and 12 quests and there are some concerns about Ascend in those areas, we may wait until I get through them.

Update: See the first post (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=29924&viewfull=1#post29924) for a link to the latest version.

Ranrar
06-05-2010, 09:52 PM
Thanks for the update.


Update to EatDrink
The second change may address the problem Ranrar was reporting above. If you fail to drink and are already over the limit then it will stop looking for more things to drink. .

I'm worried here because that is not really the bug I was reporting. I had the script overdrink me from 0 drunk to 22 drunk while calling it with inebriety_limit() and overdrink set to false. Specifically it drank 3 sangria del diablos and then a rocking wagon. 22 drunk is a harsh way to start out the FoB. ;) Sorry if I was unclear there.

I've used the old version of this script a lot and have never had this happen. Also, it sounds like the same thing happened to Deathless Assassin the same day it happened to me.

I (very gingerly) tried the new version today. It worked great but was picking grogtini's instead of diablos.

edit: Another successful run today. gorgtini's again

fronobulax
06-06-2010, 08:26 PM
I'm worried here because that is not really the bug I was reporting. I had the script overdrink me from 0 drunk to 22 drunk while calling it with inebriety_limit() and overdrink set to false. Specifically it drank 3 sangria del diablos and then a rocking wagon. 22 drunk is a harsh way to start out the FoB. ;) Sorry if I was unclear there.
:o

I'm not sure if I barked up the wrong tree or not. Let me think about things in connection with FOB. We can always pull out the addition if it seems to be a concern. I thought the problem was trying to drink again when you were already over the limit. The code didn't detect a failure when KoL wouldn't let you drink and so EatDrink kept looping to find something to drink. Note that on the fourth pass EatDrink uses 99999 as the max inebriety which may also be a factor.

EatDrink is sensitive to mall prices so that may explain why today's menu is not yesterdays. Also, and this will effect EatDrink and Farm, the mall price fetch and update process may have a problem (http://kolmafia.us/showthread.php?4343-Price-Update-not-working). The practical effect is that the historical prices the scripts operate on will be incorrect to the point of being useless.

Confederateyak
06-06-2010, 08:30 PM
I realize this has nothing to do with the support of Ascend.ash but, with donation, is it still possible to receive the password to the files? Thanks.

Winterbay
06-06-2010, 09:09 PM
I realize this has nothing to do with the support of Ascend.ash but, with donation, is it still possible to receive the password to the files? Thanks.

Yes, since that process is automatic if you send a Mr. A. to dj_d it will still work.

fronobulax
06-07-2010, 01:06 AM
I realize this has nothing to do with the support of Ascend.ash but, with donation, is it still possible to receive the password to the files? Thanks.

Yes. Then come over here and pick up updates. Hopefully the existence of this thread will keep you from being too frustrated with the support. Interesting name. Anything to do with United States history?

Ranrar
06-07-2010, 08:06 AM
Let me think about things in connection with FOB.

A clannie suggested that it was possible that since Mafia updates drunkenness from the side panel that the inherent lag from FoB could have let Mafia feed the script incorrect info and cause this error. I have no idea... just throwing stuff out there.

Anyway, we are at three days and counting of no overdrink, no looping successful runs. All on grogtinis. Maybe we can convince the markets to cheapen up diablos enough to test them? I'll go start a thread about how grogtinis are unoptimal... :P

fronobulax
06-11-2010, 12:41 PM
Well, my test multi is finally trying the level 11 quest. As reported elsewhere Ascend does not work with the latest version of MacGuffin. I have a one line edit that solves the mechanical problem but I'm not certain that is all that is needed. PM me if you want the edit now otherwise I will post edited scripts when I have more experience with them.

zarqon
06-11-2010, 06:02 PM
Tip for whoever wants to get Ascend to work with the current MacGuffin script: hiddencity.ash is no longer even used by MacGuffin.ash and is no longer needed. There is instead a hidden city function within MacGuffin.ash which completes the hidden city in a very efficient manner. You will, however, need something in your CCS for handling the spectres. I have "abort" at the moment.

fronobulax
06-11-2010, 08:06 PM
Thanks. So far, the only change needed has been an edit because a function name changed. I'm not totally sure that Ascend took care of all the prerequisites for MacGuffin. (I thought, for example that the Spooky Temple had not been unlocked by Ascend but now I'm thinking what I saw was just a complete absence of RNG Love. I had to manually set a variable so that both scripts agreed upon which outfit to use if there was no compelling reason to wear something else). Ascend calls the quest components directly and does some Eat processing in between. If Ascend were totally mine, I'd be sorely tempted to set up the prerequisites and call MacGuffin directly. That eliminates the code duplication and makes a much clearer line between maintainers.

jamfan14
06-12-2010, 05:34 PM
im getting this error when running ascend.ash - Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia, and/or its supporting scripts. (Ascend.ash, line 61)

Im using daily build 8487. I believe I have all the updated files as well too. Any suggestions?

morgad
06-12-2010, 06:49 PM
when you say the updated files, can you confirm you mean 2010_05_29.zip ?
(post #18 on previous page)

best regards
Dave

fronobulax
06-12-2010, 07:20 PM
im getting this error when running ascend.ash - Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia, and/or its supporting scripts. (Ascend.ash, line 61)

Im using daily build 8487. I believe I have all the updated files as well too. Any suggestions?

I don't recall making/seeing any changes that would cause that error but the latest version of EatDrink is here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30725&viewfull=1#post30725). The message is most commonly seen when a file is expected in your scripts directory and it is not there. At the risk of insulting you by asking the obvious, is there a file named eatdrink.ash in your scripts directory? (Case shouldn't matter on Windows but try EatDrink.ash for any other operating system).

fronobulax
06-12-2010, 07:34 PM
when you say the updated files, can you confirm you mean 2010_05_29.zip ?
(post #18 on previous page)

best regards
Dave

Yes. Get Ascend from here (http://kolmafia.us/showthread.php?1894-Ascend.ash-hands-off-ascension-script). Then get my password protected changes from here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30495&viewfull=1#post30495) (which is 2010_05_29.zip) and then get an update to EatDrink from here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30725&viewfull=1#post30725). Unzip them and put them in your scripts directory in that order so that the newer files replace the older ones. Unless I am forgetting something, if Ascend uses someone else's script (such as zlib) I have included it in the zip file. At the moment Ascend will not automatically do the Level 11, MacGuffin quest using Zarqon's script. I have an unreleased one line change to Ascend that I am waiting to release because I have not seen the quest complete yet. Also there will probably be some issues with the Island War as well.

jamfan14
06-13-2010, 03:28 AM
ok, I must have d/l'd conflicting/older script versions. Doing it in the order above seems to have fixed the problem. Thanks guys - I'm uberly noobish when it comes to scripting and mafia.

That FN Ninja
06-24-2010, 04:24 PM
Fronobulax, I noticed that your modified version of EatDrink does not contain the avoid functionality that is in the latest version of dj_d's original script.

The two versions of eatdrink in the first post of dj_d's eatdrink thread are not the latest versions of eatdrink.

Since then, several bugs have been fixed and the avoid_particular_food functionality has been added. The most up to date version of dj_d's script, as far as I can tell, is located here. (http://kolmafia.us/showthread.php?1519&p=21189&viewfull=1#post21189) (This version does not contain a suppress no milk variable however).

I was going to test out your modified version of the script, but it immediately started consuming food that I had put on my avoid list.

The reason the avoid functionality was implemented was to prevent eatdrink from consuming essential quest items like the enchanted bean and wet stew and the like. For a script that automates ascension that sort of functionality seems essential.

Just a heads up. For now, I have reverted back to the version linked to above.

fronobulax
06-24-2010, 05:18 PM
Fronobulax, I noticed that your modified version of EatDrink does not contain the avoid functionality that is in the latest version of dj_d's original script.
Thank you. My baseline version was the version dj_d had bundled in the Ascend zipfile and it had never even occurred to me that there would have been subsequent updates. I will try and do a merge and report back.

As for the never consume, I noticed that I ultimately had to farm for 10 goat cheese...

fronobulax
06-25-2010, 02:04 PM
Status update.

Ascend is not behaving for me at the moment. I am getting a "blank page, complain to Jick" message but I cannot figure out where/why the offending URL is being called.

As noted above, there seems to have been a fork in the EatDrink source. I am trying to merge the branches back together but my first attempt turned up some unexpected behavior that I want to understand before I post a fix.

Zarqon's Macguffin and Wossname scripts aren't behaving as nicely as I would like with Ascend. I believe it is a parameter or configuration issue rather a problem with the scripts but...

That FN Ninja
06-25-2010, 02:28 PM
If you've been merging eatdrink then that's probably what casued the problem. Check the boolean needakey logic in eatdrink because it is faulty and will cause a blank page error.

fronobulax
06-26-2010, 03:01 PM
As noted above in this thread, I inadvertently forked the source for EatDrink. I believe the version attached to this post reunites the threads. In particular this version retains my changes to
optionally suppress the no milk prompt
stop trying to drink when over the limit
stop retrying an item once a failure to obtain it is observed
and it includes the ability to save items and not eat them as well as tweaking the value of key lime pies if you need keys.

It ran satisfactorily for a couple of days on three different characters so I expect it to work reasonably well ;)

zarqon
06-30-2010, 05:54 AM
What issues are you having integrating MacGuffin / Wossname? They need a wee bit of configuring (default auto-stops for Awkward/Spookyraven or turning in loot) on the user side, but otherwise they're fairly comprehensive.

Bale
06-30-2010, 09:29 AM
What issues are you having integrating MacGuffin / Wossname? They need a wee bit of configuring (default auto-stops for Awkward/Spookyraven or turning in loot) on the user side, but otherwise they're fairly comprehensive.

Whoa! Auto-stops? What auto-stop is there for Awkward? My current list of auto-stops (http://wiki.kolmafia.us/index.php?title=Auto-stops).

Winterbay
06-30-2010, 09:41 AM
Mafia also autostops if you have the hobo binder equipped and get a hobo glyph adventure. Not that it has much to do with the topic of this thread I guess, but it might be useful for the wiki-page perhaps?

zarqon
06-30-2010, 09:55 AM
No; they are configurable scripted aborts. Hadn't realized the word "auto-stop" was officially reserved only for mafias automatic stops.

Also was unaware of mafia's auto-stops in the desert. There are some optimizations I could make now to the MacGuffin script.

Bale
06-30-2010, 09:58 AM
It's a happy day when I'm able to teach something to you.



Mafia also autostops if you have the hobo binder equipped and get a hobo glyph adventure. Not that it has much to do with the topic of this thread I guess, but it might be useful for the wiki-page perhaps?
That's already on the kol wiki page. Read it! You might learn something also.

Winterbay
06-30-2010, 10:06 AM
That's already on the kol wiki page. Read it! You might learn something also.

I did, but I seem to have skipped parts of it. :)

fronobulax
06-30-2010, 02:29 PM
What issues are you having integrating MacGuffin / Wossname? They need a wee bit of configuring (default auto-stops for Awkward/Spookyraven or turning in loot) on the user side, but otherwise they're fairly comprehensive.
The issues, so far, seem to be all configuration related which means that, other than a comprehensive, simple configuration guide, there is nothing I am ready to ask of you.

These are some of the questions/concerns I had but to the extent I investigated I think the solution lies in proper configuration of Ascend. Nevertheless...

Things were not well behaved when there was not enough meat to purchase the forged ID documents. Although "well behaved" in this case may be nothing more than a message tells me enough about why something stopped that I can resolve the issue.

Something would attempt to change an outfit, fail and then not give me any information about which outfit had the problem.

The configuration variable for the "default outfit" does not seem to be the same across the various scripts thus requiring it be set in multiple places. (Tangentially, I would be interested in an outfit definition and management functionality. Max Main, Max Meat, Max Item and Max Adv would account for 80% of my outfit usage and it would be wonderful to have automation that updated the outfit as new gear was obtained or became usable).

MacGuffin spent 300+ turns to open the Hidden City. Not sure why but that seems excessive. Have logs. Investigating is on to-do list.

Ascend failed to configure Macguffin so it would handle specters and bosses.

Macguffin was unable to automatically identify spheres. Don't know why.

Macguffin or Ascend should have prevented the Palidrome portion of the quest from occurring if there was not enough meat on hand to actually buy the required items.

Ascend/Wossname had problems staring the war. Have not investigated why.

General lack of coordination between scripts. If UR doesn't remove Beaten Up Ascend will continue to do the same thing that just got you Beaten Up. If, on the other hand, an Abort on Beaten Up mode is used then scripts Abort and the automation is defeated. SmartStasis handles gremlins but a CCS is used to handle specters.

However, let me say two things. First all of my testing so far with Ascend was with a character that was brand new and had never ascended. I know that is an edge case. Second, I'm sure I did not manually configure the external scripts correctly which is my problem, not the script's.

Xenthes
06-30-2010, 11:23 PM
From my experience with the mcmuffin (I have also called it that since the quest was first put in) script, if you don't have items in your inventory to do elemental elemental damage mafia has fits keeps on trying and looping. Easily solved by making a CSS for the spectres though.

slyz
07-01-2010, 08:02 AM
Just a few pointers:



Things were not well behaved when there was not enough meat to purchase the forged ID documents

macguffin.ash simply calls retrieve_item() to get the documents, so it would be Ascend.ash's responsibility to farm for meat beforehand.


(Tangentially, I would be interested in an outfit definition and management functionality. Max Main, Max Meat, Max Item and Max Adv would account for 80% of my outfit usage and it would be wonderful to have automation that updated the outfit as new gear was obtained or became usable).

Ascend.ash was released before the maximizer, I think. Equipment management would really be a great addition, if used wisely (especially for HC ascensions).


MacGuffin spent 300+ turns to open the Hidden City.

This is strange. Had the hidden temple been revealed already?


Macguffin was unable to automatically identify spheres. Don't know why.

Mafia has to be setup for automatic sphere identification by adding


set_property("autoSphereID","true");

anywhere in ascend.ash, and by making sure that Mafia will execute special actions in combat. In ascend.ash, the battle action is set to use a CCS, so it's the user's responsibility to make sure this is the case. I guess bundling SmartStasis.ash and automatically using it would be the best thing to do (Zarqon might be entitled to quite a share of those Mr As now).


Macguffin or Ascend should have prevented the Palidrome portion of the quest from occurring if there was not enough meat on hand to actually buy the required items.

macguffin.ash can be imported and the separate steps can be called individually. This would allow to make sure some meat is farmed before calling never_odd_or_even().

fronobulax
07-01-2010, 11:01 PM
Thanks. I figured most of the problems were due to either Ascend or the operator failing to configure something but I am lazy enough to appreciate someone telling me that, rather than having to look at it myself. Thank you.

As an update, my never ascended character has now ascended so I am closer to the expected use of Ascend.

I looked at some of the logs. I spent 287 turns in the Hidden Temple and all of them were automated. I'm reasonably certain some of them were done by macguffin before the diary was actually read so they would not have triggered opening the city. The script will try and use the diary but only if (my_ascensions > 0) I'm willing to chalk this up to a lack of RNG love coupled with an edge case that might actually be an abuse of the script.

vampirewolf3
07-02-2010, 08:09 AM
Ignore this post.

fronobulax
07-02-2010, 12:18 PM
Ignore this post.
Obviously, that is difficult for me to do ;)

zarqon
07-02-2010, 01:50 PM
Whoa, that should be if my_ascensions() == 0 !!

As I understand it, the diary only actually needs to be read the very first time. I've already changed that here, and will update the script soon with this and whatever other changes I have the time/interest to make. :)

Most of the other issues slyz covered well (thanks!), but some of them are cases that the script should catch and, at the very least, abort. Trying to get documents or palindrome quest items without enough meat -- and then continuing along! -- is an error and should be handled differently. Usually I've plenty of meat by then so I've never come across this problem.

EDIT: I suspect that the Hidden City issue was due to something tinkering with your conditions while you were adventuring, such as BBB's automatic turtle-taming (which is known to be implemented imperfectly). Were you a TT with auto-taming on in BBB or did you click around in the Location/Goals area of the GUI while auto-adventuring?

EDIT 2: The OCW of less than a year ago had a longstanding error with starting the war using hippy-only warplans. Not sure if that's what you were going for or not, but it's a possibility. Were you using the current OCW?

lostcalpolydude
07-02-2010, 04:10 PM
As I understand it, the diary only actually needs to be read the very first time.

You have to read it every run. The only thing that changed is that looking at the first page counts as reading the entire thing (maybe not on your first run?), but since everyone got in the habit of viewing the text-only version it effectively made no difference.

fronobulax
07-02-2010, 06:53 PM
@ Zarqon

Seal clubber. I don't recall configuring SmartStasis and so the default values are most likely to apply.

Ascend doesn't configure Wossname and it was using the default, of fastest, Frat. I DL'd the file on May 9, 2010 so my hope is that it was the latest version available at that time.

I've been philosophizing about turn burning scripts. My general thought at this time is that a script that burns turns in one or more areas in order to satisfy a goal should either detect that the prerequisites for the area and goal are met or inform the user of what must be done before the script can run successfully and then Abort. (Actually for scripts that are used by other scripts, Exit with an error code is much preferred to an Abort). To use Macguffin as an example, I would want it to check that I had enough meat to buy the forged ID documents before I started looking for the map. I probably would want to abort rather than farm for meat if there wasn't enough. Ditto for the Palindrome and the meat to buy the items. However, I am ok with burning turns to obtain the tailsman. It doesn't have to open the Spookyraven basement for me but it should tell me that I need to do it. Obtain the diary if necessary, and then unconditionally use it once just to be safe, or check a mafia "diary used" variable if one exists. My mental model is mafia's Tower script. I run it and it either completes or tells me what I need before I can continue. In the latter case, I go off and do something to address the issue and then run the Tower script. Rinse and repeat until Her Naughtiness is breathlessly awaiting my Seal Club.

Bale
07-03-2010, 12:13 AM
You have to read it every run. The only thing that changed is that looking at the first page counts as reading the entire thing (maybe not on your first run?), but since everyone got in the habit of viewing the text-only version it effectively made no difference.

This is true. I recently had trouble when I forgot to read the McGuffin Diary for the 50th time. It might be nice if mafia would just read the darn thing for me when I get it. After all, there's never a time when it's better not to have read it. (Okay, I can imagine a time... if I have an active dance card, then going to the Ballroom might negate the results of my dance card with Be Flat, but hopefully I'd be smart enough not to do that.)

retracell
07-04-2010, 01:07 AM
I'm not sure if it has to do with me not configuring anything but when I run Ascend and it calls EatDrink it fills up my stomach to full capacity, my liver to to about three quarters and leaves my spleen empty. I think the lack of drinks and adventures is what disappoints my liver however I have four advs in my inventory that EatDrink does not consume. I'm in hardcore by the way.

Edit: I notice that it tries to buying crimbo consumables many times.

Edit2: Sorry if I'm asking a lot but... just making sure. There's currently no support for familiar swapping, buff upkeeping or roach/wormwood powerlevelling right?

Thanks for all the help.

fronobulax
07-04-2010, 02:28 AM
To the best of my knowledge there is no support for familiar swapping (except as configured for Macguffin and Wossname). Buff upkeeping would seem to be covered by setting up mafia moods and I must confess that I'm not really aware of roach/wormwood powerleveling so I am almost certain it is not there. My experience so far is that Ascend is highly automated but it implements a play style that is somewhat inefficient and certainly not what I would personally do manually.

As for the spleen, I have been wondering if the branch merge on EatDrink that was posted above actually broke something with the spleen. My experience has been that it only considers the variations on fancy chocolates. I'll try and look more closely at that since I may have broken something.

Thanks.

Winterbay
07-04-2010, 08:53 AM
Also, isn't ascend mainly built for softcore ascencions and not so much hardcore? I guess hardcore puts different demands on the script due to non-pulling and so on.

ETA: Also, eatdrink.ash (the latest version posted by you) works just fine for me with the updated version of farm.ash at least.

nsd45
07-05-2010, 03:54 PM
I just downloaded and configured the files that came with ascend.ash im very noobish when it comes to this stuff but i couldnt find a fix posted maybe i just missed it im hopping someone can help. I am getting this message when i run the script


> call scripts\Ascend\Ascend.ash

Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)

im only lvl 5 on this character isnt that part of the macguffin quest and if so why is it already trying to run that part of the script?
ps.i have the latest kolmafia build and it still doesn't work

fronobulax
07-05-2010, 04:22 PM
I just downloaded and configured the files that came with ascend.ash im very noobish when it comes to this stuff but i couldnt find a fix posted maybe i just missed it im hopping someone can help. I am getting this message when i run the script


> call scripts\Ascend\Ascend.ash

Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)

im only lvl 5 on this character isnt that part of the macguffin quest and if so why is it already trying to run that part of the script?
ps.i have the latest kolmafia build and it still doesn't work

The error is mechanical - before the script runs, it checks to see that all the pieces are there as opposed to only checking when it needs a piece.

It 's probably time to get d_dj to update, but for the moment, to get the working version, follow my instructions here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=31094&viewfull=1#post31094) and then replace EatDrink with the version from here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=31738&viewfull=1#post31738). I've lost track of where I have bundled the latest versions of zlib, MacGuffin wossname, etc. But I would try following the instructions mentioned above first. Those latter scripts will tell you to DL updates if you need them and as far as I know things work with the latest versions. Since I'm less than clear, feel free to ask questions. i should be able to suppress my Inner Snark when I answer ;)

nsd45
07-05-2010, 04:42 PM
thanks that appears to have worked and for reference with me there is no need to suppress your inner snark it just makes posts more interesting to read lol

whoops spoke to soon lol new problem this time im stuck in a loop
this is what the graphical cli is saying


You have not yet slain the Boss Bat. He can be found in the Bat Hole, in the Nearby Plains.

You need to find your way into Cobb's Knob, Adventurer. Try looking around the Outskirts for a clue that might help you figure out that map we gave you.
Council of Loathing

You have not yet slain the Boss Bat. He can be found in the Bat Hole, in the Nearby Plains.

You need to find your way into Cobb's Knob, Adventurer. Try looking around the Outskirts for a clue that might help you figure out that map we gave you.
Checking step #7, 'OpenGuild'.
Working on quest step OpenGuild.
Entering guild challenge area...
Completing guild tasks...
Guild store successfully unlocked.
KoLmafia declares world peace.


ok i was able to bypass it by opening the guild before running it but i dont know if ascend was supposed to do that for me or if i was supposed to do it before running it. Sorry about all the questions.

me259259
07-15-2010, 01:17 AM
I'm thinking about buying this ascend.ash. I don't really care about the automatic ascension thing, all I really want it for is for farm.ash. Earlier in this thread people had mentioned issues with farm.ash. Have these issues been fixed?

Deathless Assassin
07-15-2010, 02:03 AM
Farm.ash runs into issues all the time for me that usually just involve me telling it to skip areas. Farm.ash is 100% NOT worth a Mr. A, it's just en extra to ascend.ash as far as I'm concerned.

fronobulax
07-15-2010, 03:28 AM
I'm obviously not an unbiased source. I actually have not paid much attention to farm.ash because I have been just running turns with Ascend. Most of the issues I have found are are with EatDrink or Bale's Universal Recovery or with scripts by others that ascend calls. I believe EatDrink is useful and it found a better diet than what I had been eating with my main. As a piece of Ascend I would like a better way to tell it to save meat. Bale's UR is wonderful, but in the context of Ascend it is very hard to manage meat and the UR parameters are constantly being tweaked to find the balance between healing so automation can continue and burning all my meat. In a perfect world there would be a way to handle Beaten Up better too, but that may be Ascend's problem. The problems with other people's scripts seems to be Ascend not getting the prerequisites right, but I'm hoping to work on that. Bottom line is I can't tell you that farm is worth it or not. Maybe I'll run it and have an opinion. I will note that I am amused when people ask if something is "worth" a Mr. A. I have a job. My Starbucks habit easily tops $10/week and if I stiff the waiter the next couple of times I go out to eat, I've got $10. So in the grand scheme of things, $10 is trivial for me. I suspect the people who are concerned about it are unemployed or young enough to to be my kids :cool:

Winterbay
07-15-2010, 05:16 AM
I'm thinking about buying this ascend.ash. I don't really care about the automatic ascension thing, all I really want it for is for farm.ash. Earlier in this thread people had mentioned issues with farm.ash. Have these issues been fixed?

There have been one fix posted for farm.ash in that it now takes the item_drops_array into account and does not crash from "map modified within foreach". I've been running that version for quite some time now and it works just fine and makes me roughly 150-200k per day. I have since managed to farm enough to buy two new Mr A. and is thus at a plus now :)

Banana Lord
07-16-2010, 06:11 AM
On the topic of eatdrink.ash, I've noticed this problem for quite a while now:
(file not found)
0 prices updated from http://zachbardon.com/mafiatools/updateprices.php?action=getmap
0 prices updated from http://nixietube.info/mallprices.txt
Followed by a lengthy process in which the script checks the mall price for (as far as I can tell) EVERY consumable in the game.

Winterbay
07-16-2010, 06:48 AM
On the topic of eatdrink.ash, I've noticed this problem for quite a while now:
(file not found)
0 prices updated from http://zachbardon.com/mafiatools/updateprices.php?action=getmap
0 prices updated from http://nixietube.info/mallprices.txt
Followed by a lengthy process in which the script checks the mall price for (as far as I can tell) EVERY consumable in the game.

The first one is because that tool does no longer exists and can be removed (as long as you instead check the little settings box that says "share prices with other users" or something similar. If you do, the second one can be commented out as well.

Banana Lord
07-16-2010, 06:51 AM
I figured that was the problem, but you never know (or at least I don't :P). I've already got that checked, have had since the option was there. Which is why this bug confuses me.

Winterbay
07-16-2010, 10:30 AM
You can try to set the variable "eatdrink_GetPriceServer" to false. That should make it not try and do that, hopefully it should not get stuck anywhere else either since you get your data from here. But it'd be worth a try I think :)

Banana Lord
07-16-2010, 10:35 AM
OK, done. I'll see how it goes tomorrow and report back :-) Thanks!

fronobulax
07-16-2010, 03:29 PM
And I should probably delete the reference to Zarqon's site...

Followed by a lengthy process in which the script checks the mall price for (as far as I can tell) EVERY consumable in the game.
Hmmm. I consider that normal behavior for the first session of the day. I suppose it would be nice to know when additional price checks are made.

Banana Lord
07-16-2010, 10:11 PM
Normal? Really? I'm sure I remember a time when it didn't have to do all that. Is it not very server unfriendly? Wouldn't it make more sense to load mallprices.txt as a map for provisional decisions, then double check prices manually before consuming. If the second (more up to date) price is too great a % above the previous "assumed" price, then look for something else. I don't know. Something along those lines. My point is, the current way seems very inefficient.

slyz
07-16-2010, 10:57 PM
On the topic of eatdrink.ash, I've noticed this problem for quite a while now:
(file not found)
0 prices updated from http://zachbardon.com/mafiatools/updateprices.php?action=getmap
0 prices updated from http://nixietube.info/mallprices.txt
Followed by a lengthy process in which the script checks the mall price for (as far as I can tell) EVERY consumable in the game.
Since revision 8351, the price updating process is handled internally by Mafia, if you checked "share mall price data with other users" in Preferences -> general. 0 prices are found on those servers simply because they aren't maintained anymore. Mall prices are now shared here on kolmafia.us.


Normal? Really? I'm sure I remember a time when it didn't have to do all that.
There are several versions of EatDrink floating around now, but the one I'm looking at has a eatdrink_maxAge zlib setting: try raising it to 2 or more so it uses older prices instead of checking for current ones.



Is it not very server unfriendly? Wouldn't it make more sense to load mallprices.txt as a map for provisional decisions, then double check prices manually before consuming. If the second (more up to date) price is too great a % above the previous "assumed" price, then look for something else.
This might be a good idea. On the other hand, once a user checks all the prices and shares them when logging off, the next users won't need to re-check them. Maybe it's not that server-unfriendly.


My point is, the current way seems very inefficient.
Then you should consider doing your own efficient consumption script and stop using dj_d's slightly out-of-date inefficient EatDrink.ash.

Banana Lord
07-16-2010, 11:09 PM
Since revision 8351, the price updating process is handled internally by Mafia, if you checked "share mall price data with other users" in Preferences -> general. 0 prices are found on those servers simply because they aren't maintained anymore. Mall prices are now shared here on kolmafia.us.
Oh I see. Is there somewhere similar to the old http://nixietube.info/mallprices.txt on kolmafia.us? What I'm asking is, what's the easiest way of getting access to mafia's price data?


There are several versions of EatDrink floating around now, but the one I'm looking at has a eatdrink_maxAge zlib setting: try raising it to 2 or more so it uses older prices instead of checking for current ones.
OK great, I'll give that a shot. Thanks!



This might be a good idea. On the other hand, once a user checks all the prices and shares them when logging off, the next users won't need to re-check them. Maybe it's not that server-unfriendly.
You have a point :-)



Then you should consider doing your own efficient consumption script and stop using dj_d's slightly out-of-date inefficient EatDrink.ash.
Oh I didn't mean any disrespect to dj_d or his script. I've been using eatdrink for a while now, and I'd be the last person to suggest it wasn't any good. I was just trying to think of ways to improve it (although, having such a limited knowledge of scripting probably invalidates most of what I can think of), it *is* still under unofficial development isn't it? I haven't been following this thread very closely.

Thanks again for your help! :-)

slyz
07-16-2010, 11:35 PM
it *is* still under unofficial development isn't it?
I think it's more on a life-support for Ascend.ash than in actual development.

The current mallprice data is gathered here (http://kolmafia.us/scripts/updateprices.php?action=getmap).

Banana Lord
07-16-2010, 11:46 PM
Fantastic! Thanks again!

fronobulax
07-17-2010, 01:08 AM
I'm the life support. At the moment I am merely trying to ease the pain of folks who paid for Ascend and then find it doesn't work from a mechanical standpoint. dj_d has said "my" changes will be incorporated so the patient may come out of the coma. That said, there are several things that annoy me about Ascend and if I figure out how to fix them, I probably will. My current big gripes are two. First there is no easy way to handle Beaten Up in an automated fashion. I think for my play style (which is a silly concept for a scripted run, except these are the cases where the script stops) I want something to either remove Beaten Up and the restore health to the Restore To setting OR adventure somewhere that is safe and useful until the effect is gone and then restore to the Restore To value. UR is a little too concerned with efficiency to be helpful, which is fine, except that Ascend doesn't seem to pick a safe place. Next, a side effect of all the automation is that lots of meat gets spent. Ascend needs to know about meat prerequisites and save some. Think buying forged ID docs or the Palindrome items. Finally (whoops, I said two) Ascend could make better choices when configuring the external scripts of Zarqon's that manage Levels 11 and 12. Currently I am only running Ascend on one character who was created for test purposes. My main has never ascended and probably never will and my primary multi is slogging through Bad Moon runs for a while.

HippoKing
07-19-2010, 11:37 AM
I have literally no idea why you have chosen to continue posting updates to this encrypted with his password, when that might encourage people to pay for something that is apparently entirely unfit for purpose - something he must have known when he started selling it, and definitely knew when he continued selling it and stopped developing it.

fronobulax
07-19-2010, 12:25 PM
I have literally no idea why you have chosen to continue posting updates to this encrypted with his password, when that might encourage people to pay for something that is apparently entirely unfit for purpose - something he must have known when he started selling it, and definitely knew when he continued selling it and stopped developing it.

You are certainly entitled to your opinion, in spite of your offensive presumption of other people's motivation.

I am supporting the script because I was seized by an apparently unappreciated desire to help out the people who had already bought it and could not get it to work. I password protect those things which were originally password protected because the script is dj_d's intellectual property, not mine, and he has not yet abandoned it. I find a contradiction between your complaint that the updates are protected and your statement that script is unfit for purpose.

I do not share your belief that the script is "unfit for purpose" but the root may be in the definition of "purpose". Ascend is not for people who already have an optimal Ascension strategy and want to automate it. It is not for people in Hardcore or Bad Moon unless they are masochists. It is for people who just want to automate a character for whatever reason where automation trumps optimality.

HippoKing
07-19-2010, 01:36 PM
I apologise for the offensive presumption and the fact that it sounds like I was directing much of my criticsm at you. I just found out from a friend the level to which this doesn't work (the script being sold won't even run without modification?) and I was fairly outraged.

Also, I do understand why you're supporting the script but I'm not sure why you're apparently now the guy to whom the issues get directed when dj_d's still receiving the money for it. I'm simply surprised that you are willing to prop up his business model in order to help out those who have been taken in. You're certainly a better man than I in that regard.

When I say "unfit for purpose", I do not mean that it is not an efficient ascender, or that it does not work in BM/HC. Obviously any script this complex must have limitations (although he should probably have explicitly stated 'no hardcore support' in the thread). I mean that it does not work in a way that literally could not have been missed because it will not run at all.

slyz
07-19-2010, 01:51 PM
(the script being sold won't even run without modification?)
Are the modifications you are talking about due to updates to Mafia? If so, that is mainly what Fronobulax is addressing.

If you are talking about configuring the script before running it, then I agree that something is "not working" alright, although I don't think it's the script.

If you are talking about other modifications/errors, please share them with the rest of us.

fronobulax
07-19-2010, 04:11 PM
@Hippo - It's all good. We can be civil and all is forgiven. You said it didn't work for your friend. Could you elaborate? It is not especially clear since I fail to update the first page of my thread and can't update the Ascend page, but to get things to work you have to have the original file, my latest changes in a protected zip file and, I believe, a version of EatDrink that has been posted separately. There should be a post a few pages back with links to everything I mentioned. Anything that is not the versions I mentioned will fail in some way. It would be helpful to know whether your friend's problem is that they were not aware of the updates or whether the updates fail in some way.

My altruism is somewhat irrational. Suffice it to say that I once was a professional writer of software and my career and salary progressed to the point that bean counters figured they could hire two or three recent college graduates for my salary and they could produce 90% of the code I did. So I look for projects where I can have fun and still feel like I am writing code. This is one of them.

Most of the changes have been mechanical ones because KoL or KoLmafia or zlib or Wossname or MacGuffin or Universal Recovery changed. Ascend would work as well, or as poorly, as it ever did without modifications if people ran the older versions of those things.

nsd45
07-25-2010, 06:35 PM
I just reached the point were i needed to use the buycrap script and im getting this as a message after it buys some of the stuff i need

Searching for "linoleum ore"...
Purchasing linoleum ore (3 @ 1,350)...
You acquire linoleum ore (3)
Purchases complete.
Searching for "milk of magnesium"...
Purchasing milk of magnesium (8 @ 915)...
You acquire milk of magnesium (8)
Purchases complete.
ERROR - one of the items in your purchase list is misspelled. To find out which one, run this script with SIM = true, and look at the items that occur in proximity to this error.
[none] has no matches.

can someone advise me on how to fix this and thanks ahead of time

Xenthes
07-26-2010, 03:26 AM
I use miner.ash found here (http://kolmafia.us/showthread.php?2883-Miner.ash-Automated-ore-farming&p=19560&viewfull=1) to do this part.

nsd45
07-26-2010, 04:41 AM
well i appreciate it but i still need to find a fix the buycrap script is stopping in the middle and there is more than just ore that needs to be bought but i do appreciate the script reference i might use it to collect the ore

slyz
07-26-2010, 08:43 AM
ERROR - one of the items in your purchase list is misspelled. To find out which one, run this script with SIM = true, and look at the items that occur in proximity to this error.
Just a wild wild guess here: try typing call BuyCrap.ash true in the gCLI. Then look at the items that occur in proximity of this error. Maybe one of the items in your purchase list is misspelled?

This is what I get when do this with the default Crap.txt bundled with Ascend:


> call buycrap.ash true

acquire 1 Boris's key lime pie
acquire 12 Hell ramen
acquire 1 Jarlsberg's key lime pie
acquire 18 Knob lo mein
acquire 1 Sneaky Pete's key lime pie
acquire 3 asbestos ore
acquire 18 bat wing stir-fry
acquire 3 chrome ore
acquire 1 clown wig
acquire 6 filthy poultice
acquire 1 grave robbing shovel
acquire 1 insanely spicy enchanted bean burrito
acquire 3 large box
acquire 8 line
acquire 3 linoleum ore
acquire 8 milk of magnesium
acquire 0 not-a-pipe
acquire 1 polka-dot bow tie
acquire 24 roll in the hay
acquire 0 single-serving herbal stuffing
acquire 12 star
acquire 2 star chart
acquire 60 twinkly wad
acquire 30 white pixel
acquire 0 17-ball
acquire 2 Mr. Accessory
acquire 0 Travoltan trousers
acquire 1 glow-in-the-dark wristwatch
acquire 0 haiku katana
acquire 0 little box of fireworks
acquire 1 palm-frond toupee
acquire 1 bubblewrap bottlecap turtleban
acquire 1 sword behind inappropriate prepositions
acquire 1 General Sage's Lonely Diamonds Club Jacket
acquire 1 Meat maid
acquire 1 bartender-in-the-box
acquire 1 chef-in-the-box
acquire 1 dope wheels
acquire 1 filthy corduroys
acquire 1 filthy knitted dread sack
acquire 1 meat engine
acquire 1 ring of conflict
acquire 4 sonar-in-a-biscuit
acquire 1 Knob Goblin harem pants
acquire 1 Knob Goblin harem veil
acquire 2 Knob Goblin perfume
acquire 1 7-Foot Dwarven mattock
acquire 5 disassembled clover
acquire 1 miner's helmet
acquire 1 miner's pants
acquire 1 pool cue
acquire 1 dingy planks
acquire 1 dungeoneer's dungarees
acquire 6 goat cheese
acquire 1 30669 scroll
acquire 1 64067 scroll
acquire 1 668 scroll
acquire 1 The Big Book of Pirate Insults
acquire 1 eyepatch
acquire 1 stuffed shoulder parrot
acquire 1 swashbuckling pants
acquire 1 dusty bottle of Marsala
acquire 1 dusty bottle of Merlot
acquire 1 dusty bottle of Muscat
acquire 1 dusty bottle of Pinot Noir
acquire 1 dusty bottle of Port
acquire 1 dusty bottle of Zinfandel
acquire 1 bird rib
acquire 1 drum machine
acquire 1 ketchup hound
acquire 1 lion oil
acquire 1 stunt nuts
acquire 0 tomb ratchet
acquire 1 E-Z Cook Oven™
acquire 1 cocktailcrafting kit
Done!

fronobulax
07-26-2010, 02:13 PM
I have not encountered BuyCrap problems so I will eventually investigate.

New version of EatDrink. I hosed my minimal configuration management so I'm not quite sure what the changes are. The posted version works mechanically, has known "looping" bugs fixed, fixes the inadvertent fork and thus has special processing for key lime pies, and now understands about negative modifiers when selecting food and drink. It also will ignore the fancy chocolate type items unless you can shop.

It still tries to update prices from nixietube. That is deliberate since nixietube is the backup in case prices are unavailable from kolmafia.us

Xenthes
07-26-2010, 03:57 PM
I am getting

Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 62) when I run ascend.ash with the new version of EatDriink.ash

I am using 8554 version of mafia.

fronobulax
07-26-2010, 04:24 PM
I am getting

Function 'eatdrink( int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, int, float, boolean, int, boolean, int, int, int, boolean, int, int, boolean, int )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 62) when I run ascend.ash with the new version of EatDriink.ash

I am using 8554 version of mafia.

Works for me. There is only one float parameter. My version of Ascend calls ...float, boolean, int, int, int, int, boolean... EatDrink's signature is the same. Your version is calling ...float, boolean, int, boolean, int,...

My knee jerk reaction is that we are not running the same version of Ascend. Since I did not deliberately change any of the calls to EatDrink, perhaps there is some local modification that you made and forgot about?

My Ascend line 62 looks like
eatdrink (fullness_limit(), 0, 0, false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, 600, 10, 1,
false, 999999999, 999999999, false, 0);
My guess is the error you are getting is in close proximity to the "600".

I will verify all this tomorrow when I have characters who have both turns and room to eat and drink.

Xenthes
07-26-2010, 08:38 PM
Its possible I accidentally changed something in ascend.ash when I was poking around how to get eatdrink to work in my castle farming script, but it was working until I put in the new version of EatDrink. I'll double check.
My line 62 looks exactly like yours.


//NOTE: can be richer, if you want the best you can get while you're
//low level
eatdrink (fullness_limit(), 0, 0, false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, false, 600, 10, 1,
false, 999999999, 999999999, false, 0);
foodabort = true;
return true;
}
if (!spleenabort && (my_spleen_use() < spleen_limit())) //then spleen
{
eatdrink (fullness_limit(), 0, spleen_limit(), false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, false, 600, 10, 1,
false, 999999999, 999999999, false, 0);
spleenabort = true;
return true;
}
if (!drinkabort && (my_inebriety() < inebriety_limit())) //then drink
{
eatdrink (fullness_limit(), inebriety_limit(), spleen_limit(), false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, false, 600, 10, 1,
false, 999999999, 999999999, false, 0);
drinkabort = true;
return true;
}
if ((my_inebriety()) == inebriety_limit()) //then overdrink
{
eatdrink (fullness_limit(), inebriety_limit(), spleen_limit(), true,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, false, 600, 10, 1,
false, 999999999, 999999999, false, 0);
if (!can_interact())
{
print("Using up pulls.");
pullcrap();
}
boolean temp = cli_execute("maximize Adventures");
if (exit_when_done)
cli_execute("exit");
abort("Finished dinner. Goodnight!");


Just added the whole chunk of what I have to verify that is as it should be.

Also, I know there are editors that show line numbers. Could someone suggest one for a windows XP machine. thanks.

heeheehee
07-26-2010, 08:55 PM
Notepad++ (http://notepad-plus-plus.org/) works nicely.

Theraze
07-26-2010, 09:52 PM
From the looks of things, the problem is with Xenthes' EatDrink.ash file, not with the Ascend.ash file... the issue is that the definition of the EatDrink function is returning improperly, not the call itself. Maybe grab fronobulax's latest EatDrink and make sure that it's the same as your current one?

Xenthes
07-26-2010, 09:55 PM
I started having the problem when I grabbed fronobulax's newest EatDrink.ash.

Xenthes
07-26-2010, 09:56 PM
Notepad++ (http://notepad-plus-plus.org/) works nicely.

Got it. Thanks heeheehee. looks nice from the couple of minutes I looked at it.

heeheehee
07-26-2010, 10:13 PM
I think I got it --

eatdrink (fullness_limit(), 0, 0, false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, false, 600, 10, 1,
false, 999999999, 999999999, false, 0);

isn't the same as

eatdrink (fullness_limit(), 0, 0, false,
true, true, true, false, true,
true, 10000, 1.25, true, 1800, 600, 10, 1,
false, 999999999, 999999999, false, 0);

(You see that "1800, false, 600"? Remove the "false" and it should work nicely. All three times, I suppose.)

fronobulax
07-26-2010, 11:16 PM
Thanks heeheehee. That is what I was trying to describe.

I use vim (http://www.vim.org/) as my text editor for Windows, and it has line numbers, but that is mostly because I have deep roots in *nix systems and using vim is easier than retraining.

Xenthes
07-27-2010, 03:50 AM
Thanks heeheehee. I changed it now. No idea how that would have been changed in the first place. Especially on all three lines and why it took until the newest fronobulax version of eatdrink to make it error out. I'll try it after rollover and see if that fixed it.

Yeap, taking out that extra false did it. I also found two more places where that occured, Lines 108 and 123

Winterbay
07-27-2010, 07:43 AM
Thanks heeheehee. I changed it now. No idea how that would have been changed in the first place. Especially on all three lines and why it took until the newest fronobulax version of eatdrink to make it error out. I'll try it after rollover and see if that fixed it.

Yeap, taking out that extra false did it. I also found two more places where that occured, Lines 108 and 123

You may have once made a "search and replace" for something and replaced some too many of that thing I guess, or replaced it with the wrong thing. I've done that a couple of times :)

GhettoTrucker
08-05-2010, 07:33 PM
Excuse me if this is an entirely ridiculous question... I've had this package for about 6 months now, and have been frustrated with it for about 6 months. Is there a package with the modified scripts that will work mostly out of the box? I know I have to configure preferences, etc. But I just want to be able to use it! At the very least I want to be able to use the farm.ash script...

catatonicmonkey
08-05-2010, 11:02 PM
Up until yesterday, I was running farm.ash to run my farming turns without any difficulty. However, after about 2pm server time yesterday, every time I ran the script (and I've tried it on multiple characters and computers), it breaks because it tries to adventure belowdecks without wearing the pirate fledges. Is there a way to fix this?

Theraze
08-05-2010, 11:28 PM
Does one of your characters have the fledges and others not? I find that sometimes, scripts get confused regarding which character has which equipment. Manually making a checkpoint, or completely closing (not just logging off) will usually fix this.

fronobulax
08-06-2010, 01:54 AM
Excuse me if this is an entirely ridiculous question... I've had this package for about 6 months now, and have been frustrated with it for about 6 months. Is there a package with the modified scripts that will work mostly out of the box? I know I have to configure preferences, etc. But I just want to be able to use it! At the very least I want to be able to use the farm.ash script...
It depends what is frustrating you. The mechanical problems have been dealt with although I confess I have not made that easy to find. DL the zip attached here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30495&viewfull=1#post30495) and eatDrink.ash from here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=32859&viewfull=1#post32859). Unzip the zip into your scripts directory overwriting anything necessary. Then replace EatDrink with the latest one. That is out of three boxes but it "works". I have a character devoted to testing it and assurances from dj_d that he will incorporate "my" changes.

If you have more specific things that don't work, post here and I may be able to address it.

catatonicmonkey
08-06-2010, 06:47 PM
Does one of your characters have the fledges and others not? I find that sometimes, scripts get confused regarding which character has which equipment. Manually making a checkpoint, or completely closing (not just logging off) will usually fix this.

The characters in question have both finished the main game and are farming in aftercore. One is level 24, the other is level 40. They both have fledges. The script simply doesn't try to equip them to adventure where they're needed.

halfvoid
08-06-2010, 08:03 PM
The characters in question have both finished the main game and are farming in aftercore. One is level 24, the other is level 40. They both have fledges. The script simply doesn't try to equip them to adventure where they're needed.

The same thing happens in every zone that requires an outfit or item to be equipped to adventure there, not just the pirate zones. I don't think there's functionality built into farm.ash to accommodate that.

fronobulax
08-07-2010, 01:41 AM
I think that is correct - outfit management is not explicitly handled. Mafia will equip the continuum transformer automagically and I would expect there is a presumption that the fledges or outfit would be equipped. I ran across the opposite problem - I had the elite guard uniform equipped and when the decision was made to level up in the lab it kept trying to shop. I have been focused on the Ascend portions but maybe I should try farm too.

fronobulax
08-10-2010, 04:21 PM
outfit_change.ash? For some weird reason i though this was an ascend.ash thread
Phew. Glad it's not something I am going to worry about. For the record the following are the Ascend scripts that as far as I know are only available to purchasers of the package:
Ascend Status.ash
Ascend.ash
dailygrind.ash
farm.ash

The following are dj_d scripts that are used by Ascend but available elsewhere:

BuyCrap.ash
EatDrink.ash
LevelUp.ash
PullCrap.ash
ver.ash

The following are zarqon scripts that are packaged with Ascend but available elsewhere:

canadv.ash
macguffin.ash
wossname.ash
zlib.ash


I am slowly gathering and testing pieces so that dj_d can make my work "official" with a new release. Above is subject to change but that is the list as I have it now.

Update:
It would seem that Dreamthief(?) chose to delete the posts that triggered this. The basic content was that Ascend was throwing an error about outfit_change.ash. outfit_change.ash is not an Ascend script and the problem was traced to multiple versions of macguffin.

icon315
08-13-2010, 03:12 AM
This happened while running ascend.ash

Have 1 miner's helmet. Total needed is 1.
13 pulls remaining. Attempting to pull 1 miner's pants.
Have 1 miner's pants. Total needed is 1.
13 pulls remaining. Attempting to pull 1 pool cue.
Have 1 pool cue. Total needed is 1.
13 pulls remaining. Attempting to pull 1 dungeoneer's dungarees.
Have 1 dungeoneer's dungarees. Total needed is 1.
13 pulls remaining. Attempting to pull 6 goat cheese.
Have 0 goat cheese. Total needed is 6.
Pulling items from storage...
8 pulls remaining,0 budgeted for automatic use.
with pulling, got a total of 5
didn't get enough from pull.

Why did it pull the goat cheese? i already did the Tr4pz0r's Quest....i could really have used those pulls

fronobulax
08-13-2010, 12:08 PM
Why did it pull the goat cheese? i already did the Tr4pz0r's Quest....i could really have used those pulls
Good question. I'll try and get an answer for you, but my initial guess is that PullCrap only looks at level and not whether something is needed or not.

icon315
08-13-2010, 03:55 PM
Yeah, it's kind of annoying, because before it also pulled lots of stuff i didn't need anymore or have already

Theraze
08-13-2010, 03:57 PM
Should it maybe have an available check in it, so it only pulls if (requested - available) > 0?

heeheehee
08-13-2010, 03:59 PM
And also a check of the Trapper's state? (is pulling goat cheese even worth it? I mean, you miss out on possible goat's milk drops!)

icon315
08-13-2010, 04:01 PM
also true....i might just remove the whole pulling process from the script. since I can make better pulling decisions

fronobulax
08-13-2010, 04:25 PM
Since the "offending" script is PullCrap and there is some possible user configuration, it might be worthwhile looking at what is pulled and when, and configuring Crap.txt. Might be more satisfactory than ripping things out and replacing them. OTOH Ascend is clearly not optimized for anything but automation, IMO.

icon315
08-13-2010, 04:28 PM
Yeah i know. i'm not expecting to ascend in 2 days using this, but i still think decisions like this should be thought over by the script

Theraze
08-13-2010, 04:44 PM
Just a note... earlier EatDrink posts have redirects to the next version as it came out, so that it's easy to follow what changes happened, etc... This didn't happen though for posts 40, 59, and 107. I know 107 is the newest, so it wouldn't have a redirect, but 59 would redirect there if updated, and 40 would redirect to 59... Or, y'know, the old files could just get removed or hope that people don't follow links to them or whatever... Just noticed it as I was rereading the whole thread for some bizarre reason today. :D

fronobulax
08-13-2010, 06:15 PM
Just a note... earlier EatDrink posts have redirects to the next version as it came out, so that it's easy to follow what changes happened, etc... This didn't happen though for posts 40, 59, and 107. I know 107 is the newest, so it wouldn't have a redirect, but 59 would redirect there if updated, and 40 would redirect to 59... Or, y'know, the old files could just get removed or hope that people don't follow links to them or whatever... Just noticed it as I was rereading the whole thread for some bizarre reason today. :D

I'm sure it makes sense to you, but I get the sense that I am bring asked to do something but can't figure out what. Maybe retry using words of three syllables or less? Not your fault. I'm especially dense today.

fronobulax
08-13-2010, 06:23 PM
PullCrap (http://kolmafia.us/showthread.php?1551-PullCrap!-A-script-to-buy-stuff-before-ascension-and-pull-it-after.&highlight=PullCrap) has some documentation on how to edit the Crap.txt file. It certainly seems to me that deleting goat cheese out of the file will keep it from pulling goat cheese - whether the quest has been undertaken or not. I think a smarter pull strategy will probably require significant rework.

Theraze
08-13-2010, 07:55 PM
Post 1 points to the newest EatDrink script file, found in post 107. See Post 1:
Update: Latest version of EatDrink is here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=32859&viewfull=1#post32859).

Post 9 though, the first update, links to post 17, like this:
UPDATE: This isn't the version of EatDrink you are looking for. Try here (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30471&viewfull=1#post30471).

Post 17 links to post 40 like so:
Update: This isn't the version of EatDrink you are looking for. This (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=30725&viewfull=1#post30725) is.

What I was asking about was, posts 40 and 59 don't have link tips, they're just there. It's not NEEDED, per se, but if people linked to those in other posts, could have people download the wrong one and complain it doesn't work right.

And I think I hid all three segment words. :) More messy and harder to read, but at least the words are short. ;)

tgetgel
08-13-2010, 08:15 PM
PullCrap has some documentation on how to edit the Crap.txt file. It certainly seems to me that deleting goat cheese out of the file will keep it from pulling goat cheese - whether the quest has been undertaken or not. I think a smarter pull strategy will probably require significant rework.

Agree, but lacking that, perhaps a guide would be of assistance for when to modify crap.txt during a run. Milestone based? Complete this, then change this.
I suppose a between battle script could be used to replace crap.txt with another file that has the updates based on the previous adventure. This would require the creation of a number of files that match the states and conditions. This could be numerous files. Do yiou then have to refresh the scripts to recognize the new .txt file?

Theraze
08-13-2010, 08:29 PM
Better would probably be having it check the individual pull when you get to that quest... if, at the point of talking to the Hermit, you want to pull the cheese, it does. Then and only then.

If the item is needed during a combat, the pull check can be done at the step before that... when you beat your shadow, if you still need WAND and don't have, either pull or abort script depending on settings, don't fight the NS and fail...

fronobulax
08-14-2010, 03:54 PM
@Theraze - I get it. If someone searches for the latest version of EatDrink and finds a post with a file they should be warned if that is no longer the latest version. I have updated the posts to refer back to the First Post which has a link to the latest version. Next time around I will just update the first post with the script itself and post a pointer to it at the end of the thread. Since I wasn't thinking I have scattered files throughout this thread and will now try and make sure that someone who wants the latest only has to look at the first post.

@PullCrappers - (Why does that sound like something you might do at a plumbing supply store?). I think we have drifted from Bug to Feature. It sounds like the desire is to make PullCrap smarter and make pulls for quest items conditional upon whether the quest has already been completed. I'm not sure how easy that will be because I don't recall any direct ash support that would let me determine whether a quest has been done or not. I'll keep this in mind but it is not something that I am likely to deal with any time soon. However I will certainly incorporate someone elses changes to PullCrap and Crap.txt that seem appropriate and of universal interest.

Thanks.

icon315
08-14-2010, 04:09 PM
I don't recall any direct ash support that would let me determine whether a quest has been done or not.
you can do a visit_url("") for example, for the goat cheese thing



//
//Technical stuff
//
log = visit_url("questlog.php?which=2")

int item_count() {
item x = $item[goat cheese];
int counter = item_amount( x ) + closet_amount( x );
return counter;
}
//
//END
//

if (!contains_text("Am I my Trapper's Keeper?"))
pull("goat cheese", (6 - item_count(x)))
else
{
print("Done with the quest; Skipping...")
}

Winterbay
08-15-2010, 09:59 AM
I know that farm.ash really isn't included in this update but I thought that I should mention these small changes that I made recently since I decided my non-ascending farmmulti should get to try out the Sea a bit. In order for it to fairly take the fact that every turn takes two turns I added this code after the part that modifies the return from the Winecellar (line 724 in my version, can't remember if I did any other changes earlier):



//The sea locations take two turns each (unless fishy is active), thus halve the expected result.
if((have_effect(to_effect("fishy")) == 0) && (loc == to_location("The Briny Deeps") || loc == to_location("The Brinier Deepers") || loc == to_location("The Briniest Deepests") || loc == to_location("An Octopus's Garden") || loc == to_location("The Wreck of the Edgar Fitzsimmons") || loc == to_location("Madness Reef") || loc == to_location("The Mer-Kin Outpost") || loc == to_location("The Marinara Trench") || loc == to_location("Anemone Mine") || loc == to_location("The Dive Bar")))
{
mon_meat = mon_meat / 2;
}


In order for this farming to work you need to equip some kind of underwater thingie to your familiar as well so had to add this shortly before the farm-part:



if (results[i].loc == to_location("The Briny Deeps") || results[i].loc == to_location("The Brinier Deepers") || results[i].loc == to_location("The Briniest Deepests") || results[i].loc == to_location("An Octopus's Garden") || results[i].loc == to_location("The Wreck of the Edgar Fitzsimmons") || results[i].loc == to_location("Madness Reef") || results[i].loc == to_location("The Mer-Kin Outpost") || results[i].loc == to_location("The Marinara Trench") || results[i].loc == to_location("Anemone Mine") || results[i].loc == to_location("The Dive Bar"))
equip (to_item("little bitty bathysphere"));

(I only have the bathysphere so far)

Also: Is there a good way to indicate all zones underwater or do you have to use that wonderful long conditional that I have?

heeheehee
08-15-2010, 04:01 PM
Patched together from bits of profit_fx.ash, which I haven't really touched much in like forever:


boolean sea;
string [string,string,boolean,location] locations;
string [location] container;
file_to_map("adventures.txt", locations);
foreach zone, url, something, loc, cond in locations {
container[loc] = zone;
}
if(container[results[i].loc]=="The Sea") sea = true;


Edit: Or, in a function-format:


boolean sea(location l) {
string [string,string,boolean,location] locations;
string [location] container;
file_to_map("adventures.txt", locations);
foreach zone, url, something, loc, cond in locations
container[loc] = zone;
return (container[l]=="The Sea");
}

Winterbay
08-15-2010, 05:45 PM
Edit: Or, in a function-format:


boolean sea(location l) {
string [string,string,boolean,location] locations;
string [location] container;
file_to_map("adventures.txt", locations);
foreach zone, url, something, loc, cond in locations
container[loc] = zone;
return (container[l]=="The Sea");
}


Looking in my data folder I seem to have no "adventures.txt" is this missing from my mafia installation or is it something you have pieced together yourself?

Theraze
08-15-2010, 05:56 PM
Run "update data" and see if that copies in the file?

Grotfang
08-15-2010, 06:00 PM
Run "update data" and see if that copies in the file?

I wouldn't advise that. Adventures.txt should already be inside mafia. Instead of running update data (if you think .txt files might be out of date) it is generally a better idea to grab a newer build of mafia.

However, I doubt this is the case here. Just try running the code snippet.

Winterbay
08-15-2010, 07:37 PM
> ash boolean sea(location l) { string [string,string,boolean,location] locations; string [location] container; file_to_map("adventures.txt", locations); foreach zone, url, something, loc, cond in locations container[loc] = zone; return (container[l]=="The Sea"); } location test = to_location("The Briny Deeps"); sea(test);

Returned: true


Seems to be working. Still no adventures.txt though.

heeheehee
08-15-2010, 08:12 PM
Yeah, Grotfang hit the nail here -- adventures.txt is one of Mafia's internal datafiles, so it comes prepackaged with the jar (or exe, whatever you use). Mafia will use the built-in one, unless you have another file called "adventures.txt" in your \data folder.

Ferdawoon
08-24-2010, 01:13 PM
I have to say, this whole jumping around the forums for the latest version of everything is a bit of a treasurehunt in itself..
Would it not be easier to just update the first post with the latest versions and links?
Atm I have been scanning the "official" ascend thread for the latest versions and now I'm searching this thread for the latest of everything as well, and I'm not really sure which one is indeed the latest version.

fronobulax
08-24-2010, 02:26 PM
I have to say, this whole jumping around the forums for the latest version of everything is a bit of a treasurehunt in itself..
Would it not be easier to just update the first post with the latest versions and links?
Atm I have been scanning the "official" ascend thread for the latest versions and now I'm searching this thread for the latest of everything as well, and I'm not really sure which one is indeed the latest version.

Well you should probably read the first post just so you understand why things are the way they are. It is my hope that the first page in this thread will always contain the latest versions "according to me". If that is not the case please give me a specifics and I will try and update the first page so that it has the latest.

Note that I have been delaying tweaking the zip file because I keep thinking I am close to getting a couple changes out. Perhaps I should raise the priority on that.

I think you should also understand that there are really three classes of scripts here and that makes it difficult to really manage a complete package. One class of scripts are scripts that were written by dj_d and that were sold to users. Those scripts need to remain "protected" until such time as dj_d releases them for free. If my notes are correct the pay scripts are: Ascend Status; Ascend; dailygrind; and farm. The second class of scripts were written by dj_d but released to the public. These include BuyCrap; EatDrink; LevelUp; PullCrap and ver. Each one of these has a thread devoted to them and I try and cross-link so that Ascend owners only have to check this thread. But, since I am not the thread owner, there is a limit as to how much I can do in those threads. Finally there are scripts written by others and used with permission. They are maintained separately and it would be somewhat presumptuous to post changes in an Ascend thread. These scripts are canadv; macguffin; wossname and zlib, all maintained by zarqon.

So you are unlikely to have one stop shopping although it will be easier if I release a newer zip file. I suppose I should just redo the first post and include all of the above links and then you will at least have one place to check.

Since Ascend is in an awkward place where dj_d doesn't have the time to maintain it but has not abandoned it there will be the Official and Unofficial threads and the latest version that works will be in the Unofficial thread.

Ferdawoon
08-24-2010, 06:06 PM
Ahh, well true, that make it sound a lot more complicated. it is just that I cant shake the feeling that I have missed something and that any failure I see in the program is due to me missing some configuration I need to do or that I have downloaded a previous version.
Well, I got the ascend.ash script earlier today, going to see if I cant read through it andfigure out how it works. Is there any ReadMe for these files on how to config?

fronobulax
08-24-2010, 07:08 PM
Ahh, well true, that make it sound a lot more complicated. it is just that I cant shake the feeling that I have missed something and that any failure I see in the program is due to me missing some configuration I need to do or that I have downloaded a previous version.
Well, I got the ascend.ash script earlier today, going to see if I cant read through it andfigure out how it works. Is there any ReadMe for these files on how to config?

Instructions are on my ToDo list but I am not there yet. From my notes - you really want to DL and configure Bale's UR and zarqon's SmartStasis. The former doesn't have much configuration if you use the associated relay browser script. The latter has instructions on the first page. These scripts are not required but if you use them you are less likely to have to deal with some things manually. There are mafia settings to automatically identify spheres and DoD potions that you want to enable. It is kind of hard to determine who is in charge (mafia or Ascend) on all the choice adventures but it is worth checking them, just in case it is mafia. You need to define an outfit named melee which will be what you wear all of the time. As you level up and gain items you will need to revisit the definition of melee. You will need to configure wossname according to zarqon's instructions. The important ones are which war plan to use. Either wossname or macguffin uses default (IIRC) as the name of the preferred outfit. You probably want to change that to melee. Running in full auto will consume a lot of meat. Until I release my changes to manage that you may want to closet your meat once in a while. However Ascend is sometimes smart enough to accumulate meat before it needs it so if you closet too much you will burn turns farming. There is an Acceptable damage parameter that may need to be tweaked. The default, which IIRC is 25% often works but raising it increases both the likelihood that automation will continue and the likelihood that play will be conservative. You definitely need to set up a CCS. Besides the Protector Spectres, I'm not sure what else has to be in it if you use SmartStasis.

Hope this helps. I'm only running one character with Ascend and I've only completed one ascension. My focus is still mechanical since the official version did not work with updated wossname, macguffin and/or zlib. And EatDrink had some infinite loops...

As a general rule, Ascend is for people who favor automation over everything else. It does little to nothing in terms of outfit and familiar management and most hardcore players get mad when it makes suboptimal choices.

But the whole point of this thread is to help folks who have the script so feel free to ask.

fronobulax
08-24-2010, 11:28 PM
OK. I put everything in one zip file available in the first (http://kolmafia.us/showthread.php?4202-The-Unofficial-Ascend.ash-support-thread.&p=29924&viewfull=1#post29924) post. Only change not mentioned (somewhere) above is putting EatDrink on a meat diet. There is a new variable, ascend_EatDrinkBudget, that is set to the maximum amount EatDrink is allowed to spend per day. The budget is enforced by closeting all meat above the remaining budget before calling EatDrink and uncloseting it afterward.

nsd45
09-13-2010, 12:39 PM
I was just running ascend and kolmafia stopped and redirected me to a choice menu for the new spooky Forrest adventure and i wasn't sure if that was an ascend thing or a mafia thing i currently have last weeks build if that helps.

fronobulax
09-13-2010, 02:54 PM
I was just running ascend and kolmafia stopped and redirected me to a choice menu for the new spooky Forrest adventure and i wasn't sure if that was an ascend thing or a mafia thing i currently have last weeks build if that helps.

Not sure. Mafia now recognizes the choice adventures. Ascend adventures in the Spooky Forest looking for specific items. What I am not sure of is whether you have to manually configure mafia to make the right choices or whether setting them as goals will be sufficient. I'll try and investigate but no promises. Real Life always gets busy in September.

nsd45
09-13-2010, 11:16 PM
Ok i will look into the mafia thing i just don't know enough to look into the script its self that's why i was asking and don't worry to much about it if you get to it you get to otherwise im not that concerned was just curious and wanted to make sure it wasn't a script problem

tgetgel
09-14-2010, 12:31 AM
It's a mafia thing about not knowing your selections for those choices. There is a post in a thread about the spooky forest with instructions on how to set the choices. Caveat - you always want the same choices.

This thread http://kolmafia.us/showthread.php?4771-Spooky-Forest-changes&highlight=spooky+forest

You do it from CLI.

fronobulax
09-15-2010, 12:02 PM
Just a heads up - there have been two reports of EatDrink unilaterally deciding to corner the boxen market. I dismissed the first one because mafia support was in a state of flux but I can't do that for the second. I will look at it but for the moment closet your meat or be careful of the use boxen, repair boxen and buy from mall settings when running EatDrink directly. If you let Ascend call EatDrink you are covered because the budget code that closets meat before calling EatDrink works.

Theraze
09-15-2010, 01:56 PM
I haven't seen this happen with updated copies of KoLmafia and EatDrink, but I hold it as immensely likely for people who don't update...

nakigara
09-16-2010, 05:37 AM
Hello.

I recently sent the Mr. A and received the password to ascend.ash

So, I was sleep deprived and drinking a bit, and decided to run farm.ash on one of my multi's.

seemed to run fine, I didn't really look too much at what it was doing, but shortly afterwards, I realized I had no idea where it spent the adventures, and realized they could have been in the slime tube or the sewers for all I know... I checked the clan basement logs, and my multi didn't adventure there (a bit of a relief...)

Anyways, is this an issue with farm.ash? or is there a (relatively) easy fix to prevent characters from adventuring in the clan basement?
I'd like to be able to mindlessly run the script without worrying about it interfering in these multi-player areas and what not.

I took a look through this thread, and didn't notice anything pertaining to clan dungeons, and I don't really know much about scripting, so figuring it out by looking at the text file wouldn't get me very far.

Thanks

Winterbay
09-16-2010, 07:48 AM
You can edit the script easily to avoid certain areas that you don't want to adventure in. The Slime Tube is in there by default I think, as is the tavern. Open the script up and there are lines at the beginning of it that explains how to do it.

nakigara
09-17-2010, 02:30 AM
Winterbay> thanks, I really didn't expect a response that quickly.

I took a look at the script, and I think I found the lines you were referring to.

I basically just copy/pasted one of the lines, so it looks like this:

setvar("farm_skip_" + replace_string(to_string($location["a maze of sewer tunnels"])," ","_"), true);

so, that should work, right? there is no need for me to list each sub-area since they won't open without first adventuring in the sewers, correct?

and, if anyone notices any errors/mistakes with that line, I'd greatly appreciate it.

thanks again for the info.

heeheehee
09-17-2010, 02:59 AM
That should work -- just note that setvar is a ZLib function that is only called if the value hasn't already been set. I suppose I could add in an option to my relay override for creating new ZLib variables, but I actually don't have that much free time on my hands. :P Maybe in the next few days, if I remember.

Winterbay
09-17-2010, 05:12 AM
That should work -- just note that setvar is a ZLib function that is only called if the value hasn't already been set.

And that also means that if you, for whatever reason, wants the script to go there again you must do that via either zlib in the gCLI or via a relay-editing-script.


I suppose I could add in an option to my relay override for creating new ZLib variables, but I actually don't have that much free time on my hands. :P Maybe in the next few days, if I remember.

That might be useful but I think that the copy-paste in the script is quite easy to use.

Drkirre
09-17-2010, 06:48 AM
Everything came through okay, but the bot is REALLY messed up, it seems. Either that or he intentionally filled the message with crazy stuff.
A (slightly modified) transcript is as follows:
Thank+you+for+the+Mr .+A% 21+I+hope+you+enjoy+ ascend.ash.++The+pas sword+is+% 27((REDACTED - it's behind a paywall for a reason! No, this isn't it!))% 27.+If+you+have+any+ questions% 2C+just+post+them+in +the+thread+at+www.k olmafia.us% 2C+which+I+check+reg ularly.++Enjoy%21++% 28note% 3A+this+account+is+n ot+regularly+monitor ed%29

The pass itself was.. well, it took a few tries to get it right, but I eventually managed it. Still kinda WTFark though.

xKiv
09-17-2010, 09:01 AM
That looks like it has been URL-encoded and hasn't been URL-decoded.
(and then had spaces added by this forum's software)

jamfan14
09-25-2010, 06:53 AM
I'm running farm.ash and right after its done calculating everything, the first adventure it attempts to adv in the spooky gravy barrow. But its not selecting an elemental fairy as my active familiar so I can't adventure there. How do I fix this?

halfvoid
09-25-2010, 08:49 AM
If you open up the data folder in your kol mafia folder you'll see some files named vars_(your character name).
open that up and insert the following text.

farm_skip_Spooky_Gravy_Barrow true

farm.ash will never attempt to farm there again.
you can use this same format to skip any other zones.

Winterbay
09-25-2010, 09:16 PM
If you open up the data folder in your kol mafia folder you'll see some files named vars_(your character name).
open that up and insert the following text.

farm_skip_Spooky_Gravy_Barrow true

farm.ash will never attempt to farm there again.
you can use this same format to skip any other zones.

While that would avoid the problem it doesn't solve it :)
In order to get it to actually choose an elemental fairy you would need to add something like



if(results[i].loc == $location[Spooky Gravy Barrow])
cli_execute("familiar spooky gravy fairy"); //Or any other elemental fairy you might have and want to use


on the line before "adventure(my_adventures(),results[i].loc);", which should be around line 950 or so.

Theraze
09-25-2010, 09:53 PM
But then you'd also have to have it check if you actually HAVE that familiar as well... if it doesn't have that check in naturally already.

Winterbay
09-26-2010, 07:40 AM
That was why I said you should edit the familiar name to one you have, or at least that was what I intended to write. I just wrote down the first one that came to my mind :)

Theraze
09-26-2010, 03:58 PM
What I mean is, the code should check for the familiar when it's trying to decide if it can farm there. :D If you don't have the familiar, the location is not a valid farming location. If it is, then it should automatically switch familiars to farm there. Optimally, it should switch them back when done.

Winterbay
09-26-2010, 09:47 PM
What I mean is, the code should check for the familiar when it's trying to decide if it can farm there. :D If you don't have the familiar, the location is not a valid farming location. If it is, then it should automatically switch familiars to farm there. Optimally, it should switch them back when done.

Ahh yes. That is true. I think that might be a communication problem between CanAdv and farm and the way that farm builds it map of how to farm at specific places.

fronobulax
09-27-2010, 12:48 AM
Ahh yes. That is true. I think that might be a communication problem between CanAdv and farm and the way that farm builds it map of how to farm at specific places.

I have found several instances where CanAdv is called by Ascend and it either returns an inappropriate location or Ascend fails to equip necessary items to adventure there. I'd love to look at that but my current highest priority with my limited time is to verify that EatDrink does what it is supposed to with the recent crafting changes. But yes, I think Winterbay has figured it out.

Drkirre
09-27-2010, 04:17 AM
Of note: It cannot handle switching to some form of elemental damage when fighting things resistant to physical. IE, protector spirits. It will just fight them over.. and over.. and over.. until it runs completely dry.

Theraze
09-27-2010, 04:40 AM
Well, CanAdv shouldn't equip the items automatically... it should just verify that it's possible. Though I suppose that it might be useful to have an optional boolean that you can pass for equip items for trip... but if you accidentally pass that on a check for which area to farm, you're looking at potentially 40-50 extra server hits. Better to just try to have an extra function added to zlib, since Zarqon made both of them, with a different name, named PrepAdv or something like that... call the variable and the area, and if it's possible to prepare you for the area, do it. Same checks that CanAdv should have for familiars being possible and the like, but equips one, or the outfit, or whatever is needed for the area.

If is_100_run is set to something besides 'none' and it requires a familiar besides the is_100_run option, CanAdv SHOULD return false... Whether or not it currently does so.

Theraze
09-27-2010, 04:41 AM
Drkirre, that'd be waiting for BatMan. But that's on hold while Zarqon waits for KoLmafia to better handle tracking ML in-combat.

ML might be a good project for me to try to work on, at least on spaded/known ML bits... they should either have a unique message or be detectable through checking equipment slots for items... the problem would be items with random levels.

For that matter, mobs using healing is still an issue... Still end up with mobs with -200 health or more displayed in the relay browser... and don't even get me started on the naughty sorority nurse. :D

Winterbay
09-27-2010, 05:08 AM
Of note: It cannot handle switching to some form of elemental damage when fighting things resistant to physical. IE, protector spirits. It will just fight them over.. and over.. and over.. until it runs completely dry.

Can't you handle that with a CCS in some way?


Well, CanAdv shouldn't equip the items automatically... it should just verify that it's possible. Though I suppose that it might be useful to have an optional boolean that you can pass for equip items for trip... but if you accidentally pass that on a check for which area to farm, you're looking at potentially 40-50 extra server hits. Better to just try to have an extra function added to zlib, since Zarqon made both of them, with a different name, named PrepAdv or something like that... call the variable and the area, and if it's possible to prepare you for the area, do it. Same checks that CanAdv should have for familiars being possible and the like, but equips one, or the outfit, or whatever is needed for the area.

If is_100_run is set to something besides 'none' and it requires a familiar besides the is_100_run option, CanAdv SHOULD return false... Whether or not it currently does so.

CanAdv returns true for the barrow if you are in a muscle sign, have a main stat above 40 and have at least one of the elemental fairies. Given that information I feel it is safe to say that the problem is farm.ash not handling special equipment needs, I don't think it handles cold protection for the icy peak either for example.

fronobulax
09-27-2010, 12:26 PM
To be clear - it is my belief that Ascend and those scripts that call CanAdv need to take some action to verify that the prerequisites for a location are actually in place before adventuring there. That is not currently the case. Part of the problem is just assembling the data and the actions to be taken before adventuring. I have found places where the required familiar is not used, where the required outfit is not worn, where the required protection is not in place and where the location is just not available. CanAdv loves to return the Haunted Kitchen even when SpookyRaven Manor has not been "discovered" and I seem to recall attempts to adventure on the Island before the a rowboat is available. So I think it is a known problem, with a fix that will be harder than trivial but a solution that needs to be implemented external to CanAdv.

@Drkirre - point noted, however it is actually buried somewhere in the documentation that there are some cases you will have to handle yourself by setting outfits. Ascend is actually calling MacGuffin and Wossname and it is my hope that Zarqon will address the issue there since most of the elemental special cases occur there. I'm not really aware of any other case Ascend expects to handle where a good CCS isn't enough. Which certainly suggests a quasi-universal CCS should be packaged with Ascend but... ;-)

Xenthes
10-06-2010, 04:44 PM
With the changes Jick did I am getting this error now:


Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)

Then the script stops. It doesn't matter what level the character is from what I can tell so far. I have tried it on a level 4, 10, and 13 character using daily build 8657.

fronobulax
10-06-2010, 07:35 PM
With the changes Jick did I am getting this error now:


Function 'explore_entire_city( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (Ascend.ash, line 1214)

Then the script stops. It doesn't matter what level the character is from what I can tell so far. I have tried it on a level 4, 10, and 13 character using daily build 8657.

I think your problem is a known and fixed. Consider using the version of Ascend on the first page of this thread.

Xenthes
10-06-2010, 07:56 PM
I am 99% sure I am. It was working yesterday but not today. I'll redownload from the first page and try again tomorrow.

fronobulax
10-07-2010, 12:27 PM
I am 99% sure I am. It was working yesterday but not today. I'll redownload from the first page and try again tomorrow.
OK. I'm leaning towards the 1% just because the function mentioned in your error is not called in the latest version and line 1214 does not seem to apply. Maybe there are multiple versions lying around in your scripts directory?

For other folks - I know EatDrink needs to be tweaked to handle the Ode and Milk changes. However as far as I can tell the tweak just adjusts the expected adventure gain and not the mechanics. I also discovered EatDrink will loop if you tell it to eat to an impossible fullness (or at least it happened once to me). I am not sure Ascend/EatDrink will do "the right thing" if you lack in-the-boxen or the new kitchen items and I suspect, although have not tried, that the demise of the Sewer will effect obtaining the meatcar and the dinghy planks.

Theraze
10-07-2010, 01:35 PM
It does indeed break the meatcar/dinghy. I fixed it myself yesterday by stopping the looping/failing execution and running "use chewing gum on a string" until I manually obtained a worthless item.

Ferdawoon
10-07-2010, 02:39 PM
Ok, skimmed the last couple of pages but couldnt find anything about this.
I am also not sure this is the proper thread to request a feature to Farm.ash but since they all come as a package I guess this is as good a place as any.

Without any clue how Farm.ash store all the data it gather each time, is it possible to get a prompter to ask the script to go directly to the Adventuring and Farming part and just use the last collected data when deciding where to go?
Just today, I started the script. Halfway through the script scanning The Mall I remembered that I did not have any buffs, such as Phat loot and Polka of Plenty. I cancelled and sent a request to the Buffbots. I got the buffs and restarted the script.
The Script then go through the whole The Mall scan and then cancel, as I had set Lunging Thrust-Smack as Action from me killing NS last night and the script had equipped me with a ranged weapon. I change Action to Attack with Weapon and restart the script.
Now the script go through the The Mall scan and spend 20 adv and then claim I cant adventure in the Middle Chamber in the Pyramid anymore (My HP and MP restorers are working and Mafia said nothing about me being Beaten up and yes, my Moxie is high enough to hit things). So now I scan The Mall for the 4th time hoping it will not do something crazy that cause me to have to restart it yet again.

slyz
10-07-2010, 03:31 PM
The good news is, the mall prices are stored by Mafia. In the example you gave, Farm.ash didn't look up the price for the same item twice, it just picked up the "scan" wherever you stopped it.

If you want to avoid finding the new mall prices every day, you can change the zlib farm_minAgeLookup variable, by typing for example zlib farm_minAgeLookup = 3 in the gCLI. In this case, it will only look up prices that are more than 3 days old.

Xenthes
10-07-2010, 04:00 PM
OK. I'm leaning towards the 1% just because the function mentioned in your error is not called in the latest version and line 1214 does not seem to apply. Maybe there are multiple versions lying around in your scripts directory?



I redownloaded the whole package and replaced the ascend.ash file. so far on the one character I have tried it on it working fine.

Ferdawoon
10-09-2010, 08:47 AM
Bad location value: "Sewer With Clovers" (canadv.ash, line 156)
Tried to run Farm.ash today, worked yesterday, and I got this. I use the mini-program to automagically download the latest Mafia so the version should be reasonably up to date.
My guess is that it is just because the Sewers simply do not exist anymore. =D

Theraze
10-09-2010, 01:37 PM
Actually, it's a problem with canadv.ash, one of the support scripts... just remove that line and the one following (unlucky sewer) from canadv.ash and you should be fine.

Ferdawoon
10-10-2010, 12:57 AM
For some reason I am stuck in the frame of mind that Ascend.ash and Farm.ash are just 2 scripts and I forget that they are each calling out to a few other scripts, and that if I can't find the proper lines in Ascend.ash or Farm.ash, that I might have to check another script!
Problem solved by just deleting the "lucky" sewer and the "unlucky" sewer!

jamfan14
10-10-2010, 09:16 PM
Actually, it's a problem with canadv.ash, one of the support scripts... just remove that line and the one following (unlucky sewer) from canadv.ash and you should be fine.

I did this (removed the two lines) and now I'm getting this error message

Begin index 0 greater than end index -1 (canadv.ash, line 147)

What now?

Theraze
10-10-2010, 11:44 PM
Most likely, you broke your boss bat or something like one of the other more complicated locations... for me at least, line 147 is the last line of the boss bat's lair. What's line 147 in yours?

The lines you should have removed are 156 and 157...

Also, are you using the latest daily build, or anything else? The sewers were recently removed... if you haven't updated, you'll need to do that before anything hermit-related will work, unless you want to do it manually yourself...

Drkirre
10-19-2010, 06:39 AM
There's daily builds of ascend.ash? O.o

Theraze
10-19-2010, 06:55 AM
Daily build of KoLmafia. If you're still using 14.0 or even up through 14.2, your sewering adventures are going to be painful. Since it doesn't exist anymore... :) To actually play and have things work well in any sort of automated way, you need to be using (at least until 14.3 comes out) the daily builds of KoLmafia.

fronobulax
10-19-2010, 01:21 PM
It is also not clear to me that Ascend will do the right thing in the Spooky Forest so I would advise opening the Temple manually. There is a lazy part of me that wants to delete it from Ascend and let macguffin handle it but I am really waiting to see of there is any good automation that I can "borrow".

Winterbay
10-19-2010, 01:36 PM
There was a "open temple" function posted somewhere, I think in the thread for BCC's ascend-script which I think could be incorporated into ascend.ash. Not 100% certain though.

Theraze
10-19-2010, 01:37 PM
The only 'difficult' part is whether you can get it to purchase one spooky sapling and change the choiceadventure. If so, perfection... automation is easy. Start with the larva, coin (which also gives 300 meat), turn in the coin, fertilizer, and then comes the fun.

Buy tree should have been planned next, or sell bar-skins if you have one which changes to sell all bar-skins if you have multiple. After that processes, if you haven't yet then buy a tree, and change choiceadventure to end. Shouldn't be too difficult since it updates your inventory normally. Can't use a between battle script for it though, because it never goes to between battle...

I think the whole choiceadventure thing for the tree needs to be done as a uniform choice, potentially through KoLmafia being recoded to allow for more logical settings, due to not being sure if it's currently limited in how to handle that. That could PROBABLY be done as an odd override currently... adv1 until you hit choiceadventure with your official choice being set to show in browser, then send specific additional pages as part of your script. Basically, make the script handle the deficiencies.

Balance check:
Negative... it pops up a mini-browser window.
Positive... it works and only buys a single tree, and can have it detect if there's 1, multiple, or no skins to sell while still in automation.

Edit: open_temple function is here. No bar-skin selling, but that's just a part of optimizing it imho.
http://kolmafia.us/showthread.php?4963-bumcheekcend.ash-A-zero-setup-semi-automated-ascension-script!&p=35629&viewfull=1#post35629

Fluxxdog
10-31-2010, 05:21 AM
With KoL's remodeling, Ascend will fail at the Untinker quest. In Ascend.ash, replace all instances of "town_right.php?place=untinker" with "forestvillage.php?place=untinker" and that should be solved. You should be able to find them on lines 464 and 470.

Bale
10-31-2010, 07:07 AM
With KoL's remodeling, Ascend will fail at the Untinker quest. In Ascend.ash, replace all instances of "town_right.php?place=untinker" with "forestvillage.php?place=untinker" and that should be solved. You should be able to find them on lines 464 and 470.

I don't use this script, but thanks for pointing that out. I need to fix one of my aliases.


alias openbeach => ash if(item_amount($item[sweet rims]) < 1 && item_amount($item[bitchin' meatcar]) < 1) hermit(1, $item[sweet rims]); retrieve_item(1, $item[bitchin' meatcar]); if(item_amount($item[Degrassi Knoll shopping list]) < 1) visit_url("guild.php?place=paco"); if(item_amount($item[Degrassi Knoll shopping list]) > 0) use(1, $item[Degrassi Knoll shopping list]); visit_url("guild.php?place=paco"); visit_url("forestvillage.php?place=untinker"); if(in_muscle_sign()) {visit_url("knoll.php?place=smith"); visit_url("forestvillage.php?place=untinker"); cli_execute("untinker bitchin' meatcar");}

redwulf25_ci
11-04-2010, 06:57 PM
Sounds like eatdrink.ash broke with the recent daily build. Anyone know what went wrong? I was also wondering if there were a recent update for farm.ash but i don't think that works right without eatdrink.ash.

Theraze
11-04-2010, 07:14 PM
I think the current guess is that pumpkins are hate? We'll see eventually. Didn't break for me, but then again, I'm running BM right now.

Ferdawoon
11-04-2010, 07:23 PM
Another Farm.ash problem.

Is there a built-in checker if I can actually adventure in a certain location before the script try to send me there?

After a few errors where it tried to equip an item I already had on, where it then bugged out as it apparently couldn't find the item (as it was already equipped) and aborted. I had to restart Mafia and strip down completly so that it could equip whatever item it wanted.

Just now, it tried to send me to the Themthar Hills even though I have defeated the NS and rescued the king, meaning the zone is closed to me.
After that it farmed the Astral cupcakes but after a while, 150:ish adv, it concluded that it could no longer adventure there as I couldnt hit anything. I had for some reason dropped to 0% hit and 0% evade after the script had done some gear changes and I suspect it was due to eqipping Bounty Hunter Rifle with me being a Muscle class. When things like that happen, can it be made so that it simply continue somewhere else or consider using some other piece of gear, instead of completly aborting, meaning I have to go through the maximizing yet again?

Speaking of that, I'd again like to comment about letting Farm.ash continue with the data already gathered instead of going through it all again.
Yes I know there is the command to stop it from scanning the Mall every time and instead let it do it every X days, but it still go through every zone and every item whenever I start it (non-simulation mode). That means, just as Farm have gone through all the maximising calculations it abort just because it wanted me to use the Bounty Hunter Rifle, causing me to be unable to hit anything in the location it want to farm. Restarting it will not really help as it will, after over half an hour of grinding maximising computations again, just end up doing the same thing.

Total of 3 drops. Monster worth is 1641 and frequency is 20.
DROP: eXtreme mittens worth 115. Drop rate is 5% with a modifier of 102% so actual freq is 10%
DROP: eXtreme scarf worth 110. Drop rate is 10% with a modifier of 102% so actual freq is 20%
DROP: Mountain Stream soda worth 58. Drop rate is 30% with a modifier of 102% so actual freq is 60%
Pickpocket only items are only considered for Disco bandits.
Monster eXtreme Cross-Country Hippy has 4 drop(s):
MEAT: base drop is 0 meat with a modifier of 270% and familiar bonus of 0 results in a drop of 0 meat.
Total of 4 drops. Monster worth is 67 and frequency is 20.
DROP: eXtreme mittens worth 115. Drop rate is 5% with a modifier of 102% so actual freq is 10%
DROP: Mountain Stream soda worth 58. Drop rate is 30% with a modifier of 102% so actual freq is 60%
DROP: snowboarder pants worth 110. Drop rate is 10% with a modifier of 102% so actual freq is 20%
Pickpocket only items are only considered for Disco bandits.
Monster eXtreme Orcish Snowboarder has 4 drop(s):
MEAT: base drop is 40 meat with a modifier of 270% and familiar bonus of 0 results in a drop of 148 meat.
Total of 4 drops. Monster worth is 215 and frequency is 20.
Average meat from combats is 384
Average meat from noncombats (hardcoded) is 0
Combat rate is 60
Total of 3 monsters; meat per adventure is 384
Best monster is Sk8 Gnome, worth 1641.
DROP: gr8ps worth 1661. Drop rate is 40% with a modifier of 102% so actual freq is 80%
DROP: sk8board worth 80. Drop rate is 5% with a modifier of 102% so actual freq is 10%
DROP: t8r tots worth 58. Drop rate is 40% with a modifier of 102% so actual freq is 80%
Monster Sk8 Gnome has 3 drop(s):
MEAT: base drop is 70 meat with a modifier of 270% and familiar bonus of 0 results in a drop of 259 meat.... and so on.. for half an hour or more, every time the script abort for whatever reason.
This is what I would like to be able to skip. Once the script start to acually adventure somewhere, store the gathered data, or at least the results, somewhere so that if I need to restart the script due to a bug in it or some other error, that I dont have to spend another half an hour going through the calculations.


I have now written this post in four chunks and adding bits here and there, so if it is a bit all over the place, I blame it on that.

Theraze
11-04-2010, 07:31 PM
Built in? No. But check out zarqon's CanAdv at http://kolmafia.us/showthread.php?t=2027 for a script that will (usually) figure out whether or not adventuring is possible.

Ferdawoon
11-04-2010, 08:40 PM
The Equip-error seem to happen every time now, where it try to eqiup an item that is already equipped and failing because I only have one such item and it cant find one to equip.
Plastic pumpkin bucket is the worst one atm when the script change familiars to see what is best.


Maximizing...
928 combinations checked, best score 320.59674
Putting Champi(nj)on the Baby Gravy Fairy back into terrarium...
Taking Masquerade the Cymbal-Playing Monkey out of terrarium...
plastic pumpkin bucket is better than (none). Switching items...
Stealing plastic pumpkin bucket from Demo the Attention-Deficit Demon...
Putting on plastic pumpkin bucket...
Adjusting familiar weight by -5 pounds
You don't have the item you're trying to equip.

Ferdawoon
11-04-2010, 08:45 PM
Built in? No. But check out zarqon's CanAdv at http://kolmafia.us/showthread.php?t=2027 for a script that will (usually) figure out whether or not adventuring is possible.
I have that one already as the Ascender use it. It seem to work somewhat in the Ascension script, or at least used to. Now it is stuck trying to make me Adv in the Degrassi Knoll as a Muscle sign, and have been trying to from lvl3 until I cleared Ronin at lvl9.
Will try to download it again and see if it help.. Only change I have made to it though is the limit to how much dmg I am willing to take in a round.

Theraze
11-04-2010, 09:00 PM
If you're properly using CanAdv it shouldn't do that... It does have checks and Degrassi Knoll is not available while in muscle sign...

Ferdawoon
11-04-2010, 09:09 PM
If you're properly using CanAdv it shouldn't do that... It does have checks and Degrassi Knoll is not available while in muscle sign...

Since I now broke Ronin and got full access to my Inventory and gear, Ascend will not adventure in the Degrassi anymore but rather happily keep on going with the quests as it should, so sadly I cannot reproduce the error anymore (and while I could I had no thought on posting about it here) but once I started Ascend it did its ususal thing, checking what quests had been done etc, and then opened the Degrassi Knoll in that little window you get when mafia say "You're on your own".

jamfan14
11-07-2010, 06:13 PM
I'm using farm.ash and it keeps on trying to adventure in the new tavern cellar. I changed my vars file to the following to avoid the zone

farm_skip_The_Tavern_Cellar true

What am I doing wrong?

I'm using the Build 8747

fronobulax
11-07-2010, 07:57 PM
Not sure. I wonder if it should be "farm_skip_Tavern_Cellar"? Alas, I'm not in any real position to check at the moment. I would also see if anyone has updated canadv in light of the Tavern revamp. (Just got back from a week out of town and off net and am somewhat dense at the moment).

slyz
11-07-2010, 08:04 PM
Yes, it should be "farm_skip_Tavern_Cellar".

leperkaun
11-10-2010, 05:10 AM
Watching the CLI output of the script I noticed that for the pirate insults nothing was really happening. Looking into it some (not the script itself) I realized that I didn't have a book of insults. I do not know what might be wrong or if this is normal (spending 60 or so adventures in the bar without the book). With the the book now I will see if the script will get the insults and continue on.

Theraze
11-10-2010, 05:18 AM
Are you low on cash? Were you when it first hit the pirate zone?

leperkaun
11-10-2010, 05:30 AM
750k meat. I've been farming with farm.ash on this character for a week or so now and I am level 23. I got past that now after I bought the book myself and wrote the book into the CCS.

Bale
11-10-2010, 05:37 AM
I've recently began playing seriously with EatDrink. I just want to share a little feature of my version so that you can add it to this version if you see fit. (My own version is not intended to be compatible with the version here, so I won't bother to post the whole thing.)

Basically, I like to be able to call EatDrink from the command line without needing an intricate alias. Since a lot of people have created these aliases to call EatDrink I suspect I'm not the only one that desires such a feature. I created a main() that accepts any and all parameters I want to control. If I don't list a parameter, then it will use the default. I call it like this:


> EatDrink 1200, sim, no stats, cookie = 2, pause = 0

Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Loading favorite consumables from user settings...
adding favorite: rockin' wagon
adding favorite: pr0n chow mein
adding favorite: twinkly wad
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 13 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 24000.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1200 meat. Muscle subpoint is 0.0. Nonprime stat subpoint is 0.0.
Simulating only; no purchases or food/drink/spleen consumption.
Pass 1: food.


> EatDrink 1500, no sim , overdrink,budget= 50000

Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Loading favorite consumables from user settings...
adding favorite: rockin' wagon
adding favorite: pr0n chow mein
adding favorite: twinkly wad
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's the mall. Per-item budget cap is 60000.004.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1500 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Pass 1: food.

Since I like to change value of adventure while playing with the script, any number by iteself is used the value of adventure. (Though you could also use Value_of_adventure = 1200 if you want to spell it out.) Any boolean can be set to false by prefacing it with "no ", just 'cause I like to do that. It will use the character's actual fullness, drunk and spleen limits unless you explicitly define them. The cookie value is a feature of my version I'm working on, so ignore it. Here's my main()


void main(string parameters) {
SIM_CONSUME = false;
int foodMax = fullness_limit();
int drinkMax = inebriety_limit();
int spleenMax = spleen_limit();
boolean overdrink = false;
matcher option = create_matcher("(?i)(?:(no) +)?([A-Za-z0-9_]+) *(?:= *([A-Za-z0-9]+))? *,?", parameters);
string var, val;
while(option.find()) {
if(option.group(1) == "no")
val = "false";
else if(option.group(3) == "0")
val = "true";
else val = option.group(3);

var = option.group(2);
if(var.is_integer()) {
val = var;
var = "value_of_adventure";
} else if(var == "sim")
var = "sim_consume";

switch(var.to_lower_case()) {
case "use_inv":
USE_INV = val.to_boolean();
break;
case "use_closet":
USE_CLOSET = val.to_boolean();
break;
case "use_storage":
USE_STORAGE = val.to_boolean();
break;
case "sim_consume":
SIM_CONSUME = val.to_boolean();
break;
case "supress_overdrink":
SUPRESS_OVERDRINK = val.to_boolean();
break;
case "shop":
SHOP = val.to_boolean();
break;
case "budget":
BUDGET = val.to_int();
break;
case "price_flexibility":
PRICE_FLEXIBILITY = val.to_float();
break;
case "consider_cost_when_owned":
CONSIDER_COST_WHEN_OWNED = val.to_boolean();
break;
case "cost_of_pull":
COST_OF_PULL = val.to_int();
break;
case "value_of_adventure":
case "voa":
VALUE_OF_ADVENTURE = val.to_int();
break;
case "value_of_prime_stat":
case "prime_stat":
case "prime":
VALUE_OF_PRIME_STAT = val.to_float();
break;
case "value_of_nonprime_stat":
case "nonprime_stat":
case "nonprime":
VALUE_OF_NONPRIME_STAT = val.to_float();
break;
case "pie_priority":
PIE_PRIORITY = val.to_boolean();
break;
case "price_of_nontradeables":
PRICE_OF_NONTRADEABLES = val.to_int();
break;
case "price_of_unknowns":
PRICE_OF_UNKNOWNS = val.to_int();
break;
case "sim_ronin":
SIM_RONIN = val.to_boolean();
break;
case "sim_level":
SIM_LEVEL = val.to_int();
break;
case "pause":
if(val == "false") pause = 0;
else if(val == "true") {
if(pause < 1) pause = 3;
} else pause = val.to_int();
break;
case "stat":
case "stats":
if(val == "false") {
VALUE_OF_PRIME_STAT = 0.0;
VALUE_OF_NONPRIME_STAT = 0.0;
}
break;
case "foodmax":
foodMax = val.to_int();
break;
case "drinkmax":
drinkMax = val.to_int();
break;
case "spleenmax":
spleenMax = val.to_int();
break;
case "overdrink":
overdrink = val.to_boolean();
break;
case "cookie":
cookie = true;
if(val.is_integer()) cookie_size = val.to_int();
break;
}
}
eatdrink(foodMax - cookie_size, drinkMax, spleenMax, overdrink);
}

Use it, modify it, throw it away as you see fit.

fronobulax
11-10-2010, 01:22 PM
@leperkaun - Shall I take your comments as a bug report that Ascend does not automagically get the Big Book of Pirate Insults? I'll check.

@Bale - Thanks. It looks like something worth including.

Edit: @Bale - just FYI, the snippet didn't deal with cookie and cookie_size which were presumably defined elsewhere. Easy fix ;-) I do miss the prompting for values so I don't have to remember a whole bunch of fiddly parameter names. I wonder if there is a way to do it either/or?

Bale
11-10-2010, 10:41 PM
Edit: @Bale - just FYI, the snippet didn't deal with cookie and cookie_size which were presumably defined elsewhere. Easy fix ;-) I do miss the prompting for values so I don't have to remember a whole bunch of fiddly parameter names. I wonder if there is a way to do it either/or?

Yeah, the code includes a few things that are only in my personal EatDrink. I assume you'll just delete those lines.

There isn't a good way to to either/or since KoLmafia will only prompt for boolean values. Though if you want to, you can institute a work-around where the script calls another script with cli_execute("call EatDrinkParameters.ash") which will take those parameters to main, then pass the values back to EatDrink with set_property()/get_property() or as zlib variables.

I'm not sure why you'd miss that prompting though. Do you ever actually call EatDrink with anything other than default values for fullness, drunkeness and spleen? As I wrote it, you'd only have to call EatDrink with sim or no sim to let it know if it is simulating and let it use your actual consumption limits.

Winterbay
11-15-2010, 09:03 AM
After the recent update to zlib it seems as if eatdrink and farm both have decided to create all possible variables. I deleted them, but how large are the odds that they will come back tomorrow when I run the scripts again?

fronobulax
11-15-2010, 11:40 AM
Close to 100%. I'm trying to figure out why but I spent too much of last week in the ER and am still under the influence of mind altering prescription drugs. My motivation has been sorely lacking, but I am getting better. While we are on the subject:
Ascend does not handle the Spooky Forest well.
Ascend does not handle the Haunted Tavern well.
Ascend gets confused about the Untinkerer and doesn't handle the opening quest well.
EatDrink is less likely to create extra variables if eatdrink_favUse is false.


These are on my todo list but, as I have said, I have been lacking in cycles to apply to KoL.

I leave it up to the user to decide whether they are more annoyed by running the older version of zLib and getting prompted about updates or running the newer one and having variable files with 5800+ entries.

Winterbay
11-15-2010, 12:38 PM
Close to 100%. I'm trying to figure out why but I spent too much of last week in the ER and am still under the influence of mind altering prescription drugs. My motivation has been sorely lacking, but I am getting better.


Ouch, that does not sound fun at all. Hope you'll feel better soon.


I leave it up to the user to decide whether they are more annoyed by running the older version of zLib and getting prompted about updates or running the newer one and having variable files with 5800+ entries.

Tough choice that one... I'm actually not sure which would be worse :)

Theraze
11-15-2010, 01:58 PM
The 'accept' code for untinker's quest should be something like the follows (has worked for me in my personal copy, but no guarantees):
if (contains_text(visit_url("forestvillage.php?place=untinker"),"I lost my screwdriver somewhere"))
visit_url("forestvillage.php?place=untinker&action=screwquest");


Also, the visit back to him after collecting the screwdriver needs to be in the forest village, not town.

Bale
11-16-2010, 04:59 AM
After the recent update to zlib it seems as if eatdrink and farm both have decided to create all possible variables.
I'm trying to figure out why but I spent too much of last week in the ER and am still under the influence of mind altering prescription drugs.

I've been messing around with EatDrink lately so I'll tackle this one. It seems likely that the culprit is these lines here:


if(to_boolean(vars["eatdrink_fav_" + replace_string(to_string(it)," ","_")]))

if(to_boolean(vars["eatdrink_daily_"+ replace_string(to_string(it)," ","_")]))

if(to_boolean(vars["eatdrink_avoid_"+replace_string(to_string(it)," ","_")]))

I assume the bug is clear, eh? I only wonder why nobody noticed a problem until recently. I fixed it by replacing it with this stuff:


boolean var_check(string vari) {
if(vars contains vari)
return vars[vari].to_boolean();
return false;
}

if(var_check("eatdrink_fav_" + replace_string(to_string(it)," ","_")))

if(var_check("eatdrink_daily_"+ replace_string(to_string(it)," ","_"))

if(var_check("eatdrink_avoid_"+replace_string(to_string(it)," ","_")))

I'm sorry that I cannot give line number or paste larger chunks of code, but my copy of EatDrink is growing different from yours.

Theraze
11-16-2010, 05:10 AM
Second var_check is missing a ) at the end. In one of its two daily checks, it does skip the third ) because it's on an or-line, but the one directly following it needs it still.

Winterbay
11-16-2010, 05:10 AM
I think the question is: What in the recent change to Zlib made it so that the orginal way to do it didn't create a lot of variables while the new one does?

Also, thanks for a potential fix but just to check: Where is "vars" defined?

Theraze
11-16-2010, 05:20 AM
Vars is the whole set of zlib variables, right? This just checks to make certain that the variable is set before it returns it?

I'm guessing the 'change' is zarqon adding in type normalization. It makes certain that the value is initialized properly, but in so doing, checks that were a bit sloppy before are initializing variables left and right.

Winterbay
11-16-2010, 05:34 AM
And is that defined every time you load a script that imports zlib? (I've not looked at zlib's functions at all so have no idea what they do or how).

Bale
11-16-2010, 05:42 AM
Every time you import zlib it will use file_to_map() on your zlib variable file to fill out values for:
string [string] vars


Vars is the whole set of zlib variables, right? This just checks to make certain that the variable is set before it returns it?
Yes. If you reference a map for a variable, if that variable does not already exist, it will be created. Icky, eh?


I'm guessing the 'change' is zarqon adding in type normalization. It makes certain that the value is initialized properly, but in so doing, checks that were a bit sloppy before are initializing variables left and right.

That's unfortunate that he stopped checking for it. I never noticed since the first time I had such a problem.

Winterbay
11-16-2010, 08:13 AM
Having done four exchanges according to the above mentioned code snippet my eatdrink now seems to have not created an abundance of variables and also runs. Thanks :)

slyz
11-16-2010, 09:39 AM
Even if all those entries were created in the vars map, updatevars() is never called, so how did they end up in the vars data file? I don't think the normalization has anything to do with it either, since only setvar() calls normalized().

EDIT: oh I found it, setvar() is called in consumeone(), and that calls updatevars().

Veracity
11-16-2010, 11:09 AM
If you reference a map for a variable, if that variable does not already exist, it will be created. Icky, eh?
Is it "icky"?

Winterbay
11-16-2010, 11:57 AM
Is it "icky"?

Well, potentially unwanted if what you wanted to knwo was if the variable was in the map or not and not create it. If that is "icky" or not I won't go into :)

slyz
11-16-2010, 12:26 PM
I don't think it's "unwanted", but if you don't know it works that way, it can have consequences you weren't expecting.

If you want to check if a map contains a specific entry, it is better practice to use contains or, in some cases, to go through all the existing entries by using foreach.

Winterbay
11-16-2010, 12:52 PM
I don't think it's "unwanted", but if you don't know it works that way, it can have consequences you weren't expecting.

If you want to check if a map contains a specific entry, it is better practice to use contains or, in some cases, to go through all the existing entries by using foreach.

I think "consequences you aren't expecting" = "unwanted", but that's mainly semantics. I do agree that it's a bad idea to do it that way (especially with the consequences it gets) but it's also not an entirely unexpected way to try and do things.

fronobulax
11-16-2010, 01:39 PM
I assume the bug is clear, eh? I only wonder why nobody noticed a problem until recently
Even after you isolated it for me it took awhile. I blame it on prescription drugs. ...vars[x]... is going to create an entry for x if it is not already there and so the code creates an entry for almost every item, in the process of testing whether the item should be used, avoided or whatever.

In a perfect world, according to fronobulax, no user script would ever access vars directly. There would be a corresponding getvar that would be called. However, I won't suggest that as a zLib do so because it pretty much would force the creation of setvar and getvar pairs for each datatype in ASH and impose stronger typing and break other scripts in the process.

I will update EatDrink to eliminate this, ASAP but no promises as to when. Thanks for tracking this down, Bale.

Chad Seksington2
11-16-2010, 03:04 PM
I wonder if someone can help me clear up something with farm.ash. It seems like maybe I completely misunderstand how to use this script, because I finally got it to run without errors (had to comment about a line regarding the tavern) and it made me an amazing 2,000 meat in about 60 adventures. Basically here is what it decided to do:
1) Make and eat 3 purple pixel pies (for some reason getting to 9 fullness with pixel pies was the way to go)
2) Adventure at the thugnderdome for all my adventures
3) Mallsell a flange, autosell other stuff
4) Done, with a profit of about 340 meat plus the value of the flange

I get better results just running ascend.ash and letting it do the bounty and giant castle. What did I miss that people are able to run this script for over 100k meat per day? Can anyone please set me straight? I'm assuming I did something stupid.

Winterbay
11-16-2010, 03:30 PM
I wonder if someone can help me clear up something with farm.ash. It seems like maybe I completely misunderstand how to use this script, because I finally got it to run without errors (had to comment about a line regarding the tavern) and it made me an amazing 2,000 meat in about 60 adventures. Basically here is what it decided to do:
1) Make and eat 3 purple pixel pies (for some reason getting to 9 fullness with pixel pies was the way to go)
2) Adventure at the thugnderdome for all my adventures
3) Mallsell a flange, autosell other stuff
4) Done, with a profit of about 340 meat plus the value of the flange

I get better results just running ascend.ash and letting it do the bounty and giant castle. What did I miss that people are able to run this script for over 100k meat per day? Can anyone please set me straight? I'm assuming I did something stupid.

A few questions:

1) What level are you?
2) Did it only eat to 9 fullness and stopped there, or had you already eaten some that day?
3) Do you have mall access and if so allow Mafia to buy things form the mall?
4) You can call the script with sim = true (or chose true in the pop-up if you just run the script) and see what it wants to do. If you try that and post the result that might help see what is happening.

Veracity
11-16-2010, 03:54 PM
I don't think it's "unwanted", but if you don't know it works that way, it can have consequences you weren't expecting.

If you want to check if a map contains a specific entry, it is better practice to use contains or, in some cases, to go through all the existing entries by using foreach.
I agree that if you want to check if a value is present you should use contains. However, it actually wouldn't be hard to change the code to not create the value if you read it and it has not been set. In textui/parsetree/CompositeReference.java:


public Value getValue( final Interpreter interpreter )
{
interpreter.setLineAndFile( this.fileName, this.lineNumber );
// Iterate through indices to final slice
if ( this.getSlice( interpreter ) )
{
Value result = this.slice.aref( this.index, interpreter );

if ( result == null )
{
result = this.slice.initialValue( this.index );
---> this.slice.aset( this.index, result, interpreter );
}
Delete that line. If you repeatedly reference the uninitialized value, we will repeatedly find null and will repeatedly cons up a new "initialValue" for the datatype, rather than saving it away. But, what the heck, if you ever actually set that entry, we'll throw away the initialValue anyway.

Chad Seksington2
11-16-2010, 04:14 PM
Thanks for the quick response.


A few questions:

1) What level are you?
2) Did it only eat to 9 fullness and stopped there, or had you already eaten some that day?
3) Do you have mall access and if so allow Mafia to buy things form the mall?
4) You can call the script with sim = true (or chose true in the pop-up if you just run the script) and see what it wants to do. If you try that and post the result that might help see what is happening.

1) Level 20
2) It ate to 9 and stopped, I had room for more
3) I have mall access, and to my knowledge I give Mafia mall access (it did put the flange in the mall)
4) I ate some food and ran the simulation. The summary is:
Best location is Thugnderdome with the command line 'maximize item drop;familiar Jumpsuited Hound Dog;{Peeled Eyeballs};'. Expected value is 835. The best monster there is Gnasty Gnome, who is worth 2334 meat.
Average meat from combats is 835
Average meat from noncombats (hardcoded) is 0
Combat rate is 100
Total of 6 monsters; meat per adventure is 835
Best monster is Gnasty Gnome, worth 2334.

slyz
11-16-2010, 05:35 PM
Delete that line.
I vaguely remembered a post by JasonHarper that explained why it wouldn't be easy to remove that behavior - and I finally found it:

Creation of keys in a map when they're read is perhaps undesirable, but not easily changed - multidimensional maps rely on that behavior, to create the intermediate levels of the map when needed.

Veracity
11-16-2010, 05:42 PM
The behavior Jason is referring to is in the "getSlice" method. That iterates down the dimensions of a map, creating intermediate levels as needed. The method I pointed you to is used to fetch a value in the final level, after getSlice has been used to get there.

Edit: here's a little test program.


int [int,int] test;

print( "test contains 1 = " + test contains 1 );
print( "test[1] contains 2 = " + test[1] contains 2 );
print( "test contains 1 = " + test contains 1 );
print( "test[1,2] = " + test[1,2] );
print( "test contains 1 = " + test contains 1 );
print( "test[1] contains 2 = " + test[1] contains 2 );

foreach key1, slice1 in test
{
print( "test[" + key1 + "] = " + slice1 );
foreach key2, value in test[ key1 ]
{
print( "test[" + key1 + "," + key2 + "] = " + value );
}
}
and here's how it operates with the current code:


> mmaps

test contains 1 = false
test[1] contains 2 = false
test contains 1 = true
test[1,2] = 0
test contains 1 = true
test[1] contains 2 = true
test[1] = 2
test[1,2] = 0
Notice that as soon as we referenced test[1], that slice was created. When we referenced test[1,2], the second slice was created. And iterating over the multi-dimensional map at the end, we see that test[1] has index 2 in it, and test[1,2] has value 0 in it.

I removed the line from getValue() as I suggested, compiled, and reran the test.


> mmaps

test contains 1 = false
test[1] contains 2 = false
test contains 1 = false
test[1,2] = 0
test contains 1 = true
test[1] contains 2 = false
Notice that referencing test[i] did NOT create that index. Referencing test[1,2] found the default value and did create the intermediate layer test[1] but did not create element test[1,2].

Edit 2: I changed the foreach loop at the end:


foreach key1 in test
{
print( "test[" + key1 + "] = " + test [key1] );
foreach key2 in test[ key1 ]
{
print( "test[" + key1 + "," + key2 + "] = " + test[key1,key2] );
}
}

and reran it:


> mmaps

test contains 1 = false
test[1] contains 2 = false
test contains 1 = false
test[1,2] = 0
test contains 1 = true
test[1] contains 2 = false
test[1] = aggregate int [int]

Now you can see if intermediate layer there at test[1]. It's empty, since when we foreach over it we find nothing.

Edit n: OK, last demo. I modify the test program thus:


int [int,int] test;

void pmap()
{
foreach key1 in test
{
print( "test[" + key1 + "] = " + test[key1] );
foreach key2 in test[ key1 ]
{
print( "test[" + key1 + "," + key2 + "] = " + test[key1,key2] );
}
}
}

print( "test contains 1 = " + test contains 1 );
print( "test[1] contains 2 = " + test[1] contains 2 );
print( "test contains 1 = " + test contains 1 );
print( "test[1,2] = " + test[1,2] );
print( "test contains 1 = " + test contains 1 );
print( "test[1] contains 2 = " + test[1] contains 2 );
pmap();
test[1,2] = 3;
print( "test contains 1 = " + test contains 1 );
print( "test[1] contains 2 = " + test[1] contains 2 );
pmap();
and get this:


> mmaps

test contains 1 = false
test[1] contains 2 = false
test contains 1 = false
test[1,2] = 0
test contains 1 = true
test[1] contains 2 = false
test[1] = aggregate int [int]
test contains 1 = true
test[1] contains 2 = true
test[1] = aggregate int [int]
test[1,2] = 3
...which looks reasonable to me.

Winterbay
11-16-2010, 08:01 PM
Thanks for the quick response.



1) Level 20
2) It ate to 9 and stopped, I had room for more
3) I have mall access, and to my knowledge I give Mafia mall access (it did put the flange in the mall)
4) I ate some food and ran the simulation. The summary is:
Best location is Thugnderdome with the command line 'maximize item drop;familiar Jumpsuited Hound Dog;{Peeled Eyeballs};'. Expected value is 835. The best monster there is Gnasty Gnome, who is worth 2334 meat.
Average meat from combats is 835
Average meat from noncombats (hardcoded) is 0
Combat rate is 100
Total of 6 monsters; meat per adventure is 835
Best monster is Gnasty Gnome, worth 2334.

Hmm... Mine usually have the dooks quite high up (and currently since I've modified mine a bit the Sea), but I guess you might have skipped that side quest and if I remove the sea entries it generally goes to the castle after the dooks.

If it just ate to nine there is something odd with the call to eatdrink.ash which farm.ash calls to eat and drink. It should max out eating before moving on to farming and spleen and drink when it has run out of turns.

I guess you have the version of farm.ash from this thread and not the one that came with the originial zip? (I'm guessing this since that one won't run due to "map modified within foreach" errors)

Chad Seksington2
11-16-2010, 11:13 PM
Hmm... Mine usually have the dooks quite high up (and currently since I've modified mine a bit the Sea), but I guess you might have skipped that side quest and if I remove the sea entries it generally goes to the castle after the dooks.

If it just ate to nine there is something odd with the call to eatdrink.ash which farm.ash calls to eat and drink. It should max out eating before moving on to farming and spleen and drink when it has run out of turns.

I guess you have the version of farm.ash from this thread and not the one that came with the originial zip? (I'm guessing this since that one won't run due to "map modified within foreach" errors)

Yeah I have the farm.ash from this thread. I'll just tell it to ignore the Thugnderdome and proceed from there. At least I know I'm not doing anything terribly stupid in the way I use the script, which I assumed was the case.

Thanks for the feedback. I'll try some tinkering and see where it takes me. As for the eatdrink thing, it seems to just reference my max fullness to I don't know why it stopped at 9. I guess I could override that with the actual fullness value.

Bale
11-17-2010, 02:05 AM
I hate EatDrink. This script was created with an aesthetic that is anathema to my soul. If I had created this script it would look very different indeed, so I find it frustrating to work with this code and frequently do clumsy things midway between dj_d's style and my own. If this script did not work so damn well I'd throw it away and start from scratch.

Anyway, I've been working on fixing get_choc() so that it will work with every chocolate in the game, not just the few that were around when dj_d was still working on this script himself. I think I've succeeded, so here is the fruit of my labor. Feel free to adapt this to the main branch of EatDrink if you see value here.


class [item] class_choco;
class_choco [$item[chocolate seal-clubbing club]] = $class[Seal Clubber];
class_choco [$item[chocolate turtle totem]] = $class[Turtle Tamer];
class_choco [$item[chocolate pasta spoon]] = $class[Pastamancer];
class_choco [$item[chocolate saucepan]] = $class[Sauceror];
class_choco [$item[chocolate disco ball]] = $class[Disco Bandit];
class_choco [$item[chocolate stolen accordion]] = $class[Accordion Thief];

item reducechoc(item it) {
if(it == $item[vitachoconutriment capsule])
return $item[vitachoconutriment capsule];
return $item[fancy chocolate]; // all other chocos track together
}

string choc_prop(item it) {
return "eatdrink_ate_"+ substring(it.reducechoc(), 0, 5);
}
setvar(choc_prop($item[vitachoconutriment capsule]),gameday_to_string() + ":0");
setvar(choc_prop($item[fancy chocolate]),gameday_to_string() + ":0");

int chocval(item it) {
int choc_adv;
switch(simchoc[it.reducechoc()]) {
case 0:
if(class_choco contains it)
choc_adv = 3;
else choc_adv = 5;
break;
case 1:
if(class_choco contains it)
choc_adv = 2;
else choc_adv = 3;
break;
case 2:
choc_adv = 1;
break;
default:
choc_adv = 0;
}
if(choc_adv > 0 && class_choco contains it)
if(class_choco[it] != my_class())
choc_adv = choc_adv - 1;
return choc_adv;
}

boolean get_choc() {
//this is cheap, but I'm going to abuse simchoc to iterate over for the main loop here (irrespective of whether I'm simulating).
simchoc[$item[vitachoconutriment capsule]] = 0;
simchoc[$item[fancy chocolate]] = 0; //note this encompasses all other chocos too
string choc_prop;
foreach key in simchoc {
choc_prop = choc_prop(key);
int mark = index_of(vars[choc_prop], ":");
if(index_of(vars[choc_prop], ":") != -1 && substring(vars[choc_prop], 0, mark) == gameday_to_string())
simchoc[key] = substring(vars[choc_prop], mark+1).to_int();
else {
vars[choc_prop] = gameday_to_string() + ":0";
updatevars();
simchoc[key] = 0;
}
}

clear(grub);
int choco_counter = 1;
foreach key in $items[chocolate disco ball, chocolate pasta spoon, chocolate saucepan,
chocolate seal-clubbing club, chocolate stolen accordion, chocolate turtle totem, fancy chocolate,
fancy but probably evil chocolate, fancy chocolate car] {
grub[choco_counter].it = key;
grub[choco_counter].consumptionGain.max = 1;
grub[choco_counter].consumptionGain.min = 1;
grub[choco_counter].type = "choc";
grub[choco_counter] = availability(grub[choco_counter]);
grub[choco_counter].price = effective_price(grub[choco_counter]);
choco_counter += 1;
}
con_rec vita;
vita.it = $item[vitachoconutriment capsule];
vita.consumptionGain.max = 1;
vita.consumptionGain.min = 1;
vita.type = "choc";
vita = availability(vita);
vita.price = effective_price(vita);
con_rec choc;
int to_consume;
foreach it in simchoc { //will run twice
if(it == $item[vitachoconutriment capsule])
choc = vita;
boolean giveup = false;
while(!giveup && simchoc[it] < 3) {
# for i from 1 upto 3 { // Chocolates can only be consumed thrice
if(it == $item[fancy chocolate]) {
foreach i in grub {
grub[i].adv.max = chocval(grub[i].it);
grub[i].adv.min = grub[i].adv.max;
grub[i].value = value(grub[i], false);
}
to_consume = best();
if(to_consume == 0) {
choc.it = $item[none];
choc.value = 0;
} else
choc = grub[to_consume];
} else {
choc.adv.max = chocval(choc.it);
choc.adv.min = choc.adv.max;
choc.value = value(choc, false);
}
if(choc.value > 0) {
verbose2("Attempting to consume a "+choc.it);
string consume_entry = format_entry(choc);
logprint(consume_entry);
if(pause > 0 && !SIM_CONSUME) {
verbose("Waiting to consume...");
print_html(consume_entry);
wait(pause);
}
if(consumeone(choc, "choc")) {
summarize(ConsumptionReportIndex+": "+consume_entry);
ConsumptionReportIndex = ConsumptionReportIndex + 1;
simchoc[reducechoc(choc.it)] += 1;
if(!SIM_CONSUME) {
vars[choc_prop(choc.it)] = gameday_to_string() + ":" + simchoc[reducechoc(choc.it)];
updatevars();
}
} else {
//Update the price, since your purchase may have failed
int oldprice = grub[to_consume].price;
grub[to_consume].price = effective_price(grub[to_consume]);
verbose(grub[to_consume].it+" price updated from "+oldprice+" to "+ grub[to_consume].price+".");
print_html("FAIL: "+consume_entry);
logprint("FAIL: "+consume_entry);
}
} else {
verbose2("For "+choc.it+" value "+to_int(choc.value)+" is less than or equal to zero.");
giveup = true;
}
}
}
}

My fiddling with EatDrink is nearly at an end. I've finally got it working the way I want.

Bale
11-17-2010, 10:10 PM
Made some more improvements to my main() to fix a few problems and add features.


void main(string parameters) {
SIM_CONSUME = false;
int foodMax = fullness_limit();
int drinkMax = inebriety_limit();
int spleenMax = spleen_limit();
boolean overdrink = false;
matcher option = create_matcher("(?i)(?:(no) +)?([A-Za-z0-9_]+) *(= *([A-Za-z0-9\\.]+))? *,?", parameters);
string var, val;
while(option.find()) {
if(option.group(1) == "no")
val = "false";
else if(option.group(3) == "0")
val = "true";
else val = option.group(4);

var = option.group(2);
if(var.is_integer()) {
val = var;
var = "value_of_adventure";
}
#print("'"+ var +"' = '"+ val + "'");

switch(var.to_lower_case()) {
case "use_inv":
case "inventory":
case "inv":
USE_INV = val.to_boolean();
break;
case "use_closet":
case "closet":
USE_CLOSET = val.to_boolean();
break;
case "use_storage":
case "storage":
USE_STORAGE = val.to_boolean();
break;
case "sim_consume":
case "sim":
SIM_CONSUME = val.to_boolean();
break;
case "supress_overdrink":
SUPRESS_OVERDRINK = val.to_boolean();
break;
case "shop":
case "buy":
SHOP = val.to_boolean();
break;
case "budget":
BUDGET = val.norm_int();
break;
case "price_flexibility":
case "flexibility":
PRICE_FLEXIBILITY = val.norm_float();
break;
case "consider_cost_when_owned":
CONSIDER_COST_WHEN_OWNED = val.to_boolean();
break;
case "cost_of_pull":
case "pull":
COST_OF_PULL = val.norm_int();
break;
case "value_of_adventure":
case "adventure":
case "voa":
VALUE_OF_ADVENTURE = val.norm_int();
break;
case "value_of_prime_stat":
case "prime_stat":
case "prime":
VALUE_OF_PRIME_STAT = val.norm_float();
break;
case "value_of_nonprime_stat":
case "nonprime_stat":
case "nonprime":
VALUE_OF_NONPRIME_STAT = val.norm_float();
break;
case "stat":
case "stats":
VALUE_OF_PRIME_STAT = val.norm_float();
VALUE_OF_NONPRIME_STAT = val.norm_float()/5;
break;
case "pie_priority":
case "pies":
case "pie":
PIE_PRIORITY = val.to_boolean();
break;
case "price_of_nontradeables":
case "nontradeables":
case "nontradeable":
PRICE_OF_NONTRADEABLES = val.norm_int();
break;
case "price_of_unknowns":
case "unknowns":
case "unknown":
PRICE_OF_UNKNOWNS = val.norm_int();
break;
case "sim_ronin":
case "ronin":
SIM_RONIN = val.to_boolean();
break;
case "sim_level":
case "level":
SIM_LEVEL = val.norm_int();
break;
case "pause":
if(val == "true") {
if(pause < 1) pause = 3;
} else pause = val.norm_int();
break;
case "foodmax":
case "food":
if(val == "true") break;
foodMax = val.norm_int();
break;
case "drinkmax":
case "drink":
if(val == "true") break;
drinkMax = val.norm_int();
break;
case "spleenmax":
case "spleen":
if(val == "true") break;
spleenMax = val.norm_int();
break;
case "overdrink":
overdrink = val.to_boolean();
break;
case "cookie":
if(val == "false") cookie = false;
else cookie = true;
cookie_size = val.norm_int();
break;
case "price_age":
price_age = val.norm_float();
break;
}
}
eatdrink(foodMax - cookie_size, drinkMax, spleenMax, overdrink);
}

Now I can do this:


> eatdrink 6000 sim, no food, no drink, no spleen

Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Loading favorite consumables from user settings...
adding favorite: rockin' wagon
adding favorite: pr0n chow mein
adding favorite: twinkly wad
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 0 food, 0 booze, and 0 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 24000.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 6000 meat. Mysticality subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
Pass 1: food.
Skipping food.
Pass 2: drink.
Skipping drink.
Pass 3: spleen.
Skipping spleen.
Pass 4: drink.
Skipping drink.
choc: Checking non-filling chocolates - all kinds
If there are favorites still in consideration, they'll be here:
simulating consumption of one fancy chocolate car.
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:13400 own:0 value:16600
If there are favorites still in consideration, they'll be here:
simulating consumption of one chocolate pasta spoon.
2: chocolate pasta spoon lev:0 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:1795 own:0 value:10205
If there are favorites still in consideration, they'll be here:
simulating consumption of one chocolate pasta spoon.
3: chocolate pasta spoon lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:1795 own:0 value:4205
simulating consumption of one vitachoconutriment capsule.
4: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:24000 own:0 value:6000
Finished.
Spent 40990 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 13. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 0 food, 0 booze, and 0 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 24000.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 6000 meat. Mysticality subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
choc: Checking non-filling chocolates - all kinds
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:13400 own:0 value:16600
2: chocolate pasta spoon lev:0 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:1795 own:0 value:10205
3: chocolate pasta spoon lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:1795 own:0 value:4205
4: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:24000 own:0 value:6000
Finished.
Spent 40990 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 13. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

halfvoid
11-17-2010, 11:03 PM
Now I can do this:

Now I want a copy of your eatdrink. ;)

Bale
11-17-2010, 11:44 PM
Now I want a copy of your eatdrink. ;)

I really hesitate to post it since I change a lot of things that users of EatDrink rely on. For instance, rather than create a zlib setting for each variable I hardcode default values into the script and have them changed from the command line call, not editing vars_username. That's why I went all out in creating a command line parameter parser. If I want to change any varaibles I use cli_execute("EatDrink 1200, no sim, cookie = 2, budget = 20000, no pull, no stats, pies, no pause, price_age = .1"); It makes scripted control of EatDrink easier, but all those zlib settings people have honed for use with EatDrink are ignored by my version.

Another reason for no wanting to show it is that it is a horrible Frankenstein's monster of patchwork parts. It's quite ugly.

My main reason for modifying my EatDrink so much and putting in the command line parameter parsing is that when I was importing it, I found some of its many global variables were conflicting with my script's variables. This caused run errors and kept the calling script from modifying the EatDrink variables with ease. Now I use cli_execute() to call EatDrink and it's golden!

If you're curious: The cookie thing is to inform EatDrink how much fullness to leave unused for fortune cookie eating later on, after getting semi-rare adventures. (If I set the cookie value, it will even decide to eat a cookie as part of EatDrink if I don't currently have any semi-rare counters.) I like using fortune cookies, but the original EatDrink didn't support them.

Oh, and my EatDrink uses coffee pixie sticks, but it would be tough to show the code since it is spread out in several places and I've lost track of it. Somewhat ugly stuff.


> eatdrink 1000, sim, no drink, no food

Checking for updates (running ZLib ver. : 21)...
_version_zlib => : 21
You have a current version of ZLib.
Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Loading favorite consumables from user settings...
adding favorite: rockin' wagon
adding favorite: pr0n chow mein
adding favorite: twinkly wad
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 0 food, 0 booze, and 15 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 24000.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
Pass 1: food.
Skipping food.
Pass 2: drink.
Skipping drink.
Pass 3: spleen.
spleen: At 0, consuming to 15.
Loading spleen map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one coffee pixie stick.
1: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one coffee pixie stick.
2: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
Spleen value is 965; mojo filter to get it costs 2675
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one coffee pixie stick.
3: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one hot wad.
4: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one hot wad.
5: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
Choosing spleen to consume.
If there are favorites still in consideration, they'll be here:
Fav: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:324 own:8696 value:802
simulating consumption of one hot wad.
6: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
Pass 4: drink.
Skipping drink.
choc: Checking non-filling chocolates - all kinds
If there are favorites still in consideration, they'll be here:
simulating consumption of one chocolate seal-clubbing club.
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2450 own:0 value:550
If there are favorites still in consideration, they'll be here:
Best find was chocolate seal-clubbing club with a value of -450. That's no good, so not consuming and moving on.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 14630 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 15. Adventures: 28. Muscle: 81. Moxie: 54. Mysticality: 27.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.0, Bale Edition).
Consuming up to 0 food, 0 booze, and 15 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 24000.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
spleen: At 0, consuming to 15.
1: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
2: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
3: coffee pixie stick lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:3640 own:0 value:965
4: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
5: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
6: hot wad lev:6 gain:1.0 adv:1.0 musc:27.0 myst:9.0 mox:18.0 meat:420 own:559 value:904
choc: Checking non-filling chocolates - all kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2450 own:0 value:550
Best find was chocolate seal-clubbing club with a value of -450. That's no good, so not consuming and moving on.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 14630 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 15. Adventures: 28. Muscle: 81. Moxie: 54. Mysticality: 27.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

(This is a different character from the earlier example that was consuming chocolate pasta spoons. The code I posted accounts for my_class() when deciding which chocolate to consume.)

fronobulax
11-18-2010, 05:03 PM
1) I'm testing Bale's chocolates now and will post an Unofficial EatDrink "soon".
2) I personally don't find Bale's changes to main to be an improvement, so if only Bale and I care, I won't incorporate them, but if someone else likes them, then please let me know and I'll roll them in.
3) I consider the zLibs variable issue to be resolved provided users run r8775 or greater. I highly recommend a text editor be applied to the vars file to undo the hiccup.

Theraze
11-18-2010, 05:18 PM
1) Awesome.
2) As long as cookie_size is defined inside the script as 0, and you can override it, I think the changes would be a good thing. Being able to have it automatically adjust for cookies if you want to, as well as having additional keywords, both make the script more friendly imho. Being able to use "closet" as well as "use_closet" would make less "wrong" parameter inclusion, etc.
3) Awesome, again. :)

Bale
11-18-2010, 08:48 PM
EatDrink has one other serious problem: no coffee pixie sticks. Currently EatDrink will not consider consuming them even though they are the cheapest value of adv/spleen. I'm going to try to dig out my pixie stick code and present it for fronobulax to include if he wants. This gets a little complicated, so bear with me.

First of all, I have replaced every single instance of mall_price() with check_price()


float price_age = 0.5;
int check_price(item it) {
if(it == $item[coffee pixie stick]) {
if(historical_age($item[game grid ticket]) < price_age)
return 10 * historical_price($item[game grid ticket]);
return 10 * mall_price($item[game grid ticket]);
}
if(historical_age(it) < price_age)
return historical_price(it);
return mall_price(it);
}

My version of get_on_budget() contains these lines:


if (startmeat > budget)
{
verbose("Looks like you have enough meat to buy it");
int got = item_amount(it);
verbose("You have "+got+" right now");
int temp;
if(it != $item[coffee pixie stick])
temp = buy(quantity, it, budget);
else {
temp = buy(10 * quantity, $item[game grid ticket], budget / 10);
if(item_amount($item[game grid ticket])/ 10 > 0)
retrieve_item(item_amount($item[game grid ticket])/ 10, $item[coffee pixie stick]);
}

In effective_price() I have these lines:


int effective_price(con_rec con)
{
item it = con.it;
int price = 0;
if ((con.have > 0) && !CONSIDER_COST_WHEN_OWNED)
return 0; //If you have it & you don't care about price
if ((con.have == 0) && !SHOP)
return 0; //If you don't have any but you can't shop
if (!is_tradeable(it) && it != $item[coffee pixie stick])
{
verbose2("NONTRADEABLE: "+it);
return PRICE_OF_NONTRADEABLES;
}


I think that is all the code involved with coffee pixie sticks. I suspect there may have been an easier way to handle this, but I do have some trouble with dj_d's code. I look forward to seeing if you can improve it.



2) As long as cookie_size is defined inside the script as 0, and you can override it, I think the changes would be a good thing. Being able to have it automatically adjust for cookies if you want to

I don't think that is an issue involving the changes to main and fronobulax wasn't really considering it. If you want to leave room for later cookie eating you can always just lower the value of foodMax from 15 to 13. The only reason that you'd want to have a cookie_size variable is if EatDrink had code to decide if you currently need to eat a cookie. In that instance it becomes relevant. Since EatDrink doesn't do that, its better not to include cookies as a parameter.

The issue about my main() changes regards the ability to call EatDrink from the command line without needing an alias.

Theraze
11-18-2010, 08:55 PM
Well, I'm thinking of cookiesize in terms of that I can check counters, decide if I need to leave room for a cookie, and then run my normal eatdrink (or maybe, eatdrinkfc if cookies are considered) script. zarqon's BBB and your CC will both eat cookies for me... but they need room to do it. :)

And I suppose that I already implemented those changes earlier when you posted them, which is why my version looked so similar to yours. :p The dangers of not grabbing the base/original file when doing comparisons. Heh.