• 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 [Essentials v19.1]

1,408
Posts
10
Years
    • Seen today
    Ok so I legit have no clue what causes the shrunk text issue, there's literally nothing in the ZUD script that should affect this, and if it's a Plugin Manager error I don't have a clue where to even begin to fix it. So I'm officially just shrugging my shoulders at the issue and moving on, since I have far better things to work on. It sucks, but oh well. At least there's a work-around fix, even if it's cumbersome and temporary. Maybe the next version of Essentials 19 (or maybe v20) will automatically address this issue for me.
     
    1,408
    Posts
    10
    Years
    • Seen today
    This plugin has been updated to v1.0.2

    Minor Updates:
    • Removed the items Max Honey and Max Mushrooms from the plugin, as the Gen 8 Project now includes these by default. If you want these items in your non-Gen 8 game, you can get the graphics/PBS/code from there.
    • Removed sprites that were included in the Gen 8 Project folder in the download, as the Gen 8 Project now includes them by default.
    • Updated some of the plugin scripts to work with the Gen 8 Project's changes to sprites.
    • Updated the Dynamax metrics for Alcremie's forms to match its base form.
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    Hello everyone, sorry if my English sucks, but I found this error and I don't know how to fix it. Can you help me pls?
     

    Attachments

    • ZUD Plugin [Essentials v19.1]
      prova confutabile.png
      14.8 KB · Views: 32
    1,408
    Posts
    10
    Years
    • Seen today
    Because this error came out after making all additions for this plugin. How is it resolved?

    By doing it properly. Syntax error literally means something wasn't inputted correctly. Seems like you didn't properly copy the full word "end" somewhere. Luckily the error points you to the exact line.
     
    53
    Posts
    4
    Years
    • Seen May 29, 2022
    I've done that many times but this problem persists for me, is there gonna be a patch for that down the line that has said .dat file or will the need for it not be there because it's already defined in the .txt file? And yes, it may annoy you because almost everyone asked this cause they had the same problem but the ZUD_PowerMoves.dat file is the reason the compiling keeps failing for me. I tried to work around it by copying the .txt file and saving it as .dat but that didn't bypass it, I tried ctrl + L then F, that didn't work either. A link to the .dat file or a patch for that not being needed will be helpful or something I'm not getting with the new script that would allow to edit the code.. Any help is welcome.
     
    1,408
    Posts
    10
    Years
    • Seen today
    I've done that many times but this problem persists for me, is there gonna be a patch for that down the line that has said .dat file or will the need for it not be there because it's already defined in the .txt file? And yes, it may annoy you because almost everyone asked this cause they had the same problem but the ZUD_PowerMoves.dat file is the reason the compiling keeps failing for me. I tried to work around it by copying the .txt file and saving it as .dat but that didn't bypass it, I tried ctrl + L then F, that didn't work either. A link to the .dat file or a patch for that not being needed will be helpful or something I'm not getting with the new script that would allow to edit the code.. Any help is welcome.

    The data file isnt included because the game auto-creates it based on which version of the PBS you have (vanilla, or Gen 8). Theres literally no reason to include it because it is self-created based on your PBS (say, if you add custom Z-Moves or G-Max Forms, which I cant account for). There wont be a patch to make the data file unnecessary, because it IS necessary, otherwise how will the game read the compatibility data? All the PBS file does is allow you to edit the info manually.

    And no, not "almost everyone" has had this problem. Three people have had this issue so far that I know of, and only one of them wasnt able to figure it out after being told to compile.

    I feel as if youre really overcomplicating the issue. If youve properly installed the plugin, literally all you have to do is open the game in debug mode and hold CTRL. Thats it.
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    I don't find the error, here is the script, can you please tell me what the error is?
    The script:
    class PokeBattle_Battler
    #=============================================================================
    # Effect per hit
    #=============================================================================
    def pbEffectsOnMakingHit(move,user,target)
    if target.damageState.calcDamage>0 && !target.damageState.substitute
    # Target's ability
    if target.abilityActive?(true)
    oldHP = user.hp
    BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
    user.pbItemHPHealCheck if user.hp<oldHP
    end
    # User's ability
    if user.abilityActive?(true)
    BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
    user.pbItemHPHealCheck
    end
    # Target's item
    if target.itemActive?(true)
    oldHP = user.hp
    BattleHandlers.triggerTargetItemOnHit(target.item,user,target,move,@battle)
    user.pbItemHPHealCheck if user.hp<oldHP
    end
    end
    if target.opposes?(user)
    # Rage
    if target.effects[PBEffects::Rage] && !target.fainted?
    if target.pbCanRaiseStatStage?(:ATTACK,target)
    @battle.pbDisplay(_INTL("{1}'s rage is building!",target.pbThis))
    target.pbRaiseStatStage(:ATTACK,1,target)
    end
    end
    # Beak Blast
    if target.effects[PBEffects::BeakBlast]
    PBDebug.log("[Lingering effect] #{target.pbThis}'s Beak Blast")
    if move.pbContactMove?(user) && user.affectedByContactEffect?
    target.pbBurn(user) if target.pbCanBurn?(user,false,self)
    end
    end
    # Shell Trap (make the trapper move next if the trap was triggered)
    if target.effects[PBEffects::ShellTrap] &&
    @battle.choices[target.index][0]==:UseMove && !target.movedThisRound?
    if target.damageState.hpLost>0 && !target.damageState.substitute && move.physicalMove?
    target.tookPhysicalHit = true
    target.effects[PBEffects::MoveNext] = true
    target.effects[PBEffects::Quash] = 0
    end
    end
    #-------------------------------------------------------------------------
    # ZUD - Grudge/Destiny Bond
    #-------------------------------------------------------------------------
    if defined?(Settings::ZUD_COMPAT); _ZUD_EffectsOnKO(move,user,target);
    else
    # Grudge
    if target.effects[PBEffects::Grudge] && target.fainted?
    move.pp = 0
    @battle.pbDisplay(_INTL("{1}'s {2} lost all of its PP due to the grudge!",
    user.pbThis,move.name))
    end
    # Destiny Bond (recording that it should apply)
    if target.effects[PBEffects::DestinyBond] && target.fainted?
    if user.effects[PBEffects::DestinyBondTarget]<0
    user.effects[PBEffects::DestinyBondTarget] = target.index
    end
    end
    end
    #-------------------------------------------------------------------------

    #=============================================================================
    # Effects after all hits (i.e. at end of move usage)
    #=============================================================================
    def pbEffectsAfterMove(user,targets,move,numHits)
    # Defrost
    if move.damagingMove?
    targets.each do |b|
    next if b.damageState.unaffected || b.damageState.substitute
    next if b.status != :FROZEN
    # NOTE: Non-Fire-type moves that thaw the user will also thaw the
    # target (in Gen 6+).
    if move.calcType == :FIRE || (Settings::MECHANICS_GENERATION >= 6 && move.thawsUser?)
    b.pbCureStatus
    end
    end
    end
    # Destiny Bond
    # NOTE: Although Destiny Bond is similar to Grudge, they don't apply at
    # the same time (although Destiny Bond does check whether it's going
    # to trigger at the same time as Grudge).
    if user.effects[PBEffects::DestinyBondTarget]>=0 && !user.fainted?
    dbName = @battle.battlers[user.effects[PBEffects::DestinyBondTarget]].pbThis
    @battle.pbDisplay(_INTL("{1} took its attacker down with it!",dbName))
    user.pbReduceHP(user.hp,false)
    user.pbItemHPHealCheck
    user.pbFaint
    @battle.pbJudgeCheckpoint(user)
    end
    # User's ability
    if user.abilityActive?
    BattleHandlers.triggerUserAbilityEndOfMove(user.ability,user,targets,move,@battle)
    end
    # Greninja - Battle Bond
    if !user.fainted? && !user.effects[PBEffects::Transform] &&
    user.isSpecies?(:GRENINJA) && user.ability == :BATTLEBOND
    if [email protected]?(user.idxOpposingSide) &&
    [email protected][user.index&1][user.pokemonIndex]
    numFainted = 0
    targets.each { |b| numFainted += 1 if b.damageState.fainted }
    if numFainted>0 && user.form==1
    @battle.battleBond[user.index&1][user.pokemonIndex] = true
    @battle.pbDisplay(_INTL("{1} became fully charged due to its bond with its Trainer!",user.pbThis))
    @battle.pbShowAbilitySplash(user,true)
    @battle.pbHideAbilitySplash(user)
    user.pbChangeForm(2,_INTL("{1} became Ash-Greninja!",user.pbThis))
    end
    end
    end
    # Consume user's Gem
    if user.effects[PBEffects::GemConsumed]
    # NOTE: The consume animation and message for Gems are shown immediately
    # after the move's animation, but the item is only consumed now.
    user.pbConsumeItem
    end
    # Pokémon switching caused by Roar, Whirlwind, Circle Throw, Dragon Tail
    switchedBattlers = []
    move.pbSwitchOutTargetsEffect(user,targets,numHits,switchedBattlers)
    # Target's item, user's item, target's ability (all negated by Sheer Force)
    if move.addlEffect==0 || !user.hasActiveAbility?(:SHEERFORCE)
    pbEffectsAfterMove2(user,targets,move,numHits,switchedBattlers)
    end
    # Some move effects that need to happen here, i.e. U-turn/Volt Switch
    # switching, Baton Pass switching, Parting Shot switching, Relic Song's form
    # changing, Fling/Natural Gift consuming item.
    if !switchedBattlers.include?(user.index)
    move.pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
    end
    if numHits>0
    @battle.eachBattler { |b| b.pbItemEndOfMoveCheck }
    end
    end

    # Everything in this method is negated by Sheer Force.
    def pbEffectsAfterMove2(user,targets,move,numHits,switchedBattlers)
    hpNow = user.hp # Intentionally determined now, before Shell Bell
    # Target's held item (Eject Button, Red Card)
    switchByItem = []
    @battle.pbPriority(true).each do |b|
    next if !targets.any? { |targetB| targetB.index==b.index }
    next if b.damageState.unaffected || b.damageState.calcDamage==0 ||
    switchedBattlers.include?(b.index)
    next if !b.itemActive?
    BattleHandlers.triggerTargetItemAfterMoveUse(b.item,b,user,move,switchByItem,@battle)
    end
    @battle.moldBreaker = false if switchByItem.include?(user.index)
    @battle.pbPriority(true).each do |b|
    b.pbEffectsOnSwitchIn(true) if switchByItem.include?(b.index)
    end
    switchByItem.each { |idxB| switchedBattlers.push(idxB) }
    # User's held item (Life Orb, Shell Bell)
    if !switchedBattlers.include?(user.index) && user.itemActive?
    BattleHandlers.triggerUserItemAfterMoveUse(user.item,user,targets,move,numHits,@battle)
    end
    # Target's ability (Berserk, Color Change, Emergency Exit, Pickpocket, Wimp Out)
    switchWimpOut = []
    @battle.pbPriority(true).each do |b|
    next if !targets.any? { |targetB| targetB.index==b.index }
    next if b.damageState.unaffected || switchedBattlers.include?(b.index)
    next if !b.abilityActive?
    BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability,b,user,move,switchedBattlers,@battle)
    if !switchedBattlers.include?(b.index) && move.damagingMove?
    if b.pbAbilitiesOnDamageTaken(b.damageState.initialHP) # Emergency Exit, Wimp Out
    switchWimpOut.push(b.index)
    end
    end
    end
    @battle.moldBreaker = false if switchWimpOut.include?(user.index)
    @battle.pbPriority(true).each do |b|
    next if b.index==user.index
    b.pbEffectsOnSwitchIn(true) if switchWimpOut.include?(b.index)
    end
    switchWimpOut.each { |idxB| switchedBattlers.push(idxB) }
    # User's ability (Emergency Exit, Wimp Out)
    if !switchedBattlers.include?(user.index) && move.damagingMove?
    hpNow = user.hp if user.hp<hpNow # In case HP was lost because of Life Orb
    if user.pbAbilitiesOnDamageTaken(user.initialHP,hpNow)
    @battle.moldBreaker = false
    user.pbEffectsOnSwitchIn(true)
    switchedBattlers.push(user.index)
    end
    end
    end
    end
     
    1,408
    Posts
    10
    Years
    • Seen today
    1) If youre going to post an entire script, PLEASE put it in spoiler tags so people dont have to scroll through your enormous post.

    2) Please post code with code tags so that its more legible. Its so much harder to read this way.

    3) Please read the instructions correctly when installing. At a glance, I can tell you probably did step 3 wrong, since there seems to be an "end" missing that you probably pasted over.
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    Ok, thank you. I found out which part of the script is giving me the error, it's that underlined. How can I fix it?
    Spoiler:
     
    1,408
    Posts
    10
    Years
    • Seen today
    Ok, thank you. I found out which part of the script is giving me the error, it's that underlined. How can I fix it?
    Spoiler:

    Again, by following the instructions. You replaced two "end's" that come after this code that I never stated to replace. Add them back in and you'll be fine.
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    Sorry if I don't understand much about programming, couldn't you tell me which lines I need to add the ends to?
    Thanks in advance
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    Sorry again, but could I add the ends to the script below, underlined or in red?
    Sorry for the inconvenience and thanks in advance.
    Spoiler:
     
    1,408
    Posts
    10
    Years
    • Seen today
    Sorry again, but could I add the ends to the script below, underlined or in red?
    Sorry for the inconvenience and thanks in advance.
    Spoiler:

    When I said "at the end of what you last posted", I meant right at the end of the chunk of code you posted in post #54. All the rest of the code is irrelevant.

    Basically, there should be 5 end's to close out the Grudge/Destiny Bond code, whereas you only have 3 because you pasted over two of them that you shouldn't have.
     

    Pokeminer20

    PDM20, Coder of Chaos!
    412
    Posts
    10
    Years
  • Sorry again, but could I add the ends to the script below, underlined or in red?
    Sorry for the inconvenience and thanks in advance.

    here's the fix to your problem, Install it properly this time. I recommend getting Notepad++ and setting the language to "Ruby" When altering scripts, it'll tell you where your code is open ended.

    Spoiler:
     
    15
    Posts
    2
    Years
    • Seen Sep 14, 2023
    Thanks you, it's worked.
    But there is another problem, the dynamax adventures scripts doesn't worked, I get this error.
    Spoiler:


    And the Dynamax doesn't work and the powerspots are set.
    Sorry for the inconvenience and thanks in advance.
     
    Back
    Top