• 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: ZUD Plugin [v20.1]

1,408
Posts
10
Years
    • Seen today
    Map 046 exist,
    and I have tested in other map for trainer battle, still got same error'

    Do some troubleshooting. Put p GameData::MapMetadata.get(46).name in an event, and tell me what it says when you interact with it.

    I suspect it'll give you the exact same error. If so, check your map_metadata.txt file, and see what Map 046 is supposed to be, and check the in-game Map Metadata editor to see if it exists there as well. Somewhere along the lines, this map is just not registered.
     
    Last edited:
    211
    Posts
    7
    Years
    • Seen May 5, 2024
    Do some troubleshooting. Put p GameData::MapMetadata.get(46).name in an event, and tell me what it says when you interact with it.

    I suspect it'll give you the exact same error. If so, check your map_metadata.txt file, and see what Map 046 is supposed to be, and check the in-game Map Metadata editor to see if it exists there as well. Somewhere along the lines, this map is just not registered.

    I opened a map_metadata file like you said, and I found two maps with the same id. Maybe that's what caused the malfunction.
     
    1,408
    Posts
    10
    Years
    • Seen today
    I opened a map_metadata file like you said, and I found two maps with the same id. Maybe that's what caused the malfunction.

    Possibly. Either way, that was probably gonna cause errors down the line if two maps share the same ID. Im not really sure how that would even happen.
     
    211
    Posts
    7
    Years
    • Seen May 5, 2024
    Possibly. Either way, that was probably gonna cause errors down the line if two maps share the same ID. Im not really sure how that would even happen.

    After I check again,
    The problem come from ZUD plugins..
    After deleted the ZUD plugins, everything works fine...
    Previously there was no constraint in ZUD version 1.1.2 and everything went smoothly, after I update to version 1.1.3 a bug appears.
    and ZUD does not support with animated sprites in Z-Moves / Dynamax Scene animation?
    I tried with the spritesheet from ebdx and the results the sprites won't animated..
     
    1,408
    Posts
    10
    Years
    • Seen today
    After I check again,
    The problem come from ZUD plugins..
    After deleted the ZUD plugins, everything works fine...
    Previously there was no constraint in ZUD version 1.1.2 and everything went smoothly, after I update to version 1.1.3 a bug appears.
    and ZUD does not support with animated sprites in Z-Moves / Dynamax Scene animation?
    I tried with the spritesheet from ebdx and the results the sprites won't animated..

    Its not the plugin's fault. It's not doing anything special. ZUD just happens to be calling a code that already exists in base Essentials. If you run the code GameData::MapMetadata.get(46).id somewhere, you'll get the same error, even without ZUD.

    ZUD needs to access the Map Metadata to check if the current map is flagged as a PowerSpot. If your Map Metadata is bugged or missing things, then obviously this'll cause an error. That's not an issue with this plugin, it's an issue with your personal Map Metadata. The plugin works 100% fine in default Essentials with the default Map Metadata. This means the only possible error is on your end.

    Code:
    $game_map && GameData::MapMetadata.get($game_map.map_id)&.has_flag?("PowerSpot")

    This is the line in the plugin that is causing your error. As you can see, there's nothing here that is out of the ordinary. It's simply checking your Map Metadata to see if a flag exists or not. It's the same exact code base Essentials uses to check for a map flagged as a DistortionWorld map, as shown here:

    Code:
    $game_map && GameData::MapMetadata.get($game_map.map_id)&.has_flag?("DistortionWorld")

    Chances are, this code would give you a similar error too, if you encountered a Giratina. Or maybe not, I don't really know what state your metadata is in.



    As for animated sprites, idk, I haven't gone out of my way to add any specific support. Mostly because no plugin exists currently (that I know of) for v20.1 that adds animated sprites. The EBDXBitmapWrapper is supported though, when the Gen 8 Pack is installed. Because that plugin relies on it to work. But if the Gen 8 Pack is not installed, it just uses the standard Essentials bitmaps.
     
    Last edited:
    211
    Posts
    7
    Years
    • Seen May 5, 2024
    Its not the plugin's fault. It's not doing anything special. ZUD just happens to be calling a code that already exists in base Essentials. If you run the code GameData::MapMetadata.get(46).id somewhere, you'll get the same error, even without ZUD.

    ZUD needs to access the Map Metadata to check if the current map is flagged as a PowerSpot. If your Map Metadata is bugged or missing things, then obviously this'll cause an error. That's not an issue with this plugin, it's an issue with your personal Map Metadata. The plugin works 100% fine in default Essentials with the default Map Metadata. This means the only possible error is on your end.

    Code:
    $game_map && GameData::MapMetadata.get($game_map.map_id)&.has_flag?("PowerSpot")

    This is the line in the plugin that is causing your error. As you can see, there's nothing here that is out of the ordinary. It's simply checking your Map Metadata to see if a flag exists or not. It's the same exact code base Essentials uses to check for a map flagged as a DistortionWorld map, as shown here:

    Code:
    $game_map && GameData::MapMetadata.get($game_map.map_id)&.has_flag?("DistortionWorld")

    Chances are, this code would give you a similar error too, if you encountered a Giratina. Or maybe not, I don't really know what state your metadata is in.



    As for animated sprites, idk, I haven't gone out of my way to add any specific support. Mostly because no plugin exists currently (that I know of) for v20.1 that adds animated sprites. The EBDXBitmapWrapper is supported though, when the Gen 8 Pack is installed. Because that plugin relies on it to work. But if the Gen 8 Pack is not installed, it just uses the standard Essentials bitmaps.

    You're right,
    In my Map_metadata ID map for Gym and Indoor missing..
    Thank you^^
     
    1,408
    Posts
    10
    Years
    • Seen today
    Minor Update (v1.1.4)


    • Moved all new Message Types added by this plugin to the Essentials Deluxe plugin, for tidiness.
    • Refactored all of the code related to displaying ZUD buttons while in the Fight Menu, and moved it into this plugin instead of keeping it in Essentials Deluxe.
    • Spruced up some of the text displays in the prize selection screen shown at the end of a Dynamax Adventure.
    • Added more item variety to the Backpacker's selection in Dynamax Adventures. The item pool will now also be more likely to have items that are useful to your specific party.
    • The Max Eggs item has been greatly streamlined so that it now instantly sets each party member to their new level after calculating Exp., instead of going through all of the text boxes for each and every individual level-up.
    • Updated the PBS data for the Z-Booster and Wishing Star items to now utilize the UsesAllBattleActions flag. Any items with this flag will now use up the trainer's entire turn, instead of checking for these specific item ID's.
    • Updated the PBS data for all Z-Crystal items to now utilize the HeldDescription property, to allow for a separate item description for the "held" version of a Z-Crystal vs the description that is displayed while viewed as a Key Item in the bag. To display this held description in a UI, you can call on it by using Item#.held_description instead of the usual Item#.description.
    • Updated the PBS data for all relevant items added by this plugin to now utilize the PortionName and PortionNamePlural properties, to allow for compatibility with the Improved Item Text plugin.
    • Changed any item text displays utilized by the plugin to now display portion name text wherever appropriate.
     
    1,408
    Posts
    10
    Years
    • Seen today
    Minor Update (v1.1.5)


    • Fixed the broken download link to the plugin.
    • Tweaked how the PowerSpot flags are checked for in the Map Metadata to prevent some unnecessary error messages.
    • Ultra Burst will no longer produce errors after updating Essentials Deluxe.
     
    17
    Posts
    1
    Years
    • Seen Jan 8, 2024
    Hi,I'm using KleinStudio's Animated BitmapWrapper to Show animated Sprites in Battle and PokeDex. I installed ZUD plugin a few Days ago. When I try to Use Z moves,Dynamax and Ultra Brust etc. this graphical Error Happens. (screenshot in Attachment.

    Klein's BitmapWrapper ---->
    Spoiler:


    I also used EBDXWrapper But for EBDX,the same thing happens(the same screenshot/attachment).

    Solution?
     

    Attachments

    • ZUD Plugin [v20.1]
      Animation.gif
      1.6 MB · Views: 10
    • ZUD Plugin [v20.1]
      Animation2.gif
      510.5 KB · Views: 10
    1,408
    Posts
    10
    Years
    • Seen today
    Hi,I'm using KleinStudio's Animated BitmapWrapper to Show animated Sprites in Battle and PokeDex. I installed ZUD plugin a few Days ago. When I try to Use Z moves,Dynamax and Ultra Brust etc. this graphical Error Happens. (screenshot in Attachment.

    Klein's BitmapWrapper ---->
    Spoiler:


    I also used EBDXWrapper But for EBDX,the same thing happens(the same screenshot/attachment).

    Solution?


    Can you upload the actual file for all that code, or link to a pastebin of it? It's way too hard to follow in that format, it's straining my eyes.
     
    17
    Posts
    1
    Years
    • Seen Jan 8, 2024
    Sorry for late reply.

    I just found that I EBDX wrapper is included with Gen 8 pack.

    So you should try editing the ebdx wrapper and ebdx wrapper compatability files in gen 8 pack scripts. Sorry for the inconvenience.

    I think you have Gen 8 pack alrady installed. And the animated sprites I use is from EBDX.
     
    Last edited:
    1,408
    Posts
    10
    Years
    • Seen today
    Sorry for late reply.

    I just found that I EBDX wrapper is included with Gen 8 pack.

    So you should try editing the ebdx wrapper and ebdx wrapper compatability files in gen 8 pack scripts. Sorry for the inconvenience.

    I think you have Gen 8 pack alrady installed. And the animated sprites I use is from EBDX.

    Idk, I've already made everything compatible with the EBDX Wrapper. That was one of the first things I ever did. I'm assuming the sprites animate properly while they're Dynamaxed, right? It's just the actual ZUD animations where they don't work, correct? If so, I don't really know what I'm supposed to change.
     
    17
    Posts
    1
    Years
    • Seen Jan 8, 2024
    The PROBLEM is that: The scene that shows when you dynamax,use z-moves etc. The trainer using the Z-ring or the Dynamx band It just shows the full spritesheet instead of the animated sprite.

    In attachments
     

    Attachments

    • ZUD Plugin [v20.1]
      [2023-01-20] 16_54_48.007.png
      31.7 KB · Views: 4
    • ZUD Plugin [v20.1]
      [2023-01-21] 20_40_41.550.png
      21.3 KB · Views: 5
    Last edited:
    1,408
    Posts
    10
    Years
    • Seen today
    The PROBLEM is that: The scene that shows when you dynamax,use z-moves etc. The trainer using the Z-ring or the Dynamx band It just shows the full spritesheet instead of the animated sprite.

    In attachments

    If it only ever happens during the ZUD animations, and no where else, then there's something different about how the sprites are called in the animations. What that is exactly, I have no idea. Im probably not going to look into this any time soon, because I would first have to go through the hassle of installing animated sprites in my game to even test anything, and I dont even know how to do that correctly on my own without doing some research.
     
    17
    Posts
    1
    Years
    • Seen Jan 8, 2024
    Yeah man. That only happens during ZUD(Z-move,Ultra burst and Dynamax) animations. I hope you can fix it on the next Major version (or the second nexr). Good luck. 😀
     
    Last edited:
    1,408
    Posts
    10
    Years
    • Seen today
    Minor Update (v1.1.6)


    • Removed the restrictions on wild Pokemon utilizing ZUD mechanics. You may now set up wild Pokemon to use Z-Moves, Ultra Burst, or Dynamax without a trainer by simply flagging them as an "ace".
    • Edited the ZUD animations to now support wild Pokemon that trigger these mechanics without a trainer.
    • ZUD animations are now compatible with animated battler sprites.
    • Overhauled how Dynamax sprites are displayed, greatly simplifying the code, and making them easier to customize. Several chunks of code have been removed from various files in the plugin due to this.
    • Dynamax sprites are no longer given their reddish color through a code setting. Instead, Dynamaxed Pokemon sprites are overlayed with another graphic to achieve the same result much easier. This graphic is named "dynamax_pattern", and has been included in this update. A second graphic named "calyrex_pattern" is also included, which is, obviously, used specifically for Calyrex. If you want to customize the coloration for Dynamax sprites, you may now do so by simply editing this graphic.
    • Removed the DYNAMAX_COLOR and CALYREX_COLOR settings, as they are no longer used.
    • Tweaked how the move Transform and the ability Imposter save data for the target Pokemon to make changing Dynamax sprites easier.
    • Made it so that you may now add custom shadow sprites for specific species while they are Dynamaxed. This can be done by adding a file to Graphics/Pokemon/Shadow that is named using the specific species ID, followed by the suffix _dmax. For example, CALYREX_dmax.
    • Added custom Dynamax shadow sprites for Calyrex and all of its forms.
    • Made it so that Z-Moves and Max Moves that target multiple Pokemon will now deal reduced damage through Wide Guard, in the same way they do with Protect. This was previously overlooked since the only move this would normally affect is the Z-Move Clangorous Soulblaze.
    • Made it so that if the Gen 9 move Silk Trap exists and is implemented, it will now also reduce damage from Z-Moves and Max Moves as other Protect-like moves do.
    • Made various changes and updates in preparation of the release of the Terastal Phenomenon plugin.
    • Added the midbattle trigger "gmax" to be triggered when a Pokemon Gigantamaxes. More details are covered in the Essentials Deluxe plugin.
    • Expanded several midbattle triggers so that you may now specify specific species or types when triggered. More details are covered in the Essentials Deluxe plugin.
     
    1,408
    Posts
    10
    Years
    • Seen today
    Minor Update (v1.1.7)


    • Fixed a bug that would cause a crash with Safari Zone encounters.
    • Made some small optimizations to the location of certain code.
     

    TheShinyMew

    Wild Challenger appeared!
    125
    Posts
    14
    Years
  • Sorry for acting up, but I'm trying to do the best is whenever I got the Pokémon the error comes up like this:

    Code:
    [2023-02-22 22:51:14 -0500]
    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]
    
    Script error in event 5 (coords 9,4), map 4 (Pokémon Lab)
    Exception: NoMethodError
    Message: undefined method `no_dynamax' for nil:NilClass
    
    ***Full script:
    pkmn = Pokemon.new(:DRATINI, 5)
    pkmn.item = :ORANBERRY
    pkmn.shiny = false
    pkmn.calc_stats
    pbAddPokemon(pkmn)
    
    Backtrace:
    [ZUD Mechanics] Data_Pokemon.rb:228:in `calc_stats'
    (eval):4:in `execute_script'
    033:Interpreter:143:in `eval'
    033:Interpreter:143:in `execute_script'
    034:Interpreter_Commands:1112:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:133:in `block in update'
    033:Interpreter:90:in `loop'
    033:Interpreter:90:in `update'
    [Following Pokemon EX] Refresh.rb:255:in `update'

    Any thoughts about the "no_dynamax" method? Is there a way to fix it?
     
    1,408
    Posts
    10
    Years
    • Seen today
    Sorry for acting up, but I'm trying to do the best is whenever I got the Pokémon the error comes up like this:

    Code:
    [2023-02-22 22:51:14 -0500]
    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]
    
    Script error in event 5 (coords 9,4), map 4 (Pokémon Lab)
    Exception: NoMethodError
    Message: undefined method `no_dynamax' for nil:NilClass
    
    ***Full script:
    pkmn = Pokemon.new(:DRATINI, 5)
    pkmn.item = :ORANBERRY
    pkmn.shiny = false
    pkmn.calc_stats
    pbAddPokemon(pkmn)
    
    Backtrace:
    [ZUD Mechanics] Data_Pokemon.rb:228:in `calc_stats'
    (eval):4:in `execute_script'
    033:Interpreter:143:in `eval'
    033:Interpreter:143:in `execute_script'
    034:Interpreter_Commands:1112:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:133:in `block in update'
    033:Interpreter:90:in `loop'
    033:Interpreter:90:in `update'
    [Following Pokemon EX] Refresh.rb:255:in `update'

    Any thoughts about the "no_dynamax" method? Is there a way to fix it?

    Can't replicate this error, I copy/pasted your script and it works fine for me. Best I can suggest is try recompiling, or try running the script without pkmn.calc_stats and see if that does anything.
     
    Back
    Top