Is this a bug or feature?
This is marked as a feature rather than a bug as this could be intended behavior, just that it hadn't considered a future with mall extinction.
First Issue
When an item is mall extinct(or only 4 is available), then mall_price will return -1
Edit: I was wrong, an item with at least one in mall still updates.
However, historical price will not update to reflect this and will instead report the same historical price that was stored. Even if the historical price is say, 60m. For example "Jeppson's Malort" is reported at 450m, but is mall extinct. This is always going to be a thing for all quantity limited items, such as iotms.
Although we could update historical_price to say mall max 999_999_999, I think it should be updated to -1 to reflect that it is mall extinct, not mall max.
If this is corrected, then the next issue then comes into play.
Second issue
We can upload -1 to the historical price database on the site (Not sure if that's an issue), but mafia will not load -1 due to this check
Now, that check is actually valid, because historical_price should not save a price as -1. That's strictly a modded mafia or third party call thing.
So instead the line will fail to load while logging a warning which is no longer desired if -1 is now a thing.
In regards to the site, @Veracity is probably the one to poke about it from what I understand.
So why you looking at this?
The reason I was playing with the whole historical_price thing is due to a separate project which is basically aimed at an alternative source of "historical prices" without the 5th item limitation, but with its own inaccurate limitations and funny behavior.
The cliff notes is that it isn't a true snapshot of the lowest price in mall and will adjust the displayed price by factors such as sales, limits, availability, with some decay for price swings. Basically, it was created as a tool to value items while attempting to ignore abnormal pricing and without asking users to do their own batches of server hits. So it may see some item at 1/day, yet it may skip the first 5 stores if the item is popular.
I was looking into historical_price as it was brought to my attention that mafia's historical prices could benifit from also being updated.
It should be mentioned though that as I am not running this through mafia I have to reimplement mafia's pricing logic to ensure there's no abnormal prices ever reported, it must always reflect exactly what mafia thinks the price would be if mafia had been the one to look it up. Thus it's still in the testing stages until I'm absolutely confident, which will take some time.
I do aim to eventually make most of the logic open source for transparency when I've finished prettifying the code, with an exception for code useful for mall botting. No need to provide the tools for that.
This is marked as a feature rather than a bug as this could be intended behavior, just that it hadn't considered a future with mall extinction.
First Issue
When an item is mall extinct
Edit: I was wrong, an item with at least one in mall still updates.
However, historical price will not update to reflect this and will instead report the same historical price that was stored. Even if the historical price is say, 60m. For example "Jeppson's Malort" is reported at 450m, but is mall extinct. This is always going to be a thing for all quantity limited items, such as iotms.
Code:
> js const i = Item.get("Jeppson's Malort"); print("Historical: " + historicalPrice(i)); print("Mall: " + mallPrice(i, 0)); print("Historical: " + historicalPrice(i));
Historical: 450000000
Searching for "Jeppson's Malort"...
Search complete.
Mall: -1
Historical: 450000000
Returned: null
Although we could update historical_price to say mall max 999_999_999, I think it should be updated to -1 to reflect that it is mall extinct, not mall max.
If this is corrected, then the next issue then comes into play.
Second issue
We can upload -1 to the historical price database on the site (Not sure if that's an issue), but mafia will not load -1 due to this check
Now, that check is actually valid, because historical_price should not save a price as -1. That's strictly a modded mafia or third party call thing.
So instead the line will fail to load while logging a warning which is no longer desired if -1 is now a thing.
In regards to the site, @Veracity is probably the one to poke about it from what I understand.
So why you looking at this?
The reason I was playing with the whole historical_price thing is due to a separate project which is basically aimed at an alternative source of "historical prices" without the 5th item limitation, but with its own inaccurate limitations and funny behavior.
The cliff notes is that it isn't a true snapshot of the lowest price in mall and will adjust the displayed price by factors such as sales, limits, availability, with some decay for price swings. Basically, it was created as a tool to value items while attempting to ignore abnormal pricing and without asking users to do their own batches of server hits. So it may see some item at 1/day, yet it may skip the first 5 stores if the item is popular.
I was looking into historical_price as it was brought to my attention that mafia's historical prices could benifit from also being updated.
It should be mentioned though that as I am not running this through mafia I have to reimplement mafia's pricing logic to ensure there's no abnormal prices ever reported, it must always reflect exactly what mafia thinks the price would be if mafia had been the one to look it up. Thus it's still in the testing stages until I'm absolutely confident, which will take some time.
I do aim to eventually make most of the logic open source for transparency when I've finished prettifying the code, with an exception for code useful for mall botting. No need to provide the tools for that.
Last edited: