Skip to main content

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 the PBS/ directory:
Project Structure
YourGame/
  ├── PBS/
  │   ├── pokemon.txt      # Pokémon definitions
  │   ├── moves.txt        # Move definitions
  │   ├── abilities.txt    # Ability definitions
  │   ├── items.txt        # Item definitions
  │   ├── trainers.txt     # Trainer battles
  │   ├── trainertypes.txt # Trainer classes
  │   ├── encounters.txt   # Wild encounters
  │   ├── metadata.txt     # Map metadata
  │   ├── tm.txt          # TM/HM assignments
  │   └── ...

Available PBS Files

Here’s a complete list of PBS files and their purposes:

Core Game Data

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
Defines all moves including:
  • Type, power, and accuracy
  • PP and priority
  • Effect functions
  • Target and flags
Lists all abilities with their:
  • Internal names
  • Display names
  • Descriptions
Defines items with:
  • Names and prices
  • Pocket categories
  • Usage effects
  • Descriptions

Battle Configuration

Defines individual trainer battles:
  • Trainer’s Pokémon teams
  • Items they use
  • AI difficulty
Defines trainer classes:
  • Trainer type names
  • Money rewards
  • Battle music
  • Gender
Assigns TM/HM moves to Pokémon

World Data

Defines wild Pokémon encounters:
  • Encounter rates per map
  • Encounter types (grass, water, etc.)
  • Pokémon species and levels
Map properties and settings:
  • Outdoor/indoor status
  • Weather conditions
  • Battle backgrounds
  • Map positions
Region map configuration:
  • Map point names
  • Map point positions
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
[1]
Name=Bulbasaur
InternalName=BULBASAUR
Type1=GRASS
Type2=POISON
BaseStats=45,49,49,45,65,65
GenderRate=FemaleOneEighth
GrowthRate=Parabolic
BaseEXP=64
Abilities=OVERGROW
HiddenAbility=CHLOROPHYLL
Moves=1,TACKLE,3,GROWL,7,LEECHSEED
Evolutions=IVYSAUR,Level,16
INI format uses [ID] section headers followed by Key=Value pairs.

CSV Format (moves.txt)

moves.txt Example
1,MEGAHORN,Megacuerno,000,120,BUG,Physical,85,10,0,00,0,abef,"Violent lunge with mighty horns."
2,THUNDERBOLT,Rayo,046,90,ELECTRIC,Special,100,15,10,00,0,bef,"May paralyze the target."
CSV format uses comma-separated values. Strings with commas must be quoted.

Simple List Format (abilities.txt)

abilities.txt Example
1,STENCH,Hedor,"May cause the foe to flinch."
2,DRIZZLE,Llovizna,"Makes it rain when entering battle."

Compilation Process

PBS files are compiled into binary .dat files for performance:
1

Edit PBS Files

Make changes to PBS text files in the PBS/ directory
2

Launch Game

Start the game normally (Game.exe)
3

Automatic Compilation

The game detects PBS changes and recompiles automatically
4

Binary Output

Compiled data is saved to Data/*.dat files
Compilation Flow
PBS/pokemon.txt  →  Compiler  →  Data/dexdata.dat
PBS/moves.txt    →  Compiler  →  Data/moves.dat
PBS/abilities.txt →  Compiler  →  Data/tm.dat
Always backup your PBS files before making major changes. If compilation fails, the game won’t start!

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)
Avoid using Windows Notepad - it doesn’t handle line endings well.

2. Maintain Proper Format

Good Example
[152]
Name=Chikorita
Type1=GRASS
BaseStats=45,49,65,45,49,65

# Bad Example (Missing brackets, wrong spacing)
152
Name =Chikorita
Type1 = GRASS
BaseStats= 45, 49, 65, 45, 49, 65

3. Check for Common Errors

  • Missing commas in CSV files
  • Unmatched brackets in INI files
  • Missing quotes around text with commas
  • Wrong field names
  • Invalid type names
  • Non-existent move/ability references
  • Out-of-range values
  • Duplicate IDs
  • Use UTF-8 encoding
  • Avoid special characters
  • Use proper line endings (LF or CRLF)

Testing Your Changes

After editing PBS files:
  1. Save the file in your text editor
  2. Launch the game - compilation happens automatically
  3. Check for errors - look for compilation error messages
  4. 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
# This is a comment - it's ignored by the compiler
[1]
Name=Bulbasaur  # You can also add comments after data

Regional Numbers

pokemon.txt
RegionalNumbers=1,0  # Kanto Regional Dex #1
RegionalNumbers=231,1 # Johto Regional Dex #231

Form Names

pokemon.txt
FormNames=,Mega Venusaur  # Empty first value = base form

Conditional Moves

pokemon.txt
Moves=0,FLAREBLITZ  # Learn at evolution
Moves=1,EMBER       # Know from level 1

Troubleshooting

  1. Check Data/debuglog.txt for errors
  2. Verify PBS syntax is correct
  3. Ensure all referenced moves/abilities exist
  4. Restore from backup if needed
  1. Delete Data/*.dat files
  2. Restart the game to force recompilation
  3. Clear any cached data
  1. Look for line numbers in error messages
  2. Check for typos in field names
  3. Verify data types are correct
  4. 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

Build docs developers (and LLMs) love