The Pokémon Showdown teambuilder is a full-featured team editor that lives inside the panel system as aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/smogon/pokemon-showdown-client/llms.txt
Use this file to discover all available pages before exploring further.
PSRoom subclass. It coordinates between three layers: the TeambuilderRoom model (which tracks UI state like the selected folder and export mode), the PSTeams model on PS.teams (which owns the canonical list of teams in memory and in localStorage), and the Teams utility object from battle-teams.ts (which handles pack/unpack serialisation).
TeambuilderRoom
TeambuilderRoom extends PSRoom and is defined in panel-teambuilder.tsx. It is not exported — it is registered with the panel system as the handler for the 'teambuilder' room type.
Client commands
TeambuilderRoom registers client commands that are triggered by user actions. These strings are also used in PS.room.send() calls within the UI.
- Team commands
- Folder commands
- Export commands
| Command | Example | Effect |
|---|---|---|
newteam | /newteam | Creates a new team and opens the editor |
newteam box | /newteam box | Creates a Pokémon storage box instead of a team |
deleteteam <key> | /deleteteam pikachu-team | Deletes the team identified by key |
undeleteteam | /undeleteteam | Restores the last deleted team |
Export mode
exportMode is false (edit mode), true (show all teams in a textarea), or 'partial' (show only the currently filtered teams). exportCode holds the generated packed text.
The curFolder system in depth
Folders in PS are not real filesystem directories — they are a naming convention stored on eachTeam object. The curFolder string on TeambuilderRoom tells the UI which virtual directory to display:
'' (empty string)
All teams. No filtering — every team and box is shown.
'gen9randombattle'
Format folder. Shows teams whose
format matches gen9randombattle.'Tournament/'
Named folder. Shows teams whose
folder property equals 'Tournament'.'/'
Unfoldered. Shows teams with an empty
folder property.PSTeams: the team list model
PS.teams is an instance of PSTeams, a PSStreamModel<'team' | 'format'>. It streams 'team' whenever the list changes and 'format' when the format metadata changes.
Team interface
Adding and looking up teams
push() and unshift() automatically assign a unique key (derived from toID(team.name), with a numeric suffix if there’s a collision). Always use these methods rather than mutating PS.teams.list directly.Teams: serialisation utilities
TheTeams object from battle-teams.ts provides the canonical pack/unpack format used for localStorage, clipboard export, and the PS team paste feature.
Teams.PokemonSet
Teams.pack and Teams.unpack
Packed team format
A packed team is a]-delimited sequence of Pokémon, each represented as a |-delimited field string:
name | species | item | ability | moves | nature | evs | gender | ivs | shiny | level | happiness [, hpType, pokeball, gigantamax, dynamaxLevel, teraType]
packAll / unpackAll (PSTeams)
PSTeams.packAll() wraps each team’s metadata (format, folder, name, box flag) around the per-set packed string:
unpackAll() reads this format line-by-line from the showdown_teams localStorage key and reconstructs the full Team[] list on page load.
