What is PBS?
PBS (Plain text database System) is Pokémon Essentials BES’s approach to storing game data in human-readable text files. Instead of using binary databases or requiring programming, PBS allows you to define Pokémon, moves, abilities, items, and more using simple text files.PBS files are the easiest way to customize your game. You can edit them with any text editor - no programming required!
Why Use PBS?
Easy to Edit
Plain text files editable in any text editor
Version Control Friendly
Text files work great with Git and other VCS
No Coding Required
Define game data without writing Ruby code
Portable
Share PBS files between projects easily
PBS File Location
All PBS files are stored in thePBS/ directory:
Project Structure
Available PBS Files
Here’s a complete list of PBS files and their purposes:Core Game Data
pokemon.txt
pokemon.txt
Defines all Pokémon species with their:
- Stats (HP, Attack, Defense, etc.)
- Types and abilities
- Level-up moves and egg moves
- Evolution methods
- Pokédex data
moves.txt
moves.txt
Defines all moves including:
- Type, power, and accuracy
- PP and priority
- Effect functions
- Target and flags
abilities.txt
abilities.txt
Lists all abilities with their:
- Internal names
- Display names
- Descriptions
items.txt
items.txt
Defines items with:
- Names and prices
- Pocket categories
- Usage effects
- Descriptions
Battle Configuration
trainers.txt
trainers.txt
Defines individual trainer battles:
- Trainer’s Pokémon teams
- Items they use
- AI difficulty
trainertypes.txt
trainertypes.txt
Defines trainer classes:
- Trainer type names
- Money rewards
- Battle music
- Gender
tm.txt
tm.txt
Assigns TM/HM moves to Pokémon
World Data
encounters.txt
encounters.txt
Defines wild Pokémon encounters:
- Encounter rates per map
- Encounter types (grass, water, etc.)
- Pokémon species and levels
metadata.txt
metadata.txt
Map properties and settings:
- Outdoor/indoor status
- Weather conditions
- Battle backgrounds
- Map positions
townmap.txt
townmap.txt
Region map configuration:
- Map point names
- Map point positions
connections.txt
connections.txt
Direct map connections for seamless transitions
PBS File Format
PBS files use different formats depending on the data type:INI-Style Format (pokemon.txt)
pokemon.txt Example
INI format uses
[ID] section headers followed by Key=Value pairs.CSV Format (moves.txt)
moves.txt Example
CSV format uses comma-separated values. Strings with commas must be quoted.
Simple List Format (abilities.txt)
abilities.txt Example
Compilation Process
PBS files are compiled into binary.dat files for performance:
Compilation Flow
Editing PBS Files Safely
Follow these best practices when editing PBS files:1. Use a Good Text Editor
Recommended editors:- Notepad++ (Windows)
- VS Code (Cross-platform)
- Sublime Text (Cross-platform)
- Atom (Cross-platform)
2. Maintain Proper Format
Good Example
3. Check for Common Errors
Syntax Errors
Syntax Errors
- Missing commas in CSV files
- Unmatched brackets in INI files
- Missing quotes around text with commas
- Wrong field names
Data Errors
Data Errors
- Invalid type names
- Non-existent move/ability references
- Out-of-range values
- Duplicate IDs
Encoding Issues
Encoding Issues
- Use UTF-8 encoding
- Avoid special characters
- Use proper line endings (LF or CRLF)
Testing Your Changes
After editing PBS files:- Save the file in your text editor
- Launch the game - compilation happens automatically
- Check for errors - look for compilation error messages
- Test in-game - verify your changes work correctly
If compilation fails, check
Data/debuglog.txt for detailed error messages.Advanced PBS Features
Comments
Add comments to document your PBS files:Using Comments
Regional Numbers
pokemon.txt
Form Names
pokemon.txt
Conditional Moves
pokemon.txt
Troubleshooting
Game won't start after PBS edit
Game won't start after PBS edit
- Check
Data/debuglog.txtfor errors - Verify PBS syntax is correct
- Ensure all referenced moves/abilities exist
- Restore from backup if needed
Changes not appearing in game
Changes not appearing in game
- Delete Data/*.dat files
- Restart the game to force recompilation
- Clear any cached data
Compilation errors
Compilation errors
- Look for line numbers in error messages
- Check for typos in field names
- Verify data types are correct
- Ensure IDs are unique
Next Steps
PBS File Reference
Detailed documentation for each PBS file
Creating Pokémon
Step-by-step guide to adding new Pokémon
Creating Moves
Learn how to create custom moves
Game Structure
Understanding the full project structure