The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: fadark on February 04, 2007, 02:01:50 AM

Title: Does anyone have.....
Post by: fadark on February 04, 2007, 02:01:50 AM
I need a script that makes it so: In the top left corner of the screen, there is a box that counts how much money you have (money counter). But I need it to say "Points" instead of "money". I also need a box to the right of the money counter that shows the name of the map that you are in.

Can anyone make me a script that does this?
Title: Re: Does anyone have.....
Post by: italianstal1ion on February 04, 2007, 06:36:14 AM
Here ya go :D If you need the window bigger or anything just say so;
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi92.photobucket.com%2Falbums%2Fl14%2Fitalianstal1ion%2FbasicJHUD.jpg&hash=bac47d29ebec69269593c7ac82c2ce949c3c1d94)
#==============================================================================
#  Basic HUD Window
#------------------------------------------------------------------------------
# By Italianstal1ion - thanks yeyinde for tutorial!
#==============================================================================


class Window_MGHUD < Window_Base
  def initialize
    super(0, 0, 340, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 145 #sets how transparent the window is
    refresh
  end
  def refresh
    self.contents.clear
   
    # Displays Gold
    self.contents.font.size = 18
    self.contents.font.color = normal_color
    self.contents.draw_text(-14, -8, 120, 32, $game_party.gold.to_s, 2)
    #Show Map Name
    map_infos = load_data("Data/MapInfos.rxdata")
    name = map_infos[$game_map.map_id].name.to_s
    self.contents.draw_text(148, -8, 180, 32, name.to_s)
   
    self.contents.font.color = system_color
    self.contents.draw_text(-80, -8, 120, 32, $data_system.words.gold, 2)
    self.contents.draw_text(112, -8, 120, 32, "Map:")

  end
  def update
    super
    refresh
  end
end

class Scene_Map
  alias mghud_main main
  alias mghud_update update
  def main
    @mghud = Window_MGHUD.new
    mghud_main
    @mghud.dispose
  end
  def update
    @mghud.update
    mghud_update
  end
end


50 lines :D
Title: Re: Does anyone have.....
Post by: fadark on February 04, 2007, 04:01:14 PM
This rocks! but could you make the

location window a tiny bit bigger?
can you put it below the money counter?
And can you make it so it doesn't say anything. instead of saying "map"?

thanks in advance :)
Title: Re: Does anyone have.....
Post by: italianstal1ion on February 04, 2007, 07:06:50 PM
#==============================================================================
#  Basic HUD Window
#------------------------------------------------------------------------------
# By Italianstal1ion - thanks yeyinde for tutorial!
#==============================================================================


class Window_MGHUD < Window_Base
  def initialize
    super(0, 0, 340, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 145 #sets how transparent the window is
    refresh
  end
  def refresh
    self.contents.clear
   
    # Displays Gold
    self.contents.font.size = 18
    self.contents.font.color = normal_color
    self.contents.draw_text(12, -8, 120, 32, $game_party.gold.to_s, 2)
    #Show Map Name
    map_infos = load_data("Data/MapInfos.rxdata")
    name = map_infos[$game_map.map_id].name.to_s
    self.contents.draw_text(0, 8, 340, 32, name.to_s)
    self.contents.font.color = system_color
    self.contents.draw_text(-76, -8, 120, 32, $data_system.words.gold, 2)

  end
  def update
    super
    refresh
  end
end

class Scene_Map
  alias mghud_main main
  alias mghud_update update
  def main
    @mghud = Window_MGHUD.new
    mghud_main
    @mghud.dispose
  end
  def update
    @mghud.update
    mghud_update
  end
end

:atma:
Title: Re: Does anyone have.....
Post by: fadark on February 05, 2007, 12:26:56 AM
QuoteBut I need it to say "Points" instead of "money"

The script you game me doesn't say anything next to my money.

Here's the format:

--------------------------|
"Points:" [amount of gold]|
-----------------------------------------
      [name of map that I am in]         |
-----------------------------------------


(anything in quotation marks I want to say all the time, no matter how much gold I have)



You got most of it right on target though! :)
Title: Re: Does anyone have.....
Post by: italianstal1ion on February 05, 2007, 12:40:28 AM
Ok yeah, you gotta set the gold words in the database systems tab.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi92.photobucket.com%2Falbums%2Fl14%2Fitalianstal1ion%2Fex.jpg&hash=c589b94839ae5251358495482e3f950ac3b08f65)
Title: Re: Does anyone have.....
Post by: fadark on February 05, 2007, 11:01:20 PM
Okay! thanks! You rock! I have only finished level 4 on it, but if you want a beta when I finish level 10 then you got it. I think there is going to be like 25-50 levels in it. (I know thats a big range but I have chosen:

the minimum amount of level to be: 25
Maximum: 50
Title: Re: Does anyone have.....
Post by: italianstal1ion on February 06, 2007, 12:16:13 AM
ok what your game?

Ill check it out later maybe
Title: Re: Does anyone have.....
Post by: fadark on February 06, 2007, 02:35:38 AM
i have no posted a beta yet (because i'm only done with level 8). after i finish level 10 you can have a beta
Title: Re: Does anyone have.....
Post by: fadark on February 10, 2007, 03:42:24 PM
I finished level 17. How do I post a beta?