Shops

The **Shops** are an area where players can claim shops and sell goods to other players. Players are able to claim a shop that has not been claimed yet, and place their items on shelves where the items are sold. After some time of the player not being online, the shop is considered abandoned and can be claimed by another player.

## Shelves

Shelves are a holder for your items you are selling. Each shelf can be customized with different materials. When you put an item on your shelf, it is for sale. Any player can right click the item and buy or sell that item in your shop. If you do not have sufficient stock, players will not be able to buy the item. If you do not have enough money in your shop's bank, players will be unable to sell to the shop.

https://medal.tv/clips/1fxbuDTOSATUzd/vpakiunME?invite=cr-MSxNWEEsLA (Video recorded by arkthegamer showing how to add items to your shop, and put them on shelves)

## Shop Stock

You can stock your shop through the The Core. Start by adding an item to the shop, setting it's price and how many you are selling, then you can stock as many as you want in the shop, up to around 1,700 items. Items won't be available in your shop until you have placed it on a shelf.

Player can buy this item in your shop once it is on a shelf. If a player buys your item, you get however much they paid in your shop's bank, and they get the item, taken from the shop's stock. If you do not have sufficient stock, the player is unable to buy that item.

Players can also sell this item to your shop once it is on a shelf. If a player sells the item to your shop, the money is given to them from your shop's bank, and the item is put in the stock. If you do not have enough money in your shop's bank, players will be unable to sell that item to you.

## Customization

Players can customize their shops with **Shop Schematics**. A player can select a schematic, and workers will be spawned to destroy your old one and create the one you selected.

Each schematic has multiple sizes, and are each a different theme or style. Players can upgrade the amount of workers they have working on the shop by prestiging or using TERA. Ranked players have access to bigger shops. Players Giga or higher can even change the shelf material.

Shop schematics are unlocked from **Cosmetic Crates**. All shop schematics are handcrafted by the staff team as well as members of the TeraSkies community.

## Automatic Shop Disbanding

Calculating Shop Points:

To determine the shop points, the algorithm takes into account several factors related to the shop's activity and inventory. Let's break down how these points are calculated:

1. Shelf Occupancy:
	* Each unoccupied shelf in the shop contributes 1 point. The fewer unoccupied shelves, the better, as it indicates efficient utilization of available space.
2. Out-of-Stock Items:
	* For each shelf with an item on display, the algorithm checks if the stock is less than the quantity available for sale. If an item is out of stock, it adds 1 point. Having fewer out-of-stock items indicates better inventory management.
3. Recent Buy Transactions:
	* The algorithm considers the number of buy transactions that have occurred in the last 3 days. Each recent buy transaction deducts points from the shop's score. A lower count of recent buy transactions is desirable, as it suggests a more active shop.
4. Recent Transactions:
	* The algorithm calculates the number of transactions that have taken place within the last 7 days. It also determines the total price of these transactions.
	* The total price is divided by the number of recent transactions, and the resulting value is subtracted from the shop's points. A lower deduction indicates healthier pricing practices and more fair transactions.
5. Time Since Last Transaction:
	* The algorithm awards 10 points for each day that has passed since the last transaction. This encourages regular activity within the shop.
	* A lower score in this category signifies more recent transaction activity, which is desirable.
6. Time Since Last Member Online:
	* The algorithm tracks the last time any member of the shop's associated island was online.
	* It adds 10 points for each day that has elapsed since the most recent member activity. A lower score indicates more recent member engagement, which is preferred.

By considering these factors, the algorithm assigns a points value to each shop, reflecting its overall activity, inventory management, and member engagement. Lower points indicate a more active and successful shop, while higher points may suggest areas for improvement. In the context of the shopping area reaching 90% capacity, the highest point shop will be unclaimed, allowing other players to claim it and ensure a balanced distribution of available shops.