• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Pokemon Contests Script 1.5

1,224
Posts
10
Years
Pokemon Contests Script 1.5

Tested and working for v14. Complete zipped v14 version to come.
Brand new update (and possibly last) for you guys. See changelog for details, but this has a ton of new stuff and fixes. I don't believe the links below will go down for any reason, but someone let me know if they do.

Complete Zipped Version(includes everything)
If you want to not have to do any work, here is a vanilla version of Essentials v13 with everything necessary in it.
Will upload a complete zipped for v14 hopefully tomorrow
Mediafire Link

If you want to move these scripts into an existing project, it's going to take a little work. Please follow these instructions as thoroughly as possible

Graphics File
First thing's first, you will need this small zip of graphics and PBS files. Instructions on where to put these is included in a txt in the zip
Mediafire Link

Okay, now here are some scripts that you will need to add above the main (you can click on main and his insert, if you don't know how to do this.)

These are all mandatory.

Note: Always just copy/paste from the Raw Paste Data, not the formatted version. Unlikely, but formatted versions can occasionally mess up code.
Spoiler:


Other Mandatory Changes (IMPORTANT edit: forgot to include change to PokemonMessages)

Spoiler:


Optional fun things:
Spoiler:


Berry Item Effects (add to PokemonItemEffects, right below the code for DNA Splicers)
Spoiler:

Note that these use game variables 35 and 36. If you have something else in these, you have to either change yours, or go through these scripts and search/replace them with your chosen number.

Calling the Contest
So now that you have everything installed, how does one use these? Actually pretty simple.
To start a contest (assuming your variables 35 and 36(or your equivalents) are set to something other than 0), use something like this
Code:
pbContest([COLOR="Red"]50[/COLOR],[COLOR="Blue"]PBSpecies::CHARIZARD[/COLOR],[COLOR="Magenta"]20[/COLOR],[COLOR="blue"]PBSpecies::SQUIRTLE[/COLOR],
[COLOR="Magenta"]20[/COLOR],[COLOR="blue"]PBSpecies::HITMONTOP[/COLOR],[COLOR="Magenta"]20[/COLOR],[COLOR="Cyan"]1[/COLOR])

The red number is the difficulty level. Higher difficulties will improve the AI, and give the opponent pokemon more preliminary points, as well as a higher likelihood to have a scarf (even more preliminary points). 100 is the max value that matters and 0 is the lowest, though having higher or lower numbers won't break the script.

The blue parts are your opponent pokemon. You can name them by species, as shown, or by species number (i.e. 9 instead of PBSpecies::CHARIZARD). List 3.

The purple numbers are the levels of your opponent's pokemon. The only thing this really does is change the moveset of the pokemon (though you can change it manually, I'll get to that later.).

The last number, the light blue one, is the ribbon rewarded to your pokemon if it wins. 1 is the Normal Rank Cool Ribbon. You can find the numbered list of ribbons in PBRibbons.

Nicknaming Opponents, and specifying their movesets
To specify movesets for your opponent, use this handy tool.
Code:
pbAddContestMove(2,1,2,3,7)
The first number is which opponent (you're 1, the next one you list when you call it is 2, etc.), and the rest are the numbers correlating to the number of which move you want to give them. See moves.txt to see how these are numbered.

To nickname an opponent is quite the same. Specify which contestant, and then the nickname you'd like to give them.
Code:
pbChangeContestName(2,"Butterscortch")

Note that these functions should be called before the contest script is called. The contest script will reset them (they're stored as global variables) when it is finished.

So calling a contest with these should look something like this.
Code:
pbAddContestMove(2,1,2,3,7)
pbChangeContestName(2,"Butterscortch")
pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20,1)

Using the Berry Mixer

All you have to do for this is call
Code:
mixer
or
Code:
pbMixer

Using the Berry High Score thing
Just call
Code:
pbBerryScores
That's it. To change the names is pretty easy, you can see them listed along lines 42-45.

Setting up the Events in the Contest Hall
Spoiler:


FAQ/Common bugs and problems
Spoiler:


Credits
Spoiler:


Screenshot album.
Will add more eventually.

Changelog:
Spoiler:
 
Last edited:
1,224
Posts
10
Years
Update 2: Added combos, fixed some smaller bugs, added in the part where it checks if you used the move on the previous turn and deducts points for it, as well as dimming the move you used on the previous turn in the move selection.

Edit: Note that in the combos, I spell Feint Attack with an "e". If you want to use the older spelling you just have to find these ( i think there's 2 instances) under the combos and change them.
 
Last edited:
1,224
Posts
10
Years
Update 3: Implemented move animations, fixed a bug with checking for combos, reduced the turn processing to one method instead of 4 separate ones, for easier and more consistent debugging/errors. Also reduces the script by about 600 lines. Pretty much all that's left now is just a couple graphical components, the end scene, and potentially debugging how some effects work and junk like that. Hopefully for the latter part I can get some feedback.

Also added a lot better commenting for easy navigation of the scripts functions.
 
1,224
Posts
10
Years
Next update will include more bug fixes(did a bit, I'll see if I can find more),graphical support for the stars earned(haven't made the graphics, but finished the methods for them), a fix so that self targeting moves (Harden, Focus Energy,etc) will display the animation on the user(done), hopefully a reorganization of how the ordering for turns happens(haven't started yet), and an AI system for the opponent's pokemon (also haven't started).
 
95
Posts
9
Years
  • Age 34
  • Seen Jun 18, 2016
That thing that looks like a badge on the right side of the map was like a thing to record the records of the Berry Mixer (or whatever it's name is). Basically, who pressed A faster or something like that =P

Asides from that, sadly, I can't help you more except from maybe getting you the end scene graphics. What do you exactly need?
 
1,224
Posts
10
Years
That thing that looks like a badge on the right side of the map was like a thing to record the records of the Berry Mixer (or whatever it's name is). Basically, who pressed A faster or something like that =P

Asides from that, sadly, I can't help you more except from maybe getting you the end scene graphics. What do you exactly need?

Oh, I'll probably just get rid of that then unless somebody makes the berry mixer things (I don't really feel like doing those but I'll help somebody with the coding if they do the brunt of the work :P).

Basically most of the scene I can make myself, except for the background for it. It was an animated thing of the different colored versions of the Contest logo sliding towards the top right.

I'm just not very good at making graphics/I don't enjoy that part much, so combining that with my natural laziness it just takes a while to get that stuff done. That's why most of the graphics I made for this look pretty unprofessional.

Edit: I did find resources for some of the contest winner pictures (up to gen 3, and only for I think 3 of the categories) at spriters resource. If you guys think it's worth it to create the picture thing then I'll do that I guess, and people can hopefully add to the picture resources.
 
Last edited:

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
If I may some suggestions and feedback, after trying out the scripts myself:
  • I would suggest removing the text box when displaying the text for contests - instead, having a text box drawn into the contest related image itself, and having text displayed there. It would require some tweaking to make it work correctly, but it would look better than having the text box cover the fourth person in the contest. Alternatively, streamline the GUI (If you can) so it can still fit between the top of the post and the text box.
  • Another thing I noticed is that the font for when contests are going on is not any of the Pokemon fonts, but is instead the default RPG Maker XP Font (Aka: The font that happens when you don't have the proper fonts installed). I'd look into checking that out, maybe?
  • Also uh, I'd honestly recommend uploading the files you've directly modified (the scripts file, the images, etc) instead of a fresh copy of Essentials with the files added. Saves on compression time, saves on upload time, saves on download time. I don't think people would like having to re-download the base essentials every time to check out the scripts, not to mention hunt around for the new and modified files.
Aside from that, everything seems to be running smoothly. Any other suggestions and feedback I could provide right now would be me nitpicking at the smallest of things. All in all, good work you've done so far, keep it up, and here's hoping this sees full completion!
 
1,224
Posts
10
Years
If I may some suggestions and feedback, after trying out the scripts myself:
  • I would suggest removing the text box when displaying the text for contests - instead, having a text box drawn into the contest related image itself, and having text displayed there. It would require some tweaking to make it work correctly, but it would look better than having the text box cover the fourth person in the contest. Alternatively, streamline the GUI (If you can) so it can still fit between the top of the post and the text box.
  • Another thing I noticed is that the font for when contests are going on is not any of the Pokemon fonts, but is instead the default RPG Maker XP Font (Aka: The font that happens when you don't have the proper fonts installed). I'd look into checking that out, maybe?
  • Also uh, I'd honestly recommend uploading the files you've directly modified (the scripts file, the images, etc) instead of a fresh copy of Essentials with the files added. Saves on compression time, saves on upload time, saves on download time. I don't think people would like having to re-download the base essentials every time to check out the scripts, not to mention hunt around for the new and modified files.
Aside from that, everything seems to be running smoothly. Any other suggestions and feedback I could provide right now would be me nitpicking at the smallest of things. All in all, good work you've done so far, keep it up, and here's hoping this sees full completion!

I've actually already solved the text box for the next update. I didn't notice the font, I'll check that out. The reason I didn't just upload the scripts is for a couple reasons. Main one being that I've overwritten several classes (the compiler, I just added in a summary screen for the contest moves, Pokemon Messages because I added in some stuff to make the textbox fit, etc). Second being the example map I've made which is quite a bit of work to explain step by step how to create the events for it. I guess I'll upload the scripts separately as well for the next update since people seem to want that.
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
Uploading the scripts file would make it easier on people who just want to download the scripts, and not redownload the entire essentials base engine, which is why I suggested it primarily.
Good to know though that the text box issue is resolved, that was my biggest concern with the scripts. That and it always kept saying "Round One" despite it not being Round One.
 
1,224
Posts
10
Years
Uploading the scripts file would make it easier on people who just want to download the scripts, and not redownload the entire essentials base engine, which is why I suggested it primarily.
Good to know though that the text box issue is resolved, that was my biggest concern with the scripts. That and it always kept saying "Round One" despite it not being Round One.

The round one thing is just because I hadn't made the graphics for the other rounds, it knew which round it was on. I've made them now (they look dumb but eh).

I guess I'll make a tutorial for the example map too, and I'll just leave the zip up in case anyone wants that or has problems. Next update is almost done, just working on writing an AI for the opponent's pokemon and then I'll release that.
 
1,224
Posts
10
Years
Update 1.4 ready, see main post. If a tutorial on creating the events for the competition are needed, I can do that. Just ask
 
220
Posts
9
Years
Hi, your pokemon contest system works fine in my project, but the game crashes when i'm using the move MAGNITUDE, if you can fix this it will be great.
Thanks to share this. If you want the graphics of Pokemon contests from Emerald i can post here for you.
 
1,224
Posts
10
Years
Hi, your pokemon contest system works fine in my project, but the game crashes when i'm using the move MAGNITUDE, if you can fix this it will be great.
Thanks to share this. If you want the graphics of Pokemon contests from Emerald i can post here for you.

Could you post the error message for me? I think I see what might make it go wrong, but it's much easier to do if I know exactly where it crashes.


As a separate, general note: going to add in a berry mixer of sorts in for the next update to create pokeblocks, as well as a fix for Pokemon Summary so that you can actually scroll through your ribbons. And likewise, initial judging will be implemented in accordance with your pokemon's attributes.
 

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
What would also be cool is an alternate move menu, maybe even activated by a button, that shows whether the moves are cool, tough, smart, etc like it did in the R/S/E
 
Back
Top