• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Pokemon Contests and Pokeblocks [Beta]

Resource Pokemon Contests and Pokeblocks [Beta] 0.7.1

I have a problem wanting to adapt this to my version 21 of essentials, when the contest ends and the tape is received, I get an error on the line 71 aprox
$stats.pokemon_contests_won_total += 1 it says that is not defined, but when i set it to =0 and then =1 it has no problem, how can i fix this to work normally?
Did you start a new game after installing the plugin? It should have been initialized on new game.

It's working after you do = 0 or = 1 because you're initializing it yourself. After that, += would work.

Long story short, just start a new game or save your game after you do that initialization yourself.
 
Hello, I'm attempting to use this in v21.1.
Thank you for making this available, I'm attempting to get it working though running into some bugs (inevitably)
Though, I'm having less success than the previous person - I seem to get errors the second after I talk to the Contest Hall person.

Just as they send me on my move route from the desk, I get the error of "uninitialized constant PBMoveRoute::Left"
I wouldn't mind fixing this myself, though I'm not too sure how to go about it.

PS: If anyone else has a guide on how to get (most) of these quirks I'll be encountering fixed for v21.1, I'll be very curious to hear!
 
Hello, I'm attempting to use this in v21.1.
Thank you for making this available, I'm attempting to get it working though running into some bugs (inevitably)
Though, I'm having less success than the previous person - I seem to get errors the second after I talk to the Contest Hall person.

Just as they send me on my move route from the desk, I get the error of "uninitialized constant PBMoveRoute::Left"
I wouldn't mind fixing this myself, though I'm not too sure how to go about it.

PS: If anyone else has a guide on how to get (most) of these quirks I'll be encountering fixed for v21.1, I'll be very curious to hear!
Change that to PBMoveRoute::LEFT. The same for other PBMoveRoutes.
 
Change that to PBMoveRoute::LEFT. The same for other PBMoveRoutes.
Thanks heaps, I realised that they were indeed lowercase, rather than the upper case version in 21.1.
I looked back at lavendersiren's earlier posts and was able to get to the point that my contest works and I come out successfully.

I didn't want to start a new save, so I just created the following function to create all the stats required, and had an NPC call it for me.
Dropped it here if anybody else needs it.
Ruby:
Expand Collapse Copy
def set_contest_stats()
  $stats.pokemon_contests_participated_total = 0
  $stats.pokemon_contests_participated_category = [0,0,0,0,0]
  $stats.pokemon_contests_participated_rank = [0,0,0,0]
  $stats.pokemon_contests_participated_category_rank = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
  $stats.pokemon_contests_won_total = 0
  $stats.pokemon_contests_won_category = [0,0,0,0,0]
  $stats.pokemon_contests_won_rank = [0,0,0,0]
  $stats.pokemon_contests_won_category_rank = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
end

I'm now trying to get the berry blending working. I'm getting an issue loading the image for the berry blender background.
Can't see the obvious issue in the code, though if anyone else has encountered, would appreciate a helping hand.

Exception `SDLError' at [Pokeblocks v20.1] 002_BerryBlender_Scenes.rb:320 - Error loading image 'Graphics/Pictures/Pokeblock/UI Berry Blender//Behind': Unsupported image format

After sorting out the PokeBlocks, my next step will be seeing whether it's possible to get the Summary page showing correctly.
I've got a few other plugins installed, specifically the Enhanced Pokemon UI & Modular UI Scenes which I believe are causing incompability issues.
 
Last edited:
Yeah I never looked into to complete list of everything that would need updated for v21 because I know there's a lot that would. I'm likely not going to update this to v21+ myself unless I just revamp the entire plugin to be cleaner in general (unsure if/when that will happen).

Good luck giving it a shot though.

As for the Summary, yep you'll have to dive into how to set up the Summary for those plugins because they didn't exist when I made mine
 
Hi, I tried to use this script in v21.1, and it worked quite well after making several changes.
Here’s a summary of the modifications I made to the script:
  • Removed the STRUGGLE move data from movesx_contest.txt.
  • Updated the PBMoveRoute constants.
  • Updated the pbMessageDisplay function.
  • Updated the pbWait function (I divided the value by 40ish).
  • Updated the Move Compiler (changed the deprecate script).
  • Modified several frame-based loops.
Some of these points have already been discussed in by several people in the previous posts.

Also, I found that the berry blender feels a bit off, particularly at the lowest speed. So, I altered the rotation animation and the NPC's clicking accuracy. Here is my changes script [link]; I don't know if it still has more errors or not.
 
Hi, I tried to use this script in v21.1, and it worked quite well after making several changes.
Here’s a summary of the modifications I made to the script:
  • Removed the STRUGGLE move data from movesx_contest.txt.
  • Updated the PBMoveRoute constants.
  • Updated the pbMessageDisplay function.
  • Updated the pbWait function (I divided the value by 40ish).
  • Updated the Move Compiler (changed the deprecate script).
  • Modified several frame-based loops.
Some of these points have already been discussed in by several people in the previous posts.

Also, I found that the berry blender feels a bit off, particularly at the lowest speed. So, I altered the rotation animation and the NPC's clicking accuracy. Here is my changes script [link]; I don't know if it still has more errors or not.
Can you PLEASE post every fix that you did specifically? I actively want to put contests into my game but am not sure how to go about it yet
 
I'm using a caruban update and works like a charm...
I am receiving this error. Not sure why or how to fix exactly

[2025-02-15 21:36:23 -0500]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 5, expected 0..1)

Backtrace:
[Pokemon Contests Script] 001_Move_Data (Compiler).rb:51:in `compile_moves'
Compiler:990:in `compile_pbs_files'
[TDW Berry Core and Dex] 001_BerryData.rb:117:in `compile_pbs_files'
Compiler:1018:in `compile_all'
Compiler:1092:in `main'
Main:29:in `mainFunctionDebug'
Main:18:in `block in mainFunction'
Errors:80:in `pbCriticalCode'
Main:18:in `mainFunction'
Main:45:in `block in <main>'

EDIT: I THINK I've found the problem. I believe it lies in the gen 9 pack moves not being in the movesx_contest pbs file.
 
Last edited:
I am receiving this error. Not sure why or how to fix exactly

[2025-02-15 21:36:23 -0500]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 5, expected 0..1)

Backtrace:
[Pokemon Contests Script] 001_Move_Data (Compiler).rb:51:in `compile_moves'
Compiler:990:in `compile_pbs_files'
[TDW Berry Core and Dex] 001_BerryData.rb:117:in `compile_pbs_files'
Compiler:1018:in `compile_all'
Compiler:1092:in `main'
Main:29:in `mainFunctionDebug'
Main:18:in `block in mainFunction'
Errors:80:in `pbCriticalCode'
Main:18:in `mainFunction'
Main:45:in `block in <main>'

EDIT: I THINK I've found the problem. I believe it lies in the gen 9 pack moves not being in the movesx_contest pbs file.
Gen 9 moves not being in the file should have no effect. The error is saying there are the wrong number of arguments being passed. It looks like @Caruban missed a spot when making changes. Their version is still using the
Ruby:
Expand Collapse Copy
def compile_moves(path = "PBS/moves.txt")
definition instead of v21's
Code:
Expand Collapse Copy
def compile_moves(*paths)

(The compiler changes from v20 => v21 was one of the reasons I haven't gotten around to doing the update myself, because I never took the time to learn the updates)
 
Gen 9 moves not being in the file should have no effect. The error is saying there are the wrong number of arguments being passed. It looks like @Caruban missed a spot when making changes. Their version is still using the
Ruby:
Expand Collapse Copy
def compile_moves(path = "PBS/moves.txt")
definition instead of v21's
Code:
Expand Collapse Copy
def compile_moves(*paths)

(The compiler changes from v20 => v21 was one of the reasons I haven't gotten around to doing the update myself, because I never took the time to learn the updates)
See, that doesn't make sense as a few lines above it still has the paths line of code for movesx_contest.txt

I'm working on updating that file to include the moves added through gen 9 as it appears that the plugin has no idea what to do with those moves
 
See, that doesn't make sense as a few lines above it still has the paths line of code for movesx_contest.txt

I'm working on updating that file to include the moves added through gen 9 as it appears that the plugin has no idea what to do with those moves
The problem is just that the gen 9 pack moves file exists. The current code can't handle multiple moves files, as that was added to v21 and that's why the compiler changed.

So again, updating movesx_contest isn't going to change anything. The function I mentioned needs updating.
 
With the right help I managed to make the 9th generation moves functional in contests, I had to add this:
def has_contest_flag?(flag)
return false if !@contest_flags || @contest_flags.empty?
return @contest_flags.any? { |f| f.downcase == flag.downcase }
end

but there are still people who have this same error, the wrong number of arguments and the error in the move data compiler. I think it may be due to some homebrew movements but I tried to create one and it didn't give me problems so I wouldn't know what I did to make it work
 
Gen 9 moves not being in the file should have no effect. The error is saying there are the wrong number of arguments being passed. It looks like @Caruban missed a spot when making changes. Their version is still using the
Ruby:
Expand Collapse Copy
def compile_moves(path = "PBS/moves.txt")
definition instead of v21's
Code:
Expand Collapse Copy
def compile_moves(*paths)

(The compiler changes from v20 => v21 was one of the reasons I haven't gotten around to doing the update myself, because I never took the time to learn the updates)
Yeah, it should use def compile_moves(*paths) and in the line after that, use contests_move_compiler_(*paths) instead of contests_move_compiler_(path)

I tested it with a new move saved in a separate file, similar to the Gen 9 plugin's moves, and it worked. It compiled all the move files first, then the contest moves.
 
Hi, I tried to use this script in v21.1, and it worked quite well after making several changes.
Here’s a summary of the modifications I made to the script:
  • Removed the STRUGGLE move data from movesx_contest.txt.
  • Updated the PBMoveRoute constants.
  • Updated the pbMessageDisplay function.
  • Updated the pbWait function (I divided the value by 40ish).
  • Updated the Move Compiler (changed the deprecate script).
  • Modified several frame-based loops.
Some of these points have already been discussed in by several people in the previous posts.

Also, I found that the berry blender feels a bit off, particularly at the lowest speed. So, I altered the rotation animation and the NPC's clicking accuracy. Here is my changes script [link]; I don't know if it still has more errors or not.
@Ambush Maybe this is what you are looking for?
 
This help. i added the contest script now. I noticed that every attack used in contest, has a permanent mirror effect in every normal battle. I use payback and me and opp sprite mirrors. If opp use an attack he went back to normal. How to end the mirror after the contest?
 
This help. i added the contest script now. I noticed that every attack used in contest, has a permanent mirror effect in every normal battle. I use payback and me and opp sprite mirrors. If opp use an attack he went back to normal. How to end the mirror after the contest?
Good find. I guess I never bothered to do battles after testing a contest.

Here's the fix. You can add all the following code to the bottom of the 011_Animations.rb file in the Pokemon Contests plugin folder.

Ruby:
Expand Collapse Copy
class Game_Temp
    attr_accessor :contest_animations_data
end

alias contests_clear_data pbClearData
def pbClearData
    $game_temp.contest_animations_data = nil if $game_temp
    contests_clear_data
end

class PokemonContestTalent_Scene
    alias contest_talent_init initialize
    def initialize(contest)
        contest_talent_init(contest)
        pbLoadBattleAnimations
    end

    def pbLoadBattleAnimations
        return pbLoadContestAnimations
    end
end

def pbLoadContestAnimations
    if !$game_temp.contest_animations_data && pbRgssExists?("Data/PkmnAnimations.rxdata")
        $game_temp.contest_animations_data = load_data("Data/PkmnAnimations.rxdata")
    end
    return $game_temp.contest_animations_data
end

alias contests_load_battle_anim pbLoadBattleAnimations
def pbLoadBattleAnimations
    $game_temp.contest_animations_data = nil if $game_temp && !$game_temp.battle_animations_data
    contests_load_battle_anim
end
 
Back
Top