At first glance this sounds like a move route not completing and the game getting stuck at "Wait for Move completion".The game freezes only during the movement part, and I have just reinstalled the script but it still happens.
vanilla 18.1 summary page should work perfectly fine.
Here's a little unpolished script I have so far that allows you to display the contest moves values in the summary screen.
It could use some filler art but that's not my strong suit.
Spoiler:Code:#==================================== #Contest Summary by TastyRedTomato #==================================== # # To install: paste above main # # In the summary screen press ctrl to show the contest stats of the selected move # Press any key afterwards to revert to the regular display. # Change the ctrl key if you want towards the bottom of the script. # #====================================== class PokemonSummary_Scene def drawSelectedContestMove(moveToLearn,moveid) #Draw Selected Contest Move overlay2 = @sprites["overlay"].bitmap base = Color.new(64,64,64) shadow = Color.new(176,176,176) @sprites["overlay"].bitmap.clear if @sprites["overlay"] @sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport) overlay2=@sprites["overlay"].bitmap @sprites["pokemon"].visible = false if @sprites["pokemon"] @sprites["pokeicon"].pokemon = @pokemon @sprites["pokeicon"].visible = true @sprites["itemicon"].visible = false if @sprites["itemicon"] move=moveid selectedmove=PBMoves.getName(move) for i in 1..PBContestMoves.maxValue name=PBContestMoves.getName(i) if selectedmove==name selectedmove=getID(PBContestMoves,i) end end contestmovedata=PBContestMoveData.new(selectedmove) selectedhearts=contestmovedata.hearts selecteddescription=pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove) heartfile=sprintf("Graphics/Pictures/Contest/heart%d",selectedhearts) selectedjam=contestmovedata.jam jamfile=sprintf("Graphics/Pictures/Contest/negaheart%d",selectedjam) imagepos=[] imagepos.push([heartfile,18,158,0, 0,64,28]) imagepos.push([jamfile,18,188,0, 0,64,28]) imagepos.push(["Graphics/Pictures/Contest/contesttype",18,124,0,contestmovedata.contestType*28,64,28]) #draw contest type pbDrawImagePositions(overlay2,imagepos) drawTextEx(overlay2,15,218,200,3, pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove), #draw contest description Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,75,80,200,3, pbGetMessage(MessageTypes::Moves,selectedmove), #draw move name Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,26,16,200,3,"CONTEST MOVES",Color.new(248,248,248),Color.new(104,104,104)) end #========================================================= def pbMoveSelection @sprites["movesel"].visible = true @sprites["movesel"].index = 0 selmove = 0 oldselmove = 0 switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) loop do Graphics.update Input.update pbUpdate if @sprites["movepresel"].index==@sprites["movesel"].index @sprites["movepresel"].z = @sprites["movesel"].z+1 else @sprites["movepresel"].z = @sprites["movesel"].z end if Input.trigger?(Input::B) (switching) ? pbPlayCancelSE : pbPlayCloseMenuSE break if !switching @sprites["movepresel"].visible = false switching = false elsif Input.trigger?(Input::C) pbPlayDecisionSE if selmove==4 break if !switching @sprites["movepresel"].visible = false switching = false else if [email protected]? if !switching @sprites["movepresel"].index = selmove @sprites["movepresel"].visible = true oldselmove = selmove switching = true else tmpmove = @pokemon.moves[oldselmove] @pokemon.moves[oldselmove] = @pokemon.moves[selmove] @pokemon.moves[selmove] = tmpmove @sprites["movepresel"].visible = false switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) end end end elsif Input.trigger?(Input::UP) selmove -= 1 if selmove<4 && selmove>[email protected] selmove = @pokemon.numMoves-1 end selmove = 0 if selmove>=4 selmove = @pokemon.numMoves-1 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::DOWN) selmove += 1 selmove = 0 if selmove<4 && selmove>[email protected] selmove = 0 if selmove>=4 selmove = 4 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::CTRL) #change the key here if you want pbPlayDecisionSE drawSelectedContestMove(0,@pokemon.moves[selmove].id) end end @sprites["movesel"].visible=false end end
Hello!
Im guessing this goes above main, or does it replace the summary script?
Thanks
vanilla 18.1 summary page should work perfectly fine.
Here's a little unpolished script I have so far that allows you to display the contest moves values in the summary screen.
It could use some filler art but that's not my strong suit.
Spoiler:Code:#==================================== #Contest Summary by TastyRedTomato #==================================== # # To install: paste above main # # In the summary screen press ctrl to show the contest stats of the selected move # Press any key afterwards to revert to the regular display. # Change the ctrl key if you want towards the bottom of the script. # #====================================== class PokemonSummary_Scene def drawSelectedContestMove(moveToLearn,moveid) #Draw Selected Contest Move overlay2 = @sprites["overlay"].bitmap base = Color.new(64,64,64) shadow = Color.new(176,176,176) @sprites["overlay"].bitmap.clear if @sprites["overlay"] @sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport) overlay2=@sprites["overlay"].bitmap @sprites["pokemon"].visible = false if @sprites["pokemon"] @sprites["pokeicon"].pokemon = @pokemon @sprites["pokeicon"].visible = true @sprites["itemicon"].visible = false if @sprites["itemicon"] move=moveid selectedmove=PBMoves.getName(move) for i in 1..PBContestMoves.maxValue name=PBContestMoves.getName(i) if selectedmove==name selectedmove=getID(PBContestMoves,i) end end contestmovedata=PBContestMoveData.new(selectedmove) selectedhearts=contestmovedata.hearts selecteddescription=pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove) heartfile=sprintf("Graphics/Pictures/Contest/heart%d",selectedhearts) selectedjam=contestmovedata.jam jamfile=sprintf("Graphics/Pictures/Contest/negaheart%d",selectedjam) imagepos=[] imagepos.push([heartfile,18,158,0, 0,64,28]) imagepos.push([jamfile,18,188,0, 0,64,28]) imagepos.push(["Graphics/Pictures/Contest/contesttype",18,124,0,contestmovedata.contestType*28,64,28]) #draw contest type pbDrawImagePositions(overlay2,imagepos) drawTextEx(overlay2,15,218,200,3, pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove), #draw contest description Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,75,80,200,3, pbGetMessage(MessageTypes::Moves,selectedmove), #draw move name Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,26,16,200,3,"CONTEST MOVES",Color.new(248,248,248),Color.new(104,104,104)) end #========================================================= def pbMoveSelection @sprites["movesel"].visible = true @sprites["movesel"].index = 0 selmove = 0 oldselmove = 0 switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) loop do Graphics.update Input.update pbUpdate if @sprites["movepresel"].index==@sprites["movesel"].index @sprites["movepresel"].z = @sprites["movesel"].z+1 else @sprites["movepresel"].z = @sprites["movesel"].z end if Input.trigger?(Input::B) (switching) ? pbPlayCancelSE : pbPlayCloseMenuSE break if !switching @sprites["movepresel"].visible = false switching = false elsif Input.trigger?(Input::C) pbPlayDecisionSE if selmove==4 break if !switching @sprites["movepresel"].visible = false switching = false else if [email protected]? if !switching @sprites["movepresel"].index = selmove @sprites["movepresel"].visible = true oldselmove = selmove switching = true else tmpmove = @pokemon.moves[oldselmove] @pokemon.moves[oldselmove] = @pokemon.moves[selmove] @pokemon.moves[selmove] = tmpmove @sprites["movepresel"].visible = false switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) end end end elsif Input.trigger?(Input::UP) selmove -= 1 if selmove<4 && selmove>[email protected] selmove = @pokemon.numMoves-1 end selmove = 0 if selmove>=4 selmove = @pokemon.numMoves-1 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::DOWN) selmove += 1 selmove = 0 if selmove<4 && selmove>[email protected] selmove = 0 if selmove>=4 selmove = 4 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::CTRL) #change the key here if you want pbPlayDecisionSE drawSelectedContestMove(0,@pokemon.moves[selmove].id) end end @sprites["movesel"].visible=false end end
Hello Again!
This works great, however I have a couple of suggestions and a bug.
Before continuing I do want to say thanks for all your support and just want to help improve things for others, the work you have put in is great and I greatly appreciate it.
BUG: Once you view the moves contest form and go back out all the text changes font: https://imgur.com/a/OKdqo0s
Possible addition: An addition you could add (again, not forcing you to add just suggesting) is the view of all moves as the names disappear: https://imgur.com/a/6uwOUnH
Thanks a bunch
#====================================
# Contest Summary by TastyRedTomato
#====================================
#
# To install: paste above main
#
# In the summary screen press left or right to show the contest stats of the selected move
# Press any key afterwards to revert to the regular display.
# Change the key(s) if you want towards the bottom of the script.
#
#======================================
class PokemonSummary_Scene
def drawSelectedContestMove(moveToLearn,moveid) #Draw Selected Contest Move
overlay2 = @sprites["overlay"].bitmap
base = Color.new(64,64,64)
shadow = Color.new(176,176,176)
@sprites["overlay"].bitmap.clear if @sprites["overlay"]
@sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
overlay2=@sprites["overlay"].bitmap
@sprites["pokemon"].visible = false if @sprites["pokemon"]
@sprites["pokeicon"].pokemon = @pokemon
@sprites["pokeicon"].visible = true
@sprites["itemicon"].visible = false if @sprites["itemicon"]
move=moveid
selectedmove=PBMoves.getName(move)
for i in 1..PBContestMoves.maxValue
name=PBContestMoves.getName(i)
if selectedmove==name
selectedmove=getID(PBContestMoves,i)
end
end
contestmovedata=PBContestMoveData.new(selectedmove)
selectedhearts=contestmovedata.hearts
selecteddescription=pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove)
heartfile=sprintf("Graphics/Pictures/Contest/heart%d",selectedhearts)
selectedjam=contestmovedata.jam
jamfile=sprintf("Graphics/Pictures/Contest/negaheart%d",selectedjam)
imagepos=[]
imagepos.push([heartfile,18,158,0,
0,64,28])
imagepos.push([jamfile,18,188,0,
0,64,28])
imagepos.push(["Graphics/Pictures/Contest/contesttype",18,124,0,contestmovedata.contestType*28,64,28]) #draw contest type
pbDrawImagePositions(overlay2,imagepos)
pbSetSystemFont(@sprites["overlay"].bitmap)
drawTextEx(overlay2,15,220,200,3,
pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove), #draw contest description
Color.new(64,64,64),Color.new(176,176,176))
drawTextEx(overlay2,75,80,200,3,
pbGetMessage(MessageTypes::Moves,selectedmove), #draw move name
Color.new(64,64,64),Color.new(176,176,176))
drawTextEx(overlay2,26,16,200,3,"CONTEST MOVES",Color.new(248,248,248),Color.new(104,104,104))
end
#=========================================================
def pbMoveSelection
@sprites["movesel"].visible = true
@sprites["movesel"].index = 0
selmove = 0
oldselmove = 0
switching = false
drawSelectedMove(0,@pokemon.moves[selmove].id)
loop do
Graphics.update
Input.update
pbUpdate
if @sprites["movepresel"].index==@sprites["movesel"].index
@sprites["movepresel"].z = @sprites["movesel"].z+1
else
@sprites["movepresel"].z = @sprites["movesel"].z
end
if Input.trigger?(Input::B)
(switching) ? pbPlayCancelSE : pbPlayCloseMenuSE
break if !switching
@sprites["movepresel"].visible = false
switching = false
elsif Input.trigger?(Input::C)
pbPlayDecisionSE
if selmove==4
break if !switching
@sprites["movepresel"].visible = false
switching = false
else
if [email protected]?
if !switching
@sprites["movepresel"].index = selmove
@sprites["movepresel"].visible = true
oldselmove = selmove
switching = true
else
tmpmove = @pokemon.moves[oldselmove]
@pokemon.moves[oldselmove] = @pokemon.moves[selmove]
@pokemon.moves[selmove] = tmpmove
@sprites["movepresel"].visible = false
switching = false
drawSelectedMove(0,@pokemon.moves[selmove].id)
end
end
end
elsif Input.trigger?(Input::UP)
selmove -= 1
if selmove<4 && selmove>[email protected]
selmove = @pokemon.numMoves-1
end
selmove = 0 if selmove>=4
selmove = @pokemon.numMoves-1 if selmove<0
@sprites["movesel"].index = selmove
newmove = @pokemon.moves[selmove].id
pbPlayCursorSE
drawSelectedMove(0,newmove)
elsif Input.trigger?(Input::DOWN)
selmove += 1
selmove = 0 if selmove<4 && selmove>[email protected]
selmove = 0 if selmove>=4
selmove = 4 if selmove<0
@sprites["movesel"].index = selmove
newmove = @pokemon.moves[selmove].id
pbPlayCursorSE
drawSelectedMove(0,newmove)
elsif Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)#change the key here if you want
pbPlayDecisionSE
drawSelectedContestMove(0,@pokemon.moves[selmove].id)
end
end
@sprites["movesel"].visible=false
end
end
I updated the script to use the correct font now and moved the description a couple pixels down to fit the lines.
I also changed the control scheme to be default left or right key to flip move descriptions. (can still be changed though if you want to)
Pasted it below here as well in the spoiler tags.
Yup, I'm aware it looks a bit buggy at the moment. I really should dive into it more but I'm working on a different project at the moment. I may revisit it in the future though to clean things up.
(unless someone else makes something amazing)
The summary screen is a bit fickle to write code for and I'm not really familiar with that part of the engine (yet).
The current layout is as it is right now because it would freak out the move names and pokemon names when switching pokemon so I simply opted to not draw those when viewing contest stats.
I admit it could definitely look better though.
Spoiler:
Code:#==================================== # Contest Summary by TastyRedTomato #==================================== # # To install: paste above main # # In the summary screen press left or right to show the contest stats of the selected move # Press any key afterwards to revert to the regular display. # Change the key(s) if you want towards the bottom of the script. # #====================================== class PokemonSummary_Scene def drawSelectedContestMove(moveToLearn,moveid) #Draw Selected Contest Move overlay2 = @sprites["overlay"].bitmap base = Color.new(64,64,64) shadow = Color.new(176,176,176) @sprites["overlay"].bitmap.clear if @sprites["overlay"] @sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport) overlay2=@sprites["overlay"].bitmap @sprites["pokemon"].visible = false if @sprites["pokemon"] @sprites["pokeicon"].pokemon = @pokemon @sprites["pokeicon"].visible = true @sprites["itemicon"].visible = false if @sprites["itemicon"] move=moveid selectedmove=PBMoves.getName(move) for i in 1..PBContestMoves.maxValue name=PBContestMoves.getName(i) if selectedmove==name selectedmove=getID(PBContestMoves,i) end end contestmovedata=PBContestMoveData.new(selectedmove) selectedhearts=contestmovedata.hearts selecteddescription=pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove) heartfile=sprintf("Graphics/Pictures/Contest/heart%d",selectedhearts) selectedjam=contestmovedata.jam jamfile=sprintf("Graphics/Pictures/Contest/negaheart%d",selectedjam) imagepos=[] imagepos.push([heartfile,18,158,0, 0,64,28]) imagepos.push([jamfile,18,188,0, 0,64,28]) imagepos.push(["Graphics/Pictures/Contest/contesttype",18,124,0,contestmovedata.contestType*28,64,28]) #draw contest type pbDrawImagePositions(overlay2,imagepos) pbSetSystemFont(@sprites["overlay"].bitmap) drawTextEx(overlay2,15,220,200,3, pbGetMessage(MessageTypes::ContestMoveDescriptions,selectedmove), #draw contest description Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,75,80,200,3, pbGetMessage(MessageTypes::Moves,selectedmove), #draw move name Color.new(64,64,64),Color.new(176,176,176)) drawTextEx(overlay2,26,16,200,3,"CONTEST MOVES",Color.new(248,248,248),Color.new(104,104,104)) end #========================================================= def pbMoveSelection @sprites["movesel"].visible = true @sprites["movesel"].index = 0 selmove = 0 oldselmove = 0 switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) loop do Graphics.update Input.update pbUpdate if @sprites["movepresel"].index==@sprites["movesel"].index @sprites["movepresel"].z = @sprites["movesel"].z+1 else @sprites["movepresel"].z = @sprites["movesel"].z end if Input.trigger?(Input::B) (switching) ? pbPlayCancelSE : pbPlayCloseMenuSE break if !switching @sprites["movepresel"].visible = false switching = false elsif Input.trigger?(Input::C) pbPlayDecisionSE if selmove==4 break if !switching @sprites["movepresel"].visible = false switching = false else if [email protected]? if !switching @sprites["movepresel"].index = selmove @sprites["movepresel"].visible = true oldselmove = selmove switching = true else tmpmove = @pokemon.moves[oldselmove] @pokemon.moves[oldselmove] = @pokemon.moves[selmove] @pokemon.moves[selmove] = tmpmove @sprites["movepresel"].visible = false switching = false drawSelectedMove(0,@pokemon.moves[selmove].id) end end end elsif Input.trigger?(Input::UP) selmove -= 1 if selmove<4 && selmove>[email protected] selmove = @pokemon.numMoves-1 end selmove = 0 if selmove>=4 selmove = @pokemon.numMoves-1 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::DOWN) selmove += 1 selmove = 0 if selmove<4 && selmove>[email protected] selmove = 0 if selmove>=4 selmove = 4 if selmove<0 @sprites["movesel"].index = selmove newmove = @pokemon.moves[selmove].id pbPlayCursorSE drawSelectedMove(0,newmove) elsif Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)#change the key here if you want pbPlayDecisionSE drawSelectedContestMove(0,@pokemon.moves[selmove].id) end end @sprites["movesel"].visible=false end end
I removed the "Wait for Move completion" and set the though on every page of the event, but it still freezes.
Hello!
Sorry to be a bother again, but during the contest when a Pokémon first appears they appear with a gap at the bottom but when the move animation plays they snap to the correct position. I tried fixing the problem myself but I couldn't find the solution. Also when the player chooses a Pokémon to compete in the contest lobby is there a way to later refer to which Pokémon they chose inside of the ShowPokemonIntro script? I've tried $game_variable[2] and \V[2] where the species name would go but it doesn't work.
Any help?
Which event are you talking about?
I removed the "Wait for Move completion" and set the though on every page of the event, but it still freezes.
The game variable doesn't store the pokemon, but its id in the party.
Use $Trainer.party[$game_variables[2]] to reference it. Then use .species and .name for the species and nickname respectively.
Hello!
Sorry to be a pain but I don't understand it sorry.
Here is an image of what I put: https://imgur.com/a/GGLxFtZ
I did it all like this and it still doesn't work.
Not at home rn but try removing the pbspecies:: part.
I tried that but I get the error:
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 18.1]
Exception: RuntimeError
Message: Script error within event 21 (coords 12,11), map 6 (Contest Hall):
Exception: TypeError
Message: (eval):3:in `[]'cannot convert String into Integer
***Full script:
Kernel.pbMessage(_INTL("First up is
\PN...!"))
showSpeciesIntro($Trainer.party[$game_variables[2]].species)
Backtrace:
Interpreter:197:in `pbExecuteScript'
(eval):3:in `pbExecuteScript'
Interpreter:1458:in `eval'
Interpreter:197:in `pbExecuteScript'
Interpreter:1458:in `command_355'
Interpreter:359:in `execute_command'
Interpreter:155:in `update'
Interpreter:102:in `loop'
Interpreter:158:in `update'
Scene_Map:162:in `follow_update'
Backtrace:
Interpreter:246:in `pbExecuteScript'
Interpreter:1458:in `command_355'
Interpreter:359:in `execute_command'
Interpreter:155:in `update'
Interpreter:102:in `loop'
Interpreter:158:in `update'
Scene_Map:162:in `follow_update'
Scene_Map:160:in `loop'
Scene_Map:169:in `follow_update'
showSpeciesIntro($Trainer.party[$game_variables[49]].species,nil,[$game_variables[2]])
Hello!
Thanks a bunch for all the help! Really appreciate it!
Also I wanted to have the text say "With [Pokémon name or nickname]!" but I'm not sure how to have the showSpeciesIntro script inside of the display text.
Thanks for everything
Hello!
It is because I wanted text around the name of the Pokémon but that means the variable is in between two peices of text I tried this:
"With" showSpeciesIntro "!"
To try and make the text box say the name invetween:
E.G if I chose Pikachu it would say "With pikachu!" In the text box under the species box.