<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Erick</title>
    <description>The latest articles on DEV Community by Erick (@junko012).</description>
    <link>https://dev.to/junko012</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265840%2F86cab89a-11aa-4c17-b893-f35854674463.png</url>
      <title>DEV Community: Erick</title>
      <link>https://dev.to/junko012</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/junko012"/>
    <language>en</language>
    <item>
      <title>Building a native, offline Pokémon save editor for Linux with Avalonia and .NET 9</title>
      <dc:creator>Erick</dc:creator>
      <pubDate>Thu, 26 Nov 2026 03:24:09 +0000</pubDate>
      <link>https://dev.to/junko012/building-a-native-offline-pokemon-save-editor-for-linux-with-avalonia-and-net-9-2i3o</link>
      <guid>https://dev.to/junko012/building-a-native-offline-pokemon-save-editor-for-linux-with-avalonia-and-net-9-2i3o</guid>
      <description>&lt;p&gt;I'm a longtime linux user and i always wanted a native editor for Pokémon save files instead of web-based tools or running PKHeX under Wine. So i built one: &lt;strong&gt;Max Potion&lt;/strong&gt;, free and open source (GPL-3.0), built on PKHeX.Core with Avalonia and .NET 9.&lt;/p&gt;

&lt;p&gt;PKHeX: &lt;a href="https://github.com/kwsch/PKHeX" rel="noopener noreferrer"&gt;https://github.com/kwsch/PKHeX&lt;/a&gt;&lt;br&gt;
Avalonia: &lt;a href="https://avaloniaui.net/" rel="noopener noreferrer"&gt;https://avaloniaui.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This post is about the technical side: a few decisions that shaped the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PKHeX.Core&lt;/strong&gt; (25.11.07) as the save engine, so it supports what PKHeX supports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avalonia 11&lt;/strong&gt; for a native UI on Linux, Windows and macOS, using MVVM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite&lt;/strong&gt; for game data (moves, learnsets, items, descriptions), so the app works fully offline.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The database is its own project
&lt;/h2&gt;

&lt;p&gt;All the game data lives in a SQLite file, &lt;code&gt;pokemon.db&lt;/code&gt;, published as a separate repository: &lt;a href="https://github.com/junko012/max-potion-database" rel="noopener noreferrer"&gt;https://github.com/junko012/max-potion-database&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It has its own versioning (a schema number plus a date-based data version), and the app repo pins an exact release in a lock file. CI downloads that release and checks that the bundled file matches its SHA-256, so the app and the data can't silently drift apart. The app opens the database read-only and checks its schema compatibility at startup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two independent languages
&lt;/h2&gt;

&lt;p&gt;The interface has 13 languages, and the &lt;em&gt;data&lt;/em&gt; language (species, moves, items) is chosen separately, because PKHeX ships data in fewer languages than the UI covers. English and Spanish are embedded; the rest are plain JSON files, &lt;code&gt;{"Key": "Text"}&lt;/code&gt;, with fallback to English for missing keys. Arabic is right-to-left, so the whole UI mirrors. Edits are stored by id, not by name, so switching the data language with a Pokémon open doesn't lose pending changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Showing what will change before saving
&lt;/h2&gt;

&lt;p&gt;Before exporting, a review screen lists every change that will be written to the save, and you can untick any of them. The legality tab explains each problem and can recreate a Pokémon from a valid encounter, which is built on PKHeX's legality analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Packaging for Linux
&lt;/h2&gt;

&lt;p&gt;This was more work than i expected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.deb and .rpm&lt;/strong&gt; built in CI. A lesson: in the .rpm, require &lt;code&gt;libc.so.6()(64bit)&lt;/code&gt; instead of a specific glibc version, or some distros say nothing provides it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AppImage&lt;/strong&gt; for any distro. If &lt;code&gt;libicu&lt;/code&gt; is missing, the launcher falls back to invariant globalization so the app still starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portable tar.gz&lt;/strong&gt; with the .NET runtime bundled, so nothing needs to be installed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPG signing&lt;/strong&gt; in CI: the .rpm and the checksums are signed, and the public key is attached to each release.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;The test suite has hundreds of tests, run on Linux, Windows and macOS in CI. One flaky test taught me a classic: a &lt;code&gt;uint&lt;/code&gt; overflow in a test loop that only failed about one run in a thousand, until a macOS runner hit it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's missing
&lt;/h2&gt;

&lt;p&gt;Linux is the main platform. The Windows and macOS builds exist but have had little testing, and the macOS one isn't notarized. The translations haven't been reviewed by native speakers. I'm also working on moving to newer PKHeX.Core versions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Downloads: &lt;a href="https://github.com/junko012/max-potion/releases/latest" rel="noopener noreferrer"&gt;https://github.com/junko012/max-potion/releases/latest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://github.com/junko012/max-potion" rel="noopener noreferrer"&gt;https://github.com/junko012/max-potion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Database: &lt;a href="https://github.com/junko012/max-potion-database" rel="noopener noreferrer"&gt;https://github.com/junko012/max-potion-database&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback is welcome, especially on packaging for your distro and on the UI.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>dotnet</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
