Bug - Fixed Jabanero Pepper obtained from Mall not Hermit ?

Darzil

Developer
It appears that Mafia preferred the Mall (100 meat) over the Hermit (50 meat) for Jabanero Pepper? This was in aftercore, with coinmasters and mall both ticked for item acquisition, all the non-worthless item items and a hermit permit in my possession.

Am I missing something? I know 50 meat is pretty irrelevant.

Code:
Verifying ingredients...
Verifying ingredients for insanely spicy     jumping bean burrito (1)...
Searching for "jumping bean burrito"...
Search     complete.
Searching for "flat dough"...
Search complete.
Searching     for "pile of jumping beans"...
Search complete.
Verifying     ingredients for spicy jumping bean burrito (1)...
Verifying ingredients     for jumping bean burrito (1)...
Creating jumping bean burrito (1)...
You     acquire an item: jumping bean burrito
Successfully created jumping bean     burrito (1)
Creating spicy jumping bean burrito (1)...
You acquire     an item: spicy jumping bean burrito
Successfully created spicy jumping     bean burrito (1)
Searching for "jabañero pepper"...
Search     complete.
Purchasing jabañero pepper (1 @ 100)...
You acquire     an item: jabañero pepper
Purchases complete.
Creating insanely     spicy jumping bean burrito (1)...
You acquire an item: insanely spicy     jumping bean burrito
Successfully created insanely spicy jumping bean     burrito (1)
 
Code:
> set debugCreate = true

debugCreate     => true

> acquire jabanero pepper

Searching     for "jabañero pepper"...
Search complete.
Using     cached search results for jabañero pepper...
Purchasing jabañero     pepper (1 @ 100)...
You acquire an item: jabañero pepper
Purchases     complete.
I made that pepper into an insane burrito, then requested mafia to make a second (no jabaneros in inventory).

Code:
> make insanely spicy bean burrito

Verifying     ingredients for insanely spicy bean burrito (1)...
Verifying     ingredients for spicy bean burrito (1)...
Verifying ingredients for     bean burrito (1)...
Using cached search results for hill of beans...
Purchasing     hill of beans (1 @ 100)...
You acquire an item: hill of beans
Purchases     complete.
Using cached search results for wad of dough...
Saving     outfit: Backup
Outfit saved
Putting on outfit: Bugbear Costume
Equipment     changed.
Purchasing wad of dough (1 @ 50)...
You acquire an item:     wad of dough
You spent 50 Meat
Purchases complete.
Creating flat     dough (1 of 1)...
Using 1 wad of dough...
You acquire an item: flat     dough
Finished using 1 wad of dough.
Successfully created flat dough     (1)
Putting on outfit: Backup
Equipment changed.
Creating bean     burrito (1)...
You acquire an item: bean burrito
Successfully     created bean burrito (1)
Creating spicy bean burrito (1)...
You     acquire an item: spicy bean burrito
Successfully created spicy bean     burrito (1)
Searching for "jabañero pepper"...
Search     complete.
Purchasing jabañero pepper (1 @ 100)...
You acquire     an item: jabañero pepper
Purchases complete.
Creating insanely     spicy bean burrito (1)...
You acquire an item: insanely spicy bean     burrito
Successfully created insanely spicy bean burrito (1)
I'm not sure how to flush the cache of the valuation on the pepper, but in any case the first acquisition of one shows that mafia thinks the mall is cheaper than a gum.
 

slyz

Developer
Oops, I meant
Code:
set debugBuy = true
There is no debugCreate preference. However, there is a debugcreate CLI command, that you can use instead of create to get this sort of mysterious information:
Code:
> debugcreate jaba pepper

jabañero pepper.canMake(1) => 272

jabañero pepper.canMake(272) => 272

jabañero pepper.canMake(273) => 272
 
Code:
> set debugBuy = true

debugBuy => true


> make insanely spicy bean burrito

Verifying ingredients for insanely spicy bean burrito (1)...
☯ wad of dough onhand=25
☯ flat dough mall=100 make=25
☯ hill of beans mall=100 make=2147483647
Searching for "bean burrito"...
Search complete.
Searching for "flat dough"...
Search complete.
Searching for "wad of dough"...
Search complete.
☯ wad of dough onhand=25
☯ flat dough mall=100 make=25
Searching for "hill of beans"...
Search complete.
☯ hill of beans mall=198 make=2147483647
☯ bean burrito mall=150 make=223
☯ spices onhand=1
☯ spicy bean burrito mall=396 make=151
Verifying ingredients for spicy bean burrito (1)...
☯ wad of dough onhand=25
☯ flat dough mall=100 make=25
☯ hill of beans mall=198 make=2147483647
☯ wad of dough onhand=25
☯ flat dough mall=100 make=25
☯ hill of beans mall=198 make=2147483647
☯ bean burrito mall=150 make=223
Using cached search results for bean burrito...
Purchasing bean burrito (1 @ 109)...
You acquire an item: bean burrito
Purchases complete.
Creating spicy bean burrito (1)...
You acquire an item: spicy bean burrito
Successfully created spicy bean burrito (1)
☯ worthless item mall=2147483647 make=2147483647
Searching for "jabañero pepper"...
Search complete.
Purchasing jabañero pepper (1 @ 100)...
You acquire an item: jabañero pepper
Purchases complete.
Creating insanely spicy bean burrito (1)...
You acquire an item: insanely spicy bean burrito
Successfully created insanely spicy bean burrito (1)
So apparently it considers a worthless item to cost maximum meat.
 

slyz

Developer
I'm stumped on this one. I don't have access to the mall right now, that's probably why I can't investigate this correctly.
 

Veracity

Developer
Staff member
I actually fired up Eclipse to poke at this a bit, but I gave up before figuring it out.
Not that I'm intending to deter anyone else from looking at it. ;)
 
So, the problem is that the Hermit CoinMaster wants WORTHLESS_ITEM (go item 13 !!! ) and getCount(inventory) says you have none.

I got it to use a worthless from inventory with this patch.

I don't think this should be THE fix... more of a demonstration of the problem.

And if you have no worthless items, it won't try to use gum to get one. So, this patch is lacking in that way as well.
 

Attachments

  • pepper.patch
    936 bytes · Views: 20
Ok, this patch will buy and use gum to get a worthless to get a hermit item.

And, of course use the hermit over the mall :)

This should fix it for all scenarios... or so I think :)
 

Attachments

  • buyhermit.patch
    1.3 KB · Views: 19

Theraze

Active member
What about if the user doesn't currently have enough starter items to guarantee a worthless item with a single gum, so that it's cheaper to buy from the mall?
 

Veracity

Developer
Staff member
There is a method, InventoryManager.currentWorthlessItemCost(), which can be used to calculate the "expected" cost of buying enough gum to get a worthless item, based on how many starter items you have. This post discusses the math for that.

The match is correct, but it doesn't take Travoltan Trousers into account, so it overestimates the cost for those of you (us) who have that item. Considering that is a Softcore item and by the time I have it available, I have all the starter items, it didn't occur to me. :)
 
Top