• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How to use and mirror the front sprite as the back sprite?

  • 12
    Posts
    5
    Years
    • Seen Nov 12, 2021
    As the title says, I want to use and mirror Pokemon Battler front sprites as the back sprites. You see, I already having a slightly reworked battle system and I either need to find a way to script this in, or I need to change over 722 back sprites manually. I already googled it and found a method from 2012 that seems to not work currently. Can someone tell me another way, or do I need to do it manually?
     
    Last edited:
    If your using Windows 10 then it comes with a nifty application called Power Shell. You can run this command through Power Shell and have it flip all the sprites for you.
    If you are using Windows 7, then I think you can use Power Shell on that as well, but I am unsure.

    Code:
    $path = "c:/path/to/files" #target directory
    
    [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    Get-ChildItem -recurse ($path) -include @("*.png", "*.jpg") |
    ForEach-Object {
      $image = [System.Drawing.image]::FromFile( $_ )
      $image.rotateflip("RotateNoneFlipX")
      $image.save($_)
    }



    Credit for the code.
     
    Last edited:
    If your using Windows 10 then it comes with a nifty application called Power Shell. You can run this command through Power Shell and have it flip all the sprites for you.
    If you are using Windows 7, then I think you can use Power Shell on that as well, but I am unsure.

    Code:
    $path = "c:/path/to/files" #target directory
    
    [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    Get-ChildItem -recurse ($path) -include @("*.png", "*.jpg") |
    ForEach-Object {
      $image = [System.Drawing.image]::FromFile( $_ )
      $image.rotateflip("RotateNoneFlipX")
      $image.save($_)
    }



    Credit for the code.

    Awesome, thank you. This will save hours of time. Now time to delete the back sprites, and rename the flipped fronts
     
    Back
    Top