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

  • 83
    Posts
    5
    Years
    • She/It/Mew
    • Seen Feb 22, 2023
    Where do I put the info for the dynamax switch stuff? Can you post an example? Whenever I do it, it makes it so that I'm unable to battle any wild Pokemon and gives an error message.
     
    Last edited:
  • 1,409
    Posts
    10
    Years
    • Seen today
    Where do I put the info for the dynamax switch stuff? Can you post an example? Whenever I do it, it makes it so that I'm unable to battle any wild Pokemon and gives an error message.

    You can put it anywhere, really. Just look at the Events.onWildPokemonCreate example in the Max Raid Events script. Yours obviously doesn't have to be anywhere near as complicated, though. It only needs a few lines. Just copy/paste how the Shinyness one is handled in PField_EncounterModifiers, and instead of makeShiny you want to obviously use makeDynamax, and plug in your new switch number instead of the shiny switch.
     
  • 83
    Posts
    5
    Years
    • She/It/Mew
    • Seen Feb 22, 2023
    Here's what I did for the script

    # Make all wild Pokémon Dynamax while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate += proc { |_sender, e|
    pokemon = e[0]
    if $game_switches[DYNAMAX_BATTLE_SWITCH]
    pokemon.makeDynamax
    end
    }

    Clearly something is wrong bcz it's preventing any event encounters
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    Here's what I did for the script

    # Make all wild Pokémon Dynamax while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate += proc { |_sender, e|
    pokemon = e[0]
    if $game_switches[DYNAMAX_BATTLE_SWITCH]
    pokemon.makeDynamax
    end
    }

    Clearly something is wrong bcz it's preventing any event encounters

    I plugged it in and it works fine for me.
    What switch number did you set "DYNAMAX_BATTLE_SWITCH" to? I just used switch #100 to test real quick and it was fine. Maybe you didn't properly define it, or set it to an existing switch number?
     
  • 83
    Posts
    5
    Years
    • She/It/Mew
    • Seen Feb 22, 2023
    Oh, I got it! I replaced it so it was this instead.

    # Make all wild Pokémon Dynamax while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate += proc { |_sender, e|
    pokemon = e[0]
    if $game_switches[35]
    pokemon.makeDynamax
    end
    }

    Thank you for helping!
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    Oh, I got it! I replaced it so it was this instead.

    # Make all wild Pokémon Dynamax while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate += proc { |_sender, e|
    pokemon = e[0]
    if $game_switches[35]
    pokemon.makeDynamax
    end
    }

    Thank you for helping!

    Oh ok cool. I wouldn't use switch 35 though, because that's the same switch number used to disable Z-Moves. Switch numbers 35-39 are all used by the ZUD Plugin already to handle certain things. So just to play it safe I'd set it to a higher number that doesn't conflict with anything.
     
  • 29
    Posts
    5
    Years
    • Seen Feb 27, 2023
    Hey! I got this error when using a specific Max Raid spot. The other spots ran with no problems. I used it to tinker a little, but i guess the game stored some changes I made and I can't make it work anymore, even after reseting it to the default event "pbMaxRaid".
    Creating a new save fixed it, but if you could help me understand this one I would appreciate it.

    Spoiler:
     

    StCooler

    Mayst thou thy peace discover.
  • 9,311
    Posts
    4
    Years
    • Seen Jun 5, 2024
    Hey! I got this error when using a specific Max Raid spot. The other spots ran with no problems. I used it to tinker a little, but i guess the game stored some changes I made and I can't make it work anymore, even after reseting it to the default event "pbMaxRaid".
    Creating a new save fixed it, but if you could help me understand this one I would appreciate it.

    Spoiler:

    If I didn't change the lines of my script, the error says that the "rank" variable is nil at some point, while it shouldn't.
    Did you give any argument to "pbMaxRaid"?
     
  • 1,409
    Posts
    10
    Years
    • Seen today
    Hey! I got this error when using a specific Max Raid spot. The other spots ran with no problems. I used it to tinker a little, but i guess the game stored some changes I made and I can't make it work anymore, even after reseting it to the default event "pbMaxRaid".
    Creating a new save fixed it, but if you could help me understand this one I would appreciate it.

    Spoiler:

    Hard to say, the raids are a bit complicated. It seems like you probably moved events around or something after their info was already saved to a specific event, and now when trying to access that raid, it's searching for data that doesn't exist for that particular event.

    Basically, how the raids work is that once a Raid has been accessed, it takes the Map ID number the raid event is on, the Event ID number of that specific raid, and the number MAXRAID_PKMN is set to (500 by default) and stores all the Pokemon information generated for that raid to a variable equal to the sum of all of those numbers.

    So if you have a raid event on Map 50 in Event 6, the info for that raid is stored in $game_variables[556]. It's done this way to help ensure that each raid has its info stored in a unique place, so that each raid can have a different species "saved" to it once one is generated. It's still technically possible that there may be overlaps (you have a raid event on a different map/event id combo that also add up to 556 somehow), but unless you have a TON of raids spread across a variety of maps, that's fairly unlikely to happen. This is also why MAXRAID_PKMN is purposely set to a high number (500), to ensure that any combination of these numbers won't overlap with an existing game variable that someone would be feasibly using. Although, if your game does utilize, for some reason, over 500 different variables, you should bump MAXRAID_PKMN up to a higher number to avoid conflicts.

    Anyway, with all that said, once the raid data has been stored to a variable (let's keep using 556 for the example) and you save the game, that data is now set in stone. So if, for example, you then choose to delete the raid event, and create a new event (let's say Event 7) and put the raid there, the data for that raid will not transfer over. Because now the game will be searching for the raid data stored in variable 557 instead of 556, which might not exist. This might not be the exact reason that you're getting errors (it could be a million complicated things of this nature), but that's generally how the raids work and worth keeping in mind if you're doing a lot of quick and haphazard edits. Just because you delete or move a raid doesn't mean any data that was stored for that raid will be deleted/moved with it.

    To help avoid these headaches, it's best to just not save your game when playtesting raids. Holding the CTRL button while accessing a raid in Debug will skip the saving prompt, and this is a big part of why I included this feature.
     
    Last edited:
  • 16
    Posts
    3
    Years
    • Seen Jan 19, 2022
    Hi, I just downloaded this yesterday, and, for some reason,every time I try to open the game, I get this error message.

    [Wed Mar 10 11:12:26 Eastern Standard Time 2021]
    [Pokémon Essentials version 18.1]
    Exception: NameError
    Message: undefined local variable or method `pbCompileZMoveCompatibility' for nil:NilClass

    Backtrace:
    Compiler:1155:in `pbCompileAllData'
    Compiler:1303:in `pbCompiler'
    Main:1

    Now I've gone back through the installation process 2 extra times to make sure all files and scripts are correct. I can't find anything. I assume, based on the error message, that the problem is in the compiler script. So is here are lines 1148- 1160 of my compiler script. If you think the problem is any where else, just let me know and I will post the script.

    yield(_INTL("Compiling Pokémon forms data"))
    pbCompilePokemonForms
    #===========================================================================
    # Compiles data for Z-Moves and Dynamax. (ZUD)
    #===========================================================================
    # Depends on PBSpecies, PBMoves, PBItems
    yield(_INTL("Compiling Z-Moves compatibility data"))
    pbCompileZMoveCompatibility
    # Depends on PBSpecies, PBMoves, PBItems
    yield(_INTL("Compiling Gigantamax data"))
    pbCompileGigantamaxData
    #===========================================================================
    # Depends on PBSpecies, PBMoves
     

    StCooler

    Mayst thou thy peace discover.
  • 9,311
    Posts
    4
    Years
    • Seen Jun 5, 2024
    Hi, I just downloaded this yesterday, and, for some reason,every time I try to open the game, I get this error message.

    It looks like you didn't install all the scripts. Do you miss ZUD_09_Compilers? :)
     
  • 16
    Posts
    3
    Years
    • Seen Jan 19, 2022
    It looks like you didn't install all the scripts. Do you miss ZUD_09_Compilers? :)

    So maybe I'm just dumb, but what exactly do you mean by installing scripts? All the ZUD RB files are in the data file but in the script file, all the ZUD scripts are blank. How do I install the scripts? Again, sorry, but I'm kinda new to scripting
     
  • 16
    Posts
    3
    Years
    • Seen Jan 19, 2022
    Wait a minute, do i just need to copy and paste the contents of the ZUD files into the script?
     
  • 29
    Posts
    5
    Years
    • Seen Feb 27, 2023
    I once tried to set it like pbMaxRaid(nil,nil,nil) so it would default size to 3, rank to random AND species to random (which I thought it would give an error, but I still tried it). I don't think that was the issue because I tried it again with a new save and it defaulted to Ditto. After trying to reset things by changing the event back to just "pbMaxRaid", pasting the same "faulty" event onto different maps (they worked) and replacing the bad event with functional ones from different maps (still same error), I then thought about something being stored in that map that made the event go wrong everytime I triggered it. After reading what Lucidious89 answered (which was very informative!), I expanded the Variable limit and found which variables were being stored. I couldn't replicate the error again to see if this method would work, but i believe that by inserting "Control Variables: ["variable"] = 1" above "pbMaxRaid" it would force the Event to run with a new pokemon and fix the error. I might be wrong, as my experience and understanding level about coding is too low.

    Thanks for reminding me about the CTRL method.

    TfolChespin you need to copy the content of each of those 12 files in the Data folder, create 12 new slots in Scripts and paste each file's content on each slot. Must be above Main and below Compiler_MapsAndEvents.
    It's on the INSTALLATION GUIDE.txt:

    Spoiler:
     
  • 16
    Posts
    3
    Years
    • Seen Jan 19, 2022
    I once tried to set it like pbMaxRaid(nil,nil,nil) so it would default size to 3, rank to random AND species to random (which I thought it would give an error, but I still tried it). I don't think that was the issue because I tried it again with a new save and it defaulted to Ditto. After trying to reset things by changing the event back to just "pbMaxRaid", pasting the same "faulty" event onto different maps (they worked) and replacing the bad event with functional ones from different maps (still same error), I then thought about something being stored in that map that made the event go wrong everytime I triggered it. After reading what Lucidious89 answered (which was very informative!), I expanded the Variable limit and found which variables were being stored. I couldn't replicate the error again to see if this method would work, but i believe that by inserting "Control Variables: ["variable"] = 1" above "pbMaxRaid" it would force the Event to run with a new pokemon and fix the error. I might be wrong, as my experience and understanding level about coding is too low.

    Thanks for reminding me about the CTRL method.

    TfolChespin you need to copy the content of each of those 12 files in the Data folder, create 12 new slots in Scripts and paste each file's content on each slot. Must be above Main and below Compiler_MapsAndEvents.
    It's on the INSTALLATION GUIDE.txt:

    Spoiler:

    Thank you very much, but now theres a problem when I use a Zmove.

    [Wed Mar 10 12:17:47 Eastern Standard Time 2021]
    [Pokémon Essentials version 18.1]
    Exception: NameError
    Message: uninitialized constant PBEffects::GorillaTactics

    Backtrace:
    ZUD_04_Battle_Effects:589:in `pbEndTurn'
    Battler_UseMove:525:in `_ZUD_pbUseMove'
    ZUD_04_Battle_Effects:545:in `pbUseMove'
    ZUD_04_Battle_Effects:408:in `pbProcessTurn'
    ZUD_04_Battle_Effects:407:in `logonerr'
    ZUD_04_Battle_Effects:407:in `pbProcessTurn'
    Battle_Phase_Attack:126:in `pbAttackPhaseMoves'
    Battle_Phase_Attack:122:in `each'
    Battle_Phase_Attack:122:in `pbAttackPhaseMoves'
    Battle_Phase_Attack:108:in `loop'

    I think i saw someone else have the problem too on this discussion so I might just go look at that.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,311
    Posts
    4
    Years
    • Seen Jun 5, 2024
    Wait a minute, do i just need to copy and paste the contents of the ZUD files into the script?

    Yes :)

    Thank you very much, but now theres a problem when I use a Zmove.

    [Wed Mar 10 12:17:47 Eastern Standard Time 2021]
    [Pokémon Essentials version 18.1]
    Exception: NameError
    Message: uninitialized constant PBEffects::GorillaTactics

    Backtrace:
    ZUD_04_Battle_Effects:589:in `pbEndTurn'
    Battler_UseMove:525:in `_ZUD_pbUseMove'
    ZUD_04_Battle_Effects:545:in `pbUseMove'
    ZUD_04_Battle_Effects:408:in `pbProcessTurn'
    ZUD_04_Battle_Effects:407:in `logonerr'
    ZUD_04_Battle_Effects:407:in `pbProcessTurn'
    Battle_Phase_Attack:126:in `pbAttackPhaseMoves'
    Battle_Phase_Attack:122:in `each'
    Battle_Phase_Attack:122:in `pbAttackPhaseMoves'
    Battle_Phase_Attack:108:in `loop'

    I think i saw someone else have the problem too on this discussion so I might just go look at that.

    I see from your error that you're using v18.1 instead of the Gen 8 project.
     
    Back
    Top