• 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!
  • Akari, Red, Kris, May - which Pokémon protagonist is your favorite? Let us know by voting in our semifinal 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.

Type-based TM/HM Icons

  • 1,189
    Posts
    11
    Years
    This script makes TM/HM icons automatically chosen, based on type. Meaning if you add or change moves you don't have to mess around with their item icons, just delete them and keep these. However, if it finds an icon for the specific item first, it uses that one (in case you want special icons or something).

    Download Icons here, put in Graphics/Icons folder (unpacked)

    When copying and pasting scripts from pokecommunity, use Thread Tools -> Printable Version
    There is a formatting problem that breaks some scripts. If you encounter a "Syntax error", your lack of reading this warning is most likely the cause.

    Add this in a new section above the main (and below PSystem_Utilities)

    Code:
    def pbItemIconFile(item)
      return nil if !item
      bitmapFileName=nil
      if item==0
        bitmapFileName=sprintf("Graphics/Icons/itemBack")
      else
        bitmapFileName=sprintf("Graphics/Icons/item%s",getConstantName(PBItems,item)) rescue nil
        if !pbResolveBitmap(bitmapFileName)
          bitmapFileName=sprintf("Graphics/Icons/item%03d",item)
        end
      end
      if pbIsMachine?(item) && !pbResolveBitmap(bitmapFileName)
        move = PBMoveData.new($ItemData[item][ITEMMACHINE])
        typeid = move.type
        type=getConstantName(PBTypes,typeid)
        bitmapFileName=sprintf("Graphics/Icons/TM_%s",type)
      end
      return bitmapFileName
    end
     
    Last edited:
    I get no errors but when I take the png's out of the rar file into Icons it still dosnt show. And yes I did copy in the printable version.
     
    Back
    Top