Skip to content

PixelmonGTS

A Global Trade Station: players sell Pokemon and items to each other for money, by fixed price or auction, and post buy orders for things they want. Everything runs from the /gts menu.

What it does

  • Listings. Sell a Pokemon or an item at a fixed price (Buy It Now) or as an auction. The Pokemon or item leaves your party or inventory while it is listed.
  • Auctions with a minimum raise per bid, and snipe protection: a bid in the last 30 seconds adds 60 seconds.
  • Buy orders. Post a standing offer to buy a Pokemon or item at a price. The money is taken when you post it and held, so the seller is guaranteed to be paid. Anyone with a match can fill it.
  • Stash. Anything owed to you (an expired listing, an auction you won, a refund) waits in your stash until you claim it. Nothing is lost while you are offline.
  • History of your sales and purchases.
  • Rank limits. How many listings you can have and how long they can last depend on your rank, plus any personal bonus staff have given you.
  • New listings and buy orders are announced in chat with a [View] button.

Uses MariaDB and Vault (XConomy on this network). Server-side only.

How players use it

/gts opens the main menu:

Button What it does
Browse All, Pokemon Only, Items Only Look through current listings
Search Find listings by name
Auctions Only auction listings
Buy Orders See and fill other players' buy orders, or create your own
My Bids Auctions you have bid on
My Listings Create and manage your listings
History Your past trades
Stash Claim money, Pokemon and items owed to you

Sell: open My Listings, pick a Pokemon from your party or an item from your inventory, set a price and a duration, and choose Buy It Now or auction.

Buy order: open Buy Orders, create one, choose the Pokemon (species, and optionally IVs) or item, the price for each, and how many. The full amount is taken up front. Cancelling or expiring returns the unspent part to your stash.

Fill a buy order: open it and supply a matching Pokemon or item. You are paid the moment the trade goes through.

Clicking [View] in a chat announcement runs /gts view <id> or /gts vieworder <id>.

Staff guide

Admin permissions are off by default. Player permissions are on by default. Ops have everything. Test as a non-op.

Task Command Permission
Remove a listing (item or Pokemon goes to the seller's stash) /gts remove <id> pixelmongts.gts.admin.remove
Close a buy order and refund it /gts removeorder <id> pixelmongts.gts.admin.remove
Ban a player from GTS for a while (0 lifts it) /gts timeout <player> <minutes> pixelmongts.gts.admin.timeout
Reload rank limits /gts reload pixelmongts.gts.admin.reload
Show the loaded rank limits /gts ranks pixelmongts.gts.admin.reload
Show a player's limits and where they come from /gts limits <player> pixelmongts.gts.admin.limits
Give a permanent personal bonus /gts limits <player> add listings\|duration <amount> [reason] pixelmongts.gts.admin.limits
Set the personal bonus exactly /gts limits <player> set listings\|duration <amount> [reason] pixelmongts.gts.admin.limits
See the bonus history /gts limits <player> history pixelmongts.gts.admin.limits

/gts limits works on offline players (name or UUID). Always give a reason; every change is saved in an audit table.

How limits work

limit = highest rank floor the player holds + personal bonus   (capped by the absolute maximum)
  • Rank floors come from config/pixelmongts-ranks.json. Each rank has a permission node, a listing count and a duration in hours. If a player has several, the highest of each is used. -1 means unlimited for that value. Rank changes apply on the next GTS check, no relog needed.
  • Personal bonuses are for purchases and one-off grants. They stack on top and survive rank changes. Do not use a bonus for a rank perk, or a rank upgrade pays twice.
/lp group vip permission set pixelmongts.gts.rank.vip true

Players with no rank use listings.maxListingsPerPlayer and listings.maxDurationHours.

Configuration

File What it is for How it goes live
config/pixelmongts-server.toml Database, listing rules, auctions, buy orders, fees, minimum prices, broadcasts, Discord Restart
config/pixelmongts-ranks.json Rank floors and absolute caps /gts reload

Settings people change in pixelmongts-server.toml:

  • [listings]: price range, durations, item and Pokemon listings on or off.
  • [auctions]: bid raise rules and snipe protection. Keep minBidIncrement above 0, or an auction that starts at 0 can never be raised.
  • [buy_orders]: on or off, how many per player, the maximum quantity, and an optional fee.
  • [fees]: listing fees and sales tax (off by default).
  • [pokemon_pricing]: minimum prices by perfect IV count, and extra minimums for Hidden Ability, legendary, shiny and custom skins. Eggs are not allowed by default.
  • [discord]: an optional webhook. Keep the webhook URL out of shared copies of the file.

The [rank_tiers] values only seed pixelmongts-ranks.json the first time. After that, edit the JSON. /gts reload keeps the old ranks if the new file is broken.

Data and storage

MariaDB, in the database named in the config:

Table Holds
gts_listings, gts_bids Listings (with the full Pokemon or item data) and auction bids
gts_buy_orders Buy orders and their held money
gts_stash Everything waiting to be claimed
gts_history Completed trades
gts_players Player names, timeouts, personal bonuses
gts_limit_grants Audit log of every bonus change

Listed Pokemon and items exist only in these tables. Never delete listing, stash or buy order rows by hand. That destroys the Pokemon, item or money. Use /gts remove or /gts removeorder.

For a buy order, escrow_remaining should always equal unit_price * (quantity - filled). A row where it does not is a payout problem worth investigating.

Troubleshooting

Symptom Cause Fix
"You don't have permission to use the GTS." Player lacks pixelmongts.gts.command.open Grant it, or remove a negation
GTS says the database is unavailable MariaDB down or wrong login Check the database and the [database] section
Player says an item disappeared after a listing expired It is in their stash Stash button in /gts
A player's limits are wrong Rank node missing, or a bonus was set /gts limits <player> shows the breakdown
Rank change did nothing The rank's permission in the JSON is not the node the group has Compare /gts ranks with the group's nodes
A buy order is stuck as being filled Server stopped mid-trade The 30 second lease runs out and the expiry check frees it

Maintainer notes

  • Buy orders take the money first, then the goods. Filling one: preview (nothing taken), claim one slot with a single conditional UPDATE (every rule in the WHERE, trust only the row count), take the goods and check they are really gone, then commit goods, money and counters in one transaction. If the commit fails, the goods are put back. Taking the goods before the claim would leave the losing side of a race without their Pokemon and with no record to return it from.
  • The fill lease (fulfilmentLeaseSeconds) is a crash safety net. Without it, a crash mid-fill would leave the order and its money stuck forever.
  • Rank permissions are checked through Youer's Bukkit player bridge, so a rank's node does not need to exist when NeoForge starts. Reloads also add new nodes to Bukkit for LuckPerms tab completion.
  • Admin subcommands use requires, so players without the node do not see them in tab completion.
  • The typed shortcuts for player features were removed on purpose. Everything is a menu button.
  • Docs in the ops repo: documentation/mods/pixelmongts-buy-orders.md and documentation/mods/pixelmongts-dynamic-limits.md.

Building

./gradlew build -Ppixelmon_version=9.3.16

Set pixelmon_version to the version the server runs. Output: build/libs/pixelmongts-<version>.jar.

Full command, permission and config tables: Reference.