Skip to content

Bank System

The bank system provides additional Pokemon storage beyond PC boxes, stored in a MongoDB database.

Bank features:

  • Unlimited storage (configurable)
  • Persistent across servers
  • Separate from PC boxes
  • Database-backed
  • Secure and reliable
  1. MongoDB Installation

    • Install MongoDB 4.0+
    • Create database
    • Configure authentication
  2. Network Access

    • Server can reach MongoDB
    • Firewall rules configured
    • Port 27017 open (default)

Edit config/tarot/config.json:

{
"bankEnabled": true,
"mongoConnection": {
"host": "localhost",
"port": 27017,
"database": "tarot_bank",
"username": "tarot_user",
"password": "secure_password",
"authDatabase": "admin",
"useAuth": true
},
"bankSettings": {
"maxPokemonPerPlayer": 1000,
"allowDeposit": true,
"allowWithdraw": true,
"requirePermission": true
}
}
/bank

Opens bank interface.

# Basic access
tarot.bank.access
# Deposit Pokemon
tarot.bank.deposit
# Withdraw Pokemon
tarot.bank.withdraw
# View others' banks (admin)
tarot.bank.admin
# Basic users - no bank
lp group default permission set tarot.bank.access false
# VIP users - limited bank
lp group vip permission set tarot.bank.access true
lp group vip permission set tarot.bank.deposit true
lp group vip permission set tarot.bank.withdraw true
# Admins - full access
lp group admin permission set tarot.bank.admin true
┌─────────────────────────────┐
│ Pokemon Bank │
│ Used: 45/1000 │
├─────────────────────────────┤
│ [Deposit] [Withdraw] [View] │
│ │
│ Your Stored Pokemon: │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ │P│P│P│P│P│E│E│E│E│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
│ [Next Page] [Search] │
└─────────────────────────────┘

Select Pokemon from party/boxes to deposit:

┌─────────────────────────────┐
│ Deposit Pokemon │
├─────────────────────────────┤
│ Select Pokemon to deposit: │
│ │
│ Party: │
│ [Pikachu] [Charizard] │
│ │
│ Box 1: │
│ [Gengar] [Mewtwo] [Mew] │
│ │
│ [Confirm] [Cancel] │
└─────────────────────────────┘

Select banked Pokemon to withdraw:

┌─────────────────────────────┐
│ Withdraw Pokemon │
├─────────────────────────────┤
│ Select Pokemon to withdraw:│
│ │
│ Pikachu Lv.50 ★ │
│ Charizard Lv.65 │
│ Gengar Lv.55 ★ │
│ │
│ Destination: [Party] [Box] │
│ [Confirm] [Cancel] │
└─────────────────────────────┘

Find Pokemon by criteria:

/bank search <criteria>

Examples:

/bank search pikachu
/bank search shiny
/bank search level:50+
/bank search legendary

Organize banked Pokemon:

/bank sort <criteria>

Criteria:

  • species: Alphabetical by species
  • level: Highest level first
  • date: Newest first
  • shiny: Shinies first
  • iv: Highest IV total first
/bank deposit box <box_number>

Deposit entire box to bank.

/bank withdraw filter <criteria> <destination>

Example:

/bank withdraw filter shiny box:5

Withdraw all shinies to box 5.

Filter displayed Pokemon:

/bank filter <criteria>

Examples:

/bank filter shiny
/bank filter legendary
/bank filter level:50-75
/bank filter type:fire
/bank view <player>

View another player’s bank (requires tarot.bank.admin).

/bank setlimit <player> <limit>

Change player’s Pokemon limit:

/bank setlimit Steve 2000
/bank stats [player]

Shows:

  • Total Pokemon stored
  • Storage by species
  • Shiny count
  • Average level
  • Storage usage
/bank backup

Creates manual backup of bank database.

/bank restore <backup_id>

Restore from backup (use with caution).

// Collection: pokemon_bank
{
"_id": ObjectId("..."),
"playerUUID": "069a79f4-44e9-4726-a5be-fca90e38aaf5",
"pokemon": [
{
"uuid": "pokemon-uuid",
"species": "pikachu",
"level": 50,
"shiny": true,
"form": "",
"ivs": {
"hp": 31,
"attack": 30,
"defense": 31,
"specialAttack": 31,
"specialDefense": 30,
"speed": 31
},
"evs": {...},
"moves": [...],
"ability": "static",
"nature": "jolly",
"depositDate": 1730419200000,
"nbt": "..." // Full Pokemon NBT data
}
],
"lastAccessed": 1730419200000
}

Create indexes for performance:

db.pokemon_bank.createIndex({ "playerUUID": 1 })
db.pokemon_bank.createIndex({ "pokemon.species": 1 })
db.pokemon_bank.createIndex({ "pokemon.shiny": 1 })
db.pokemon_bank.createIndex({ "lastAccessed": 1 })

Useful MongoDB queries:

Count total Pokemon:

db.pokemon_bank.aggregate([
{ $project: { count: { $size: "$pokemon" } } },
{ $group: { _id: null, total: { $sum: "$count" } } }
])

Find players with shinies:

db.pokemon_bank.find({ "pokemon.shiny": true })

Storage by player:

db.pokemon_bank.aggregate([
{ $project: {
playerUUID: 1,
count: { $size: "$pokemon" }
}},
{ $sort: { count: -1 } }
])
{
"bankSettings": {
"maxPokemonPerPlayer": 1000,
"maxPokemonGlobal": 100000,
"warnAtPercent": 0.9,
"blockDepositAtPercent": 0.95
}
}
{
"bankSettings": {
"requirePermission": true,
"requireLevel": 10,
"requirePlaytime": 3600,
"requireRank": "member"
}
}
{
"bankBackup": {
"autoBackup": true,
"backupInterval": 3600,
"maxBackups": 10,
"backupPath": "backups/bank/"
}
}

Use MongoDB authentication:

{
"mongoConnection": {
"username": "tarot_user",
"password": "strong_password_here",
"authDatabase": "admin",
"useAuth": true
}
}

Enable MongoDB encryption:

  • Connection encryption (SSL/TLS)
  • At-rest encryption
  • Encrypted backups

Enable bank access logging:

{
"bankLogging": {
"logDeposits": true,
"logWithdrawals": true,
"logSearches": false,
"logAdminAccess": true
}
}

Symptoms: “Failed to connect to bank”

Solutions:

  • Verify MongoDB is running
  • Check host/port configuration
  • Test connection manually
  • Review firewall rules
  • Check authentication credentials

Symptoms: Bank loads slowly

Solutions:

  • Add database indexes
  • Limit Pokemon per player
  • Optimize queries
  • Upgrade MongoDB server
  • Check network latency

Best practices:

  • Regular automated backups
  • Test restore procedures
  • Monitor database health
  • Replicate to secondary
  • Document recovery process

Symptoms: Running out of space

Solutions:

  • Set player limits
  • Clean inactive accounts
  • Archive old data
  • Upgrade storage
  • Implement data lifecycle

Migrate existing PC Pokemon:

/bank migrate <player> <box_range>

Example:

/bank migrate Steve 1-5

Moves boxes 1-5 to bank.

Reverse migration:

/bank export <player> <destination_box>

Transfer banks between servers:

  1. Export player bank
  2. Transfer MongoDB data
  3. Import on new server
  4. Verify data integrity
  1. Regular deposits: Don’t let PC boxes fill up
  2. Organize before depositing: Sort first
  3. Use search: Find Pokemon quickly
  4. Keep backups: Screenshot valuable Pokemon
  1. Monitor storage: Check usage regularly
  2. Backup frequently: At least daily
  3. Set reasonable limits: Based on server capacity
  4. Communicate clearly: Explain system to players
  5. Test regularly: Verify deposits/withdrawals work