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

Dynamax & Max Raid Battles [Essentials v18.1]

658
Posts
7
Years
  • Dynamax & Max Raid Battles [Essentials v18.1]

    Looks Insane! But may I ask what is the KO Counter for? It makes sense when you have 4 people in the Raid but not if you have only 1 player. Also isn't 7 shields a bit much?
     
    1,408
    Posts
    10
    Years
    • Seen today
    Looks Insane! But may I ask what is the KO Counter for? It makes sense when you have 4 people in the Raid but not if you have only 1 player. Also isn't 7 shields a bit much?

    The KO counter works much like it does in the main series. Each KO strengthens the "storm" surrounding the Raid Pokemon, and once the storm becomes too powerful, you get blown out of the den, and the battle ends as a loss. I think it's a valuable part of the Raid mechanic that is worth keeping, because not only do you need to focus on offense (to break through shields), but you need to keep defense in mind too (to prevent KO's), as well as juggling the timer. Without the KO counter, Raid battles would just be 100% about offense, and the gameplay would become somewhat one-dimensional.

    As far as the shields go, yes, it's a lot. That's why I'm in the balance phase right now. I made the shield HP able to go as high as 8 (and can activate up to twice per battle), but I don't plan on giving any Pokemon that much shield HP in reality. It's gonna scale though based on the raid level, just like the main games. So this example with Mewtwo is extreme, yes, but a level 20 Pikachu raid is only gonna have like, 3 shield HP.

    I'm trying to find a good balance between shield HP, shield frequency, turn count, and KO count, and striking a balance that makes sense for single player. And implementing it in a way that can just automatically scale based on the difficulty. However, I'm also adding in the ability to easily customize these settings, so you can just manually adjust the base turn count/KO count/shield HP as you see fit, and the script will just scale them up from there for stronger Pokemon. So far I think im in a good spot, but I have to make up some mock party configurations and do some play testing for each level of raid difficulty. I still also have to go back and re-test everything else in the original script to make sure nothing was broken with these new additions.
     
    1,408
    Posts
    10
    Years
    • Seen today
    For some reason... Gigantamax doesn't appear to be working for me. I've tried toying around with the script but it's not working.
    Can you elaborate? What is it that youre trying to do? What are you testing, and in what context?

    Gigantamax will only occur in the specified species IF they have G-Max Factor. Sprites for the Gmax forms arent included, so the only way youll be able to tell if theyre Gigantamaxed is if they have their respective G-Max move instead of the regular Max Move. If youve added your own sprites and they arent showing up, make sure the sprites are properly numbered.
     
    1,408
    Posts
    10
    Years
    • Seen today
    Update: Max Raid Battles
    This update builds upon the initial Dynamax script to now include Max Raid battles. This will allow you to set up complex battle challenges for the player with simple tools that you can customize to your liking.

    Dynamax & Max Raid Battles [Essentials v18.1]


    In the main series, Max Raid battles pits you and three others up against a wild Dynamaxed Pokemon. These Pokemon have increased HP, as well as special battle mechanics such as shields, and need to be taken down for an opportunity to capture it. If the Dynamax Pokemon KO's your Pokemon a certain number of times, or if a certain number of turns have passed, you and your allies get blown out of the den, and the raid ends.

    Obviously, Essentials does not support multi-battles such as this, so I made several liberties in adapting Max Raids into a single player environment. Because of this, this feature doesn't perfectly replicate how the main series portrays Max Raids, but the spirit behind the gameplay remains the same. You're still pitted up against a wild dynamax Pokemon, and almost all of the gameplay elements from the main series (shields, capture mechanics, den spawns, etc) has been replicated as closely as possible, with details changed for balance adjustment purposes.

    I have, however, introduced a brand new feature that is not present in the main series: Hard Mode Raids.

    In Hard Mode, Raid Pokemon will have access to a bevy of new options that add extra challenges during the fight. This includes new forms of healing, boosting stats, and dealing residual damage. Clearing a Hard Mode raid will often yield better rewards and better quality Pokemon, as well as offering a higher challenge for players.

    Max Raid Mechanics
    Spoiler:


    New Additions
    Spoiler:

    Other Updates
    Spoiler:


    Installation
    Check the installation section in the main post. It has been updated with new instructions. Any step of the installation that has been changed, added, or must be redone has been tagged with a red label.

    I didn't label this in the instructions, but the code changes to the moves Pain Split, Super Fang, and Endeavor in the "Additional Installation" section have been updated to perform properly. The old code was bugged. Please redo those steps as well.




    I've prepared video examples below to demo Max Raid battles. Note that these are sliiightly outdated, because I've made some fine tuning to the mechanics since I made these videos, but they get the idea across.

    Video 1: Normal 4 Star Raid (vs. Salamence)
    Link:https://youtu.be/bSoVlPgcuj4

    This battle is what made me realize I needed to nerf Leech Seed.

    Video 2: Hard Mode Legendary Raid (vs. Articuno)
    Link: https://youtu.be/1oVLDgIpDBE

    I'm still salty about Articuno waiting to use Max Guard until the VERY turn I'm out of Feint PP lol
     
    Last edited:
    22
    Posts
    3
    Years
    • Seen Apr 29, 2021
    Lmao this is unrelated but Meloetta's Dynamax cry literally just sounds like a real woman singing. I need to go through some of these, some of them are surprising haha.


    I am very very thankfull to creators like you but i am very new in this field so pls help me by sending me your script here
     
    Last edited by a moderator:
    1,408
    Posts
    10
    Years
    • Seen today
    Small update: Just made some minor tweaks to both scripts to fix some small inconsistencies I found. Should be good to go now, unless somebody finds an issue I overlooked.
     
    22
    Posts
    10
    Years
    • Seen Nov 24, 2023
    Hi, I got this message when I try to use any moves

    [Pokémon Essentials version 17.2]
    Exception: NoMethodError
    Message: undefined method `[]' for nil:NilClass
    PokeBattle_Battler:3009:in `pbTarget'
    PokeBattle_Battler:2925:in `pbFindUser'
    PokeBattle_Battler:4081:in `pbUseMove'
    PokeBattle_Battler:4504:in `pbProcessTurn'
    PokeBattle_Battler:4503:in `logonerr'
    PokeBattle_Battler:4503:in `pbProcessTurn'
    Battle Mechanic Compatibility:950:in `pbAttackPhase'
    Battle Mechanic Compatibility:936:in `each'
    Battle Mechanic Compatibility:936:in `pbAttackPhase'
    Battle Mechanic Compatibility:924:in `times'
     
    1,408
    Posts
    10
    Years
    • Seen today
    Hi, I got this message when I try to use any moves
    Were you able to use the Dynamax script before the new update? Or is this your first time installing? Also, does this happen when selecting a move, or just selecting "Fight" in general?

    In either case, I don't know what I can suggest other than to carefully follow the instructions and re-install. I uninstalled and re-installed everything into a default copy of Essentials, and tested on both old and new save files, and could not replicate this error. If you're working on a customized project, you may have something creating conflicts if it does something to rework the battle system.

    The only new areas of the script that the Max Raid update touches that the old Dynamax script didn't are "def pbProcessMoveAgainstTarget", "def pbReduceHPDamage", and some things in PokeBattle_Scene (which don't seem relevant, since your error doesn't seem to be pointing to anything there). So I'd check if you have anything installed that does something to change those two areas in the script.
     
    Last edited:
    22
    Posts
    10
    Years
    • Seen Nov 24, 2023
    Were you able to use the Dynamax script before the new update? Or is this your first time installing? Also, does this happen when selecting a move, or just selecting "Fight" in general?

    In either case, I don't know what I can suggest other than to carefully follow the instructions and re-install. I uninstalled and re-installed everything into a default copy of Essentials, and tested on both old and new save files, and could not replicate this error. If you're working on a customized project, you may have something creating conflicts if it does something to rework the battle system.

    The only new areas of the script that the Max Raid update touches that the old Dynamax script didn't are "def pbProcessMoveAgainstTarget", "def pbReduceHPDamage", and some things in PokeBattle_Scene (which don't seem relevant, since your error doesn't seem to be pointing to anything there). So I'd check if you have anything installed that does something to change those two areas in the script.

    maybe I got lost in the process, sorry for the inconvenience
     
    1,408
    Posts
    10
    Years
    • Seen today
    Some more minor tweaks to the code. All I did was make it so that Shedinja wouldn't be randomly chosen as a raid boss if using a random raid event. You auto-win the raid after attacking Shedinja once, so it's basically just free rewards for no effort. You can still manually force a Shedinja raid if you want, but it seems more balanced to me to remove it from being randomly selected, at least.

    I also changed the success checks for certain moves in Max Raid battles. The following will now only fail when used ON a Max Raid Pokemon:
    • Bug Bite
    • Pluck
    • Incinerate
    • Knock Off
    • Super Fang

    The following will now only fail when used BY the Max Raid Pokemon:
    • Explosion/Self-Destruct
    • Final Gambit
    • Memento
    • Destiny Bond
    • Roar/Whirlwind
    • Circle Throw/Dragon Tail

    The following will now fail when used by ANY Pokemon in a Max Raid battle:
    • Curse (when Ghost-type)
    • Perish Song (requires an edit in PokeBattle_MoveEffects; added to instructions)

    It makes sense to separate the moves out like this (rather than before where I just made all these moves fail regardless of user), because a lot of these moves have no reason to fail when used by the player in a 1v1 environment (you don't have teammates to troll by using Explosion on them, for example). Perish Song isn't prevented from being used in the main series, but I added it here because in the main series you will automatically lose to Perish Song (since all of your teammates will be KO'd too), so it makes sense to allow it. But in a 1v1 environment Perish Song is an auto-win (since you will always win if you still have 1 Pokemon left to switch to), so it needs to be banned from being used to prevent all of the Raid battles from being cheesed.
     
    Last edited:
    44
    Posts
    4
    Years
  • This update is amazing.

    I noticed two things testings raid battles. One maybe is something that I did in the wrong way:

    1 - I don't know why, but I can't see the shields when the raid pokemons got it. But the barrier is there, only I can't see the graphics.

    2- If a raid Pokemon use teleport, it will scape from battle.

    And now, two questions.

    Is there any way to make that trainers in "Max Zones" don't dinamax their Pokes?

    And the other one... Trainers always dinamax their first pokémon. Is there a way to change this?

    Thanks for everything.

    PD: I writted this before, but the text was weird, so I deleted and posted again
     
    658
    Posts
    7
    Years
  • Issue 1 - I don't know why, but I can't see the shields when the raid pokemons got it. But the barrier is there, only I can't see the graphics.

    Issue 2- If a raid Pokemon use teleport, it will scape from battle.

    Question 1-Is there any way to make that trainers in "Max Zones" don't dinamax their Pokes?

    Question 2-And the other one... Trainers always dinamax their first pokémon. Is there a way to change this?

    Thanks for everything.

    For issue 1
    You should check if you put the shield graphics in the correct place and the name of the graphic matches that of the script.

    For issue 2
    Go to the Teleport Function code and add
    Code:
    if attacker.isDynamax?
        @battle.pbDisplay("But it Failed")
        return
    end

    For question 1
    Just don't give the opponent a Dynamax Band

    For question 2
    Look for this in the Dynamax.txt
    Code:
    def pbEnemyShouldDynamax?(index)
       return pbCanDynamax?(index)
    end
    And edit the conditions over there. Currently its set up so that the Enemy Dynamaxes his/her Pokemon if its capable of Dynamaxing.
     
    44
    Posts
    4
    Years
  • First of all, thanks for answering and the fixes.

    For issue 1
    You should check if you put the shield graphics in the correct place and the name of the graphic matches that of the script.

    For issue 2
    .....

    For question 1
    Just don't give the opponent a Dynamax Band

    For question 2
    ....

    Issue 1: The graphics are in the correct places with the correct name. I've added the corrections to Pokebattle_Scene too, of course.
    Maybe something is interfering. I'll check it and write here if I find it.

    Question 1: I don't give Dynamax Band to the opponents. Normally, if they are on a power spot, they can Dynamax their Pokémons. That's why I'm asking this.
     
    1,408
    Posts
    10
    Years
    • Seen today
    This update is amazing.

    I noticed two things testings raid battles. One maybe is something that I did in the wrong way:

    1 - I don't know why, but I can't see the shields when the raid pokemons got it. But the barrier is there, only I can't see the graphics.

    2- If a raid Pokemon use teleport, it will scape from battle.

    And now, two questions.

    Is there any way to make that trainers in "Max Zones" don't dinamax their Pokes?

    And the other one... Trainers always dinamax their first pokémon. Is there a way to change this?

    Thanks for everything.

    PD: I writted this before, but the text was weird, so I deleted and posted again

    1) If the raid shield graphics aren't showing up, it means your databox_foe_normal graphic isn't the right size. I included a resized version of this graphic in the download. The dimensions for this graphic needs to be changed to have a length of at least 82 pixels. Make sure this graphic has the right dimensions.

    2) I completely forgot about Teleport, I'll add that.

    3) I haven't put any focus on NPC Dynamax, maybe ill include something in a new update. But Golisopod pointed you in the right direction.
     
    Last edited:
    1,408
    Posts
    10
    Years
    • Seen today
    Yup, that was the problem. The databox.

    Now all works well. Thanks!

    Cool, I figured that's all it was.

    In regards to NPC trainers, I thought it was gonna be a pain to figure out, but I actually already came up with something so I'll just post it here.

    Code:
    def pbEnemyShouldDynamax?(index)
        return false if !$game_switches[NPC_DYNAMAX]
        ret=0
        for i in @party2
          ret+=1 if i.fainted?
        end
        if [email protected]
          return pbCanDynamax?(index)
        end
        return false
      end

    Replace the old Enemy Dynamax code with this. Then add this in the Settings at the top of the script:
    Code:
    NPC_DYNAMAX   = 507

    This will make it so that you can toggle NPC's ability to trigger Dynamax in battle with a control switch. By default, this switch is off, so no opposing trainers will activate Dynamax. However, if you you turn it on for specific battles, they will Dynamax (assuming all other conditions are met). But now, instead of Dynamaxing turn 1, they will always Dynamax their final Pokemon instead. So now you can save this for the trainer's ace Pokemon. For example, if you battle Brock, he will always save Dynamax for Onix, and not waste it on Geodude (unless you do something to alter his party order with something like Whirlwind).

    Trainers with just a single Pokemon will just use their Dynamax right away like before.

    Also, I fixed some things in regards to Max Raid Pokemon inheriting TM moves, and I made it so you can no longer flee from Max Raids (as was intended). I somehow overlooked that the ability to run was still enabled.

    Also, I made it so Teleport will now fail when used in Max Raids (by both you and the Raid Pokemon). I added it to the instructions. It's a very simple edit, just go to the code for Teleport and next to the line "if @battle.opponent ||" add:
    Code:
    $game_switches[MAXRAID_SWITCH] ||


    The Dynamax script in the download link has been updated with all of these changes.
     
    Back
    Top