• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
4
Years
  • Age 24
  • 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:
277
Posts
15
Years
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:
12
Posts
4
Years
  • Age 24
  • Seen Nov 12, 2021
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