Bug - Fixed NPC stores potentially out of order with Five Finger Discount

Bale

Minion
Using r14372. It seems that if you have the AT skill "Five Finger Discount" the mall purchasing frame will order the NPC store by the default price, not the price that the player will actually pay. I imagine this will also have a problem with the Travoltan Trousers which are stackable with the AT skill, but I cannot test that.

This can be easily seen by searching for Dramatic™ range if you have that skill. As shown at the bottom of this screenshot:

wfYXSVh.png
 
Last edited:

Bale

Minion
You're welcome. I often try to test changes if it is reasonably easy for me to do so. That's why I asked for the test case when I couldn't figure it out. This time it mattered.
 

Veracity

Developer
Staff member
It was a bug in the comparison function for PurchaseRequest objects; it looked directly at the "price" field, rather than getting it via getPrice(). NPCPurchaseRequest overrode that method and took the AT skill and Travoltan trousers into account.

Revision 14373
 

Bale

Minion
Well done. One question remains though. Why do you place the NPC store after all mall stores at the same price? Shouldn't the store with the most available items be listed first?

Related point... Isn't it better for the game to give business to the NPC since that sinks the meat? That is a reason to put the NPC store first.
 
re r14372: "Sort mall search results that are returned by StoreManager.searchMall so that
NPC stores get inserted into the correct place and that stores with larger
stocks appear before those with fewer items at the same price."

I understand that having larger stocks at the same price appear first makes it easier to buy in bulk, but consider this from the low stock seller's perspective for a moment: To make a sale, they must underprice higher volume sellers. This in effect forces them to give the big seller the opportunity to buy up the lower priced items and mark them up. Meanwhile, the smaller volumes at lower price now appear first, and the list is volume-fragmented anyway. Not bad for buyers, I guess, but it's not the best of situations for more casual small volume sellers. I go out of my way to select from low volume sellers when not doing implicit buying, since I imagine what it would be like for them to place a few items in the mall and never sell them - means more to them than the big guy.

Of course, it doesn't always work out this way, just a thought experiment. But how about an option to sort smaller volumes first (at same price)? That few would use, probably. Anyway, just a thought that might make for a more fluid economy from the perspective of involving more stores. And yes, balanced against the considerations of needing to retrieve more results, etc.
 

lostcalpolydude

Developer
Staff member
The current setup is geared toward reduced server hits. If you start with the store that has the most of an item, it's more likely that you won't need to buy from a second store.

This is how mafia has worked for as long as I can remember. The only thing that changed with this update was the position of the NPC store on the list.
 
Yes, I'm aware of both points (reduced hits, pre-existing behavior), and I wasn't really expecting a change, just thought the counterpoint might be worth considering. It does create a market bias of sorts, and for some items (and not infrequently either), you can see the low-volume, lower-price volume fragmentation effect, which negates the server hit reduction. But only for some items, whereas reversing the sort would do it for all items, so yeah, I see the point. I'll still cherry pick the little guys when I can ;-)
 

Veracity

Developer
Staff member
You can do whatever you want on the Mall Purchase Frame (just like you can in the browser), but we're talking about automating purchases - and our goal there is to get you the best price with the fewest server hits.
 

Veracity

Developer
Staff member
Well done. One question remains though. Why do you place the NPC store after all mall stores at the same price? Shouldn't the store with the most available items be listed first?

Related point... Isn't it better for the game to give business to the NPC since that sinks the meat? That is a reason to put the NPC store first.
It's actually coded to put NPC stores last if you are in Hardcore and first otherwise.

Code:
		if ( !this.isMallStore && pr.isMallStore )
		{
			return KoLCharacter.isHardcore() ? -1 : 1;
		}

		if ( this.isMallStore && !pr.isMallStore )
		{
			return KoLCharacter.isHardcore() ? 1 : -1;
		}
I'll think about your suggestion. Perhaps we should let price/quantity rule all any time you can interact with the mall.
 

Veracity

Developer
Staff member
OK, revision 14374 removes any special checks for Hardcore or Interaction. Not needed!

- If prices differ, lowest price comes first.
- If limits differ, highest limit comes first (the "limit" of a store with no artificial limit is the available quantity - unlimited for an NPC store)
- If total stocked quantity differs, lowest quantity comes first (if limits are the same but one store has more in stock, may as well try to buy out the one with the least - which might be one who doesn't even have a limit, but happens to have the same number as one with an artificial limit. Reward them for not having a limit. ;))
 

Veracity

Developer
Staff member
Again - this ONLY changes where the NPC store gets placed in a list of purchase requests; everything else has been in place for mall purchases for a long time.
 

Bale

Minion
Reward them for not having a limit.

Yay! Limits are annoying. I know why limits are good for some people and some sellers use them to try to help restrict inflation, but that doesn't change the fact that limits are annoying.
 
Top