Equipt - an item selection tool

dj_d

Member
>> CURRENTLY -fill[Moxie=10] will add atleast 10 moxie to your outfit using the least items

By the way, I don't think this works for me. With moxie of 1012 and wearing birthday suit, this command equipped the swashbuckling getup and Hodgman's bow tie.
 

Bale

Minion
Could you please fix this? It is getting rather troublesome... I'd rather not have to keep changing my inventory by hand whenever the optimal weapon is 2-handed...

Code:
[COLOR="Olive"]> equipt item drop[/COLOR]

Searching for Item Drop
[outfit: (none)] [hobo: (none)] [rate: 159.081]
[outfit: Bounty-Hunting Rig] [hobo: (none)] [rate: 169.081]
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: Baron von Ratsworth's monocle
acc3: Nickel Gamma of Frugality
familiar: Dandy Lion
familiar item: little box of fireworks

Putting Pakkun the Purse Rat back into terrarium...
Taking Ryntha the Dandy Lion out of terrarium...
annoying pitchfork is better than (none). Switching items...
Stealing annoying pitchfork from Pakkun the Purse Rat...
Putting on annoying pitchfork...
Equipment changed.
Wielding bounty-hunting rifle...
Equipment changed.

[COLOR="Red"]You can't equip an off-hand item while wielding a 2-handed weapon.[/COLOR]
 

DerDrongo

Member
Could you please fix this? It is getting rather troublesome... I'd rather not have to keep changing my inventory by hand whenever the optimal weapon is 2-handed...
I havnt been able to reproduce this error yet (an item being selected for offhand at the same time as a 2handed weapon) but have added a check if you have a 2handed weapon just before equipping to offhand... with the familiar item fix and the automated tester there is still a lot to check before i can release the next version (possibly tomorrow)

if you want to add the extra check now you can change line 1254 to..
Code:
if (weapon_hands(base.slots[$slot[weapon]].i) == 1 && base.slots[$slot[offhand]].i != $item[none]) {
 

Bale

Minion
I tried that fix, but this still happened: (I've leveled up a bit since last time I used the command.)

Code:
[COLOR="Olive"]> equipt item drop[/COLOR]

Searching for Item Drop
[outfit: (none)] [hobo: (none)] [rate: 159.081]
[outfit: (none)] [hobo: Hodgman's imaginary hamster] [rate: 167.081]
[outfit: Bounty-Hunting Rig] [hobo: (none)] [rate: 169.081]
[outfit: Bounty-Hunting Rig] [hobo: Hodgman's imaginary hamster] [rate: 187.081]
[outfit: Hodgman's Regal Frippery] [hobo: (none)] [rate: 112.08099]
[outfit: Hodgman's Regal Frippery] [hobo: Hodgman's imaginary hamster] [rate: 151.081]
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: Baron von Ratsworth's monocle
acc3: Nickel Gamma of Frugality
familiar: Dandy Lion
familiar item: little box of fireworks

Putting on Order of the Silver Wossname...
Equipment changed.
Putting on Baron von Ratsworth's monocle...
Equipment changed.
Putting on Nickel Gamma of Frugality...
Equipment changed.
Putting on little box of fireworks...
Equipment changed.
Putting on bounty-hunting helmet...
Equipment changed.
[COLOR="Red"]You can't equip an off-hand item while wielding a 2-handed weapon.[/COLOR]

I put in a check to print(base.slots[$slot[offhand]].i) and found out it is trying to equip the Brimstone Bunker. When I both of my bunkers in the display case it did this:

Code:
[COLOR="Olive"]> equipt item drop[/COLOR]

Searching for Item     Drop
[outfit: (none)] [hobo: (none)] [rate: 157.081]
[outfit:     (none)] [hobo: Hodgman's imaginary hamster] [rate: 167.081]
[outfit:     Bounty-Hunting Rig] [hobo: (none)] [rate: 167.081]
[outfit:     Bounty-Hunting Rig] [hobo: Hodgman's imaginary hamster] [rate: 187.081]
[outfit:     Hodgman's Regal Frippery] [hobo: (none)] [rate: 110.08099]
[outfit:     Hodgman's Regal Frippery] [hobo: Hodgman's imaginary hamster] [rate:     151.081]
hat: bounty-hunting helmet
shirt: flaming pink shirt
pants:     plexiglass pants
weapon: duct tape sword
offhand: Hodgman's     imaginary hamster
acc1: Hodgman's lucky sock
acc2: Hodgman's bow tie
acc3:     Order of the Silver Wossname
familiar: Dandy Lion
familiar item:     little box of fireworks

Taking off Order of the Silver Wossname...
Equipment     changed.
Wielding duct tape sword...
Equipment changed.
Hodgman's     imaginary hamster
Holding Hodgman's imaginary hamster...
Equipment     changed.
Putting on Hodgman's lucky sock...
Equipment changed.
Putting     on Hodgman's bow tie...
Equipment changed.
Putting on Order of the     Silver Wossname...
Equipment changed.
Putting on plexiglass pants...
Equipment     changed.
Putting on flaming pink shirt...
Equipment changed.
[COLOR="Green"]done.[/COLOR]

Note that it came up with a very different configuration for my gear. That was interesting, but clearly line 1254 cannot be where the Brimstone Bunker is equipped. A bit of troubleshooting (involving a few extra print commands) reveals that the bunker is still being equipped a few lines later here:

Code:
	foreach s in base.slots {
		if (base.slots[s].i == $item[none]) { continue; }
		equip(s, base.slots[s].i);
	}

Of course that doesn't solve the problem of why it has allocated an off-hand item along with a two handed weapon. Somewhere, you must have forgotten to check the handedness of the weapon. The proof is that it changed my optimal gear when I moved the bunkers to my display case.
 

DerDrongo

Member
Of course that doesn't solve the problem of why it has allocated an off-hand item along with a two handed weapon. Somewhere, you must have forgotten to check the handedness of the weapon. The proof is that it changed my optimal gear when I moved the bunkers to my display case.
Ah, knowing it is adding the brimstone bunker helped identify where it was being added, testing a fix now
 

halfvoid

Member
for me, when selecting meat drop, it will prioritize a cup of infinite pencils (+15%) in the off hand over a Coily (+25%) as a 2 handed weapon.
 

DerDrongo

Member
for me, when selecting meat drop, it will prioritize a cup of infinite pencils (+15%) in the off hand over a Coily (+25%) as a 2 handed weapon.
does mafia support this item yet?
since it was added have you regenerated the item maps? (equipt.ash -regen)
 

Bale

Minion
Ah, knowing it is adding the brimstone bunker helped identify where it was being added, testing a fix now
Yay! I'm glad my troubleshooting helped. I'd have done that earlier, but trying to unravel such a complicated script is a big job. When you pointed me to the part of the code where items are equipped I was able to test that.

Looking forward to the next version.

does mafia support this item yet?
since it was added have you regenerated the item maps? (equipt.ash -regen)
I try to do that every week to keep up with the new items being added. It's a shame that it takes so long, but that is the price of convenience.
 

DerDrongo

Member
Version 1.8 (View attachment 1669)
Mainly a bug fixing version, familiar item selection and avoiding brimstone buckler with 2 handed weapons with a few minor changes to add more checks along the way

Also released is equipt_tester.ash ... its mainly for my own batch testing but should help with reporting problems, for example... if the script still had the brimstone buckler bug you could generate a pair of files to help, one containing your inventory/familiars the other containing the results from the script... all with a single command such as equipt_tester.ash trace item drop

equipt_tester.ash (View attachment 1670)
equipt_tests.txt (View attachment 1671)
All the tests should pass (remain in blank font for match expected result, green for higher than expected, red for lower) expect the third, its there to test if familiar weight modifiers are being used in normal equipment which will hopefully be supported next version

Yay! I'm glad my troubleshooting helped. I'd have done that earlier, but trying to unravel such a complicated script is a big job.
at over 2000 lines of code it can be tricky tracking down the bugs i can reproduce, thanks for the help :)

I try to do that every week to keep up with the new items being added. It's a shame that it takes so long, but that is the price of convenience.
If the script can tell what the highest item ID is then i might be able to automatically tell when an itemmap is out of date and try and check only the new items... but that will need a new ash command (using itemdesc.txt, currently 4132 lines, takes a performance hit negating any convenience gain)

>> CURRENTLY -fill[Moxie=10] will add atleast 10 moxie to your outfit using the least items
By the way, I don't think this works for me. With moxie of 1012 and wearing birthday suit, this command equipped the swashbuckling getup and Hodgman's bow tie.
The script shouldnt have been using outfit modifiers if it could reach 10 moxie without them, this has been fixed
 

Bale

Minion
Downloaded the new version, ran equipt -regen and...

Code:
[COLOR="Olive"]> equipt item drop[/COLOR]

Searching for Item Drop
[outfit: (none)] [hobo: (none)] [rate: 157.081]
[outfit: (none)] [hobo: Hodgman's imaginary hamster] [rate: 167.081]
[outfit: Bounty-Hunting Rig] [hobo: (none)] [rate: 169.081]
[outfit: Bounty-Hunting Rig] [hobo: Hodgman's imaginary hamster] [rate: 187.081]
[outfit: Hodgman's Regal Frippery] [hobo: (none)] [rate: 110.08099]
[outfit: Hodgman's Regal Frippery] [hobo: Hodgman's imaginary hamster] [rate: 151.081]
hat: bounty-hunting helmet
shirt: flaming pink shirt
pants: bounty-hunting pants
weapon: bounty-hunting rifle
offhand: (two handed weapon)
[COLOR="Red"]offhand is not empty!: Brimstone Bunker[/COLOR]
acc1: Order of the Silver Wossname
acc2: Baron von Ratsworth's monocle
acc3: Nickel Gamma of Frugality
familiar: Dandy Lion
familiar item: little box of fireworks

[COLOR="Red"]You can't equip an off-hand item while wielding a 2-handed weapon.[/COLOR]
Is there anything I can do to help troubleshoot this? With the bunkers in my display case it produces a rather different set of gear involving a duct tape sword and my imaginary hamster.
 

DerDrongo

Member
Is there anything I can do to help troubleshoot this? With the bunkers in my display case it produces a rather different set of gear involving a duct tape sword and my imaginary hamster.
I might need you to send me an inventory report (generated by equipt_tester.ash) to aid stomping this bug... and i cant be sure if its related but it doesnt seam to be picking the highest scoring outfit, which should be bounty hunter and hobo.... erm... that doesnt make sense.. it shouldnt be trying to build an outfit that contains a 2handed weapon and add an offhand hobo item
I will add some more checks when adding outfit/hobo items (they are not selected in the same way as normal items), as its getting late i probably wont get a new version out tonight
*grabs a piece of paper to write this down before i fall asleep*
 

Bale

Minion
Sure, I'd be glad to send you that inventory report

Code:
[COLOR="Olive"]> call scripts\equipt_tester.ash[/COLOR]

[COLOR="Red"]Unknown variable 'test_list' (equipt_tester.ash, line 150)[/COLOR]
You can use the wall over there if you feel a need to test the firmness of your head.
After changing test_list to local_save (hopefully I was correct about that)...

Code:
[COLOR="Olive"]> call scripts\equipt_tester.ash[/COLOR]

Taking off everything...
Everything removed.
Testing equipt.ash ... 0 item/familiar sets loaded...
[COLOR="Green"]all tests complete.[/COLOR]

[COLOR="#808000"]> call scripts\equipt_tester.ash help[/COLOR]

Equipt tester....
a basic tool to automate changing to a specific set of inventory items/familiars to aid testing

leave the inputbox blank to run all standard tests (from '.equipt_tests.txt')
type 'report' to generate '.equipt_tester_generated_inv.txt' and '.equipt_tester_generated_results.txt' which will include all your inventory/familiars and some results for those items/familiars
type 'trace <equipt options>' to create '.equipt_tester_generated_inv.txt' with just a single test ran (specified in place of '<equipt options>')

[COLOR="Olive"]> call scripts\equipt_tester.ash report[/COLOR]

Generating inventory report...
Generating results for 7 tests...
completed 1 of 7
completed 2 of 7
completed 3 of 7
completed 4 of 7
completed 5 of 7
completed 6 of 7
completed 7 of 7
[COLOR="Green"]complete....[/COLOR]
Requests complete.
 

Attachments

  • results.zip
    6.4 KB · Views: 24

DerDrongo

Member
Sure, I'd be glad to send you that inventory report

Code:
[COLOR="Olive"]> call scripts\equipt_tester.ash[/COLOR]

[COLOR="Red"]Unknown variable 'test_list' (equipt_tester.ash, line 150)[/COLOR]
You can use the wall over there if you feel a need to test the firmness of your head.
After changing test_list to local_save (hopefully I was correct about that)...
*Sigh* I never learn :)
yeah local_save is right

if my muddled brain is working at all 1.8b should fix the problem, just going to post it straight to this post for now as really really need some sleep :)
 

Attachments

  • equipt--v1.8b.ash
    99.9 KB · Views: 44

Bale

Minion
It worked! It worked! equipt v1.8b is brilliant! Thanks (again) for this wonderful script.

On my own I'd never have come up with that hybrid of hodgman, bounty hunter and plexiglass pants which is 2.5% better than straight Hodgman gear. Though I think I'll loose the 2.5% since my hamster gives much better regeneration and +Meat when I use full Hodgman regalia. :D However, most of the time in hardcore I have no such options and this script shines brightest when my gear is constantly changing.
 
Last edited:

asturia

Minion
It still doesn't use my 3 time.swords correctly.
It always wants to use the depleted grimacite gravy boat insead of the third time sword.

Any idea why it wants to do this?
 

Rinn

Developer
Did you try regenerating the Adventures data file? It's possible you generated it on a day where the boat gave more then 3 adventures and equipt is using that number instead of the correct value.
 
Top