• 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.

Script: Essentials Deluxe [v20.1] [DEPRECATED]

1,407
Posts
10
Years
    • Seen today
    I've got an error when I tried to make a Pokemon faint when I used a Raid Capture rule. Here:
    Code:
    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]
    
    Exception: NoMethodError
    Message: undefined method `[]' for true:TrueClass
    
    Backtrace:
    [Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint'
    [ZUD Mechanics] Battler_Overrides.rb:155:in `pbFaint'
    [Generation 9 Pack] Battler.rb:518:in `block in pbProcessMoveHit'
    [Generation 9 Pack] Battler.rb:518:in `each'
    [Generation 9 Pack] Battler.rb:518:in `pbProcessMoveHit'
    [Generation 9 Pack] Ability Shield Changes.rb:728:in `block in pbUseMove'
    [Generation 9 Pack] Ability Shield Changes.rb:726:in `times'
    [Generation 9 Pack] Ability Shield Changes.rb:726:in `pbUseMove'
    [ZUD Mechanics] Battler_Overrides.rb:101:in `pbUseMove'
    166:Battler_UseMove:52:in `block in pbProcessTurn'

    Oh, that's because I updated how this battle setting works and completely forgot to make note of it in the last update. This setting is no longer set to "true" to be set, you instead set it as an array containing up to three items. The first item is a string that contains any custom "flee" text you want to display if you fail to capture the Pokemon. The second item may be the name of a BGM track that should play during the capture sequence, like how normal raid battle switch to a different music track while capturing raid Pokemon. And the third item may be a number between 1-100 to set the odds of capturing the Pokemon, which overrides the normal capture rate (just like how raid Pokemon have different forced capture rates than normal Pokemon, regardless of ball type).

    The second and third items are completely optional, and can be omitted if you want. And the first setting can just be set to "nil" if you don't want any custom flee text. So if you don't want to customize this setting at all, you can simple set it equal to [nil].

    Here's the updated entry I just added to the tutorial:

    :raidcapture => Array
    Only relevant to wild battles. When set, this battle will have Raid-style capture mechanics. This means that when you KO the wild Pokemon, it will not faint. Instead, you will be prompted to capture it while its in a weakened state. If you fail to capture it, or choose not to, the wild Pokemon will flee to end the battle. You can combine this rule with :setcapture to ensure that any ball you throw at the Pokemon is guaranteed to capture it, and/or the :nocapture rule to prevent the player from throwing any Poke Balls during this battle except when prompted to. Note that wild double/triple battles can also have Raid-style capture mechanics. If so, you will be prompted to capture each wild Pokemon you defeat, allowing you to capture multiple Pokemon in a single battle.

    The array you set this to can contain up to three items, although only one item is required. The first item in this array may be a string, and whatever text you enter will be used for the message that appears if the Pokemon flees. You may use {1} to refer to the wild Pokemon's name in this text. If you instead set this string to "nil", the generic flee text will display instead.

    The second item in this array may be another string, this time the name of an audio file found in the BGM folder. If the file exists, this track will play when the Pokemon is weakened and becomes capturable, similar to how a "capture" theme plays when attempting to capture a raid Pokemon in the main series. If you omit this item, or set it to "nil", then the music will not change and the default battle music will continue to play instead.

    The last item in this array may be a number between 1-100. This number will override the normal capture chance of whatever Poke Ball you throw at the Pokemon. For example, if you set this number to 20, then whatever ball is thrown will have a 20% chance at successfully capturing the Pokemon, and an 80% chance to fail, regardless of the ball type (except for Master Balls, which will always succeed and ignore this setting). Note that these forced odds will override the :setcapture setting, so there's no need to set that battle rule if you intend to set forced capture odds here. If you omit this item in the array or set it to 0, then the normal capture chance will be used instead.
     

    TheShinyMew

    Wild Challenger appeared!
    125
    Posts
    13
    Years
  • Oh, that's because I updated how this battle setting works and completely forgot to make note of it in the last update. This setting is no longer set to "true" to be set, you instead set it as an array containing up to three items. The first item is a string that contains any custom "flee" text you want to display if you fail to capture the Pokemon. The second item may be the name of a BGM track that should play during the capture sequence, like how normal raid battle switch to a different music track while capturing raid Pokemon. And the third item may be a number between 1-100 to set the odds of capturing the Pokemon, which overrides the normal capture rate (just like how raid Pokemon have different forced capture rates than normal Pokemon, regardless of ball type).

    The second and third items are completely optional, and can be omitted if you want. And the first setting can just be set to "nil" if you don't want any custom flee text. So if you don't want to customize this setting at all, you can simple set it equal to [nil].

    Here's the updated entry I just added to the tutorial:

    Never mind. I put arrays in there and it worked like a charm!
     
    35
    Posts
    3
    Years
    • Seen yesterday
    Game is crashing when I try and start a wild battle event.

    Code

    ----

    WildBattle.dx_start([:CARVANHA_2, 5], {

    # Rules

    :setcapture => true,

    :introtext => :You found the weird Pokémon!

    },

    { # Pokemon

    :hp => 2,

    :status => :PARALYZE

    })

    ---

    Error Message

    ---

    [Pokémon Essentials version 20.1]

    [v20.1 Hotfixes 1.0.7]



    Script error in event 1 (coords 14,21), map 96 (Ashwood Cove)

    Exception: SyntaxError
    Message: (eval):4: syntax error, unexpected local variable or
    method, expecting '}'

    :introtext => :You found the strange Pokémon!,

    ^~~~~

    (eval):5: syntax error, unexpected '}'

    (eval):9: syntax error, unexpected ')', expecting end-of-input



    ***Full script:

    WildBattle.dx_start([:CARVANHA_2, 5], {

    # Rules

    :setcapture => true,

    :introtext => :You found the strange Pokémon!,

    },

    { # Pokemon

    :hp => 2,

    :status => :PARALYZE

    })
     
    1
    Posts
    342
    Days
    • Seen Jun 19, 2023
    Good afternoon friend, I have a little inconvenience to tell you,

    When using a speech, it does not reproduce a cinematic black bars, only a text appears below without cinematic.

    The version of Essentials Deluxe is 1.1.5 and I am using version 20.1 of Pokemon Essentials, (I emphasize that I have the Gen 9 plugin)
    I already tried installing the latest version, but because of the Gen 9 plugin it sends me an error

    Here the demo...

    DEMO_WILD_POOCHYENA = {
    "turnCommand" => {
    :text => [1, "vaya, pero que pokemon es ese!"],
    :speech => "sea lo que sea, sin duda no esta tan feliz de verte!"
    },


    It's a battle against a wild Pokemon, but with the trainers it's still the same.

    (I'm sorry if my English is too bad)
     
    Last edited:
    1,407
    Posts
    10
    Years
    • Seen today
    ATTENTION! Final Update!
    With the release of Essentials v21, this will be the final update for Essentials Deluxe for v20.1. Going forward I will instead be fully focused on v21, so I will no longer be updating or supporting this plugin. I intend to take a break before I even start thinking about how or when I'm going to start working on a v21 iteration of the plugin, so don't ask me about a time frame for release. I will keep this plugin available in the meantime. But this iteration of the plugin will eventually be removed once a v21 successor is released and takes its place. I will give fair warning before this happens, so don't panic.

    See you all in v21!


    Final Update (v1.2.8)

    • Made various tweaks for better compatibility with the newest update to the Gen 9 Pack.
    • This is the final update for this plugin. Going forward, my focus will now be on adapting this plugin for v21.

    Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
     
    2
    Posts
    300
    Days
    • Seen Mar 18, 2024
    Hi. How do I fix this issue? While battling a trainer when selecting a move, this kind of error shows up like this:

    Exception: SystemStackError
    Message: stack level too deep

    ***Full script:
    TrainerBattle.dx_start([:TEAMROCKET_M, "Grunt", 2])
    Backtrace:
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
    206:AI_Move_EffectScores_3:1309:in `pbGetMoveScoreFunctionCode'
     
    3
    Posts
    3
    Years
    • Age 23
    • Seen May 5, 2024
    Hi! It seems I'm having problems with essentials deluxe.

    some of the features such as egg group display or relearn moves from summary screen are not appearing. is someone else having this problem?
     
    1,407
    Posts
    10
    Years
    • Seen today
    Hi! It seems I'm having problems with essentials deluxe.

    some of the features such as egg group display or relearn moves from summary screen are not appearing. is someone else having this problem?

    That's probably because none of those are features of this plugin. Youre thinking of the Enhanced UI plugin and the Gen 9 Pack, respectively.
     
    73
    Posts
    4
    Years
    • Seen today
    I'm using this plugin: https://www.pokecommunity.com/showthread.php?p=10283930. With the latest update to this plugin I now get this error:

    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]

    Script error in event 20 (coords 7,12), map 131 (Pokémon Center South)
    Exception: TypeError
    Message: no implicit conversion of false into Integer

    ***Full script:
    show_image_pokemon(:CLEFAIRY)

    Backtrace:
    [Essentials Deluxe] Pokedex.rb:350:in `register'
    [Show Species Introdution] Show species introduction.rb:36:in `show_image_pokemon'
    (eval):1:in `execute_script'
    Interpreter:143:in `eval'
    Interpreter:143:in `execute_script'
    Interpreter_Commands:1112:in `command_355'
    Interpreter_Commands:116:in `execute_command'
    Interpreter:133:in `block in update'
    Interpreter:90:in `loop'
    Interpreter:90:in `update'

    This is the whole script:

    def show_image_pokemon(specie, gender = 0, form = 0, shiny = false, shadow = false, seen = true)
    specie = GameData::Species.get(specie).id
    name = GameData::Species.get(specie).name
    kind = GameData::Species.get(specie).category
    if seen
    $player.pokedex.set_seen(specie)
    $player.pokedex.register(specie, gender, form, shiny) //The line the error points to
    end
    bitmap = GameData::Species.front_sprite_filename(specie, form, gender, shiny, shadow)
    GameData::Species.play_cry_from_species(specie, form)
    if bitmap # to prevent crashes
    iconwindow = PictureWindow.new(bitmap)
    iconwindow.x = (Graphics.width - iconwindow.width) / 2
    iconwindow.y = ((Graphics.height - 96) - iconwindow.height) / 2
    if $player.has_pokedex
    pbMessage(_INTL("{1}. The {2} Pokémon.", name, kind))
    else
    pbMessage(_INTL("It's a {1}!", name))
    end
    iconwindow.dispose
    end
    end

    Any idea of what needs to be fixed?
     
    1,407
    Posts
    10
    Years
    • Seen today
    I'm using this plugin: https://www.pokecommunity.com/showthread.php?p=10283930. With the latest update to this plugin I now get this error:

    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]

    Script error in event 20 (coords 7,12), map 131 (Pokémon Center South)
    Exception: TypeError
    Message: no implicit conversion of false into Integer

    ***Full script:
    show_image_pokemon(:CLEFAIRY)

    Backtrace:
    [Essentials Deluxe] Pokedex.rb:350:in `register'
    [Show Species Introdution] Show species introduction.rb:36:in `show_image_pokemon'
    (eval):1:in `execute_script'
    Interpreter:143:in `eval'
    Interpreter:143:in `execute_script'
    Interpreter_Commands:1112:in `command_355'
    Interpreter_Commands:116:in `execute_command'
    Interpreter:133:in `block in update'
    Interpreter:90:in `loop'
    Interpreter:90:in `update'

    This is the whole script:

    def show_image_pokemon(specie, gender = 0, form = 0, shiny = false, shadow = false, seen = true)
    specie = GameData::Species.get(specie).id
    name = GameData::Species.get(specie).name
    kind = GameData::Species.get(specie).category
    if seen
    $player.pokedex.set_seen(specie)
    $player.pokedex.register(specie, gender, form, shiny) //The line the error points to
    end
    bitmap = GameData::Species.front_sprite_filename(specie, form, gender, shiny, shadow)
    GameData::Species.play_cry_from_species(specie, form)
    if bitmap # to prevent crashes
    iconwindow = PictureWindow.new(bitmap)
    iconwindow.x = (Graphics.width - iconwindow.width) / 2
    iconwindow.y = ((Graphics.height - 96) - iconwindow.height) / 2
    if $player.has_pokedex
    pbMessage(_INTL("{1}. The {2} Pokémon.", name, kind))
    else
    pbMessage(_INTL("It's a {1}!", name))
    end
    iconwindow.dispose
    end
    end

    Any idea of what needs to be fixed?

    Essentials Deluxe overwrites shininess in the Pokedex from being a boolean (true/false) into an integer (0-2). This is what's used to display Super Shiny forms in the dex.
    0 = Non-shiny
    1 = Shiny
    2 = Super Shiny

    So just change shiny = false in the arguments into shiny = 0 instead, to default to non-shiny forms. Then, whenever you call the method, you can set this to 1 or 2 if you want to specifically show Shiny or Super Shiny sprites, respectively.

    Hopefully that works.
     
    73
    Posts
    4
    Years
    • Seen today
    That worked, thank you!
    But now when the image of the mon is displayed, the shiny sprite is shown. But if I check the Pokedex, the regular mon is registered, not the shiny.
     
    1,407
    Posts
    10
    Years
    • Seen today
    That worked, thank you!
    But now when the image of the mon is displayed, the shiny sprite is shown. But if I check the Pokedex, the regular mon is registered, not the shiny.

    Well, what are you setting "shiny" to when you call the script? You should be setting it to 0 like I explained.
     
    73
    Posts
    4
    Years
    • Seen today
    Of course.
    I call the script: show_image_pokemon(:CLEFAIRY)
    I leave everything else to the default because I set the shiny parameter in the method to 0.
    If I do show_image_pokemon(:CLEFAIRY,0,0,0), it also shows a shiny mon.
    I just thought Essentials Deluxe also overwrote the front_sprite_filename method and there was something different there now too.
     
    1,407
    Posts
    10
    Years
    • Seen today
    Of course.
    I call the script: show_image_pokemon(:CLEFAIRY)
    I leave everything else to the default because I set the shiny parameter in the method to 0.
    If I do show_image_pokemon(:CLEFAIRY,0,0,0), it also shows a shiny mon.
    I just thought Essentials Deluxe also overwrote the front_sprite_filename method and there was something different there now too.

    Yeah, idk. If you don't care about being able to display shiny sprites at all, just try hardcoding the shiny attribute to always be zero, or just remove the shiny attribute from being set altogether.
     
    Back
    Top