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

Type-based TM/HM Icons

1,224
Posts
10
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:
    81
    Posts
    8
    Years
    • Seen Sep 7, 2019
    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