jasonharper
Developer
Ok, big change in r7531 - the most recently seen Mall price for each item is now remembered between sessions, so that you can always get an approximate idea of the value of any tradeable item without needing a server hit. The ASH functions to use are:
int historical_price(item) - Returns price, or zero if no data is available. Will never hit the server.
float historical_age(item) - Returns age of price data, in days.
* The price has the same meaning as with mall_price(): it was 5th available item as of the time the search was performed, or the last one if there weren't that many in the Mall.
* You'll get zero for any newly-added item prior to the first search for it, or for any of the (currently 16) tradeable items that aren't available at any price - hand turkey outlines, for example.
* The returned price is variable for NPC-buyable items, depending on whether the search that last updated it was done by a player who had access to the store that carries it or not.
The price data is stored as mallprices.txt in mafia's data folder, and is intended to be shared: CLI command update prices URL will retrieve a copy of the file that's been made available somewhere, and merge newer prices into your copy. To start things off, I'm now automatically uploading mine after every session, and you can retrieve it via:
update prices http://nixietube.info/mallprices.txt
The idea is that if we can set up a network of people updating from each other, then everybody will be able to benefit from reasonably current price data, without anybody having to perform an excessive number of Mall searches.
If you choose to make your data public: there shouldn't be any privacy issues, as there is no personally identifiable data in mallprices.txt. It doesn't even reveal anything about your Mall usage habits, as there is no way to tell whether a given updated price came from a search you performed, or was received in an update from someone else.
If you choose to receive updates from others: please understand that this will expose you to some risk of undesired behavior due to falsified data. There is some consistency checking of the received file, but it can't (for example) tell that the price of twinkly wads isn't a million meat - if it could infallibly tell if a price was correct, there would be no need for the price data in the first place!
int historical_price(item) - Returns price, or zero if no data is available. Will never hit the server.
float historical_age(item) - Returns age of price data, in days.
* The price has the same meaning as with mall_price(): it was 5th available item as of the time the search was performed, or the last one if there weren't that many in the Mall.
* You'll get zero for any newly-added item prior to the first search for it, or for any of the (currently 16) tradeable items that aren't available at any price - hand turkey outlines, for example.
* The returned price is variable for NPC-buyable items, depending on whether the search that last updated it was done by a player who had access to the store that carries it or not.
The price data is stored as mallprices.txt in mafia's data folder, and is intended to be shared: CLI command update prices URL will retrieve a copy of the file that's been made available somewhere, and merge newer prices into your copy. To start things off, I'm now automatically uploading mine after every session, and you can retrieve it via:
update prices http://nixietube.info/mallprices.txt
The idea is that if we can set up a network of people updating from each other, then everybody will be able to benefit from reasonably current price data, without anybody having to perform an excessive number of Mall searches.
If you choose to make your data public: there shouldn't be any privacy issues, as there is no personally identifiable data in mallprices.txt. It doesn't even reveal anything about your Mall usage habits, as there is no way to tell whether a given updated price came from a search you performed, or was received in an update from someone else.
If you choose to receive updates from others: please understand that this will expose you to some risk of undesired behavior due to falsified data. There is some consistency checking of the received file, but it can't (for example) tell that the price of twinkly wads isn't a million meat - if it could infallibly tell if a price was correct, there would be no need for the price data in the first place!