The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials
Reload this Page Essentials Script [Luka's Elite Battle System] Gen 6-style trainer battle intro
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #1    
Old June 3rd, 2015 (1:53 AM). Edited June 3rd, 2015 by rigbycwts.
rigbycwts's Avatar
rigbycwts rigbycwts is offline
Hmm, hmm.
 
Join Date: Mar 2013
Gender: Male
Nature: Timid
Posts: 67
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:

Single Battle:

Double Battle with two separate Trainers:


__________________
Coming soon: Pokemon Collective and Mercantile Versions.

My college-life-advice blog.
Reply With Quote

Relevant Advertising!

  #2    
Old June 3rd, 2015 (12:31 PM).
塗 ゆり's Avatar
塗 ゆり 塗 ゆり is offline
Scripter / RGSS Modder
 
Join Date: Apr 2011
Location: France
Age: 22
Gender: Other
Posts: 45
Send a message via Skype™ to 塗 ゆり
Does it looks like this :
The modifications looks really short '^'
__________________
Nuri Yuri
Community Script Project | Facebook Page
Reply With Quote
  #3    
Old June 4th, 2015 (12:02 AM).
rigbycwts's Avatar
rigbycwts rigbycwts is offline
Hmm, hmm.
 
Join Date: Mar 2013
Gender: Male
Nature: Timid
Posts: 67
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.
__________________
Coming soon: Pokemon Collective and Mercantile Versions.

My college-life-advice blog.
Reply With Quote
  #4    
Old June 4th, 2015 (8:01 AM).
塗 ゆり's Avatar
塗 ゆり 塗 ゆり is offline
Scripter / RGSS Modder
 
Join Date: Apr 2011
Location: France
Age: 22
Gender: Other
Posts: 45
Send a message via Skype™ to 塗 ゆり
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)
__________________
Nuri Yuri
Community Script Project | Facebook Page
Reply With Quote
  #5    
Old June 4th, 2015 (11:56 AM).
matwert's Avatar
matwert matwert is offline
 
Join Date: Feb 2015
Gender: Male
Nature: Calm
Posts: 11
I didn't understand what to do in EliteBattle_Scene
__________________
This signature has been disabled.
Exceeds signature height limit.
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

I am Brazilian, excuse me for my bad English
Reply With Quote
  #6    
Old July 8th, 2015 (10:08 AM).
rigbycwts's Avatar
rigbycwts rigbycwts is offline
Hmm, hmm.
 
Join Date: Mar 2013
Gender: Male
Nature: Timid
Posts: 67
Quote:
Originally Posted by matwert View Post
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.
__________________
Coming soon: Pokemon Collective and Mercantile Versions.

My college-life-advice blog.
Reply With Quote
  #7    
Old March 18th, 2016 (10:18 PM).
pauloo's Avatar
pauloo pauloo is offline
 
Join Date: Mar 2011
Gender: Male
Nature: Timid
Posts: 24
I can not find the link to download the script resources..
Reply With Quote
  #8    
Old March 25th, 2016 (9:43 PM).
zain1424's Avatar
zain1424 zain1424 is offline
 
Join Date: Mar 2016
Posts: 3
Can you please tell me what to name the sprite of closeup, full body and background.
Reply With Quote
  #9    
Old 4 Weeks Ago (2:54 AM).
Chris313 Chris313 is offline
 
Join Date: Mar 2016
Gender: Male
Posts: 28
Quote:
Originally Posted by rigbycwts View Post
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:

Single Battle:

Double Battle with two separate Trainers:


how do u resize to 512x512? whenever you do that in paint.net the other value changes the moment you put 512 for one
Reply With Quote
  #10    
Old 4 Weeks Ago (4:43 PM).
Vendily's Avatar
Vendily Vendily is offline
Making BW-style OWs for RMXP
 
Join Date: Aug 2015
Gender: Female
Nature: Calm
Posts: 561
Quote:
Originally Posted by Chris313 View Post
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.

Just make sure that checkbox is cleared, like it is in the picture.
__________________
Resources for ROM hackers has moved.

Reply With Quote
  #11    
Old 4 Weeks Ago (10:00 PM).
Chris313 Chris313 is offline
 
Join Date: Mar 2016
Gender: Male
Posts: 28
Quote:
Originally Posted by Vendily View Post
This isn't the place to ask for this, but what the heck, this is a quick question.

Just make sure that checkbox is cleared, like it is in the picture.
Thx for the quick answer
Reply With Quote
  #12    
Old 3 Weeks Ago (6:56 PM).
kidbuu543 kidbuu543 is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 3
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.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:28 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.