Joined: Sat Nov 05, 2005 9:29 am Posts: 1968 Location: In a Rental.
Oh-oh... I think theres a glitch in the market code.
I've looked it over a few times and i can't spot it, but the results
keep happening.
I believe the free-market fail-safe code is getting ignored. Prices
aren't stopping if they are too low, or too high.
In the last incarnation, I could push the prices to thier market-limit
minimum by editing the existing freemarket-merge-27032.xml.
Using a char replace, I would cut off the last digit of the prices and
make them 1/10th. Then the free-market fail-safes would catch
them and adjust them to the 1/3 minimum for me.
Now, it's not catching it. I had my servers running for 3 days as
such, and some of the lower value items even got recorded in the
negatives(dirt-ball reached -60).
Can some one else try to duplicate this? I don't want to look totally crazy.
Added:
I looked again, and am almost sure i spotted something related..
277-279
// Set sell price to 0.8X the buy price int selPrice = int(float(accessory->getPrice()) / float(accessory->getBundle()) * 0.8f);
is outside of the braces for the failsafes of
265-270
// Make suse price does not get greater than 1.5X the original price if (price > int(float(accessory->getOriginalPrice()) * limit)) price = int(float(accessory->getOriginalPrice()) * limit); // Make sure price does not get lower than 1.5X the original price else if (price <int>getOriginalPrice()) / limit)) price = int(float(accessory->getOriginalPrice()) / limit);
... making it lower prices 'after' the failsafes are checked, not before.
However, since the situation I use above doesn't lower any prices, it's
still slipping somewhere else.
don't know if it helps. but with the last known check-out build from the cvs, i still see kicks often.
Mon Jan 28 08:49:22 2008 - NetServerTCP2Destination 0: Recv returned an error 1622875645
Thanks Thrax, this is the standard way that the SDL_Net library lets me know if someones disconnected. I'll have a look into the library and see if it can also occur under other situations.
Oh-oh... I think theres a glitch in the market code.
I've looked it over a few times and i can't spot it, but the results keep happening.
Not sure this is a glitch. I've changed the way the prices are stored.
Previously the prices in the file were clamped between the min and max prices allowed for the weapon. This meant that if you bought a whole load of an item (regardless of how many) the item would be stuck at the maximum cost. Then if you were to buy another item in the same group its price of the original item would immediately fall.
e.g.
Buying 1000 of item x would put item x's price to its max.
Then buying 1 item y would move item x's price down a little
This seemed wrong as item x was actualy bought 1000 times more than item y.
So I changed it so after the adjustments to price are made the item prices are not clamped between min and max. However when the item price is displayed to the user (or bought) it is clamped.
So now in the freemarket.xml files you will see an reflection of the price the item would get to if there was no min or max.
Joined: Sat Nov 05, 2005 9:29 am Posts: 1968 Location: In a Rental.
gcamp wrote:
Not sure this is a glitch. I've changed the way the prices are stored.
-snip-
So I changed it so after the adjustments to price are made the item prices are not clamped between min and max. However when the item price is displayed to the user (or bought) it is clamped.
So now in the freemarket.xml files you will see an reflection of the price the item would get to if there was no min or max.
Oh...
I'll have to find a different way then.. I'd been pushing all
prices to 1/3 base, none could drop further for the first few
weeks. And then letting them grow to what the players were
willing to spend.
The reason i'd asked for the variable limits, was to expand the top and
bottom manually. If something ever did finally reach 300%, i'd have
noted it... and repaired the base price to account for it's popularity.
I'll watch this new form for a while then, and see what appears.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum