Icon in Map Name Display

● ARCHIVED · READ-ONLY
Started by Tiptank 10 posts View original ↗
  1. When I transfer to another Map I can display its name with map name display. But it seems I can't include any icon. I tried it with \i[X] and \\I[X] but these doesn't work. Is there an other solution?
  2. Thanks. I considered to use this but it gives me an error:

    Script " line 289: TypeError occurred.
    can't convert String into Array
  3. Maybe there's another solution? I'm fine with the default map name display system. I just want to place icons in the map name. Maybe a short snippet will do the trick?
  4. You were right. A small snippet will do
    script
    Code:
    #==============================================================================
    # ★ Icon displayed in Map Name Ver1.0
    #==============================================================================
    =begin
    
      Basically select the icon from your icon sheet and put the number down below
    
    =end
    
    #==============================================================================
    # ★ Editable region
    #==============================================================================
    module R2MAPICON
     
      # Icon number
      Icon = 100
     
    end
    #==============================================================================
    # ★ Script Code
    #==============================================================================
    class Window_MapName < Window_Base
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        contents.clear
        unless $game_map.display_name.empty?
          draw_background(contents.rect)
          draw_icon($game_variables[R2MAPICON::Icon], 0, 0)
          draw_text(contents.rect, $game_map.display_name, 1)
        end
      end
    end
  5. Thanks. :) So can I select more than one icon? Because I have two different kind of stages in my game, so it would be important that I can select different icons for them, depending if it is a defense stage or an offensive stage.
  6. You will need to set the number in the variable you select.
    Roninator2 Map Icon script
    Code:
    #==============================================================================
    # ★ Icon displayed in Map Name Ver1.0
    #==============================================================================
    =begin
    
      Basically select the icon from your icon sheet and put the number down below
     
    =end
    
    #==============================================================================
    # ★ Editable region
    #==============================================================================
    module R2MAPICON
     
      # Icon number Variable
      IconVar = 1
     
    end
    #==============================================================================
    # ★ Script Code
    #==============================================================================
    class Window_MapName < Window_Base
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        contents.clear
        unless $game_map.display_name.empty?
          draw_background(contents.rect)
          draw_icon($game_variables[R2MAPICON::IconVar], 0, 0)
          draw_text(contents.rect, $game_map.display_name, 1)
        end
      end
    end
  7. This line:
    Spoiler
    Code:
    draw_text(contents.rect, draw_icon($game_variables[R2MAPICON::IconVar], 0, 0), 1)
    Should just be this instead:
    Spoiler
    Code:
    draw_icon($game_variables[R2MAPICON::IconVar], 0, 0)
  8. Sixth said:
    Should just be this instead:
    Thanks, obviously wasn't thinking
  9. Thank you very much, it works perfectly. :)