Icon in Map Name Display

Tiptank

Villager
Member
Joined
Aug 26, 2018
Messages
23
Reaction score
1
First Language
German
Primarily Uses
RMVXA
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?
 

Tiptank

Villager
Member
Joined
Aug 26, 2018
Messages
23
Reaction score
1
First Language
German
Primarily Uses
RMVXA
Thanks. I considered to use this but it gives me an error:

Script " line 289: TypeError occurred.
can't convert String into Array
 

Tiptank

Villager
Member
Joined
Aug 26, 2018
Messages
23
Reaction score
1
First Language
German
Primarily Uses
RMVXA
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?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
You were right. A small snippet will do
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
 
Last edited:

Tiptank

Villager
Member
Joined
Aug 26, 2018
Messages
23
Reaction score
1
First Language
German
Primarily Uses
RMVXA
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.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,674
Reaction score
566
First Language
English
Primarily Uses
RMVXA
You will need to set the number in the variable you select.
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
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
This line:
Code:
draw_text(contents.rect, draw_icon($game_variables[R2MAPICON::IconVar], 0, 0), 1)
Should just be this instead:
Code:
draw_icon($game_variables[R2MAPICON::IconVar], 0, 0)
 

Tiptank

Villager
Member
Joined
Aug 26, 2018
Messages
23
Reaction score
1
First Language
German
Primarily Uses
RMVXA
Thank you very much, it works perfectly. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top