• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Black and White Battle Style

Status
Not open for further replies.

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Ok, we have a year to get the battle sytem like Black and White Version or these fan games will be usless. I have some backrounds and HP Bars.
Also, I am trying to modify Luka's Animated Pokemon Scripts to have the Pokemon "move" Throughout the battle to appear "lifelike" such as Black and White. Anything that you can supply to help people upgrade there battle style one step closer to Black and White, please do.

Things to look for or to add to thread:
1. Battle Backrounds
2. Attack Animations
3. Scripting Help
4. Sprites

Here is just the few things I have found so far.
 

Rai Rai

Master of everything!
262
Posts
13
Years
  • Seen Aug 29, 2012
Ok, we have a year to get the battle sytem like Black and White Version or these fan games will be usless. I have some backrounds and HP Bars.
Also, I am trying to modify Luka's Animated Pokemon Scripts to have the Pokemon "move" Throughout the battle to appear "lifelike" such as Black and White. Anything that you can supply to help people upgrade there battle style one step closer to Black and White, please do.

Things to look for or to add to thread:
1. Battle Backrounds
2. Attack Animations
3. Scripting Help
4. Sprites

Here is just the few things I have found so far.

Uh, we don't really have a year to get the fan games battle systems better and they wont be useless :L. The game comes out in just over two weeks over at Japan so why not just wait till it comes about before gathering graphics from it? But I may help out doing the put together of a few battle graphics, by the way you forgot to put credits in for spaceemotion.
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Your right, I was thinking about the US release. Sorry about the credit. Thats why I said I found them. If anybody knows who deserves credit for these, please let me know. If you have seen the videos for the battles on Black and White, you can see that some major scripting may be needed to get the same effects on RMXP. Thanks for the info Rai Rai. Here is some sprites. I dont know who deserves credit for these either. Sorry.
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Major credit to Luka for this. Here is a possible way to simulate the "lifelike" animation's of the battlers.
Luka S.J. said:
Hmm...I just took a look at the Battle script. If you search "((@frame/9).floor&1)==1 && @selected==1" in, it should appear in a def update. This is the place that sets player pokemon to move up and down. So now all you have to do is link the other sprites. For changing the player pokemon you could just do "self.bitmap=pbLoadPokemonBitmap2($pkmn,true)" but you'd have to put $pkmn=pkmn in def pbSendOut. And the enemy sprites you could link like $pokemon1=@sprites["pokemon1"] (where they are defined). Try to work it out that way.
 

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
And if you want animating sprites dont use pbWait(X)
And thanks luka.

Like
self.bitmap=pbLoadPokemonBitmap2($pkmn,true)
pbWait(11)
self.bitmap=pbLoadPokemonBitmap($pkmn,true)
pbWait(11)

Game will lag little because of pbWait(11).
 

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
No. That's wrong. You don't want to be using the pbWait(X) command in there, because it will make your battle system wait. I think about every 9 or more frames, the sprite will loop on its own. It's the way the script is made. It loops automatically between "((@frame/9).floor&1)==1 && @selected==1" and the other one (when the pokemon is back at its original position), so if the pbWait function was to be introduced, every 9 frames, the game would wait X frames, making you unable to make any commands - in other words there would only be a timeframe of 9 frames where you could select "Fight" "Bag" and so on. Not to mention that it would look bad if you set a higher wait period within "((@frame/9).floor&1)==1 && @selected==1" then it normally is.
 
Last edited:
664
Posts
15
Years
Well i had a crack at this, and did it :D
For anyone else who wants it, here it is:

Spoiler:

You MUST have already installed Luka S.J's animating pokemon script, and have the firstframe/secondframe folders inside Graphics/Battlers.
Works in single screen mode too, enjoy! :D

Note, this will continuously loop the animations, even when attacking, although that's what happens in Black/White anyway :3
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Your a god CNG. Thanks a million!
It works great! How do I get the same effect for the wild Pokemon?
 
Last edited:
664
Posts
15
Years
Yeah just by itself, but make sure you've already installed Luka's Animating pokemon script, or it'll just blast errors at you :D
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
I have. It all works good, wild, player, and trainer pokemon move fine with Luka's animated scripts and the player and trainer pokemon move throughout the battle with your script but not the wild pokemon.
Also, how can I modifiy your script to get the graphics to loop between the folder firstframe and a folder called thirdframe?
What I mean is when the pokemon comes out or appears in battle I still want them to go from firstframe to secondframe just like Luka's script, but throught the battle I want it to loop between firstframe and thirdframe.

EDIT: Having a new problem with trainers pokemon. When it says "So and SO trainer set out Alakazam" it shows me sending their pokemon out and it shows there backsprite until I send out mine and the trainer remains in place. Check the screenshots below.
EDIT2: Now my touch screen in battle doesnt work. I can still move the mouse but the button don't work.
 
Last edited:

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
That helped a bunch. But when I tested it, it only animated the Pokemon on my side of the screen. It also forbade me to do anything (couldn't move the cursor or select attack, switch, etc.) Also, my frame rate dropped to about 7-8 fps instead of the usual 40. Any ideas?
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Me too. The wild pokemon aren't animated at all. Also Having a problem with trainers pokemon. When it says "So and So trainer set out Alakazam" it shows me sending their pokemon out and it shows there backsprite until I send out mine and the trainer remains in place.
Now my touch screen in battle doesnt work. I can still move the mouse but the button don't work.

Check the screen shots in post 11?????????
 

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
Me too. The wild pokemon aren't animated at all. Also Having a problem with trainers pokemon. When it says "So and So trainer set out Alakazam" it shows me sending their pokemon out and it shows there backsprite until I send out mine and the trainer remains in place.
Now my touch screen in battle doesnt work. I can still move the mouse but the button don't work.

Check the screen shots in post 11?????????


The difference between yours and mine were that my pokemon we're still in the right place.
 
664
Posts
15
Years
Fixed, although they won't animate throughout the battle now, just when you're choosing commands. It does fix the not being able to select anything problem.

Code:
#===============================================================================
# * B/W Style Animated Pokemon In Battle
# * By Crazyninjaguy
# * Credit to Luka S.J for finding the right part :3 (Just felt it was right to
#   credit you)
#===============================================================================

class PokemonBattlerSprite < RPG::Sprite
  def initialize(doublebattle,index,viewport=nil)
  super(viewport)
  @selected=0
  @frame=0
  @index=index
  @updating=false
  @doublebattle=doublebattle
  @index=index
  @spriteX=0
  @spriteY=0
  @spriteXExtra=0
  @spriteYExtra=0
  @spriteVisible=false
  @frames = 0
  @_iconbitmap=nil
  self.visible=false
 end
  def update
  @frame+=1
  @updating=true
  if @frames == 0 && @selected==1
    case @index
    when 0
       self.bitmap=pbLoadPokemonBitmap($playerpokemon,true)
    when 1
      self.bitmap=pbLoadPokemonBitmap($enemypokemon,false)
    end
  elsif @frames == 10 && @selected==1
   case @index
    when 0
       self.bitmap=pbLoadPokemonBitmap2($playerpokemon,true)
    when 1
      self.bitmap=pbLoadPokemonBitmap2($enemypokemon,false)
    end
  elsif @frames == 20 && @selected==1
    @frames = -1
  end
  @frames+=1
  if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  elsif @selected==2 # When targeted or damaged
   self.x=@spriteX
   self.y=@spriteY
   self.visible=(@frame%10<7)
  elsif 
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  end
  if @_iconbitmap
   @_iconbitmap.update
   self.bitmap=@_iconbitmap.bitmap
  end
  @updating=false
end
end

class PokeBattle_Scene
  alias pbSendOut_cng pbSendOut
  def pbSendOut(battlerindex,pkmn)
    $playerpokemon=pkmn
    pbSendOut_cng(battlerindex,pkmn)
  end
  alias pbTrainerSendOut_cng pbTrainerSendOut
  def pbTrainerSendOut(battlerindex,pkmn)
    $enemypokemon=pkmn
    pbSendOut_cng(battlerindex,pkmn)
  end
end
 

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
Fixed, although they won't animate throughout the battle now, just when you're choosing commands. It does fix the not being able to select anything problem.

Code:
#===============================================================================
# * B/W Style Animated Pokemon In Battle
# * By Crazyninjaguy
# * Credit to Luka S.J for finding the right part :3 (Just felt it was right to
#   credit you)
#===============================================================================

class PokemonBattlerSprite < RPG::Sprite
  def initialize(doublebattle,index,viewport=nil)
  super(viewport)
  @selected=0
  @frame=0
  @index=index
  @updating=false
  @doublebattle=doublebattle
  @index=index
  @spriteX=0
  @spriteY=0
  @spriteXExtra=0
  @spriteYExtra=0
  @spriteVisible=false
  @frames = 0
  @_iconbitmap=nil
  self.visible=false
 end
  def update
  @frame+=1
  @updating=true
  if @frames == 0 && @selected==1
    case @index
    when 0
       self.bitmap=pbLoadPokemonBitmap($playerpokemon,true)
    when 1
      self.bitmap=pbLoadPokemonBitmap($enemypokemon,false)
    end
  elsif @frames == 10 && @selected==1
   case @index
    when 0
       self.bitmap=pbLoadPokemonBitmap2($playerpokemon,true)
    when 1
      self.bitmap=pbLoadPokemonBitmap2($enemypokemon,false)
    end
  elsif @frames == 20 && @selected==1
    @frames = -1
  end
  @frames+=1
  if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  elsif @selected==2 # When targeted or damaged
   self.x=@spriteX
   self.y=@spriteY
   self.visible=(@frame%10<7)
  elsif 
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  end
  if @_iconbitmap
   @_iconbitmap.update
   self.bitmap=@_iconbitmap.bitmap
  end
  @updating=false
end
end

class PokeBattle_Scene
  alias pbSendOut_cng pbSendOut
  def pbSendOut(battlerindex,pkmn)
    $playerpokemon=pkmn
    pbSendOut_cng(battlerindex,pkmn)
  end
  alias pbTrainerSendOut_cng pbTrainerSendOut
  def pbTrainerSendOut(battlerindex,pkmn)
    $enemypokemon=pkmn
    pbSendOut_cng(battlerindex,pkmn)
  end
end

Nice job, but you shouldn't say fixed when you even said yourself it wasn't. Can't wait for the frozen command fix. Still great job, CNG, can't wait for another epic release from ya.
 

ashthebest10

Creator of Pocket Monsters
81
Posts
13
Years
Thanks for your time CNG. But there is major problems with it. Only the players pokemon are animated and when you face a trainer, it shows me sending out the trainers pokemon and it doesent move. Don't know why this happens but maybe you can figure it out.
Check out these screenshots.

EDIT: Also the trainer remains in battle and the opponents pokemon is shows as backsprite above mine as you can see. The only changes to my scripts that I have made are Luka's animated pokemon and the D/P battle style. Don''t know if maybe that has something to do with it, I don't think so though. Have you tested the script against a trainer?
 
Last edited:

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
Okay the commands aren't frozen anymore, but the trainer battles are still pretty bugged. The opponent just says there and the pokemon that they own are sent onto my side, overlapping my own. Other than that, I like it. I hope that this gets fixed, and maybe the speed at which they animate to slow down a bit. I can figure that much on my own I bet.

Can't wait for your next script CNG. You're awesome.

EDIT: Also, can you make it so that the pokemon go back to moving up and down 1 pixel when your selecting an action? It seems like the sprite would appear less static that way.
 
Status
Not open for further replies.
Back
Top