Skip to content

Dechrissen/dexelect

Repository files navigation

Dexelect

Dex (as in Pokédex) + elect / select = Dexelect

Try Dexelect on the web Download Dexelect Solus Discord server
Buy Me a Coffee at ko-fi.com

Dexelect – Progression-aware Pokémon Team Generator

Dexelect is a tool for generating (prescribing) a random, progression-faithful team of Pokémon for use in a challenge playthrough. Customization options are available to curate the output party further.

Dexelect GUI sample output

Table of Contents

  1. Introduction
  2. Currently supported games
  3. Installation
  4. Usage
  5. Credits
  6. Support the app

Introduction

Dexelect generates (prescribes) a progression-faithful party for use in a playthrough — either to introduce an element of challenge or simply for team inspiration. See the suggested rulesets for some ideas about how to use Dexelect.

The app is universal in that it maintains compatibility with most generations of Pokémon games, and with romhacks that contain changes to game data, such as:

  • Pokémon
  • Evolution methods
  • Locations

See CONTRIBUTING.md if you'd like to add support for a romhack.

Currently supported games

Vanilla

Gen Game Supported
1 Red
1 Blue
1 Yellow Planned
2 Gold
2 Silver
2 Crystal Planned
3 Ruby
3 Sapphire
3 Emerald Planned
4 Diamond
4 Pearl
4 Platinum Planned
5 Black Planned
5 White Planned
5 Black 2 Planned
5 White 2 Planned
6 X Planned
6 Y Planned

Romhacks

Gen Game Supported
1 Solus RGB

Implementation quirks

  • Munchlax trees (click to show/hide)

    In Diamond/Pearl/Platinum, Munchlax trees are a special case to handle. A random 4/21 total Honey Trees in the game are upgraded to special Munchlax trees in which Munchlax can be encountered 1% of the time. The locations are dependent on Trainer ID and secret ID, so there's no way to know where they are until finding them in a new file. This means there is no reliable point in the game to use as the acquisition point for Munchlax, and the party balance stats will not be 100% accurate. The solution I settled on for Dexelect (since it uses a sphere progression system) was to assume that Munchlax trees are accessible in Sphere 3, since by that point in the game, the probability of having access to at least one of the 4 Munchlax trees is 91% (up from 77% in Sphere 2 and 0% in Sphere 1) which seemed like a high enough probability to rely on for calculating party balance stats.

Installation

Option 1: Download (Windows/Linux)

Click to show/hide
  1. Download and extract dexelect-<version>-<platform>.zip
  2. Run dexelect.exe on Windows, or ./dexelect on Linux
  3. Linux only (optional): After extracting, run ./install.sh to register Dexelect with your app launcher. You can then delete the downloaded folder. To update, repeat these steps with the new version (the old one will be overwritten).

Option 2: Build the binary (Windows/Linux)

Click to show/hide
  • Build only (Windows/Linux): git clone https://github.com/Dechrissen/dexelect.git && cd dexelect && ./scripts/build.sh. Output binary will be in dist/dexelect/ (run ./dexelect on Linux; dexelect.exe on Windows).
  • Build and install to register Dexelect with your app launcher (Linux): git clone https://github.com/Dechrissen/dexelect.git && cd dexelect && ./scripts/build.sh && cd dist/dexelect && ./install.sh

See the build instructions for more details.

Option 3: Run from source (terminal)

Click to show/hide Requires Python 3.11+.
  1. git clone https://github.com/Dechrissen/dexelect.git
  2. cd dexelect
  3. pip install -r requirements.txt (virtual environment recommended)
  4. (Optional) python main.py --fetch-sprites to enable sprite display in the GUI
  5. python main.py to run the GUI (optionally add --ui=cli for CLI or --ui=web for local Flask web app)

Run python main.py --help for available flags.

Usage

Using the GUI app

Click to show/hide
  • The app is split into sidebar (left) and main window (right). Help option is at the top right.
  • Left sidebar:
    • The mode can be switched between 'Progression', 'Random (Obtainable)', and 'Random (National Dex)'
    • Party size can be adjusted (1–6)
    • 'Acquisition Details', 'HM Coverage', and 'Balance Stats' display can each be toggled on or off
    • 'Export Party' button exports party to .txt file
  • Main window:
    • 'Generate', 'Spheres', and 'Config' tabs at the top can be switched between
    • Click 'Generate Party' (or press Enter) to generate a team
    • Change sphere mode and view per-sphere location lists in the 'Spheres' tab
    • Modify settings in the 'Config' tab to customize output party restrictions

Using the web app

Click to show/hide

Visit the live Dexelect web app.

Alternatively, run python main.py --ui=web and visit the url:port shown in your terminal.

The web app is organized into a main header (with Game selector and 'Generate Party' button) and tabs for navigation.

  • Click 'Generate Party' to generate a team
  • Tabs
    • Party – Where the generated party will be displayed
    • Setup – For changing global settings (generation mode, party size, etc.)
    • Spheres – For changing sphere modes and viewing per-sphere location lists
    • Config – For modifying settings to customize output party restrictions
    • Help – Display the help dialog

Using the CLI app

Click to show/hide

Run python main.py --ui=cli.

  • ENTER – Generate a team with the current settings
  • G – Open the 'Supported Games' menu to switch current game
  • M – Open the 'Generation Mode' menu to change the team generation mode
  • P – Open the 'Set Party Size' menu to set party size (1–6)
  • R – Reload the config file from disk (after making any config changes while the app is running)
  • H – Display help menu
  • Q – Quit the app

Modifying config settings for the CLI app

Open /config/config_gen1.yaml (for Gen 1 games for instance). Modify values according to your preferences. Save the file and then, if the app was running, use the R option in the app to reload.

Credits

  • Quadrixis – assistance with progression data planning and app testing
  • Jade Lune – logo and icon design

Support Dexelect

Please support Dexelect development! The app is free and open-source, but you can support it in these ways:

  • Donate on Ko-fi
  • Give this repository a Star ⭐
  • Join the Discord
  • Share the app with someone who might be interested

Contributing

If you'd like to add support for a missing game or romhack, see CONTRIBUTING.md.

License

Dexelect is licensed under the MIT License (see LICENSE).

Disclaimer on LLM usage

The core code in this project (i.e., core.py logic and functions, data file format, data structures, classes) was neither designed nor written by an LLM.

The GUI wrappers (local Tk GUI and web app) were created using LLMs; as such the directories that were exclusively authored by an LLM in this project are ui/gui/ and ui/web/. Development work on this project is sometimes carried out utilizing LLMs for certain tedious tasks such as data file creation and formatting (the .yaml files in /data).

Legal

Pokémon and all respective names and sprites are © and ™ of Nintendo, Game Freak, and The Pokémon Company. Dexelect is an unofficial fan project and is not affiliated with, endorsed, or sponsored by them.