Maximize.ash, maximize equipment in one command.

Status
Not open for further replies.
dangerpin, do you know how to get map_to_file or file_to_map to put all of the data
files into the "data" directory rather than the "scripts" directory. Right now
all of the generated data files are being put in my scripts directory.

I tried modifying the following line:

string equipmentDataFile = "data/";

But then I get filenames in the "scripts" directory called for example:

_Adventures.txt
I dont know of anyway to write files to the data directory, but you can move them to the data dir and kolmafia will find them for the script...
the next version will change equipmentDataFile to '.ItemMap' which will create the files in the base script directory but hide them from the scripts menu (removing the use of directory slashes which is a bug and might be removed for security)... it should also make moving them easier but having the files in data directory might cause problems when you try and regen the item maps and im not sure what will happen if you have files with the same filename in both 'scripts/' and 'data/'

I noticed that when you maximize "Adventures" it does not equip a time sword in the offhand.
do you have a Disembodied Hand? What has the script decided to equipt?

update: new posts since i started writting...
Captain Kirk said:
Hmm... this reverse slash stuff you are using doesn't really work on my mac.
Because the data directory was never created.
It only worked on windows because of a bug, it was suppost to be disabled to avoid scripts writting over system files

Captain Kirk said:
so for some reason once they are found in the data directory they remain there
kolmafia must be detecting the files already exist in the data/ directory so is overwritting them which is great
 
Last edited:
do you have a Disembodied Hand? What has the script decided to equipt?

Yes, I have a Disembodied Hand, dual-fisted, and 3 time swords. It takes the disembodied
hand and puts a time sword on it. It equips a time sword in my main hand, but
does not put a time sword in the offhand.

I looked at the generated file,
ItemMap_Adventures.txt

and if I put manually edit the file after it's generated and add this line:

off-hand time sword 0

Then the script works correctly after that. Is there a way to insert this line
into the generated file automatically?
 
It takes the disembodied hand and puts a time sword on it. It equips a time sword in my main hand, but does not put a time sword in the offhand.
did your familiar already have a time sword equipt? currenly the script uses available_amount([item]) to find out how many swords you have but if your disembodied hand has one of the equipt (but is not your current familiar) this isnt counted

Is there a way to insert this line into the generated file automatically?
adding a weapon as off-hand shouldnt be needed as with the right skill all 1 handed weapons are considered off-hand
the next version is changing how the item counts are monitored (trying to add storage lookup so you can see what to pull) so hopefully that will fix that bug, but dont have much time for programming just now so next version is a little way off
 
Last edited:
I think I have the exact same problem as him, let me verify some logs I have to see if I can give you an exact output on what happens.
 
Here are my logs from today:
First run of the command:
Code:
 > searching for 'Adventures'....
> You only have 15 of the possible 25 item(s) which have this modifier
> [outfit: (none)] [rate: 22]
> [outfit: time trappings] [rate: 27]
> Hat: time helmet
> Shirt: General Sage's Lonely Diamonds Club Jacket
> Pants: time trousers
> Weapon: time sword
> Offhand: depleted Grimacite gravy boat
> Acc1: imitation nice watch
> Acc2: depleted Grimacite grappling hook
> Acc3: depleted Grimacite weightlifting belt
> Familiar: Disembodied Hand
> Familiar Item: time sword
> (Outfit: time trappings)
> (Rating: 27)

equip hat time helmet

equip shirt General Sage's Lonely Diamonds Club Jacket

equip pants time trousers
unequip offhand

equip weapon time sword

equip off-hand depleted Grimacite gravy boat

equip acc1 imitation nice watch

equip acc2 depleted Grimacite grappling hook

equip acc3 depleted Grimacite weightlifting belt

familiar Disembodied Hand (21 lbs)

second run of the command:
Code:
> searching for 'Adventures'....
> You only have 15 of the possible 25 item(s) which have this modifier
> [outfit: (none)] [rate: 22]
> [outfit: time trappings] [rate: 25]
> Hat: time helmet
> Shirt: General Sage's Lonely Diamonds Club Jacket
> Pants: time trousers
> Weapon: time sword
> Offhand: time sword
> Acc1: imitation nice watch
> Acc2: depleted Grimacite grappling hook
> Acc3: depleted Grimacite weightlifting belt
> Familiar: Disembodied Hand
> Familiar Item: time sword
> (Outfit: time trappings)
> (Rating: 25)

equip off-hand time sword
 
One was on the disembodied hand.
Could that be the problem?
yes thats the problem, when you log in do you use equipt.ash to change familiar or do it manually?
the script should be removing the sword before swapping out the disembodied hand but in the next version I will also add a check when the script is called that will unequipt the disembodied hand's sword if the familiar is not currently being used
 
I change it manually to a ADD.
But I came up with a solution for it though. I just run the command twice in my script.
 
Why does the "Item Drop" category pick a leprechaun as a familiar, and not something
that makes sense like my jumpsuited hound dog.


equiptLastArgs => Item Drop
searching for 'Item Drop'....
You only have 40 of the possible 57 item(s) which have this modifier
using dummy numeric_modifier function for familiars -- it will always return 0 -- I'm testing a KoLMafia patch
[outfit: (none)] [rate: 111]
[outfit: bounty-hunting rig] [rate: 126]
Hat: bounty-hunting helmet
Shirt: flaming pink shirt
Pants: bounty-hunting pants
Weapon: bounty-hunting rifle
Offhand: (two handed weapon)
Acc1: Order of the Silver Wossname
Acc2: Red Balloon of Valor
Acc3: Uranium Omega of Temperance
Familiar: Leprechaun
Familiar Item: plastic pumpkin bucket
 
Why does the "Item Drop" category pick a leprechaun as a familiar, and not something that makes sense like my jumpsuited hound dog.
...
using dummy numeric_modifier function for familiars -- it will always return 0 -- I'm testing a KoLMafia patch
...
Familiar: Leprechaun
Familiar Item: plastic pumpkin bucket
the script loops through all familiars and all possible equipment for them, as a familiar numeric_modifier() [one that takes a weight argument] is not yet supported it can only judge them based on their familiar items, you are probably seeing a leprechaun chosen because it was the first familiar to be check with the plastic pumpkin picket equipt (which gives 13% ItemDrop)

the only familiar fully supported is the disembodied hand which gives no modifiers itself and only has the modifiers of the 1handed weapon it holds

if you build your own client from the SVN you can try and use the patch i posted on the bug tracker ( http://kolmafia.us/project.php?issueid=168 ) which should calculate the familiars numeric_modifier correctly (you need to change "int numeric_modifier" to "int unused_numeric_modifier" in the script to make sure its using the clients function) ... hopefully the patch will be added to kolmafia soon as jason harper is reviewing the patch
.. but for now you can use the -familiar[] option to specify the best familiar or modify the scripts numeric_modifier() to force selection...

I'm currently using a livecd to boot pc as hardrive has failed so cant test any exact code workarounds but something like replacing
int numeric_modifier(string s, string a, int w) {
return 0;
}
with
int numeric_modifier(string s, string a, int w) {
if (s == "Leprechaun" && a == "Meat Drop") { return 1 * w; }
if (s == "Jumpsuited Hound Dog" && a == "Item Drop") { return 1 * w; }
return 0;
}
might help until the patch is approved
 
Ok .. this time I tried "Meat Drop" .. with this script I got the following outfit:
(335.33% meat drop), compared to my configuration (504.61%)
equiptLastArgs => Meat Drop
searching for 'Meat Drop'....
You only have 31 of the possible 46 item(s) which have this modifier
using dummy numeric_modifier function for familiars -- it will always return 0 -- I'm testing a KoLMafia patch
[outfit: (none)] [rate: 190]
Hat: none
Shirt: origami pasties
Pants: stainless steel slacks
Weapon: bottle-rocket crossbow
Offhand: bobble-hip hula elf doll
Acc1: natty blue ascot
Acc2: natty blue ascot
Acc3: natty blue ascot
Familiar: Leprechaun
Familiar Item: lucky Tam O'Shatner
(Rating: 190)
Putting on stainless steel slacks...
Equipment changed.
Holding bobble-hip hula elf doll...
Equipment changed.
Putting on natty blue ascot...
Equipment changed.
Putting on natty blue ascot...
Equipment changed.
Putting Chief Engineer Sooty the Hobo Monkey back into terrarium...
Taking McEnterprise the Leprechaun out of terrarium...
lucky Tam O'Shatner is better than (none). Switching items...
Stealing lucky Tam O'Shatner from Chief Engineer Sooty the Hobo Monkey...
Putting on lucky Tam O'Shatner...
Equipment changed.

My outfit is this:
Hodgman's outfit + lucky sock + garbage sticker
BRC
origami pasties
natty blue ascot
hobo monkey
lucky Tam
 
I'm currently working on hobo power converters (part of my major rewiring of internals) im not sure if ill get it working how i want to it, not least because i dont have items to test it on, but it should start handling hobo power
 
equip.ash tries to use a ranged weapon with a melee weapon:

> call scripts\equipt.ash -item[Brimstone Bludgeon] -stickers[off] -familiar[current] Item Drop

equiptLastArgs => -item[Brimstone Bludgeon] -stickers[off] -familiar[current] Item Drop
equipt condition: item 'Brimstone Bludgeon'
searching for 'Item Drop'....
You only have 16 of the possible 56 item(s) which have this modifier
[outfit: (none)] [rate: 1000067]
Hat: bounty-hunting helmet
Pants: bounty-hunting pants
Weapon: Brimstone Bludgeon
Offhand: bottle-rocket crossbow
Acc1: Order of the Silver Wossname
Acc2: Red Balloon of Valor
Acc3: Uranium Omega of Temperance
Familiar: Psychedelic Bear
(Rating: 1000067)
Wielding Brimstone Bludgeon...
Equipment changed.
You can't hold a bottle-rocket crossbow in your off-hand when wielding a Brimstone Bludgeon
 
I'm currently working on hobo power converters (part of my major rewiring of internals) im not sure if ill get it working how i want to it, not least because i dont have items to test it on, but it should start handling hobo power

Well another major factor was the hobo monkey vs. the leprechaun.
hobo monkey is much better.
 
Status
Not open for further replies.
Back
Top