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

[Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • A little update about Utility Umbrella with Primordial Weathers case:
    Spoiler:


    Updated the main post about that item.
     
    Last edited:
    286
    Posts
    5
    Years
    • Seen yesterday
    Mints' Mechanic:
    Spoiler:

    I tried implementing this code, but I'm getting this error whenever an opposing Pokemon faints or I run away from a wild battle.
    Spoiler:

    Line 962 in PokeBattle_Pokemon is this if it helps: nd5=(nature/5).floor. If I replace nature=(self.mint!=-1) ? self.mint : self.nature with its original code, I don't get an error. Does anyone know what might cause this?
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I tried implementing this code, but I'm getting this error whenever an opposing Pokemon faints or I run away from a wild battle.
    Spoiler:

    Line 962 in PokeBattle_Pokemon is this if it helps: nd5=(nature/5).floor. If I replace nature=(self.mint!=-1) ? self.mint : self.nature with its original code, I don't get an error. Does anyone know what might cause this?

    I tested about battle (faint and run cases) and works fine. Double check how you added.
     
    286
    Posts
    5
    Years
    • Seen yesterday
    I tested about battle (faint and run cases) and works fine. Double check how you added.

    I reviewed everything but it's still causing the same problem. I made several edits to my scripts so maybe something I did is preventing this from working properly. I realized that even if I change what I said in my last post, the same error appears when going into page 3 of the summary screen. Upon further investigation, it seems that this segment of the drawpagethree method is causing the problems, as reverting this section to its original form eliminates all errors (the only other code added in this method as far as I could tell was nat = (@pokemon.mint!=-1) ? @pokemon.mint : @pokemon.nature):
    Code:
        if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false)
          natup = (nat/5).floor
          natdn = (nat%5).floor
          natureup = (@pokemon.nature/5).floor
          naturedn = (@pokemon.nature%5).floor
          statshadows[natureup] = Color.new(136,96,72) if natureup!=naturedn
          statshadows[naturedn] = Color.new(64,120,152) if natureup!=naturedn
        end
    The code above is the change you made, while the code below is what it previously was:
    Code:
        if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false)
          natup = (@pokemon.nature/5).floor
          natdn = (@pokemon.nature%5).floor
          statshadows[natup] = Color.new(136,96,72) if natup!=natdn
          statshadows[natdn] = Color.new(64,120,152) if natup!=natdn
        end
    However, I don't see how this changes anything because in the edit you made, the variables natup, natdn, and nat aren't used except for defining them, as natureup and naturedn are used in the same way that natup and natdn previously were. Unless I'm missing something, don't these 2 segments essentially do the same thing?

    Also I just realized that you had the prices of the mints as 10 in the PBS file, but shouldn't they be priced at 20 so they can be sold for 10 (Bulbapedia says 10 is their sell price).
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I reviewed everything but it's still causing the same problem. I made several edits to my scripts so maybe something I did is preventing this from working properly. I realized that even if I change what I said in my last post, the same error appears when going into page 3 of the summary screen. Upon further investigation, it seems that this segment of the drawpagethree method is causing the problems, as reverting this section to its original form eliminates all errors (the only other code added in this method as far as I could tell was nat = (@pokemon.mint!=-1) ? @pokemon.mint : @pokemon.nature):
    Spoiler:

    However, I don't see how this changes anything because in the edit you made, the variables natup, natdn, and nat aren't used except for defining them, as natureup and naturedn are used in the same way that natup and natdn previously were. Unless I'm missing something, don't these 2 segments essentially do the same thing?

    Also I just realized that you had the prices of the mints as 10 in the PBS file, but shouldn't they be priced at 20 so they can be sold for 10 (Bulbapedia says 10 is their sell price).

    I tested my tutorial installing it into a vanilla essentials and it works fine. You need to triple check what you did then.

    About the price feel free to change it. o.o I just posted a base and you guys need to edit as you want.
     
    286
    Posts
    5
    Years
    • Seen yesterday
    I tested my tutorial installing it into a vanilla essentials and it works fine. You need to triple check what you did then.

    About the price feel free to change it. o.o I just posted a base and you guys need to edit as you want.

    Alright, thanks for your help anyway. I'll see if I can find what I messed up, but I guess it's not that serious if this part isn't implemented correctly because it should be purely visual as far as I can tell.
     
    1
    Posts
    9
    Years
    • Seen Oct 16, 2020
    I believe I ran into the same problem when implementing mints, which came down to testing using Pokémon initialised from before implementing. Can't remember exactly how the code works, but think new Pokémon are initialised with some default mint value, and therefore when trying to access this for old mons, it breaks. So try with newly initialised Pokemon instead and should be fine? Was at least the case for me so hopefully this helps.

    Also as my first time talking on here, thanks a lot to all the contributors!
     

    Atlat

    Atlat
    63
    Posts
    4
    Years
    • Seen today
    Attacks that are multi-hitting don't seem to be working from anyone on the field. I'm certain it has something to do with the implementation of Propeller Tail/Stalwart and whatnot. Please help.

    def pbChangeTarget(thismove,userandtarget,targets)
    [email protected]
    changeeffect=0
    user=userandtarget[0]
    target=userandtarget[1]
    # Snipe Shot/ Stalwart/ Propeller Tail
    if !isConst?(thismove.id,PBMoves,:SNIPESHOT) &&
    !user.hasWorkingAbility(:STALWART) && !user.hasWorkingAbility(:PROPELLERTAIL)
    # Lightningrod
    if targets.length==1 && isConst?(thismove.pbType(thismove.type,user,target),PBTypes,:ELECTRIC) &&
    !target.hasWorkingAbility(:LIGHTNINGROD)
    for i in priority # use Pokémon earliest in priority
    next if user.index==i.index || target.index==i.index
    if i.hasWorkingAbility(:LIGHTNINGROD)
    PBDebug.log("[Ability triggered] #{i.pbThis}'s Lightningrod (change target)")
    target=i # X's Lightningrod took the attack!
    changeeffect=1
    break
    end
    end
    end
    # Storm Drain
    if targets.length==1 && isConst?(thismove.pbType(thismove.type,user,target),PBTypes,:WATER) &&
    !target.hasWorkingAbility(:STORMDRAIN)
    for i in priority # use Pokémon earliest in priority
    next if user.index==i.index || target.index==i.index
    if i.hasWorkingAbility(:STORMDRAIN)
    PBDebug.log("[Ability triggered] #{i.pbThis}'s Storm Drain (change target)")
    target=i # X's Storm Drain took the attack!
    changeeffect=1
    break
    end
    end
    end
    # Change target to user of Follow Me/Rage Powder (overrides Magic Coat
    # because check for Magic Coat below uses this target)
    if PBTargets.targetsOneOpponent?(thismove)
    newtarget=nil; strength=100
    for i in priority # use Pokémon latest in priority
    next if !user.pbIsOpposing?(i.index)
    if !i.fainted? && !i.effects[PBEffects::SkyDrop]
    if i.effects[PBEffects::FollowMe]>0 && i.effects[PBEffects::FollowMe]<strength
    PBDebug.log("[Lingering effect triggered] #{i.pbThis}'s Follow Me/Rage Powder")
    newtarget=i; strength=i.effects[PBEffects::FollowMe]; changeeffect=0
    end
    end
    end
    target=newtarget if newtarget
    end
    # Change target to target of Spotlight (overrides Magic Coat
    # because check for Magic Coat below uses this target)
    if PBTargets.targetsOneOpponent?(thismove)
    newtarget=nil
    for i in priority # use Pokémon latest in priority
    next if !user.pbIsOpposing?(i.index)
    if i.effects[PBEffects::FollowMe] && !i.fainted?
    PBDebug.log("[Lingering effect triggered] #{i.pbThis}'s Spotlight")
    newtarget=i
    changeeffect=0
    end
    end
    target=newtarget if newtarget
    end
    end
     
    286
    Posts
    5
    Years
    • Seen yesterday
    I believe I ran into the same problem when implementing mints, which came down to testing using Pokémon initialised from before implementing. Can't remember exactly how the code works, but think new Pokémon are initialised with some default mint value, and therefore when trying to access this for old mons, it breaks. So try with newly initialised Pokemon instead and should be fine? Was at least the case for me so hopefully this helps.

    Also as my first time talking on here, thanks a lot to all the contributors!

    Thank you so much! I didn't think it was something so simple, but that was exactly the problem. I might have even left the mints out if you didn't say anything, so it means a lot.
     
    44
    Posts
    6
    Years
    • Seen Jul 13, 2021
    Are you gonna change how speed works in battles now?
    In gen 8, any speed changes take place in the current turn, immediately.
    Instead of having to wait for the next one.

    Like:
    Double battle:
    Pokemon A(your side) uses Tailwind.
    Pokemon B(your side) instantly gets the speed boost, and attacks.

    Before Tailwind would only give the boost the following turn.
    Do you think having these dynamic speed calculations would be hard to program?
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Later perhaps. But you can try to dig how 'pbPriority' works and maybe trying to add it into the final of TURN instead ROUND (I guess v17.2 does that one).
     
    1
    Posts
    4
    Years
    • Seen Feb 22, 2021
    Let's start it!

    In the file attached below it shows that I get a syntax error at line 3626 in PokeBattle_Battler whenever I try to playtest the game but line 3626 in the last line of the the script. Do I have to restart?
     

    Attachments

    • [Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)
      Pokemon Electric Boogaloo 5_20_2020 1_20_39 AM.png
      3.5 KB · Views: 4

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • In the file attached below it shows that I get a syntax error at line 3626 in PokeBattle_Battler whenever I try to playtest the game but line 3626 in the last line of the the script. Do I have to restart?

    Think so. Recommend you to add them into a vanilla version of essentials and test, and then add into your project.
     
    14
    Posts
    4
    Years
    • Seen Jun 22, 2022
    This has been super helpful, thank you so much!
    I'm having an issue with Octolock. It works partially (the stats still reduce at the end of the turn), but my Pokemon can still switch out and I can still flee from wild Pokemon that use it. As far as I can tell, the only difference in my script and yours is that I changed Octolock's move effect to CF21 and that I have the Jaw Lock script also applied.

    Edit: If this helps, here's some of my scripts
    Spoiler:
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Milcery's evo method (Credits to FL, Nuri Yuri and WolfPP if used):
    [Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)

    I made this at night (8:53pm)

    Spoiler:


    How to evolve:
    The player needs to pressing and holding L Button (or "A", "Q" and "Page Up" buttoms. Look inside 'PSystem_Controls' to check the buttoms) and spin around (360o) at least 4 times ('trigo_wise_spin_turns>=16 || clock_wise_spin_turns>=16') and then press out the L Buttom (IDK the correctly word for it, sorry LOL); else, we included the times (5 and 10 seconds and press out case included).

    The script uses game Variable 28. Change it if you want to!

    Enjoy it!

    To not trigger the evo method when the player uses Rare Candy, go to 'PItem_Items' and replace 'def pbChangeLevel(pokemon,newlevel,scene)' to:
    Spoiler:
     
    Last edited:
    658
    Posts
    7
    Years
  • Milcery's evo method (Credits to FL, Nuri Yuri and WolfPP if used):

    Wow, this does look like the most complex Gen 8 Script you have made till now. Well Done.

    Also Congratulations on completing all Gen 8 Scripts.

    Now all that we have left is Dynamax and we're done for this generation right?
     
    14
    Posts
    4
    Years
    • Seen Jun 22, 2022
    I might not have worded it very well, but I gave Octolock to a wild Pokemon to try it out, it used the move on me, and I was still able to switch out and run away, and I was the one the move was used on.
     
    Back
    Top