Feature - Implemented always update historical price when possible

Theraze

Active member
Wrong, as roippi says...
> historical_price palm frond fan

Returned: 250

> mall_price palm frond fan

Searching for "palm-frond fan"...
Search complete.
Returned: 200

> historical_price palm frond fan

Returned: 200
historical_price will be updated when mall_price is called, if it's different. It won't make an additional server hit on its own though...
 

Theraze

Active member
Quite possible, but that's a speculative interpretation of his words rather than a literal one... :)
 

Fluxxdog

Active member
The function itself doesn't update. Unless the wiki and my memory is wrong, historical_price() will never go to the server to search for mall prices. mall_price() only updates. The conversation became confusing when both were being used seemingly interchangeably by Theraze.

historical_price() only depends on mafia's internal data. That data can be adjusted by mall_price() or manually editing the .txt file, but it never updates on it's own.
mall_price(), when called, will search for the appropriate mall price if that price hadn't been searched for yet in the current session. That data would then be used in the future by historical_price().
The Purchases Tab and the Store Manager perform the same search that mall_price() does. However, as you noted in your OP, their values have no effect on mall_price() or historical_price().

historical_price(): "I remeber when bread cost a nickel!"
Store Manager: "Nope, it costs 2 bucks now."
historical_price(): "I remeber when bread cost a nickel!"
mall_price(): "Uh, it's 2 bucks a loaf now grandpa."
historical_price(): "I remember when bread cost 2 bucks!"
Puchases: "Oh hey, it costs $3 now."
historical_price(): "I remember when bread cost 2 bucks!"
 
Last edited:

Bale

Minion
Nobody disputes the mechanism. This "disagreement" only exists because of misunderstood terminology.

historical_price(): "I remeber when bread cost a nickel!"
Store Manager: "Nope, it costs 2 bucks now."
historical_price(): "I remeber when bread cost a nickel!"
mall_price(): "Uh, it's 2 bucks a loaf now grandpa."
historical_price(): "I remember when bread cost 2 bucks!"
Puchases: "Oh hey, it costs $3 now."
historical_price(): "I remember when bread cost 2 bucks!"

Funny!
 

roippi

Developer
Yeah, semantic kerfuffle.

r11296 should fill this. Purchases tab search (or "price analysis" search on store manager) will update mall_price and historical_price once per item per session.
 

xKiv

Active member
On a counter shared with mall_price(), or in addittion to that?
Actually, I should be able to check that myself
...
yes, shared.
So now it's
Code:
historical_price(): "I remeber when bread cost a nickel!"
Store Manager: "Nope, it costs 2 bucks now."
historical_price(): "I remeber when bread cost 2 bucks" # important change is here
mall_price(): "So do I!"
Puchases: "Oh hey, it costs $3 now."
historical_price(): "I remember when bread cost 2 bucks!"
mall_price(): "So do I!"
 

Fluxxdog

Active member
Cool. It seems a step toward the OP request. The once per session update uses either mall_price(), Store Manager, or Purchases, whichever comes first.

Would it be an issue to have Purchases and Store Manager continually update after that as the user manually searches? I don't quite get why some people likened it to botting. (I do understand Mafia's intentional work against mallbots and spambots.)
 

Winterbay

Active member
There's no change there is there? I mean, basically that uploads your mallprices.txt to kolmafia.us and replaces any information on the server that is older than your data when you log out. This would just mean that there is a higher probability that your historical_price() is somewhat correct when you log in...
 

Theraze

Active member
Yeah... people using mall_price manually will get historical_price to update regardless of historical_age. People using historical_age will end up running mall_price less, because mallprices.txt will be updated slightly more frequently.
 

Bale

Minion
So how does "share mall data with other users" fit into this?

It increases the chance that historical_price() will be recent since everyone who enables it will update everyone else's prices by simply searching the mall.
 
Last edited:

Fluxxdog

Active member
Re: PM - Thanks Theraze, that explains a lot. I was going to ask what the point of actually having historical_price() but you answered that succinctly.
 
Top