• 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.

Replacing Back Sprites with Front Sprites in Battle

RaulCortez

Maybe active...sometimes?
96
Posts
12
Years
Hey Everyone,

I directed this question originally to Maruno, but if anyone knows how to do this, i'd be eternally grateful!

I'm using the latest release (december 24), and I'd like to change the battle system.

Not sure if it's a huge change, but instead of using a backsprite, i'd like to use the front sprite, but mirrored, the way it shows on the summary. Here's a picture to illustrate what i mean:

Spoiler:


To describe it briefly, the idea is to put the ally pokemon side by side with the enemy pokemon, using the mirrored front sprite.

Now, the position of the hp bars were easy to change, but my main thing is that i put Torchic on that position by mirroring the sprite on photoshop and then replacing the backsprite with the mirrored version. Then i had to reposition it to be on that place with the editor.

If i did that with each and every pokemon of all the 600+...well, you can imagine.

But i really don't think that should be necessary if there was a way to just use the front sprite, mirror it and use it on battle, on that position, just like the summary sprite.

So, i'm not sure if that peculiar thing requires a lot of work or if it can be done with minor tweaks, so i'm asking:

How can i do it?
Is that on the Pokebattle_ActualScene part?
Or is it somewhere else?

FL told me that i could do something on the lines of

"@sprites["pokemon"].mirror=true"

But i don't really know in what part of the script i can add that, also i'm not sure if that would do the whole repositioning sprites thing. But thanks FL, it gave me an idea!

And...i think that's it. It would be great it you could give me some advice on that. Thank you so much!
 
Last edited:

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
Change the battle backs easiest (but longest) way to do so, or use some scripting which I don't mess around with the structure scripts...
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
In PokemonUtilities, find the def pbLoadPokemonBitmapSpecies. In there are four instances of the code back ? "b" : "". Simply delete the b in each of them, to leave back ? "" : "". That'll give you the front sprites rather than the back sprites.

In PokeBattle_ActualScene, around line 372 is the following def; add in the red line:

Code:
  def setPokemonBitmapSpecies(pokemon,species,back=false)
    @_iconbitmap.dispose if @_iconbitmap
    @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
    self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
    [COLOR=Red]self.bitmap.mirror=true if back[/COLOR]
  end
That'll mirror the sprite (hopefully). I haven't tested this.

Moving the sprites around is different, and in this case quite involved. But I don't think you asked about that.
 

RaulCortez

Maybe active...sometimes?
96
Posts
12
Years
In PokemonUtilities, find the def pbLoadPokemonBitmapSpecies. In there are four instances of the code back ? "b" : "". Simply delete the b in each of them, to leave back ? "" : "". That'll give you the front sprites rather than the back sprites.

In PokeBattle_ActualScene, around line 372 is the following def; add in the red line:

Code:
  def setPokemonBitmapSpecies(pokemon,species,back=false)
    @_iconbitmap.dispose if @_iconbitmap
    @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
    self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
    [COLOR=Red]self.bitmap.mirror=true if back[/COLOR]
  end
That'll mirror the sprite (hopefully). I haven't tested this.

Moving the sprites around is different, and in this case quite involved. But I don't think you asked about that.

Thanks! deleting the b's on the PokemonUtilities section worked, the front sprite is shown instead of the back sprite.

But the mirroring didn't worked...it still shows the sprite on its original position..

And moving the sprite well, it could be just positioning the sprites on the same level of the enemy sprites, since the idea is a Vs. kind of thing, so they should be at the same level. I'm guessing it could be just changing the default position of the back sprites?

Oh, and, the first post is updated with the image, in case someone needs to see the picture.
 
423
Posts
13
Years
  • Age 37
  • Seen Aug 31, 2023
why dont you delete the original back sprites make copys of the front sprites rename to include _b then edit them so there flipped
 

RaulCortez

Maybe active...sometimes?
96
Posts
12
Years
hmmmmm..... that is a VERY interesting idea.

It is! i particularly like it/thought about it for three reasons:

1- Gives the game a more original, rpg feeling

2- Makes it easier for games that require devamping, since you just have to worry about devamping two sprites - The front normal and the front shiny.

3- Also great if you make fakemons, since you won't have to worry about making backsprites from scratch.
I personally love coming up with ideas for new pokemon, but doing the backsprite is something i sincerely abhor.

And since it could help the community, why not share the idea so others can use it?

Maruno helped me a lot, but i still can't get the mirroring to work and also can't change the default position of the sprites to be side by side with the enemy pokemon.

But anyone who can help would be great! Since it's something i'm not doing alone, i'll post the script on the first post once it's done, so people can find it as soon as they enter the thread.
 
Back
Top