Advertiser Content

RaulCortez

Maybe active...sometimes?

Age 29
Male
Panamá, Panamá
Seen November 5th, 2017
Posted November 5th, 2017
96 posts
8.2 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!

Name: Bellefleur
Adopt one yourself! @Pokémon Orphanage

Maruno

Lead Dev of Pokémon Essentials

England
Seen 1 Hour Ago
Posted 1 Hour Ago
5,197 posts
11.8 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:

  def setPokemonBitmapSpecies(pokemon,species,back=false)
    @_iconbitmap.dispose if @_iconbitmap
    @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
    self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
    self.bitmap.mirror=true if back
  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.
Go to the Essentials Docs Wiki

Essentials Docs Wiki

Follow me on Twitter: @maruno42


RaulCortez

Maybe active...sometimes?

Age 29
Male
Panamá, Panamá
Seen November 5th, 2017
Posted November 5th, 2017
96 posts
8.2 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:

  def setPokemonBitmapSpecies(pokemon,species,back=false)
    @_iconbitmap.dispose if @_iconbitmap
    @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
    self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
    self.bitmap.mirror=true if back
  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.

Name: Bellefleur
Adopt one yourself! @Pokémon Orphanage

RaulCortez

Maybe active...sometimes?

Age 29
Male
Panamá, Panamá
Seen November 5th, 2017
Posted November 5th, 2017
96 posts
8.2 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.

Name: Bellefleur
Adopt one yourself! @Pokémon Orphanage
Advertiser Content