• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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
    12
    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:
    Does it looks like this :
    The modifications looks really short '^'
     
    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.
     
    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)
     
    I didn't understand what to do in EliteBattle_Scene
     
    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.
     
    Can you please tell me what to name the sprite of closeup, full body and background.
     
    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
     
    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.
     
    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 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