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

ZUD plugin - Z-moves, Ultra-Burst, Dynamax, Dynamax adventures [v18]

  • 1,409
    Posts
    10
    Years
    • Seen today
    I will try to adapt that.
    By the way,I have found the life orb bug in previous thread and it is fixed.Now I find a similar problem about Curse.
    it seems curse damage should depend on dynamaxBoost.

    If that's true, does that mean all effects that deal a set fraction of damage/healing operate by this rule? Like Fire Spin damage, or Leftovers healing for example? It's not something I ever discovered while looking through Bulbapedia and other sources.
     
  • 22
    Posts
    3
    Years
    • Seen Apr 29, 2021
    def pbMaxRaidBattleSimple(species, lvl, gmax)
    # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
    # lvl = Pokémon level (will be converted to a rank level).
    # gmax = boolean
    setBattleRule("canLose")
    setBattleRule("cannotRun")
    setBattleRule("noPartner")
    setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))

    s = pbGetSpeciesFromFSpecies(species)
    $game_switches[MAXRAID_SWITCH] = true
    $game_variables[MAXRAID_PKMN] = s + [nil,lvl,gmax]
    pbWildBattleCore(species, lvl)
    pbResetBattle
    $PokemonTemp.clearBattleRules
    for i in $Trainer.party; i.heal; end
    end

    Will this code work with the new plugin ?
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    def pbMaxRaidBattleSimple(species, lvl, gmax)
    # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
    # lvl = Pokémon level (will be converted to a rank level).
    # gmax = boolean
    setBattleRule("canLose")
    setBattleRule("cannotRun")
    setBattleRule("noPartner")
    setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))

    s = pbGetSpeciesFromFSpecies(species)
    $game_switches[MAXRAID_SWITCH] = true
    $game_variables[MAXRAID_PKMN] = s + [nil,lvl,gmax]
    pbWildBattleCore(species, lvl)
    pbResetBattle
    $PokemonTemp.clearBattleRules
    for i in $Trainer.party; i.heal; end
    end

    Will this code work with the new plugin ?

    Not sure. Try it out first and see.
     

    Sir William

    Chemist
  • 72
    Posts
    3
    Years
    • Seen Apr 14, 2021
    Well is there anyway to stop NPCs dynamaxing even of they are on powerspot but player can dynamax ? Something like NPC_DMAX switch ?
     
    Last edited:
  • 33
    Posts
    5
    Years
    • Seen Dec 19, 2023
    Hey man, since i want to had the moves Behemoth Blade, Behemoth Bash and Dynamax Canon wich are not implemented in the Gen 8 Project wich code should i put in their function ?
    thanks
     
  • 125
    Posts
    4
    Years
    • Seen Nov 20, 2023
    HP-based effects
    When calculating changes in HP (damage or restoration) based on the percentage of a Pokémon's maximum HP, the Dynamax Pokémon's non-Dynamax HP is used. For example:

    Super Fang inflicts damage to a Dynamax Pokémon equal to 50% of its non-Dynamax HP.
    A held Figy Berry will restore HP equal to 1/3 of the Dynamax Pokémon's non-Dynamax maximum HP.
    Endeavor inflicts damage equal to the amount that the target's non-Dynamax HP exceeds the user's non-Dynamax HP.
    Pain Split averages the two Pokémon's non-Dynamax HP, calculates the signed difference between that average and each Pokémon's non-Dynamax HP, then changes each Pokémon's HP by that signed difference.
    Effects that vary based on the percentage of HP a Pokémon has remaining use the Dynamax Pokémon's Dynamax HP. For example:

    Emergency Exit activates when the Dynamax Pokémon's current Dynamax HP falls to 50% or less of its maximum Dynamax HP.
    A Pokémon will consume its held Figy Berry when its HP falls to 50% or less of its maximum Dynamax HP.
    Brine's power is increased if a target Dynamax Pokémon's current Dynamax HP is 50% or less of its maximum Dynamax HP.
    The moves Dynamax Cannon, Behemoth Blade, and Behemoth Bash do double damage against a Dynamax Pokémon.

    Immunities
    Dynamax Pokémon are immune to flinching. Fake Out can still damage a Dynamax Pokémon, but will have no secondary effect.

    Dynamax Pokémon are unaffected by moves affected by weight (such as Low Kick and Heavy Slam), one-hit knockout moves, and Destiny Bond.

    Moves and Abilities that replace the target's Ability with the user's (such as Skill Swap, Entrainment, and Wandering Spirit) have no effect on Dynamax Pokémon. However, moves that change or suppress the Dynamax Pokémon's Ability altogether (such as Gastro Acid and Worry Seed) still work.

    Dynamax Pokémon cannot be switched out by the effects of moves that switch the target out (like Roar and Whirlwind). Circle Throw and Dragon Tail will still damage Dynamax Pokémon without switching it out. Red Card also fails to switch out a Dynamax Pokémon, but is still activated and consumed. Dynamax Pokémon can still be forced out by their own Abilities or items, such as Emergency Exit or an Eject Button. If a Dynamax Pokémon has Magic Bounce and is targeted by Parting Shot, the move will be reflected and force the Dynamax Pokémon to switch out (the owner of the Dynamax Pokémon is still able to choose the Pokémon that it is replaced with).

    Dynamax Pokémon cannot be affected by Disable or Cursed Body. A Max Move or G-Max Move can still be used if its base move was disabled prior to Dynamax. Dynamax Pokémon are also immune to Encore, Torment, and Instruct. Choice Band, Choice Scarf, Choice Specs, Gorilla Tactics, and Sheer Force temporarily stop working (including the stat boosts) if the holder is Dynamaxed. However, Assault Vest still works accordingly and prevents the holder from using Max Guard.

    In addition to the above, there are certain moves that will fail if used during a Max Raid Battle, but will work against a Dynamax Pokémon otherwise.
    From https://bulbapedia.bulbagarden.net/wiki/Dynamax

    I also find Heavy Slam can attack a dynamax pokemon and it shouldnt.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,308
    Posts
    4
    Years
    • Seen yesterday
    Well is there anyway to stop NPCs dynamaxing even of they are on powerspot but player can dynamax ? Something like NPC_DMAX switch ?
    NPCs should dynamax only their Ace Pokémon (label TrainerAce=true in the file trainers.txt). If all trainers always try to dynamax, then it's a bug, but I cannot decide whether it's a bug or not only based on your post.

    Hey man, since i want to had the moves Behemoth Blade, Behemoth Bash and Dynamax Canon wich are not implemented in the Gen 8 Project wich code should i put in their function ?
    thanks
    They are in the file ZUD_06_Move_Effects, the move code is 199.
     
  • 125
    Posts
    4
    Years
    • Seen Nov 20, 2023
    #---------------------------------------------------------------------------
    # Dynamax Pokemon are immune to specified moves.
    #---------------------------------------------------------------------------
    if target.effects[PBEffects::Dynamax]>0
    if move.function=="066" || # Entrainment
    move.function=="067" || # Skill Swap
    move.function=="070" || # OHKO moves
    move.function=="09A" || # Weight-based moves
    move.function=="0B7" || # Torment
    move.function=="0B9" || # Disable
    move.function=="0BC" || # Encore
    move.function=="0E7" || # Destiny Bond
    move.function=="0EB" || # Roar/Whirlwind
    move.function=="16B" # Instruct
    @battle.pbDisplay(_INTL("But it failed!"))
    ret = false
    end
    end
    I find that phase.
    Can I solve it or same problems by adding the function to here like"move.function=="09B" || #Heavy Slam / Heat Crash"?
     

    StCooler

    Mayst thou thy peace discover.
  • 9,308
    Posts
    4
    Years
    • Seen yesterday
    I find that phase.
    Can I solve it or same problems by adding the function to here like"move.function=="09B" || #Heavy Slam / Heat Crash"?

    Ah, I was sure this code was somewhere -__-
    Yes, this will work.
    I'll update the script with this.
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    There's a little problem (I think) with Z Crystals. If I already have a Pkmn holding a Crystal, I can go to the bag and give that same Crystal to another Pkmn.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,308
    Posts
    4
    Years
    • Seen yesterday
    There's a little problem (I think) with Z Crystals. If I already have a Pkmn holding a Crystal, I can go to the bag and give that same Crystal to another Pkmn.
    It's not a bug, it's a feature!
    (Thank you, it's the first time I get to use this sentence :D)

    Citing Bulbapedia:
    These Z-Crystals can be used to create held items of the same name at will.

    TBH, I haven't played the game, so my interpretation might be wrong, but I think it says you can give the same Z-crystal to 6 Pokémon at the same time.
     
  • 73
    Posts
    4
    Years
    • Seen yesterday
    That's why I said "(I think)", and it turns out you're absolutely right, I just checked on my Ultra Sun lol, my bad. Seems kind of dumb that you can do that, but that's how it works in the actual game. Thanks for the quick response, and the amazing job on this plugin!
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    That's why I said "(I think)", and it turns out you're absolutely right, I just checked on my Ultra Sun lol, my bad. Seems kind of dumb that you can do that, but that's how it works in the actual game. Thanks for the quick response, and the amazing job on this plugin!

    Yeah it's done that way so you can't "lose" your Z-Crystals by putting them on a Pokemon in the PC, trading them away, or deleting them like regular consumables. So they had to make Z-Crystals Key Items so that you can never lose them. But since Key Items aren't equipable items, the workaround is that the Z-Crystals in your bag just spawn consumable versions of themselves in unlimited quantity that are then deleted once you unequip them from a Pokemon.

    Fun fact: Essentials doesn't have this limitation, so the Z-Crystals you're equipping on your Pokemon are, in fact, Key Items.
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    I swear I've read through this Bulbapedia entry a thousand times, and I still find something I missed every time I read it. Dynamax affects so many tiny random things, I always lose track of something.

    I found a good overview on Smogon too, which notified me of a few more missing Dynamax functions I need to include. I'm currently working on some kind of generalized way to deal with the HP issues (effects that deal a fraction of damage/healing per turn). It might require a lot more script edits in the instructions though, since there's a million things in the game that change HP in this way.
     

    Sir William

    Chemist
  • 72
    Posts
    3
    Years
    • Seen Apr 14, 2021
    Hi StCooler and Lucidiois89 I have some questions can we set Common or Specific animations for Dynamax and Zmove like Common :ZPower then ZMove:NAMEOFTHATZMOVE like in last add on of zmove by amethyst and for dynamax Like Common:Dynamax and MaxMove:NAMEOFTHATMAXMOVE and yes and a Common:UltraBurst animation ?
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    Hi StCooler and Lucidiois89 I have some questions can we set Common or Specific animations for Dynamax and Zmove like Common :ZPower then ZMove:NAMEOFTHATZMOVE like in last add on of zmove by amethyst and for dynamax Like Common:Dynamax and MaxMove:NAMEOFTHATMAXMOVE and yes and a Common:UltraBurst animation ?

    Punctuation, please lol.
    I don't know anything about animations, but I see no reason why you wouldn't be able to do this.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,308
    Posts
    4
    Years
    • Seen yesterday
    Hi StCooler and Lucidiois89 I have some questions can we set Common or Specific animations for Dynamax and Zmove like Common :ZPower then ZMove:NAMEOFTHATZMOVE like in last add on of zmove by amethyst and for dynamax Like Common:Dynamax and MaxMove:NAMEOFTHATMAXMOVE and yes and a Common:UltraBurst animation ?
    Yes you can.
    In the Z-move plugin by the Reborn team, Z-moves were handled as a different category of "object".
    In ZUD, Z-moves and Max-moves are treated as normal moves. So the animations should NOT be named ZMove:STUFF / MaxMove:STUFF but rather: Move:STUFF / Move:STUFF.

    As for the animations for Z-Power and Dynamaxing, they'll need to be manually called at some point in the script. Animations are not in our TODO-list, mainly because Lucidious and I don't really understand the animation editor, but also because they're too long to make + they're a PAIN to install.

    Punctuation, please lol.
    +1
    As a non-native speaker, it's very hard to parse sentences without punctuation.
     
  • 19
    Posts
    3
    Years
    I don't think you actually have the Gen 8 Project installed. It seems like you're missing those Gen 8 mechanics (Gorilla Tactics, Obstruct, etc.). You wouldn't be getting those errors otherwise. I think you installed this plugin in a regular copy of Essentials v18.1 (the error even says its v18.1).

    EDIT: You're definitely using v18.1 and not the Gen 8 Project. Your error says pbRecallAndReplace should only have 3 arguments instead of 4. Version 18.1 only uses 3 arguments for that method, but the one in the Gen 8 Project uses 4. So you're using the wrong version of Essentials.

    I guess we know that this plugin definitely doesn't work with v18.1 now, though lol

    Ok, so I reinstalled the script and Gen 8 Project and the errors still keep popping up. Again, this could be me and my careless mistakes, but I really don't know what to do, and I even started a new save.

    Also, I'm not using the wrong version of Essentials. I've been using Essentials V18.1 since I started making my fan game. I didn't know about Essentials until October 2020 and just used V18.1 since late December 2020. I didn't know about V17 or V16 back then.

    I also installed this script and Gen 8 Project in a fresh copy of Essentials and still, it doesn't work. Again, this could be me and my carelessness, but I've tried every method and it still doesn't work.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,308
    Posts
    4
    Years
    • Seen yesterday
    I also installed this script and Gen 8 Project in a fresh copy of Essentials and still, it doesn't work. Again, this could be me and my carelessness, but I've tried every method and it still doesn't work.
    Does your game raise the same errors, or are there new errors?
    I assure you that the errors you reported in your previous post should be solved, as the uninitialized constants do exist in the Gen 8 project.
     
    Back
    Top