• 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.6 [18.dev]

55
Posts
4
Years
    • Seen May 1, 2024
    This is a continuation of the script by mej71 found here.
    Unlike that version, this is for the version 18.dev of pokemon essentials. (also known as the github version)

    A lot of errors were cleaned up and it's possible to play through the contests without issue very often.
    The most recent fix was for the 017 effect (moves like sing) where it would crash if used in second place.

    I updated and renumbered the PBS as well to include the new moves up to gen7.
    I used Bulbapedia's documentation to add the effects. Moves that didn't have an effect defined or that had an effect that didn't exist in the code were given an effect close to the nature of the move.
    At the top of the PBS, an explanation was added that should help you add new moves if you deem it necessary.

    The order in the first round is now based on the speed EV rather than the speed stat itself.

    There are still bugs (maybe)!
    This is still a work in progress but if you want to help out squashing the remaining bugs, feel free to help out.
    I didn't originally write this script, just fixed it here and there.
    One bug to be on the lookout for is the result yielding the incorrect winner. I've heard it was an issue in the original version but haven't been able to replicate it yet.
    I will update this script as I patch it further as well.

    Credits
    Always credit the original author and whoever helped make the script.
    Original script Credits:
    Maruno, FL, JV, and Umbreon/Hansiec for answering my questions
    Fl-Species Intro script
    Super Dedenne - help with Berry Mixer, explaining the intricacies of pokeblocks, and fixing up the ribbon summary page
    DL Kurosh -initial help with the berry mixer
    Deorro -for some of the berry mixer graphics
    Saving Raven -Contest Hall tileset
    The PokeCommunity in general
    and mej71

    Additional Credits:
    Tastyredtomato
    bo4p5687

    How to install this
    The code to change in messages has changed (see below)
    Add the new pbs file to the load order for your compiler. (for instructions on that, see the original pokemon contest post)
    Add the PBContestmove script from the original post above the PBmove script.
    Make sure you have all the necessary graphics from the original post.
    Copy the new Contest script below and paste it above your main.
    Make a contestmoves.txt in your PBS and paste the data below in it.

    Messages script
    Paste the following snippet at the bottom of your messages script:
    Spoiler:

    And update the following in your messages script:

    in "def pbMessageDisplay":
    below "controls=[]", we have:
    Code:
    while text[/(?:\\(w|f|ff|ts|cl|me|se|wt|wtnp|ch)\[([^\]]*)\]|\\(g|cn|wd|wm|op|cl|wu|\.|\||\!|\^))/i]
    change this to
    Code:
    while text[/(?:\\(w|f|ff|ts|cl|me|se|wt|wtnp|ch|q)\[([^\]]*)\]|\\(g|cn|wd|wm|op|cl|wu|\.|\||\!|\^))/i]

    Add below case control:
    Code:
    when "q"
    yval=param.to_i
    and add below break if !letterbyletter:
    Code:
    if yval
    msgwindow.y=val
    end


    The new Contest Script
    Spoiler:

    Note that these use game variables 48 and 49. 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.

    The contestmoves.txt PBS
    Spoiler:

    Changelog
    Spoiler:
     
    Last edited:
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    Alternatively, you can use the berry blender script by bo4p5687 which can be found here.

    Berry Mixer
    This is an updated script for the berry mixer that works for v18.1
    Install graphics and such as it was in the original, then use this script instead:

    Spoiler:
     
    Last edited:
    295
    Posts
    5
    Years
    • Seen Aug 15, 2022
    First, in PE v.18.1, you don't need Kernel before pb, change all.
    Second, in "def pbMessageDisplay", just add some codes don't need to change all.
    below "controls=[]", we have:
    Code:
    while text[/(?:\\(w|f|ff|ts|cl|me|se|wt|wtnp|ch)\[([^\]]*)\]|\\(g|cn|wd|wm|op|cl|wu|\.|\||\!|\^))/i]
    change into
    Code:
    while text[/(?:\\(w|f|ff|ts|cl|me|se|wt|wtnp|ch|q)\[([^\]]*)\]|\\(g|cn|wd|wm|op|cl|wu|\.|\||\!|\^))/i]
    Then, we add
    Code:
    when "q"
    yval=param.to_i
    and
    Code:
    if yval
    msgwindow.y=val
    end
    like original post
    Third, thank you for fix all moves, I will test it if it works I will post my change for this script because my script works perfectly in v.17.2 but in v.18.1 it changes something.
    After all, thank you for your work.

    P/s: About Berry Mixer, I create a script which call "Berry blender", it likes in original game, you can check it.
    It will increase tough,smart,cute,sheen and beauty of Pokemon. Here.
     
    Last edited:
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    Hi, thanks for your reply. I will make the necessary adjustments to the code and will add your berry blender script as a second option by providing a link in the main post.
    Recently updated the script with another bugfix as well.
    At this point I believe all the moves should function but let me know if I missed one and I'll look at it.
     
    Last edited:
    80
    Posts
    5
    Years
    • Seen Nov 5, 2023
    No, the moves PBS for 17.2 is different from the one in 18 and some script commands are different.
    It'll need a rewrite for it to work on 17.2

    I mean... you do not need to do it then. Sooner or later I will go to V.18 anyway...
    (It would be nich if you would rewrite it, but I am totally fine if you do not, since... do what you like)
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    Hello!
    I am confused as to where in the messages script "when "q"
    yval=param.to_i" needs to be put.
    Awaiting a reply.
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    I created it for v18.1 but in the folder, there are the images which can help you.
    Here

    Thanks!
    But after doing everything I press playtest and i get the error:
    "Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18.1]

    Exception: NameError

    Message: undefined local variable or method `pbCompileContestMoves' for nil:NilClass



    Backtrace:

    Compiler:1177:in `pbCompileAllData'

    Compiler:1288:in `pbCompiler'

    Main:1"

    What does this mean?
     
    295
    Posts
    5
    Years
    • Seen Aug 15, 2022
    Thanks!
    But after doing everything I press playtest and i get the error:
    "Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18.1]

    Exception: NameError

    Message: undefined local variable or method `pbCompileContestMoves' for nil:NilClass



    Backtrace:

    Compiler:1177:in `pbCompileAllData'

    Compiler:1288:in `pbCompiler'

    Main:1"

    What does this mean?

    if you use v.17.2, I don't support it.
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    if you use v.17.2, I don't support it.

    Hello again,
    It says v18.1 at the top of the error message, and that is the version I am running. Do you understand the crash message?

    EDIT: After further inspection I have solved the error, Thanks for all the Help. Also, is there an updated version of the other two scripts (FL's Species Intro and The modified summary page) or do they both still work fine?
     
    Last edited:
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    Hello again,
    It says v18.1 at the top of the error message, and that is the version I am running. Do you understand the crash message?

    EDIT: After further inspection I have solved the error, Thanks for all the Help. Also, is there an updated version of the other two scripts (FL's Species Intro and The modified summary page) or do they both still work fine?

    As far as I know, the species intro works. I'm not sure about the summary as I haven't tried it yet.
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    As far as I know, the species intro works. I'm not sure about the summary as I haven't tried it yet.

    Hello!

    Ok, thanks for all the help, I really appreciate it. I'll test the summary scripts and get back to this forum to give my results.
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    Hello again!

    After putting in the summary script I tried a playtest but an error came up, after removing the script I still got the error:

    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18.1]

    Exception: NameError

    Message: uninitialized constant PokemonParty_Scene::PokemonSummary_Scene



    Backtrace:

    PScreen_Party:637:in `pbSummary'

    PScreen_Party:1217:in `pbPokemonScreen'

    PScreen_Party:1114:in `loop'

    PScreen_Party:1323:in `pbPokemonScreen'

    PScreen_PauseMenu:178:in `pbStartPokemonMenu'

    PScreen_PauseMenu:175:in `pbFadeOutIn'

    PScreen_PauseMenu:180:in `pbStartPokemonMenu'

    PScreen_PauseMenu:144:in `loop'

    PScreen_PauseMenu:274:in `pbStartPokemonMenu'

    Scene_Map:107:in `call_menu'



    Any help?
     
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    Hello again!

    After putting in the summary script I tried a playtest but an error came up, after removing the script I still got the error:

    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 18.1]

    Exception: NameError

    Message: uninitialized constant PokemonParty_Scene::PokemonSummary_Scene



    Backtrace:

    PScreen_Party:637:in `pbSummary'

    PScreen_Party:1217:in `pbPokemonScreen'

    PScreen_Party:1114:in `loop'

    PScreen_Party:1323:in `pbPokemonScreen'

    PScreen_PauseMenu:178:in `pbStartPokemonMenu'

    PScreen_PauseMenu:175:in `pbFadeOutIn'

    PScreen_PauseMenu:180:in `pbStartPokemonMenu'

    PScreen_PauseMenu:144:in `loop'

    PScreen_PauseMenu:274:in `pbStartPokemonMenu'

    Scene_Map:107:in `call_menu'



    Any help?

    I'm not really surprised as the summaryscreen in the old script is based on v16.
    I've been messing with it a bit and it's working now, but I'm having some annoying visual bugs.
    Will post if I get it all smoothed out.
     
    18
    Posts
    4
    Years
    • Seen Dec 30, 2020
    I'm not really surprised as the summaryscreen in the old script is based on v16.
    I've been messing with it a bit and it's working now, but I'm having some annoying visual bugs.
    Will post if I get it all smoothed out.

    Ah ok, Just a shame that the original script for the summary that comes with essentials doesn't work (unless it's just mine). Anyway thanks for all the help nontheless.

    EDIT: Just wondering if the summary page in v18.1 works for others aswell.
     
    Last edited:
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    Ah ok, Just a shame that the original script for the summary that comes with essentials doesn't work (unless it's just mine). Anyway thanks for all the help nontheless.

    EDIT: Just wondering if the summary page in v18.1 works for others aswell.

    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.

    EDIT: updated the contest summary screen script to not make the movelist go blank, should look properly now. You can now also cycle between the normal display and the contest move display.

    Spoiler:
     
    Last edited:
    8
    Posts
    6
    Years
    • Seen Jun 11, 2022
    The game freezes after selecting the Pokémon and the contest category and rank, though the map's music still plays and there is no error message.
     
    55
    Posts
    4
    Years
    • Seen May 1, 2024
    The game freezes after selecting the Pokémon and the contest category and rank, though the map's music still plays and there is no error message.

    After selecting the Pokémon and contest category the player should move into the competition area. If this doesn't happen, double check your installation as per the linked original post.

    If the freeze happens when the contest script should run, let me know and include as much information as you can.
     
    Back
    Top