• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Best way to auto-value items?

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,175
Solutions
17
Reaction score
481
Location
Sweden
What are the most ideal way of valuing items based on the in-game market by an automatic standard?
I was thinking of using the game market, but it comes with it's ups and downs including it's limitations.

If using the market to value items based on sales, checking the past 25 item sales and calculating them based on the average sale value, time since sale, and adding/deciding a % of it to base it as it's current ~ value. Would this be a good standard value?

This can easily be abused and exploited, but what options would be used to auto calculate an item value from the market in a better way?
 
This can easily be abused and exploited, but what options would be used to auto calculate an item value from the market in a better way?
What do you plan to do with that information?
Make items easily sellable in some Lua script 'for that price'? Show their value in loot message? or just show statistics of avg price on website/in market module in OTC?

It's unregulated market, so it can be abused by anyone to increase/decrease 'avg price'. I would not use that kind of data in any system that may affect in-game balance [reduce price of runes/potions, increase value of loot etc.].
checking the past 25 item sales and calculating them based on the average sale value, time since sale, and adding/deciding a % of it to base
In case of low volume of trades, 'time since transaction' is important, as price may change over time and you may have just 3-5 transactions of given item over XX hours/days.
Of course making more recent trades more important will make it easier to manipulate 'avg price' :(
but what options would be used to auto calculate an item value from the market in a better way?
In real stock markets, 'current price' is price of last sell/buy transaction. Just 1 last transaction.
In that scenario, you would check 'market history' for last sold/bought item with given ID, not current offers.
In case of Tibia market, you would need to save in history, if item was sold/bought by highest/lowest price available, or player picked item he wanted for lower/higher price than cheapest option.
 
What do you plan to do with that information?
Make items easily sellable in some Lua script 'for that price'? Show their value in loot message? or just show statistics of avg price on website/in market module in OTC?

It's unregulated market, so it can be abused by anyone to increase/decrease 'avg price'. I would not use that kind of data in any system that may affect in-game balance [reduce price of runes/potions, increase value of loot etc.].

In case of low volume of trades, 'time since transaction' is important, as price may change over time and you may have just 3-5 transactions of given item over XX hours/days.
Of course making more recent trades more important will make it easier to manipulate 'avg price' :(

In real stock markets, 'current price' is price of last sell/buy transaction. Just 1 last transaction.
In that scenario, you would check 'market history' for last sold/bought item with given ID, not current offers.
In case of Tibia market, you would need to save in history, if item was sold/bought by highest/lowest price available, or player picked item he wanted for lower/higher price than cheapest option.
Thanks for replying, Gesior.
The plan is to have some form of a calculation of items over on the webpage for items based on what the players sell them for in gold, forming their values based of the current game market. I am creating something just for release cause I am bored.

"It's unregulated market, so it can be abused by anyone to increase/decrease 'avg price'. I would not use that kind of data in any system that may affect in-game balance [reduce price of runes/potions, increase value of loot etc.]."
Yes, this is what I am wondering what and how such calculation could be made more reliable as an option.
The plan is to form a back-end api that checks the latest sales or something of set item to calculate out it's current ~ value of the player market.
But how would this be made without allowing abuse of set item?

For example:
Magic Sword:
Latest 100 Sales:
day:
Week:
Month:
Is it sold a lot for the same or has it become too many sales the past days / weeks that its worth noting as a real value, or is abuse taking place in-order to lower the market value calculations.
Is it worth skipping those from the calculation?

So, in short words, if I understand it correctly:
Check previous sold item values, check current listings, deduct by date, and time stamps of day, week and month to avoid abuse of less sold items?
 
Yes, this is what I am wondering what and how such calculation could be made more reliable as an option.
For popular things on unregulated markets - player can "pick which 'item' he wants to buy" (can buy more expensive one, instead of cheapest), on regulated markets you must buy by lowest/highest price without knowing who is a seller/buyer -,
common formula is to cut top/bottom X% of prices (5/10/15% of transactions with lowest/highest prices). So someone trying to change avg price must generate over X% of transactions ex. 'magic sword' trades for ~100k gp and has XXX transactions in last 24 hours and someone makes 5 sells for 1kk each. These 1kk values are ignored, as there are 'top' 10% of transaction prices.

It's still easy to manipulate (generate X% of transactions), if 'fee' for trades is low - like on Tibia market.

In case of rare items, there is no way to stop manipulation. Player just has to trade X item few times between 2 accounts/his guild/his friends - so detecting IP/account won't prevent manipulation - to make avg price go high/low.
Yes, this is what I am wondering what and how such calculation could be made more reliable as an option.
To make calculation more reliable there are 'market makers' on real stock exchanges ( Market maker - Wikipedia (https://en.wikipedia.org/wiki/Market_maker) ). Companies that value stock and trade it in milliseconds, if someone tries to manipulate price of stock - "last transaction price" I mentioned before - by making some stupid order like sell/buy for XX% lower/higher price (with low volume), they will catch it (buy/sell) and make profit.

In case of Tibia, you would need to create own 'market maker' algorithm and it would be almost impossible - it would be as easy to abuse as your idea 'auto value' algorithm.
The plan is to form a back-end api that checks the latest sales or something of set item to calculate out it's current ~ value of the player market.
In this case I would focus on data presentation. You should show users max/min and avg/median price of item. You can't just calculate 'avg' price by some formula as single integer/float value as it can be manipulated easily.

You can show that 'magic sword' sold for min: 80k, max: 1kk, avg: 105k, median: 100k - all with SQL queries for given time range day/week/month.
Trading volume - number of sold/bought items - may be also interesting for website users (ex. by different IPs to make spoofing harder).
Something like (just random 'stock bar charts' example from google):
1755448295410.webp

Ex. this is Steam CS:GO loot box price on Steam market:
  • top is 'median of transaction price' for given time range (day/hour/minute) - in OTS case from 'market history' of OTS
  • bottom is 'order book' = list of active offers to sell/buy item - in OTS case current market sell/buy offers

If CS:GO players can analyse it (find out that someone is manipulating price of rare item), Tibia players can do it too.

1755448709584.webp
 
Back
Top