• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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] More Pokemon Icons Like Shiny icons

YashPokeFan123

#PokeFan
  • 283
    Posts
    4
    Years
    • Seen Sep 27, 2024
    Hi I want to add a image like for shiny pokemon there is a shiny star image I want to add for alolan forms and galarian forms logo beside shiny pokemon.
    i m using bw summary pack by DeepBlu Pacific Waves
     
    Alright, so first you're gonna to go script> hit CTRL + SHIFT + F or right click any script and hit "...find"

    Code:
    # Show shininess star

    Search for the above string. From there, you should have a 'sense' of what to do next. Notice what is being done under those conditions, and replicate one of those (pokerus or shiny) to your preference. You'd then have the .png file where the code directory leads.

    Let me know how it goes, since I plan to implement this into my own project as well.

    If your 'summary page' is not essential base, then you'd have to search for whatever the pokerus icon name is in the game/graphic/pictures to lead you to where you need to go.
    Basically, when a game show an image, you can reverse search it by looking at the file name, and searching that file name within all script.
     
    Alright, so first you're gonna to go script> hit CTRL + SHIFT + F or right click any script and hit "...find"

    Code:
    # Show shininess star

    Search for the above string. From there, you should have a 'sense' of what to do next. Notice what is being done under those conditions, and replicate one of those (pokerus or shiny) to your preference. You'd then have the .png file where the code directory leads.

    Let me know how it goes, since I plan to implement this into my own project as well.

    If your 'summary page' is not essential base, then you'd have to search for whatever the pokerus icon name is in the game/graphic/pictures to lead you to where you need to go.
    Basically, when a game show an image, you can reverse search it by looking at the file name, and searching that file name within all script.

    Hi Thank You I have already try that but it not work because there @pokemon.shiny?
    but for alolan Pokemon or galarian Pokemon. There is a @form='Alolan'.but it does not work can you plz tell me. Plz. Thank You
     
    Actually the attribute @pokemon.form is the number of the form. The actual form name needs to be retrieved from the database directly ^^"

    @YashPokefan paste this somewhere:
    Code:
    class PokeBattle_Pokemon
      def isAlolanForm?
        if @is_alolan.nil?
          formname = pbGetMessage(MessageTypes::FormNames,self.fSpecies)
          @is_alolan = formname && formname.include?("Alolan")
        end 
        return @is_alolan
      end
      
      def isGalarianForm?
        if @is_galarian.nil?
          formname = pbGetMessage(MessageTypes::FormNames,self.fSpecies)
          @is_galarian = formname && formname.include?("Galarian")
        end 
        return @is_galarian
      end
    end
    and the code:
    Code:
            # Draw shiny icon
            if @pokemon.shiny?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/shiny",80,48,0,0,16,16]])
            end
    turns to:
    Code:
            # Draw shiny icon
            if @pokemon.shiny?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/shiny",80,48,0,0,16,16]])
            end
            # Draw Alolan/Galarian icon
            if @pokemon.isAlolanForm?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/alolan",80,48,0,0,16,16]])
            elsif @pokemon.isGalarianForm?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/galarian",80,48,0,0,16,16]])
            end

    Also, I told you, you're asking way too many questions in terms of scripting. Are you sure you don't want to recruit someone to work with you?
     
    Actually the attribute @pokemon.form is the number of the form. The actual form name needs to be retrieved from the database directly ^^"

    @YashPokefan paste this somewhere:
    Code:
    class PokeBattle_Pokemon
      def isAlolanForm?
        if @is_alolan.nil?
          formname = pbGetMessage(MessageTypes::FormNames,self.fSpecies)
          @is_alolan = formname && formname.include?("Alolan")
        end 
        return @is_alolan
      end
      
      def isGalarianForm?
        if @is_galarian.nil?
          formname = pbGetMessage(MessageTypes::FormNames,self.fSpecies)
          @is_galarian = formname && formname.include?("Galarian")
        end 
        return @is_galarian
      end
    end
    and the code:
    Code:
            # Draw shiny icon
            if @pokemon.shiny?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/shiny",80,48,0,0,16,16]])
            end
    turns to:
    Code:
            # Draw shiny icon
            if @pokemon.shiny?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/shiny",80,48,0,0,16,16]])
            end
            # Draw Alolan/Galarian icon
            if @pokemon.isAlolanForm?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/alolan",80,48,0,0,16,16]])
            elsif @pokemon.isGalarianForm?
              pbDrawImagePositions(@overlaysprite.bitmap,[[
                 "Graphics/Pictures/galarian",80,48,0,0,16,16]])
            end

    Also, I told you, you're asking way too many questions in terms of scripting. Are you sure you don't want to recruit someone to work with you?

    Thank You StCooler Again. I m just want some small things that someone can make if they want. I m gonna make my game alone thats why.
     
    I am adding a few icons to some custom forms I made myself and I got everything working except for the icon that needs to appear in battle (like the Shiny icon). I am trying several codes but it still does not appear. I have also tried to follow this thread: (broken link removed) but I still can't seem to get it to work.
     
    I am adding a few icons to some custom forms I made myself and I got everything working except for the icon that needs to appear in battle (like the Shiny icon). I am trying several codes but it still does not appear. I have also tried to follow this thread: (broken link removed) but I still can't seem to get it to work.

    What do you mean it doesn't work? It just doesn't show or it gives you an error?

    You'll have to write similar code in the file PokeBattle_SceneElements, in the function:
    Code:
      def refresh
    You'll have to copy and adapt this code:
    Code:
          # Draw shiny icon
          if @battler.shiny?
            shinyX = (@battler.opposes?(0)) ? 206 : -6   # Foe's/player's
            imagePos.push(["Graphics/Pictures/shiny",@spriteBaseX+shinyX,36])
          end
     
    What do you mean it doesn't work? It just doesn't show or it gives you an error?

    You'll have to write similar code in the file PokeBattle_SceneElements, in the function:
    Code:
      def refresh
    You'll have to copy and adapt this code:
    Code:
          # Draw shiny icon
          if @battler.shiny?
            shinyX = (@battler.opposes?(0)) ? 206 : -6   # Foe's/player's
            imagePos.push(["Graphics/Pictures/shiny",@spriteBaseX+shinyX,36])
          end

    I am now trying to give the alolan forms an icon using the code you posted above. The icon shows up perfectly in the party- and summary screen.The only thing left is to make the icon appear in battle.

    I used the shiny code in PokeBattle_SceneElements as an example and tried to adapt it but i can't get it to show up in battle. So it seems like I'm doing something wrong.
     
    I am now trying to give the alolan forms an icon using the code you posted above. The icon shows up perfectly in the party- and summary screen.The only thing left is to make the icon appear in battle.

    I used the shiny code in PokeBattle_SceneElements as an example and tried to adapt it but i can't get it to show up in battle. So it seems like I'm doing something wrong.

    Make sure you're using @battler.pokemon.isAlolanForm? instead of just @battler.isAlolanForm?. StCooler's code defines alolan forms for PokeBattle_Pokemon objects, but not PokeBattle_Battler objects. So you either need to add new code to define alolan forms in PokeBattle_Battler, or use @battle.pokemon before the alolan function.
     
    Make sure you're using @battler.pokemon.isAlolanForm? instead of just @battler.isAlolanForm?. StCooler's code defines alolan forms for PokeBattle_Pokemon objects, but not PokeBattle_Battler objects. So you either need to add new code to define alolan forms in PokeBattle_Battler, or use @battle.pokemon before the alolan function.

    +1
     
    Make sure you're using @battler.pokemon.isAlolanForm? instead of just @battler.isAlolanForm?. StCooler's code defines alolan forms for PokeBattle_Pokemon objects, but not PokeBattle_Battler objects. So you either need to add new code to define alolan forms in PokeBattle_Battler, or use @battle.pokemon before the alolan function.

    Thanks for the explanation! It works perfectly in battle now.
     
    Back
    Top