# Improved Pokécenters 2017-03-28

Pokémon Essentials Version
This script and events were included in Gen 6, but since it's a standalone script, I decided to make a separate post for it.
First thing, add this script in a new section above the main.
Code:
class MakeHealingBallGraphics
def initialize
balls=[]
for poke in \$Trainer.party
balls.push(poke.ballused) if !poke.isEgg?
end
return false if balls.length==0
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=999999
for i in 0...balls.length
@sprites["ball#{i}"]=Sprite.new(@viewport)
if pbResolveBitmap("Graphics/Pictures/Balls/ball_#{balls[i]}.png")
@sprites["ball#{i}"].bitmap=Bitmap.new("Graphics/Pictures/Balls/ball_#{balls[i]}.png")
else
@sprites["ball#{i}"].bitmap=Bitmap.new("Graphics/Pictures/Balls/ball_0.png")
end
@sprites["ball#{i}"].visible=false
end
bitmap1=Bitmap.new(128,192)
bitmap2=Bitmap.new(128,192)
rect1=Rect.new(0,0,128,192/4)
rect2=Rect.new(0,0,128,192/4)
for i in 0...balls.length
case i
when 0
bitmap1.blt(20,50,@sprites["ball#{i}"].bitmap,rect1)
bitmap1.blt(20,98,@sprites["ball#{i}"].bitmap,rect1)
bitmap1.blt(20,146,@sprites["ball#{i}"].bitmap,rect1)
when 1
bitmap2.blt(0,50,@sprites["ball#{i}"].bitmap,rect2)
bitmap2.blt(0,98,@sprites["ball#{i}"].bitmap,rect2)
bitmap2.blt(0,146,@sprites["ball#{i}"].bitmap,rect2)
when 2
bitmap1.blt(20,106,@sprites["ball#{i}"].bitmap,rect1)
bitmap1.blt(20,154,@sprites["ball#{i}"].bitmap,rect1)
when 3
bitmap2.blt(0,106,@sprites["ball#{i}"].bitmap,rect2)
bitmap2.blt(0,154,@sprites["ball#{i}"].bitmap,rect2)
when 4
bitmap1.blt(20,162,@sprites["ball#{i}"].bitmap,rect1)
when 5
bitmap2.blt(0,162,@sprites["ball#{i}"].bitmap,rect2)
end
Graphics.update
end
if RTP.exists?("Graphics/Characters/Healing balls left.png")
File.delete("Graphics/Characters/Healing balls left.png")
end
if RTP.exists?("Graphics/Characters/Healing balls right")
File.delete("Graphics/Characters/Healing balls right")
end
bitmap1.saveToPng("Graphics/Characters/Healing balls left.png")
bitmap2.saveToPng("Graphics/Characters/Healing balls right.png")
pbDisposeSpriteHash(@sprites)
@viewport.dispose
bitmap1.dispose
bitmap2.dispose
end
end
And add this folder (which contains the graphics for each ball) into Graphics/Pictures
Now, for setting up the events.
Instead of making this overcomplicated, I've just made an example map with the necessary events.
Note that this map's number is 009, so you'll probably have to change that before adding it to your game to avoid overwriting a previous map.
Video of this working:
PS: To add a new ball's graphic, just put it in the same folder. Named "ball_X", where X is it's ID number (if you'd added a new ball, you've defined this.) If a ball graphic is not found for a particular ball, it defaults to "ball_0", which is a pokeball.
Credits
mej71
Author
mej71
Views
1,110
First release
Last update
Rating
2 ratings