- 56
- Posts
- 10
- Years
- Seen Jul 8, 2023
You did download the picture in my initial post and put it in the Graphics/Pictures folder?
Yes, I did. I'll check again though but I do remember downloading it.
EDIT: I just checked it is there.
Last edited:
You did download the picture in my initial post and put it in the Graphics/Pictures folder?
Ahh, I got it. I left behind code from my own game. Near the beginning there's two lines that refer to overlay3. Remove them.
Again, you can get rid of the line that's using pbSetLargestFont...
That did the trick! Thanks a lot! I'm still new to essentials so I don't really know the scripts yet.
EDIT: Something odd happens, on the moves page, I cannot select the moves, I have to go to the IV/EV/HP screen to select moves. Also the ribbon screen is not available. I assume this is because of the new page inserted. Is there any way to fix this?
This should have fixed the first issue. As for the second issue,Earlier in that same function, you should see code for if you press the C button. There's a line that reads "elsif @page==3", change that to 4. I forgot this myself initially. This is so that pressing the enter button on the Moves page, not the IVs/EVs/Hidden Power page, allows you to rearrange moves.
def pbScene
pbPlayCry(@pokemon)
loop do
Graphics.update
Input.update
pbUpdate
if Input.trigger?(Input::B)
break
end
dorefresh=false
if Input.trigger?(Input::C)
if @page==0
break
elsif @page==4
pbMoveSelection
dorefresh=true
drawPageFour(@pokemon)
end
end
if Input.trigger?(Input::UP) && @partyindex>0
pbGoToPrevious
@pokemon=@party[@partyindex]
@sprites["pokemon"].setPokemonBitmap(@pokemon)
@sprites["pokemon"].color=Color.new(0,0,0,0)
pbPositionPokemonSprite(@sprites["pokemon"],40,144)
dorefresh=true
pbPlayCry(@pokemon)
end
if Input.trigger?(Input::DOWN) && @partyindex<@party.length-1
pbGoToNext
@pokemon=@party[@partyindex]
@sprites["pokemon"].setPokemonBitmap(@pokemon)
@sprites["pokemon"].color=Color.new(0,0,0,0)
pbPositionPokemonSprite(@sprites["pokemon"],40,144)
dorefresh=true
pbPlayCry(@pokemon)
end
if Input.trigger?(Input::LEFT) && [email protected]?
oldpage=@page
@page-=1
@page=5 if @page<0
dorefresh=true
if @page!=oldpage # Move to next page
pbPlayCursorSE()
dorefresh=true
end
end
if Input.trigger?(Input::RIGHT) && [email protected]?
oldpage=@page
@page+=1
@page=0 if @page>5
if @page!=oldpage # Move to next page
pbPlayCursorSE()
dorefresh=true
end
end
if dorefresh
case @page
when 0
drawPageOne(@pokemon)
when 1
drawPageTwo(@pokemon)
when 2
drawPageThree(@pokemon)
when 3
drawPageSix(@pokemon)
when 4
drawPageFour(@pokemon)
when 5
drawPageFive(@pokemon)
end
end
end
return @partyindex
end
This should have fixed the first issue. As for the second issue,
Replace your def pbScene with this. It should fix both issues.Code:def pbScene pbPlayCry(@pokemon) loop do Graphics.update Input.update pbUpdate if Input.trigger?(Input::B) break end dorefresh=false if Input.trigger?(Input::C) if @page==0 break elsif @page==4 pbMoveSelection dorefresh=true drawPageFour(@pokemon) end end if Input.trigger?(Input::UP) && @partyindex>0 pbGoToPrevious @pokemon=@party[@partyindex] @sprites["pokemon"].setPokemonBitmap(@pokemon) @sprites["pokemon"].color=Color.new(0,0,0,0) pbPositionPokemonSprite(@sprites["pokemon"],40,144) dorefresh=true pbPlayCry(@pokemon) end if Input.trigger?(Input::DOWN) && @partyindex<@party.length-1 pbGoToNext @pokemon=@party[@partyindex] @sprites["pokemon"].setPokemonBitmap(@pokemon) @sprites["pokemon"].color=Color.new(0,0,0,0) pbPositionPokemonSprite(@sprites["pokemon"],40,144) dorefresh=true pbPlayCry(@pokemon) end if Input.trigger?(Input::LEFT) && [email protected]? oldpage=@page @page-=1 @page=5 if @page<0 dorefresh=true if @page!=oldpage # Move to next page pbPlayCursorSE() dorefresh=true end end if Input.trigger?(Input::RIGHT) && [email protected]? oldpage=@page @page+=1 @page=0 if @page>5 if @page!=oldpage # Move to next page pbPlayCursorSE() dorefresh=true end end if dorefresh case @page when 0 drawPageOne(@pokemon) when 1 drawPageTwo(@pokemon) when 2 drawPageThree(@pokemon) when 3 drawPageSix(@pokemon) when 4 drawPageFour(@pokemon) when 5 drawPageFive(@pokemon) end end end return @partyindex end
def drawPageSix(pokemon)
overlay=@sprites["overlay"].bitmap
overlay.clear
@sprites["background"].setBitmap("Graphics/Pictures/summary6")
imagepos=[]
if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
status=6 if pbPokerus(pokemon)==1
[email protected] if @pokemon.status>0
status=5 if pokemon.hp==0
if status==1 && @pokemon.statusCount>0
status=7
end
imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
end
if pokemon.isShiny?
imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
end
if pbPokerus(pokemon)==2
imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
end
[email protected] ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
imagepos.push([ballimage,14,60,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
base=Color.new(248,248,248)
shadow=Color.new(104,104,104)
statshadows=[]
for i in 0...5; statshadows[i]=shadow; end
natup=(pokemon.nature/5).floor
natdn=(pokemon.nature%5).floor
statshadows[natup]=Color.new(128,32,64) if natup!=natdn
statshadows[natdn]=Color.new(32,64,128) if natup!=natdn
pbSetSystemFont(overlay)
abilityname=PBAbilities.getName(pokemon.ability)
abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
itemname=pokemon.hasItem? ? PBItems.getName(pokemon.item) : _INTL("None")
[email protected]
brenda=overlay.font.size
pbSetLargestFont(overlay,pokename,170-46-2)
brenda -= overlay.font.size
textpos=[[pokename,46,62+(brenda/2),0,base,shadow]]
pbDrawTextPositions(overlay,textpos)
pbSetSystemFont(overlay)
textpos=[
[_INTL("IVs, EVs, Hidden Power"),26,16,0,base,shadow],
[pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Item"),16,320,0,base,shadow],
[itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("HP"),248,89,0,base,shadow],
[sprintf("%d",pokemon.iv[0]),358,89,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[0]),485,89,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Attack"),248,120,0,base,statshadows[0]],
[sprintf("%d",pokemon.iv[1]),358,120,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[1]),485,120,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Defense"),248,152,0,base,statshadows[1]],
[sprintf("%d",pokemon.iv[2]),358,152,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[2]),485,152,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
[sprintf("%d",pokemon.iv[4]),358,184,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[4]),485,184,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
[sprintf("%d",pokemon.iv[5]),358,216,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[5]),485,216,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Speed"),248,248,0,base,statshadows[2]],
[sprintf("%d",pokemon.iv[3]),358,248,0,Color.new(96,0,96),Color.new(176,176,176)],
[_INTL("{1}/252",pokemon.ev[3]),485,248,1,Color.new(0,96,96),Color.new(176,176,176)],
[_INTL("Hidden Power"),221,284,0,base,shadow],
]
if pokemon.isMale?
textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
elsif pokemon.isFemale?
textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
end
pbDrawTextPositions(overlay,textpos)
hp=pbHiddenPower(pokemon.iv)
type1rect=Rect.new(0,hp[0]*28,64,28)
overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/COLOR]
drawMarkings(overlay,15,291,72,20,pokemon.markings)
if pokemon.hp>0 hpcolors=[
Color.new(24,192,32),Color.new(0,144,0), # Green
Color.new(248,184,0),Color.new(184,112,0), # Orange
Color.new(240,80,32),Color.new(168,48,56) # Red
]
hpzone=0
totalEV=pokemon.ev[0]+pokemon.ev[1]+pokemon.ev[2]+pokemon.ev[3]+pokemon.ev[4]+pokemon.ev[5]
overlay.fill_rect(360,110,pokemon.hp*96/pokemon.totalhp,2,hpcolors[hpzone*2+1])
overlay.fill_rect(360,112,pokemon.hp*96/pokemon.totalhp,4,hpcolors[hpzone*2])
end
end
if pokemon.hp>0 hpcolors=[
overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/COLOR]
I get this problem:
The other screen overlap the IV SCREEN and it seems that the calculation of the points isn't working for me to.
Why would you bother? The latest version of Pok?mon is v16.2, which is highly recommend to use.
I'm already using that
Did you take a look at the thread title? It says it's for version 15.1.
Did you take a look at the thread title? It says it's for version 15.1.
You realise that makes little difference since versions are by and large backwards compatible?