Bank System
Bank System
Section titled “Bank System”The bank system provides additional Pokemon storage beyond PC boxes, stored in a MongoDB database.
Overview
Section titled “Overview”Bank features:
- Unlimited storage (configurable)
- Persistent across servers
- Separate from PC boxes
- Database-backed
- Secure and reliable
Prerequisites
Section titled “Prerequisites”-
MongoDB Installation
- Install MongoDB 4.0+
- Create database
- Configure authentication
-
Network Access
- Server can reach MongoDB
- Firewall rules configured
- Port 27017 open (default)
Configuration
Section titled “Configuration”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 }}Using the Bank
Section titled “Using the Bank”Access Command
Section titled “Access Command”/bankOpens bank interface.
Permissions
Section titled “Permissions”# Basic accesstarot.bank.access
# Deposit Pokemontarot.bank.deposit
# Withdraw Pokemontarot.bank.withdraw
# View others' banks (admin)tarot.bank.adminLuckPerms Setup
Section titled “LuckPerms Setup”# Basic users - no banklp group default permission set tarot.bank.access false
# VIP users - limited banklp group vip permission set tarot.bank.access truelp group vip permission set tarot.bank.deposit truelp group vip permission set tarot.bank.withdraw true
# Admins - full accesslp group admin permission set tarot.bank.admin trueBank Interface
Section titled “Bank Interface”Main Screen
Section titled “Main Screen”┌─────────────────────────────┐│ Pokemon Bank ││ Used: 45/1000 │├─────────────────────────────┤│ [Deposit] [Withdraw] [View] ││ ││ Your Stored Pokemon: ││ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┐ ││ │P│P│P│P│P│E│E│E│E│ ││ └─┴─┴─┴─┴─┴─┴─┴─┴─┘ ││ ││ [Next Page] [Search] │└─────────────────────────────┘Deposit Screen
Section titled “Deposit Screen”Select Pokemon from party/boxes to deposit:
┌─────────────────────────────┐│ Deposit Pokemon │├─────────────────────────────┤│ Select Pokemon to deposit: ││ ││ Party: ││ [Pikachu] [Charizard] ││ ││ Box 1: ││ [Gengar] [Mewtwo] [Mew] ││ ││ [Confirm] [Cancel] │└─────────────────────────────┘Withdraw Screen
Section titled “Withdraw Screen”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] │└─────────────────────────────┘Features
Section titled “Features”Search Function
Section titled “Search Function”Find Pokemon by criteria:
/bank search <criteria>Examples:
/bank search pikachu/bank search shiny/bank search level:50+/bank search legendarySorting
Section titled “Sorting”Organize banked Pokemon:
/bank sort <criteria>Criteria:
species: Alphabetical by specieslevel: Highest level firstdate: Newest firstshiny: Shinies firstiv: Highest IV total first
Bulk Operations
Section titled “Bulk Operations”Mass Deposit
Section titled “Mass Deposit”/bank deposit box <box_number>Deposit entire box to bank.
Mass Withdraw
Section titled “Mass Withdraw”/bank withdraw filter <criteria> <destination>Example:
/bank withdraw filter shiny box:5Withdraw all shinies to box 5.
Filtering
Section titled “Filtering”Filter displayed Pokemon:
/bank filter <criteria>Examples:
/bank filter shiny/bank filter legendary/bank filter level:50-75/bank filter type:fireAdministration
Section titled “Administration”View Player Bank
Section titled “View Player Bank”/bank view <player>View another player’s bank (requires tarot.bank.admin).
Modify Limits
Section titled “Modify Limits”/bank setlimit <player> <limit>Change player’s Pokemon limit:
/bank setlimit Steve 2000Bank Statistics
Section titled “Bank Statistics”/bank stats [player]Shows:
- Total Pokemon stored
- Storage by species
- Shiny count
- Average level
- Storage usage
Backup Bank
Section titled “Backup Bank”/bank backupCreates manual backup of bank database.
Restore Bank
Section titled “Restore Bank”/bank restore <backup_id>Restore from backup (use with caution).
MongoDB Management
Section titled “MongoDB Management”Database Structure
Section titled “Database Structure”// 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}Indexes
Section titled “Indexes”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 })Queries
Section titled “Queries”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 } }])Advanced Configuration
Section titled “Advanced Configuration”Storage Limits
Section titled “Storage Limits”{ "bankSettings": { "maxPokemonPerPlayer": 1000, "maxPokemonGlobal": 100000, "warnAtPercent": 0.9, "blockDepositAtPercent": 0.95 }}Access Control
Section titled “Access Control”{ "bankSettings": { "requirePermission": true, "requireLevel": 10, "requirePlaytime": 3600, "requireRank": "member" }}Backup Settings
Section titled “Backup Settings”{ "bankBackup": { "autoBackup": true, "backupInterval": 3600, "maxBackups": 10, "backupPath": "backups/bank/" }}Security
Section titled “Security”Authentication
Section titled “Authentication”Use MongoDB authentication:
{ "mongoConnection": { "username": "tarot_user", "password": "strong_password_here", "authDatabase": "admin", "useAuth": true }}Encryption
Section titled “Encryption”Enable MongoDB encryption:
- Connection encryption (SSL/TLS)
- At-rest encryption
- Encrypted backups
Access Logging
Section titled “Access Logging”Enable bank access logging:
{ "bankLogging": { "logDeposits": true, "logWithdrawals": true, "logSearches": false, "logAdminAccess": true }}Troubleshooting
Section titled “Troubleshooting”Cannot Connect
Section titled “Cannot Connect”Symptoms: “Failed to connect to bank”
Solutions:
- Verify MongoDB is running
- Check host/port configuration
- Test connection manually
- Review firewall rules
- Check authentication credentials
Slow Performance
Section titled “Slow Performance”Symptoms: Bank loads slowly
Solutions:
- Add database indexes
- Limit Pokemon per player
- Optimize queries
- Upgrade MongoDB server
- Check network latency
Data Loss Prevention
Section titled “Data Loss Prevention”Best practices:
- Regular automated backups
- Test restore procedures
- Monitor database health
- Replicate to secondary
- Document recovery process
Storage Issues
Section titled “Storage Issues”Symptoms: Running out of space
Solutions:
- Set player limits
- Clean inactive accounts
- Archive old data
- Upgrade storage
- Implement data lifecycle
Migration
Section titled “Migration”From PC to Bank
Section titled “From PC to Bank”Migrate existing PC Pokemon:
/bank migrate <player> <box_range>Example:
/bank migrate Steve 1-5Moves boxes 1-5 to bank.
From Bank to PC
Section titled “From Bank to PC”Reverse migration:
/bank export <player> <destination_box>Cross-Server
Section titled “Cross-Server”Transfer banks between servers:
- Export player bank
- Transfer MongoDB data
- Import on new server
- Verify data integrity
Best Practices
Section titled “Best Practices”Player Guidelines
Section titled “Player Guidelines”- Regular deposits: Don’t let PC boxes fill up
- Organize before depositing: Sort first
- Use search: Find Pokemon quickly
- Keep backups: Screenshot valuable Pokemon
Admin Guidelines
Section titled “Admin Guidelines”- Monitor storage: Check usage regularly
- Backup frequently: At least daily
- Set reasonable limits: Based on server capacity
- Communicate clearly: Explain system to players
- Test regularly: Verify deposits/withdrawals work