Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
ChaosBlitz

Rmxp Map name script

Recommended Posts

Hello, is chaos again. well, now i've found somewhat script that i have been looking for.If anyone will like it, I may want to share. this script can make the certain map name appear and pop out on the certain map. Just follow the instruction

below and everything will be find. Honestly, it is not mine, but have fun! :) But i want only just a request from someone that will be a good scripter. Well, I want to add something in the script that will make the certain map name will not appear in the screen and some does as I like. thks :)

 

Instruction:

Insert this script above the Main.

There is only two easy thing u will need to edit. And that is...

 

1# See this one on the script? See on the spoiler below. Change the "Chip Location" To your specific window that will be straight and long and thin one, or that will fit your map name. If you don't have it, just click on this url and right click on the picture and save it. http://yfrog.com/5echiplocationp

 

Now, you have it. Don't forget to import this on the windowskins. And 1 more thing, if you rename the picture you just downloaded now, don't forget to type the name exactly like the same in the "Chip_Location". :)

 

 

 

# pictur loction must be on ( Windowskin )
   BackGroundImage = "Chip_Location"

 

 

If u don't get it, see this on the spoiler below.

 

 


If your picture name is something like "chaos".

# pictur loction must be on ( Windowskin )
   BackGroundImage = "chaos"

 

 

Ok, good to go?

2# if you want to change the invisblility of the window change the opacity of the window to 255.Like this

 

# Opacity of the Hud

Opacity = 255

 

Got it? Ok here's the script.

 

Script

 

 

 


#==============================================================================
# Map_Location
#------------------------------------------------------------------------------
# simple map loction ,iam typr note if you want to changr 
# by Hunter x
# v. 1.0
# http://www.rpgrevolution.com/
#==============================================================================
module LSRS


 module ScriptConfig_001

   # time for the hud hidden
   Timer = 150

   # pictur loction must be on ( Windowskin )
   BackGroundImage = "Chip_Location"

   # Position(3=down 9=up)
   Position = 9

   # Opacity of the Hud
   Opacity = 255

   # Position of the Font (0:Left 1:Midlle 2:right)
   LabelPosition = 1

   # Font Type and Color
   LabelFont = Font.new(["MS UI Gothic", "Tahoma", "Tahoma"])
   LabelFont.color = Color.new(0, 0, 0)
   #LabelFont.size = 22      #Size of the font
   #LabelFont.bold = false   # (true : bold, false :Normal)
   #LabelFont.italic = false # (true : italic, false :Normal)
 end
end

# Dont touch 
class LSRS::Sprite_Location < Sprite
 include LSRS::ScriptConfig_001
 @@cache = {}


 def initialize(text)
   super()
   RPG::Cache.windowskin(BackGroundImage).font = LabelFont
   self.z = 9996
   self.opacity = 0
   @count = 0
   @text = text
   refresh
   set_align
 end


 def update
   if @text != $game_map.map_name
     @text = $game_map.map_name
     refresh
   end
   if $game_system.map_interpreter.running?

     self.opacity -= 24

     @count = 0
   elsif @count.zero?
     self.opacity -= 12
   elsif self.opacity < Opacity
     self.opacity = [self.opacity += 12, Opacity].min
   else
     @count -= 1
   end
 end


 def refresh
   if @text.empty?

     self.visible = false
     return
   end
   if @@cache[@text]
     self.bitmap = @@cache[@text]
   else
     self.bitmap = RPG::Cache.windowskin(BackGroundImage).dup

     self.bitmap.draw_text(self.bitmap.rect, @text, LabelPosition)
     @@cache[@text] = self.bitmap
   end
   self.visible = true
   @count = Timer
 end


 def set_align
   self.x = case Position % 3
     when 1 then 0
     when 2 then 320 - self.width / 2
     else 640 - self.width
   end
   self.y = case Position
     when 1 .. 3 then 480 - self.height
     when 4 .. 6 then 240 - self.height / 2
     else 0
   end
 end


 def height
   self.bitmap ? self.bitmap.rect.height : 0
 end


 def width
   self.bitmap ? self.bitmap.rect.width : 0
 end
end


class Game_Map
 @@mapinfo = load_data("Data/MapInfos.rxdata")


 def map_name(id = @map_id)
   @@mapinfo[id].name.sub(/@.*/, "")
 end
end


class Scene_Map
 alias :main_lsrs1 :main
 alias :update_lsrs1 :update


 def main
   @location_sprite = LSRS::Sprite_Location.new($game_map.map_name)
   main_lsrs1
   @location_sprite.dispose
 end


 def update
   update_lsrs1
   @location_sprite.update
 end
end

 

 

Hope, ya all like it :)

 

And don't forget to tell me how to make the map name unpopping if you know :)

For someone who can not wait this unpopping map name, just erase the map name. :)

Edited by ChaosBlitz

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...