Finding the average prices from drawing a random card from the deck of many cards

ereinion

Member
I am considering making a script to figure out what my best options are for what to with my draws from the deck of many cards in aftercore. However, after having had a look at how it works for some of the cards giving you items from large item-pools (e.g. the X of Swords or the X of Cups) I started having second thoughts. One problem is that the mechanics doesn't seem to be very-well spaded - the wiki certainly doesn't seem to have any info about exactly which items can be found in the pools. My best guess is that the items available from the cards are the ones which can be found in the PvP stealable items and are of the category specified by the card, which I should be able to figure out using ash. A bigger problem (in my mind) is that to get the prices for all the items acquireable from the deck I'll have to do a lot of mall-requests, which will both take a while and cause quite a few server hits.

Considering that I expect the actual improvement in meat-gains to be pretty mariginal compared to just drawing for items which I know sell for a bit (blue mana, for instance) and that it will probably take a bit of work to create a script which can figure out the approximate meat value of drawing each of the cards in the deck, I figured I'd first ask if any of the people on this forum has looked at this problem already. I was thinking that using historical_price could be a good option, but I am a bit curious about where it gets its values from - is it from the last time I searched for a given item, or the last time any mafia-user did so? The wiki-page doesn't really say, and it makes a bit of a difference in how useful the results it gives would be.

In regards to figuring out the value of e.g. swords, I'd also like to ask if there are any cli-commands or ash-functions for figuring out expected smash-yield from a given piece of equipment - my initial searching indicates no, but I could very much be wrong.

I very much look forward to see what input you guys have for these questions - in advance, thanks for all your help! :)
 

lostcalpolydude

Developer
Staff member
I was thinking that using historical_price could be a good option, but I am a bit curious about where it gets its values from - is it from the last time I searched for a given item, or the last time any mafia-user did so? The wiki-page doesn't really say, and it makes a bit of a difference in how useful the results it gives would be.
There's a setting, Preferences -> General -> "Share recent Mall price data with other users". With that checked, you will get updated prices for what everyone searched for when you log in, and you will send updated prices when you log out.

There's also historical_age(), so you can get the mall_price() if historical_age() is too large, and use historical_price() otherwise. I often have a separate function to handle that, which will also return the item's autosell price if the item is at mall minimum.

In regards to figuring out the value of e.g. swords, I'd also like to ask if there are any cli-commands or ash-functions for figuring out expected smash-yield from a given piece of equipment - my initial searching indicates no, but I could very much be wrong.

It's not the easiest thing to find, but get_related will tell you that.
 

Crowther

Active member
In regards to figuring out the value of e.g. swords, I'd also like to ask if there are any cli-commands or ash-functions for figuring out expected smash-yield from a given piece of equipment - my initial searching indicates no, but I could very much be wrong.
I wouldn't bother adding that complexity to your script. If the swords smash into something valuable that should be reflected in the mall price. If it isn't, then you should be buying them in the mall and smashing them, but that's a different script and different thing. No reason to combine it with your best card to draw script.

This actually sounds like a fun project.
 

fronobulax

Developer
Staff member
This actually sounds like a fun project.

I look forward to it. I would be interested in the tradeoffs between random and choosing (not that I expect this to handle them out of the gate) because the expected value of five random cards might very well exceed the value of any particular draw.
 

Crowther

Active member
I look forward to it. I would be interested in the tradeoffs between random and choosing (not that I expect this to handle them out of the gate) because the expected value of five random cards might very well exceed the value of any particular draw.
Yes and the second round might depend on if high value or low value card were drawn during the first round.
 
Top