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

[Luka's Elite Battle System] Gen 6-style trainer battle intro

rigbycwts

Hmm, hmm.
98
Posts
11
Years
    • Seen Feb 22, 2019
    Okay, so here is how to incorporate the Gen 6-styled Trainer introduction at the start of battles. The only sections that are going to be modified are: PSystem_Utilities, EliteBattle_Scene, and EliteBattle_Sprites, hence this requires Luka S.J.'s Elite Battle System.
    Remember that the resource pack I know that contains the Gen 6 mugshots use a 512x256 resolution, so the mugshots that you want to use must be resized to 512x512, with the mugshot taking the upper half of the image file.

    In PSystem_Utilities, add this function starting at line 1343:
    Code:
    def pbTrainerMugshotFile(type)
      return nil if !type
      bitmapFileName=sprintf("Graphics/Characters/mugshot%s",getConstantName(PBTrainers,type)) rescue nil
      if !pbResolveBitmap(bitmapFileName)
        bitmapFileName=sprintf("Graphics/Characters/mugshot%03d",type)
      end
      return bitmapFileName
    end
    Note that that function looks for the trainer mugshot's filename.

    Next, modify a few lines in EliteBattle_Scene. Under
    Code:
    if @battle.opponent
    Replace all instances of pbTrainerSpriteFile with
    pbTrainerMugshotFile.

    Finally, in EliteBattle_Sprites, under the class DynamicTrainerSprite, replace the setTrainerBitmap function with this:
    Code:
    def setTrainerBitmap(file)
        @bitmap=AnimatedBitmapWrapper.new(file,TRAINERSPRITESCALE)
        @[email protected]
        @[email protected]
        @sprite.ox=(@bitmap.width/2) + 150
        if @doublebattle
          if @index==-2
            @sprite.ox-=150
          elsif @index==-1
            @sprite.ox+=150
          end
        end
        @[email protected]/4
        
        self.formatShadow
        @shadow.skew(74)
      end
    After those few modifications, here are the results:
    Spoiler:

     
    Last edited:

    MysteriousUser94

    Guest
    0
    Posts
    Does it looks like this :
    The modifications looks really short '^'
     

    rigbycwts

    Hmm, hmm.
    98
    Posts
    11
    Years
    • Seen Feb 22, 2019
    I didn't make it exactly like the games (even though that's what I'm aiming). The only thing done with that for now is just use mugshots instead of sprites. I don't know how to add the background for it.
     

    MysteriousUser94

    Guest
    0
    Posts
    Oh ^^
    I didn't read the content of Elite Battle System but you just have to create a new sprite that contain the background before the calls of setTrainerBitmap and animate the thing. (And also don't forget to destroy the sprite when the animation is done :d)
     

    rigbycwts

    Hmm, hmm.
    98
    Posts
    11
    Years
    • Seen Feb 22, 2019
    I didn't understand what to do in EliteBattle_Scene
    In EliteBattle_Scene, replace all instances of pbTrainerSpriteFile with pbTrainerMugshotFile. It means changing the functions so that the mugshots can be called instead of the sprites.

    Sorry for the late reply, been busy with a lot of things lately.
     
    3
    Posts
    8
    Years
    • Seen Oct 23, 2016
    Can you please tell me what to name the sprite of closeup, full body and background.
     
    28
    Posts
    8
    Years
    • Seen Oct 1, 2016
    Okay, so here is how to incorporate the Gen 6-styled Trainer introduction at the start of battles. The only sections that are going to be modified are: PSystem_Utilities, EliteBattle_Scene, and EliteBattle_Sprites, hence this requires Luka S.J.'s Elite Battle System.
    Remember that the resource pack I know that contains the Gen 6 mugshots use a 512x256 resolution, so the mugshots that you want to use must be resized to 512x512, with the mugshot taking the upper half of the image file.

    In PSystem_Utilities, add this function starting at line 1343:
    Code:
    def pbTrainerMugshotFile(type)
      return nil if !type
      bitmapFileName=sprintf("Graphics/Characters/mugshot%s",getConstantName(PBTrainers,type)) rescue nil
      if !pbResolveBitmap(bitmapFileName)
        bitmapFileName=sprintf("Graphics/Characters/mugshot%03d",type)
      end
      return bitmapFileName
    end
    Note that that function looks for the trainer mugshot's filename.

    Next, modify a few lines in EliteBattle_Scene. Under
    Code:
    if @battle.opponent
    Replace all instances of pbTrainerSpriteFile with
    pbTrainerMugshotFile.

    Finally, in EliteBattle_Sprites, under the class DynamicTrainerSprite, replace the setTrainerBitmap function with this:
    Code:
    def setTrainerBitmap(file)
        @bitmap=AnimatedBitmapWrapper.new(file,TRAINERSPRITESCALE)
        @[email protected]
        @[email protected]
        @sprite.ox=(@bitmap.width/2) + 150
        if @doublebattle
          if @index==-2
            @sprite.ox-=150
          elsif @index==-1
            @sprite.ox+=150
          end
        end
        @[email protected]/4
        
        self.formatShadow
        @shadow.skew(74)
      end
    After those few modifications, here are the results:
    Spoiler:

    how do u resize to 512x512? whenever you do that in paint.net the other value changes the moment you put 512 for one
     
    1,682
    Posts
    8
    Years
    • Seen today
    how do u resize to 512x512? whenever you do that in paint.net the other value changes the moment you put 512 for one

    This isn't the place to ask for this, but what the heck, this is a quick question.
    RENz6dF.png

    Just make sure that checkbox is cleared, like it is in the picture.
     
    3
    Posts
    7
    Years
    • Seen Aug 12, 2016
    Does this work with double battles? As in with a partner trainer? There's an error when using it when trying to double battle with a partner trainer.
     
    350
    Posts
    5
    Years
  • Sorry for necroposting, I want to use this for the new EBS. I want to use the animated backgrounds. Will this be compatible. I don't want trainer sprites.
     
    19
    Posts
    6
    Years
  • Sorry for necroposting, I want to use this for the new EBS. I want to use the animated backgrounds. Will this be compatible. I don't want trainer sprites.

    Sorry, probably not the place to ask, but new ebs? I thought ebs was discontinued? Was it updated recently or something? I haven't heard much about it, aside from it being distributed via the EPI instead of UPI now.
     
    Back
    Top