The Trade Routes page is becoming a real tool. For the first time anywhere, you can read live supply and demand ratios straight off the running game server.
What changed in the game server
The 3.0 fork's SpecialtyManager.cs was previously holding pack ratios only in memory; when the server restarted, all values reset to the ceiling and the world had no record of what got hauled where. That's now persisted.
- New MariaDB table
aaemu_game_3030.specialty_live_ratios. One row per (pack, destination zone). Updated on every consume tick and every regen tick. - New
PersistTouchedRatios()method onSpecialtyManager. Called automatically at the end ofConsumeRatio()andRegenRatio(). Fails silently if MariaDB is unreachable; in-memory state stays authoritative. - Only touched ratios get written. Pristine packs (never been sold) keep the assumed-max default, so the table stays lean.
- No client-side changes. Players notice nothing except more accurate route prices on the website.
What you'll see on the site
Once the game server has been up long enough for the first regen tick (default 15 minutes after start), the /trade page will start showing live percentages alongside the route's max payout. Saturated routes will read low ("Marianople 78%") and untouched routes will show full ("Sunspeck Sea 100%").
Until live values land in the table, every route reads at its steady-state ceiling. That's the truth-by-default.
The math, properly this time
Looking at the C# SellSpecialty flow inside the server, the actual gold paid to a player is:
basePrice = floor(bundle.profit * bundle.ratio / 1000) + item.refund
finalGold = basePrice * (currentLiveRatio / 100) * 1.05
The previous Trade Routes table was using specialties.profit from the static DB, which is loaded but never actually read in the sell logic. That's been corrected. Pack-level base prices will reflect what NPCs really pay.
Under the hood for ops
- Source patch lives at
C:\AAEmu_3\AAEmu.Game\Core\Managers\World\SpecialtyManager.cs. Build withdotnet build AAEmu.Game/AAEmu.Game.csproj -c Release. - DDL idempotent script at
C:\Echo\scripts\create_specialty_live_ratios_table.py. - Discord posting script at
C:\Echo\scripts\post_patch_note.py. Webhook URL stored privately inC:\Echo\config\webhooks.json.
What's next
- Echo endpoint
/api/aaemu/<sid>/trade/live-ratiosso the website can read this table. /tradepage rewrite to overlay live percentages, per-pack base prices, NPC turn-in details, and a route matrix view next to the filter list.