• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • 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.

[Scripting Question] How to create the figy Berry?

  • 7
    Posts
    5
    Years
    • Seen Apr 15, 2025
    hi guys, I am trying to create the FIgy Berry in Pokemon Essentials but i dont´t know how i introduce the effects. Can you help me?
     
    hi guys, I am trying to create the FIgy Berry in Pokemon Essentials but i dont´t know how i introduce the effects. Can you help me?

    I'm assuming you're trying to get it updated for gen 7/8 mechanics? If so, find "def pbConfusionBerry". You should see something like "amt=self.pbRecoverHP((self.totalhp/8).floor,true)". Just replace the "8" with "3" if you want gen 8 mechanics or "2" if you want gen 7 mechanics.
     
    ok thanks. One question more. How can i create a new item that it heals X hp and result in confusion to own pokemon
     
    ok thanks. One question more. How can i create a new item that it heals X hp and result in confusion to own pokemon

    If you're on v17.2, you should see this block of code:
    Code:
        elsif isConst?(berry,PBItems,:FIGYBERRY)
          consumed=pbConfusionBerry(0,
             _INTL("{1}'s {2} restored health!",pbThis,berryname),
             _INTL("For {1}, the {2} was too spicy!",pbThis(true),berryname))
    Just replace the "0" with "self.nature%5" (after copying this segment and changing the item name) to have it always confuse the Pokemon (and alter the message to be what you want when it confuses the Pokemon). Then, in order to heal a certain amount of HP, I recommend making an "if" statement that will be fulfilled if the Pokemon's item is the certain berry, which would contain the "amt=self.pbRecoverHP((self.totalhp/x).floor,true)" in this section, and move "amt=self.pbRecoverHP((self.totalhp/3).floor,true)" to the "else" section.
     
    wow man thanks very much for your help¡¡¡. Last question if you can respond.... Can i put the object have probability to make confusion?
     
    wow man thanks very much for your help¡¡¡. Last question if you can respond.... Can i put the object have probability to make confusion?

    Where I said to put "self.nature%5" in the last post, put a new variable there, "nat" for example. Before that line, you can do something like this (where the probability of it NOT confusing is 1/x):

    Code:
        elsif isConst?(berry,PBItems,:BERRYNAME)
          nat = self.nature%5
          if rand(x) == 0
            nat += 1
          end
          consumed=pbConfusionBerry(nat,
             _INTL("{1}'s {2} restored health!",pbThis,berryname),
             _INTL("For {1}, the {2} was too spicy!",pbThis(true),berryname))
     
    I can get it with this code

    elsif isConst?(berry,PBItems,:FIGYBERRY)
    nat =
    azar=rand(100)
    if azar >= 60
    nat = self.nature%5
    end
    consumed=pbConfusionBerry(nat,
    _INTL("¡{1} ha restaurado su salud con un {2}!",pbThis,berryname),
    _INTL("¡El {2} le pego un pelotazo a {1}!",pbThis(true),berryname))
     
    Back
    Top