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

Pokemon Specific Items

  • 148
    Posts
    11
    Years
    I haven't used Essentials in a long time and don't have it up yet, so If this is a simple question I'm sorry. Items like light ball that boost only Pikachu's stats. Can they be used in Essentials? Would it be simple (since I have little scripting knowledge) to copy the Light ball code and copy/paste it and make it a item to work and boost stats for another pokemon?

    Also, are there any tutorials on scripting new move effects (such as, raise targets speed, then puts them to sleep) that anyone can recommend?
     
  • 1,405
    Posts
    11
    Years
    The code for Light Ball is in PokeBattle_Move section in the Script Editor

    Code:
    if isConst?(attacker.species,PBSpecies,:PIKACHU) && isConst?(attacker.item,PBItems,:LIGHTBALL)
          basedmg*=2
        end

    basedamage means both attack and special attack are changed, *=2 pretty much means doubled

    other stats you can change are atk, spatk, defense, spdef, accuracy and evasion.

    i think you can figure out what to change in the script on your own. then just place it right after Light Ball so you don't accidentally place it into the wrong script
     
  • 15
    Posts
    10
    Years
    • Seen Jun 19, 2014
    Thanks for posting the example. I was wondering how to do this. Does that make it so the only pokemon that can hold the item is pikachu?
     
  • 148
    Posts
    11
    Years
    The code for Light Ball is in PokeBattle_Move section in the Script Editor

    Code:
    if isConst?(attacker.species,PBSpecies,:PIKACHU) && isConst?(attacker.item,PBItems,:LIGHTBALL)
          basedmg*=2
        end

    basedamage means both attack and special attack are changed, *=2 pretty much means doubled

    other stats you can change are atk, spatk, defense, spdef, accuracy and evasion.

    i think you can figure out what to change in the script on your own. then just place it right after Light Ball so you don't accidentally place it into the wrong script

    Thank you for the explanation and example. So, would

    Code:
    if isConst?(attacker.species,PBSpecies,:FERALIGATR) && isConst?(attacker.item,PBItems,:LIGHTBALL)
          defense*=2
        end

    double Feraligatr's Defense when holding Light Ball? Or would you need to change ""attacker" to "defender" or something like that?

    How could one item effect multiple stats, like defense and Special attack? Is it as simple as just adding another line with "spatk*=2"?

    Can you not change HP or Speed with items this way? Or did you just not use them in your example?
     
  • 1,405
    Posts
    11
    Years
    Thank you for the explanation and example. So, would

    Code:
    if isConst?(attacker.species,PBSpecies,:FERALIGATR) && isConst?(attacker.item,PBItems,:LIGHTBALL)
          defense*=2
        end

    double Feraligatr's Defense when holding Light Ball? How could one item effect multiple stats, like defense and Special attack? Is it as simple as just adding another line with "spatk*=2"?

    Can you not change HP or Speed with items this way? Or did you just not use them in your example?

    yes that code would double Feraligatr's defense. and to add more stat changes, you just need to write another line.

    i didn't mention HP or Speed because i couldn't find any example of using these anywhere, but i would guess speed is just speed .
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Thank you for the explanation and example. So, would

    Code:
    if isConst?([COLOR=Red]attacker[/COLOR].species,PBSpecies,:FERALIGATR) && isConst?([COLOR=Red]attacker[/COLOR].item,PBItems,:LIGHTBALL)
          defense*=2
        end
    double Feraligatr's Defense when holding Light Ball? Or would you need to change ""attacker" to "defender" or something like that?
    This code will not work as intended. If Feraligatr is holding the Light Ball and it attacks, the TARGET will have their Defence doubled, which is bizarre as the target is not holding the item. Effectively, it works the same as halving Feraligatr's Attack. Both red parts would need to be opponent instead. It does help to look at similar items to see how they work.

    Speed determines priority, not damage (ignoring the couple of moves whose base damage depends on it), and priority is calculated way before damage - it's done before a battle round even begins. Items such as Choice Scarf and Quick Powder can affect the speed. As for HP, there is no stat modifier for it and nor should there be, because it's a different kind of stat to the others (conceptually speaking) - just alter the Defence and Special Defence stats instead.
     
  • 148
    Posts
    11
    Years
    This code will not work as intended. If Feraligatr is holding the Light Ball and it attacks, the TARGET will have their Defence doubled, which is bizarre as the target is not holding the item. Effectively, it works the same as halving Feraligatr's Attack. Both red parts would need to be opponent instead. It does help to look at similar items to see how they work.

    Speed determines priority, not damage (ignoring the couple of moves whose base damage depends on it), and priority is calculated way before damage - it's done before a battle round even begins. Items such as Choice Scarf and Quick Powder can affect the speed. As for HP, there is no stat modifier for it and nor should there be, because it's a different kind of stat to the others (conceptually speaking) - just alter the Defence and Special Defence stats instead.

    So, if I wanted an item to boost a specific Pokemon I'm using to battle Defense/Special Defense, the code would be this?

    Code:
    if isConst?(opponent.species,PBSpecies,:POKEMON NAME) && isConst?(opponent.item,PBItems,:ITEM NAME)
       defense*=2 OR spdef*=2
        end
     
    Last edited:
  • 1,405
    Posts
    11
    Years
    This code will not work as intended. If Feraligatr is holding the Light Ball and it attacks, the TARGET will have their Defence doubled, which is bizarre as the target is not holding the item. Effectively, it works the same as halving Feraligatr's Attack. Both red parts would need to be opponent instead. It does help to look at similar items to see how they work.

    Speed determines priority, not damage (ignoring the couple of moves whose base damage depends on it), and priority is calculated way before damage - it's done before a battle round even begins. Items such as Choice Scarf and Quick Powder can affect the speed. As for HP, there is no stat modifier for it and nor should there be, because it's a different kind of stat to the others (conceptually speaking) - just alter the Defence and Special Defence stats instead.

    So, if I wanted an item to boost a specific Pokemon I'm using to battle Defense/Special Defense, the code would be this?

    Code:
    if isConst?(opponent.species,PBSpecies,:POKEMON NAME) && isConst?(opponent.item,PBItems,:ITEM NAME)
       defense*=2 OR spdef*=2
        end

    my bad, totally overlooked that.

    i think that code should work fine now.
     
  • 148
    Posts
    11
    Years
    my bad, totally overlooked that.

    i think that code should work fine now.


    Thanks again for the help. Really want to start getting into learning how to script with essentials. For now I'll just have to stick to editing others scripts.

    Speaking of which. Could you help me clarify something real quick? I was looking in the gen 6 update thread (to see if anyone had figured out how to make the Fur coat ability). I saw someone post Mega Launcher code.

    Code:
     if isConst?(attacker.ability,PBAbilities,:MEGALAUNCHER) #by ~JV~
              if @id == 25 or @id == 56 or @id == 93 or @id == 548 #each move ID, missing Heal Pulse
                  basedmg=(basedmg*1.5).floor
              end
           end

    If I changed the "MEGALAUNCHER" to some new ability and the IDs for different moves, it would work the same right? Those moves would get a boost from having the ability? Wouldn't have to mess around with anything else?
     
  • 1,405
    Posts
    11
    Years
    Thanks again for the help. Really want to start getting into learning how to script with essentials. For now I'll just have to stick to editing others scripts.

    Speaking of which. Could you help me clarify something real quick? I was looking in the gen 6 update thread (to see if anyone had figured out how to make the Fur coat ability). I saw someone post Mega Launcher code.

    Code:
     if isConst?(attacker.ability,PBAbilities,:MEGALAUNCHER) #by ~JV~
              if @id == 25 or @id == 56 or @id == 93 or @id == 548 #each move ID, missing Heal Pulse
                  basedmg=(basedmg*1.5).floor
              end
           end

    If I changed the "MEGALAUNCHER" to some new ability and the IDs for different moves, it would work the same right? Those moves would get a boost from having the ability? Wouldn't have to mess around with anything else?

    yeah it should work the same.
     
    Back
    Top