Auno.org: 18.8.62 | Live servers: 18.8.62

Forums

Forums > auno.org > Development > Value Formula

Author Content
anonymous @195.7.84.61
Anonymous


Joined: N/A
Posts: 0

Posted: Fri Apr 25, 2003 12:10
I have looked a bit into what things are worth in shops and the Value tag in the database.
It seems to me that the formula you are using to interpolate between the values are not the correct one.

This is the formula that I have tested (and confirmed):
Value = A * QL *QL - 2 * A * QL + C

A and C are constants.

A = (v2 - v1) / (q2*q2 - q1*q1 - 2*(q2 -q1))
C = v1 - A*(q1*q1 - 2*q1)

v1 = Value at low QL (usually at QL 1).
v2 = Value at high QL (usually at QL 200).
q1 = Low QL.
q2 = High QL.

I tested this formula on "Wire Drawing Machine" in Trade section of Omni General Store.
To get the actual buy price, lower the value with 1% for each full 50 in Computer Literacy.

I have yet to break the sell formula yet. Anyone knows how it is related to the buy value?

PS. Login does not seem to work for me (using Safari on MacOSX). DS.

/Firebird
anonymous @195.7.84.61
Anonymous


Joined: N/A
Posts: 0

Posted: Fri Apr 25, 2003 13:13
This formula does not seem to work that well on items that are not defined at QL 1 and 200.
For example, Over-Tuned Sleekblaster lies between QL 41 och QL 60. I added the values given by
the database into the formula and it does not seem to work out correctly (compared prices for a
QL 43 item). I am not sure why it does not work. It could be that the Values given by the database
already has been interpolated. Will test some more later tonight.
Firebird
Registered user
SWEDEN

Joined: 25 Apr 2003
Posts: 1

Posted: Sat Apr 26, 2003 16:02
YES! I have cracked the formula!!!

Here it is:

v = A*(q^2 - (2*q1)*q) + C

A = (v2 - v1) / (q2 - q1)^2
C = v1 + A*q1^2


Description of the different variables (example values is from Cast-Off E-Beamer).
q1 = Min QL for item (21).
q2 = Max QL for item (40).
v1 = Value at Min QL, taken from database (9096)
v2 = Value at Max QL, taken from database (25821)
q = Wanted QL
v = Value at wanted QL.


How Computer Literacy modifies these values:
mod = 1% for each 40 in CL.

CL 118 => mod = 1.02
CL 120 => mod = 1.03

Buy value = v / mod
Sell value = v * mod / 25


I have tested these values with several different items at different maxQL and minQL and it works
perfectly (except that the final value can be off by 1 or 2).

Forums > auno.org > Development > Value Formula