DarkstarProject / darkstar

DEPRECATED - FFXI Server Emulator - See Project Topaz
https://github.com/project-topaz/topaz
GNU General Public License v3.0
455 stars 550 forks source link

Bastore Bream sells for 6k to Fisherman's Guild #4016

Open Wiggo32 opened 7 years ago

Wiggo32 commented 7 years ago

I have:

Client Version (type /ver in game) :30170728_2

Server Version (type !revision in game) :unknown

Source Branch (master/stable) :master

Additional Information (Steps to reproduce/Expected behavior) : Resale price for Bastore Bream is 582-615 gil. http://ffxiclopedia.wikia.com/wiki/Bastore_Bream But, take it to the guild NPC Babubu who you're fishing right next to and she'll give you 6,264 per fish! Sounds fishy to me.

TeoTwawki commented 7 years ago

Guild pricing depends on their stock level, can often get far more than regular shops. Or far less, if they are overstocked.

I'd need to see some retail data on the min and max guild pricing to know if this was off.

Wiggo32 commented 7 years ago

It's off. Your "retail data" will confirm. Trust me. I can catch 2 stacks of Bream in an hour. Then turn around and sell them to the NPC right behind me for 150,336 gil. That sound right to you?

TeoTwawki commented 7 years ago

I don't have retail data for that "will confirm". So I "can't say" and its been so long since I gamed the guild NPCs on retail I don't know "whats sounds right" to me anymore. 😉

So someone more familiar than me will hafta do the fixin, and hopefully make a good case for the "yes I actually checked this" part of it, ya know?

Its easy to modify for server operators until then. There's an impossible to miss SQL table that holds guild pricing. Or can go the drastic route and disable the guild style shops (one line to comment out in npc script) and just add a regular shop containing what you want at fixed prices (see any non guild shop npc script ever).

Personally I'd just crush the max sell in the guild table. Can be done in one query, and players can just NPC stuff at non guilds if they hafta npc and guild price is "too low" after the change.

Examples :

UPDATE guild_shops SET max_price = min_price WHERE max_price > min_price;

Would bottom out all the guild prices.

UPDATE guild_shops SET max_price = min_price*2 WHERE max_price > min_price*2;

Would clamp them all to 2 times the minimum.

Wiggo32 commented 7 years ago

I checked the "impossible to miss" SQL and in there are values for what the NPC sells the item for. Not what you can sell to the NPC. https://github.com/DarkstarProject/darkstar/blob/master/sql/guild_shops.sql am i looking in the wrong place?

TeoTwawki commented 7 years ago

You are "looking in the right place" but not understanding "how guild shops work".

Its the same base used for buy and sell. "And then math happens." Say the guild is selling at 300. Then its buying at 100 at the same stock amount. But then a new game day starts and now it has a lot more of that item from people selling it. Now it sells them for 30 and buys them at 10. Numbers pulled from my rear end for example purposes. The guild doesn't have values for a sell and a buy in its table - its has a "guild price". buy/sell and low stock/high stock modify that price.

teschnei commented 7 years ago

PItem->setBasePrice(PItem->getMinPrice() + ((float)(PItem->getStackSize() - PItem->getQuantity()) / PItem->getStackSize()) * (PItem->getMaxPrice() - PItem->getMinPrice()));

TeoTwawki commented 7 years ago

See? Maths.

Wiggo32 commented 7 years ago

I see. When I do that though, that means people will be able to buy the Bream for cheaper than normal prices also, Right?

TeoTwawki commented 7 years ago

my examples would cause a "cheap goods" situation. Do math unto the min and max as you see fit.

Until it is properly fixed.

Wiggo32 commented 7 years ago

Ok, I got it! I didn't realize that the guilds weren't meant to behave like retail. Now that I'm unconfused, I'll play with the prices. Thanks!

TeoTwawki commented 7 years ago

Oh they were "meant to" They just sorta aren't and we don't have everything we need to make it so. Sorry about that. We've had some previous complaints about it but they tended to start off with some nutty arguments, like talking about the AH value instead of the guild NPC. Another reason this is hard to get right is a lot of retail servers are just sorta..dead...So we can't really get the extremes of what retail does anymore, have to wing it. Best we can do is maintenance camp a retail guild to see what it starts off, then buy/sell a bit and see what our stock change did to it in a small time frame.

teschnei commented 7 years ago

please use discord for discussing specifics like this