Investigamer / Proxyshop

A Photoshop automation tool for generating high quality Magic the Gathering card renders.
Mozilla Public License 2.0
89 stars 21 forks source link
automation card-game cards design magic-the-gathering photoshop proxy python
![Showcase Image](/src/img/cover-photo.png) Proxyshop is a Photoshop automation app that generates high-quality Magic the Gathering card renders. Inspired by Chilli-Axe's [original Photoshop automation scripts](https://github.com/chilli-axe/mtg-photoshop-automation). If you need help with this app or wish to troubleshoot an issue, [please join our discord](https://discord.gg/magicproxies)! ![Photoshop](https://img.shields.io/badge/photoshop-CC_2017+-informational?style=plastic) ![Python](https://img.shields.io/badge/python-3.9_|_3.10_|_3.11-blue?style=plastic) [![Discord](https://img.shields.io/discord/889831317066358815?style=plastic&label=discord&color=brightgreen)](https://discord.gg/magicproxies) ![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/MrTeferi/Proxyshop?style=plastic&label=commits&color=brightgreen) [![Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dmpcfill%26type%3Dpatrons&style=plastic&color=red&logo=none)](https://patreon.com/mpcfill) [![GitHub](https://img.shields.io/github/license/MrTeferi/Proxyshop?color=red&style=plastic)](https://github.com/MrTeferi/Proxyshop/blob/main/LICENSE)

πŸ› οΈ Requirements

πŸš€ Setup Guide

  1. Download the latest release, extract it to a folder of your choice.
  2. Install the fonts included in the fonts/ folder, please note that Proxyglyph may need to be updated in future releases.
  3. Place card arts for cards you wish to render in the art/ folder. These arts should be named according to the card (see Art File Naming for more info).
  4. Launch Proxyshop.exe. Click the Update button. Proxyshop will load templates available to download, grab what you want.
  5. Hit Render All to render every card art in the art/ folder. Hit Render Target to render one or more specific card arts.
  6. You can also drag art images or folders containing art images onto the Proxyshop app, Proxyshop will automatically start rendering those cards.
  7. During the render process the console at the bottom will display the current progress and prompt you if any failures occur.

🎨 Art File Naming

πŸ’» Using the Proxyshop GUI

Render Cards Tab

Custom Creator Tab

Tools Tab

🐍 Setup Guide (Python Environment)

Setting up the Python environment for Proxyshop is intended for advanced users, contributors, and anyone who wants to get their hands dirty making a plugin or custom template for the app!

  1. Install Poetry using one of these methods.

    # Install pipx, then install poetry with pipx (Recommended)
    python -m pip install --user pipx
    python -m pipx ensurepath
    pipx install poetry
    
    # Install using Powershell
    (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
    
    # Install using WSL (Windows Subsystem for Linux)
    curl -sSL https://install.python-poetry.org | python3 -
    
    # Install using scoop
    scoop install poetry
  2. Clone Proxyshop somewhere on your system, we'll call this repository the root directory.
    git clone https://github.com/MrTeferi/Proxyshop.git
  3. Navigate to the root directory and install the Proxyshop project with poetry.

    # Move to the Proxyshop repository we just cloned
    cd Proxyshop
    
    # OPTIONAL: Configure poetry to setup the environment locally
    poetry config virtualenvs.in-project true
    
    # Install the Proxyshop project
    poetry install
  4. Install the fonts included in the fonts/ folder. Do not delete these, even after you install them (some are used by the GUI).
  5. Create a folder called art in the root directory. This is where you place art images for cards you wish to render.
  6. Run the app.

    # OPTION 1) Execute via poetry
    poetry run main.py
    
    # OPTION 2) Enter the poetry environment, then execute normally
    poetry shell
    py main.py
  7. Refer to the usage guide for navigating the GUI.

πŸ’Ύ Download Templates Manually

If you wish to download the templates manually, visit this link:

πŸ’Œ How can I support Proxyshop?

Feel free to join our discord and participate in the #Proxyshop channel where we are constantly brainstorming and testing new features, dropping beta releases, and sharing new plugins and templates. Also, please consider supporting our Patreon which pays for S3 + Cloudfront hosting of Proxyshop templates and allows us the freedom to work on the app, as well as other applications like MPC Autofill, MTG Art Downloader, and more! If Patreon isn't your thing, you can also buy me a coffee via Paypal. Thanks so much to our awesome supporters!

❓ FAQ

How do I change the set symbol to something else? In settings, change "Default Symbol" to the set code of the symbol you want, and enable "Force Default Symbol". If you wish to add a totally custom symbol, here's the process: - Head over to `src/img/symbols/` and create a folder named according a new custom code. - Add your custom SVG symbols to the folder you created, name each file according to the first letter of its rarity (capitalized). - Set that symbol as "Default Symbol" and enabled "Force Default Symbol". You're good to go!
How do I completely hide the set symbol? In Global Settings, or settings for a specific template, change "Symbol Render Mode" to None. This disables the expansion symbol altogether.
How do I hide a layer in a Proxyshop template, so it doesn't appear in rendered cards? In the Photoshop template of your choice, change the opacity to 0 on the layer you wish to hide. You can use this method to hide anything. This is safer than just disabling the layer's visibility because layers may be forcibly enabled and disabled by the app, it's also safer than deleting the layer because that may cause errors on some templates.
Where is a good place to find high quality MTG art? Your best resource is going to be [MTG Pics](https://mtgpics.com), to improve art quality even more you can look into upscaling with Topaz/Chainner/ESRGAN. On our [discord](https://discord.gg/magicproxies) we provide a lot of resources for learning how to upscale art easily and effectively. For mass downloading art, view my other project: [MTG Art Downloader](https://github.com/MrTeferi/MTG-Art-Downloader)
The app stops when trying to enter text and Photoshop becomes unresponsive! There is a known [bug](https://github.com/MrTeferi/MTG-Proxyshop/issues/9) where Photoshop crashes when trying to enter too much text into a text box, it should be fixed but could theoretically happen on some plugin templates that don't make the text box big enough. The best way to fix this is to open the template in Photoshop and expand the bottom edge of the Rules text boxes (creature and noncreature).
Required value is missing / RPC server not responding. This can sometimes be one of the more rare but obnoxious errors that occur on some systems. Sometimes the root cause is unknown, but it can usually be fixed. Try these options in order until something works: - Ensure there is only **ONE** installation of Photoshop on your computer. Having two versions of Photoshop installed at the same time can prevent making a connection to the app. If you have more than one installed, uninstall **all** versions of Photoshop and reinstall one version. You must uninstall all of them **first**, just removing one likely won't fix the issue. - Ensure that your Photoshop application was installed using an actual installer. **Portable installations** of Photoshop do not work with Proxyshop, since Windows needs to know where it is located. - Close Photoshop and Proxyshop, then run both Photoshop and Proxyshop as Administrator, try rendering something. - Close both of them, then hold ALT + CTRL + SHIFT while launching Photoshop, then launch Proxyshop, try again. - Restart your computer, then start both and try again. - If you have a particularly over-defensive antivirus software running that may be interfering with Proxyshop connecting to Photoshop, such as Avast, Norton, etc. close your antivirus software, relaunch both, and try again. You might also try disabling Windows Defender. - If there's a chance your Photoshop installation could be damaged, corrupted, or otherwise messed up in some way, it is recommended to completely uninstall Photoshop and install the latest version you have access to. Generally, Proxyshop works best with newer versions of Photoshop. If using an in-authentic version of Photoshop, verify it is of high quality and uses a real installer. - If all of these fail to fix the issue, please join our Discord (linked at the top) and provide the error log from `logs/error.txt` in your Proxyshop directory, so we can help find the cause :)
Mana Cost, Rules, or other text is huge and not scaling down? - In Photoshop go to **Edit** > **Preferences** > **Units & Rulers**. - Set **Rulers** to **Pixels** - Set **Type** to **Points** - The issue should be fixed.
Photoshop is busy! This error occurs when Photoshop is not responding to commands because it is busy. To prevent this error, you must ensure Photoshop is in a neutral state when you run Proxyshop or render a card: - There should be no dialog boxes or settings menus open in Photoshop. The normal tool panels are fine. - There should be no tools performing tasks, for example having text highlighted for editing with the text tool. - Ideally Photoshop should be launched fresh, with no documents open.
I'm getting some other error! In your proxyshop directory, look for a folder named `logs`, inside that folder you should see `error.txt`, check the last error log in that file. If the error isn't obvious, join our Discord and feel free to ask for help in the #Proxyshop channel.

✨ Credits