Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Closed TopicStart new topic
> Map Loction HUD
hunter x
post Jun 16 2008, 05:06 AM
Post #1



Group Icon

Group: Member
Posts: 3
Type: Artist
RM Skill: Beginner




Hi evry body.....

this my first script ihave made it so simple it show map loction , you need these pictur for the Hud:


Image:


Demo:
Idon't thinj it need Demo rolleyes.gif .

Script:

post it above main and change name to Map_Loction.
[Show/Hide] The Script
CODE
#==============================================================================
# Map_Loction
#------------------------------------------------------------------------------
# simple map loction ,iam typr note if you want to changr happy.gif
# 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 = 155
    
    # 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 happy.gif
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


Note:Iam Arbic one so ican't type English very well.

Hopw it usefull. laugh.gif
Go to the top of the page
 
+Quote Post
   
KDawg08
post Jun 16 2008, 11:06 PM
Post #2



Group Icon

Group: Member
Posts: 4
Type: Event Designer
RM Skill: Skilled




I'm new to this stuff but I've been downloading ALOT of tutorials, and I am using this in my game. Thanks, I'm loving how it is setup smile.gif
Go to the top of the page
 
+Quote Post
   
Josuec
post Aug 9 2009, 05:31 PM
Post #3



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Skilled




Thank you very much, it works . !
cool.gif
Go to the top of the page
 
+Quote Post
   
Gary The Duck
post Aug 29 2009, 03:21 AM
Post #4


Level 1
Group Icon

Group: Member
Posts: 7
Type: Mapper
RM Skill: Skilled




Nice, thank you!


__________________________
Go to the top of the page
 
+Quote Post
   
cupski
post Jan 24 2010, 12:29 AM
Post #5


Level 1
Group Icon

Group: Member
Posts: 13
Type: Event Designer
RM Skill: Beginner




Great!
Thank!


__________________________
The XxXX
:P
Go to the top of the page
 
+Quote Post
   
Seitei Son Goku
post Apr 5 2010, 10:40 PM
Post #6


Level 1
Group Icon

Group: Member
Posts: 13
Type: Writer
RM Skill: Intermediate




A pretty useful script! Indeed, a life saver for parts of the game where you NEED to know where you are! Thanks! cool.gif


__________________________
If you need help or tips with your games storyline, character texts, or even the build of your credits, PM or Email me!

QUOTE
No one person can do everything, but everyone can do something...
Go to the top of the page
 
+Quote Post
   
ragnaroc444
post Apr 9 2010, 03:44 AM
Post #7


Level 6
Group Icon

Group: Member
Posts: 81
Type: Developer
RM Skill: Beginner




QUOTE (Seitei Son Goku @ Apr 6 2010, 04:40 PM) *
A pretty useful script! Indeed, a life saver for parts of the game where you NEED to know where you are! Thanks! cool.gif



sweet hey can you also change the pic for the map name to whatever you want with the same dimensions and same name?


__________________________
ADD THIS TO YOUR SIG IF YOU PLAYED OR LIKE KINGDOM HEARTS




[Show/Hide] RAGNAROC444 IS SORA




[Show/Hide] GAME PROGRESS
Go to the top of the page
 
+Quote Post
   
FlippedSided
post Apr 14 2010, 02:27 PM
Post #8


"I too, am a total frickin' rockstar from mars"
Group Icon

Group: Revolutionary
Posts: 164
Type: Mapper
RM Skill: Intermediate




Wow this is great and works perfectly. However I would like to cut down the time that its displayed in the top right corner. How do i do this? Also how can i change where its displayed? (For example if i wanted it to be in the top left corner)

This post has been edited by Crazygi: Apr 14 2010, 02:27 PM


__________________________
Man it has been ages since I last came on this site xD. But with the recent (localized) release of RPG maker VX Ace (and thanks to a bit of money I recently came into possession of ^_^) how could I stay away?? :).
But its been a good 2 years since I updated my profile (seeing as my about me page said I was 15, when im now 17 years of age).
Well anyway glad to be back :). I probably wont be a commonly seen face (or... profile) but I hope to prolong my stay :). And yes my signature is the same as my about me page, mainly due to the fact that im lazy ;D.
Go to the top of the page
 
+Quote Post
   
Legacy
post Apr 14 2010, 02:47 PM
Post #9


B★RS Coding Ninja
Group Icon

Group: Global Mod
Posts: 1,414
Type: Scripter
RM Skill: Advanced
Rev Points: 15




@ragnaroc444

yes you can, all you have to do is place the new file in the windowskin flder, and either name it "Chip_Location" or edit the script here. To be the name of the file.

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



@Crazygi

look at these: It explians it pretty well, if you read the comments happy.gif

CODE
    # time for the hud hidden
    Timer = 150
    
    # Position(3=down 9=up)
    Position = 9

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


This post has been edited by LegACy: Apr 14 2010, 02:50 PM


__________________________
Freelance Programmer (C#, C++, Ruby)
#onegameamonth


Have you seen the new Unity3D sections?..
Unity 3D Discussion
Unity Script Development
Unity Projects
Go to the top of the page
 
+Quote Post
   
FlippedSided
post Apr 14 2010, 02:51 PM
Post #10


"I too, am a total frickin' rockstar from mars"
Group Icon

Group: Revolutionary
Posts: 164
Type: Mapper
RM Skill: Intermediate




QUOTE (LegACy @ Apr 14 2010, 11:47 PM) *
look at these: It explians it pretty well, if you eread the comments happy.gif

CODE
    # time for the hud hidden
    Timer = 150
    
    # Position(3=down 9=up)
    Position = 9

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


Oooooh okay happy.gif . Thanks happy.gif . TBH, didnt really read through the script as most of the stuff dont make too much sense to me. Luckily that does though laugh.gif . Thanks

QUOTE (ragnaroc444 @ Apr 9 2010, 12:44 PM) *
sweet hey can you also change the pic for the map name to whatever you want with the same dimensions and same name?


Yes you can. I made a quick one myself and it had no problems happy.gif . Just remember you have to import it to window skins in the resources and correctly set the transparent and semi-transparent colours. I suggest you load the original image so you quickly have the right size to work with.
Oh and also make sure you either:
Call your design: Chip_Location which means you cant save each design you make into the same folder
or a better alternative,
In the script, close to the top, where it says:
CODE
BackGroundImage = "Chip_Location"
just simply change the name Chip_Location to whatever you name your design. (Make sure to leave in the: " " ). For example:
CODE
BackGroundImage = "My_Design1"

BTW love this script. Gonna use it in everything i make biggrin.gif

This post has been edited by Crazygi: Apr 14 2010, 02:55 PM


__________________________
Man it has been ages since I last came on this site xD. But with the recent (localized) release of RPG maker VX Ace (and thanks to a bit of money I recently came into possession of ^_^) how could I stay away?? :).
But its been a good 2 years since I updated my profile (seeing as my about me page said I was 15, when im now 17 years of age).
Well anyway glad to be back :). I probably wont be a commonly seen face (or... profile) but I hope to prolong my stay :). And yes my signature is the same as my about me page, mainly due to the fact that im lazy ;D.
Go to the top of the page
 
+Quote Post
   
dsoulja85
post Apr 21 2010, 01:46 PM
Post #11


Level 10
Group Icon

Group: Revolutionary
Posts: 160
Type: Developer
RM Skill: Skilled




SWEET!!, this is exactly what i was looking for! I will surely give you props for this in my credits ^^. i was searching everwhere for an "XP" Graphical location map script, this didnt come up in the google search though !! rolleyes.gif 1 question, could you customize the dimensions of the graphic if you wanted a different sized picture? thanks again,
Go to the top of the page
 
+Quote Post
   
Mataris
post Apr 24 2010, 11:15 PM
Post #12


Level 5
Group Icon

Group: Member
Posts: 73
Type: None
RM Skill: Intermediate




Sweet this is perfect only thing i would like is a different Backround but i bet i can find one somewhere that will siut me mad props to you, thank you very much.
Go to the top of the page
 
+Quote Post
   
Locke
post Apr 30 2010, 11:34 PM
Post #13


Level 10
Group Icon

Group: Revolutionary
Posts: 151
Type: Mapper
RM Skill: Intermediate




Oh boy! This is better and it works too. I'm happy with it

SALUTE!!


__________________________
We are one (Really i,m not joking)



I've seen many things when mankind rule the land


Which Final Fantasy Character Are You?
Go to the top of the page
 
+Quote Post
   
Crossknive
post May 3 2010, 09:38 AM
Post #14



Group Icon

Group: Member
Posts: 4
Type: None
RM Skill: Undisclosed




How come when I change the map I'm in it goes away and doesn't come back?
Go to the top of the page
 
+Quote Post
   
Scriptless
post May 3 2010, 12:01 PM
Post #15


Level 1337
Group Icon

Group: Banned
Posts: 1,664
Type: Writer
RM Skill: Intermediate




If you want the map HUD to look like a default window change the opacity to 255.

# Opacity of the Hud
Opacity = 255


__________________________
I'm not dead. Thanks.
Go to the top of the page
 
+Quote Post
   
YoshidudeEx
post Jul 10 2010, 05:37 PM
Post #16


Level 3
Group Icon

Group: Member
Posts: 30
Type: Developer
RM Skill: Skilled




Thank you. I been looking almost everywhere for this! biggrin.gif


__________________________
This world. Is not mean't to be ruled. It's ment to be free. I will save all I can to save the world of Light. The world in which you live in. With the powers I have. I will protect the world of Dawn, Earth and the world of dusk, my world.

Many think that the ones from the world of Dusk are evil but it's not true. The world of dusk has some that aren't evil and try to save the worlds. Fire and Dark aren't evil. Not everything of one is evil.

There's always good in one species.


Go to the top of the page
 
+Quote Post
   
drakiyth
post Aug 12 2010, 03:54 PM
Post #17


Level 3
Group Icon

Group: Member
Posts: 44
Type: None
RM Skill: Advanced




This is a nice script and all but you need to make a way of turning it on/off immediately before a map zone. The problem I'm having is my introduction is totally screwed up with this because it's ALWAYS on. Hunter, do you think you could fix this to work with a switch or something?
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Aug 13 2010, 12:23 AM
Post #18


Level 50
Group Icon

Group: +Gold Member
Posts: 1,523
Type: Scripter
RM Skill: Undisclosed




@> drakiyth: Give edit this a go:
[Show/Hide] Hide-able Edit
CODE
#==============================================================================
# Map_Loction
#------------------------------------------------------------------------------
# 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
    
    # hide location switch
    OffSwitch = 1
    
    # 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 = 155
    
    # 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_switches[OffSwitch]
      return @count = self.opacity = 0
    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


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
blakerrdurr
post Aug 14 2010, 10:53 AM
Post #19


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Skilled




I'm having a similar problem but the opposite effect.
During my introduction the script doesn't take effect which is good but then when you get to move and actually play the script still doesn't take effect. But when I make the starting position somewhere random without the into it works again but is cut off if there is another event happening.
This is a great script but I need it to not show up during my intro and then start working afterwards. Would this be possible?
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Aug 14 2010, 08:34 PM
Post #20


Level 50
Group Icon

Group: +Gold Member
Posts: 1,523
Type: Scripter
RM Skill: Undisclosed




Yup, completely possible smile.gif Just needs a bit of editing smile.gif

[Show/Hide] blakerrdurr's edit
CODE
#==============================================================================
# Map_Loction
#------------------------------------------------------------------------------
# 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
    
    # hide location switch
    OffSwitch = 1
    
    # 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 = 155
    
    # 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
    @has_shown = false
  end
  
  
  def update
    if $game_switches[OffSwitch]
      self.opacity = 0
      @count = 0
      return
    end
    if not @has_shown and not $game_switches[OffSwitch]
      @count = Timer
    end
    if @text != $game_map.map_name
      @text = $game_map.map_name
      refresh
    end
    if @count.zero?
      self.opacity -= 12
    elsif self.opacity < Opacity
      @has_shown = true
      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


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 12:21 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker