Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Closed TopicStart new topic
> Map Name Pop-up Script
GREYHOUND
post Mar 9 2008, 06:27 AM
Post #1


Level 10
Group Icon

Group: Banned
Posts: 165
Type: Developer
RM Skill: Skilled




Back again...Apologizing if I'm posting this again...

and yeah its from RMXP...

Here's the script again...

[Show/Hide] THe THing
CODE
#=========================================================================
=====
# ** Map Name Popup
#------------------------------------------------------------------------------
#  © Dargor, 2008
#  06/03/08
#  Version 1.0
#------------------------------------------------------------------------------
#  INSTRUCTIONS:
#   - Paste this above main
#   - Edit the Exclude_Maps array in the Map_Name_Popup module
#  VERSION HISTORY:
#   - 1.0 (06/03/08), Initial release
#==============================================================================

#==============================================================================
#  ** Map Name Popup Configuration
#==============================================================================

module Map_Name_Popup
  # These maps will not popup the name window
  Exclude_Maps = [2,3]
end

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :show_name
  #--------------------------------------------------------------------------
  # Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_map_name_window_setup setup
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    dargor_map_name_window_setup(map_id)
    @show_name = true
  end
  #--------------------------------------------------------------------------
  # * Get Map ID
  #--------------------------------------------------------------------------
  def name
    map_infos = load_data("Data/MapInfos.rvdata")
    name = map_infos[@map_id].name
    name.gsub!(/\\N\[([0-9]+)\]/i) { $game_actors[$1.to_i].name }
    return name
  end
end

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # Alias Listing
  #--------------------------------------------------------------------------
  alias dargor_spriteset_name_window_initialize initialize
  alias dargor_spriteset_name_window_update update
  alias dargor_spriteset_name_window_dispose dispose
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    create_windows
    dargor_spriteset_name_window_initialize
    update
  end
  #--------------------------------------------------------------------------
  # * Create Windows
  #--------------------------------------------------------------------------
  def create_windows
    @name_window = Window_MapName.new
    if $game_map.show_name
      @name_window.show_name($game_map.name, 128)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    dargor_spriteset_name_window_update
    @name_window.update
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    dargor_spriteset_name_window_dispose
    @name_window.dispose
  end
end

#==============================================================================
# ** Window_MapName
#------------------------------------------------------------------------------
#  This window shows the map name when the player is transfered.
#==============================================================================

class Window_MapName < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(name="", count=128)
    super(0, 0, 544, 64)
    self.visible = false
    self.openness = 0
    @name = name
    @count = count
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #return unless $game_map.display_name
    self.visible = true
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0,0,504,32,@name,1)
    $game_map.show_name = false
  end
  #--------------------------------------------------------------------------
  # * Show Name
  #--------------------------------------------------------------------------
  def show_name(name=@name, count=@count)
    return if Map_Name_Popup::Exclude_Maps.include?($game_map.map_id)
    @name = name
    @count = count
    refresh
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    unless $scene.is_a?(Scene_Map)
      self.visible = false
      return
    end
    if self.visible
      if @count == 0
        self.openness -= 24
        self.visible = false if self.openness == 0
        return
      end
      self.openness += 24
      @count -= 1
    end
  end
end


Again HOpe ya LIke it alll!
Reason for edit: Fixing the codebox(puppeto4)


__________________________
Greyhound of mighty earth
Knowledge is my food
Knowledge I must consume
Give me some Knowledge dude
Or go begging in my toom...

Which Final Fantasy Character Are You?
Final Fantasy 7
Current Project:
RMVX - TeamUp 43321 = 5%
Making a new RPG Maker need support from members who are willing to help...
Go to the top of the page
 
+Quote Post
   
snstar2006
post Mar 9 2008, 06:32 AM
Post #2


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




no indention
what a mess

so much unnecessary variables

and it's kinda ugly and stupid to have such a big window for such short name
plus it stays at top

can't you make it a dynamic one??
Go to the top of the page
 
+Quote Post
   
GREYHOUND
post Mar 9 2008, 01:57 PM
Post #3


Level 10
Group Icon

Group: Banned
Posts: 165
Type: Developer
RM Skill: Skilled




I'll ask the creator of the script later...


__________________________
Greyhound of mighty earth
Knowledge is my food
Knowledge I must consume
Give me some Knowledge dude
Or go begging in my toom...

Which Final Fantasy Character Are You?
Final Fantasy 7
Current Project:
RMVX - TeamUp 43321 = 5%
Making a new RPG Maker need support from members who are willing to help...
Go to the top of the page
 
+Quote Post
   
PhantomH
post Mar 9 2008, 03:34 PM
Post #4


Ushiromiya Battler
Group Icon

Group: Revolutionary
Posts: 758
Type: Writer
RM Skill: Skilled




You forgot to mention that this script also features the ability to display actor names if you used actor ID's in map names (For games that lets you rename characters). That idea from this script was actually inspired by me (In the original topic on RMXP, Dargor mentions that Hero gave him the idea of using actor IDs in map names since I requested a script that allows actor names to be shown in maps without using the default name) but I was pretty surprised that my request actually went through.


__________________________
Go to the top of the page
 
+Quote Post
   
GREYHOUND
post Mar 10 2008, 03:17 AM
Post #5


Level 10
Group Icon

Group: Banned
Posts: 165
Type: Developer
RM Skill: Skilled




What does that mean?


__________________________
Greyhound of mighty earth
Knowledge is my food
Knowledge I must consume
Give me some Knowledge dude
Or go begging in my toom...

Which Final Fantasy Character Are You?
Final Fantasy 7
Current Project:
RMVX - TeamUp 43321 = 5%
Making a new RPG Maker need support from members who are willing to help...
Go to the top of the page
 
+Quote Post
   
PhantomH
post Mar 10 2008, 01:32 PM
Post #6


Ushiromiya Battler
Group Icon

Group: Revolutionary
Posts: 758
Type: Writer
RM Skill: Skilled




It means that when you put \n[1] in the map name, then when the map name window comes out inside the game, it'll show the first character's name along with the map name.

Ex: \n[1] House would say "Ralph's House".


__________________________
Go to the top of the page
 
+Quote Post
   
snstar2006
post Mar 11 2008, 01:19 PM
Post #7


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




i have never thought of that, but it is a prettey easy function, all you have to do is replace \n[1] with the actor's name

but i would like to have is the window's width to be dynamic

just get the length of the string to be shown in the window then change the length of the window width to that length+32

BTW, can I post this script in another forum (also make some changes in it)?
Go to the top of the page
 
+Quote Post
   
PhantomH
post Mar 12 2008, 12:02 AM
Post #8


Ushiromiya Battler
Group Icon

Group: Revolutionary
Posts: 758
Type: Writer
RM Skill: Skilled




The actor name ID was there for people who allows their characters to be renamed. For example, both the male and female main character in my game project don't have a default name (For the purpose that the player will feel more like the character they're controlling since I'm trying to make the game as interactive as possible) so you must pick a name for them. And then you get to name your property, which I use the name of that property the map.

As for editting the script, you need to contact Dargor (The one who made the script) first. He hangs around on rmxp.org so look for him in the forums there.


__________________________
Go to the top of the page
 
+Quote Post
   
Bt255
post May 25 2008, 11:21 AM
Post #9


Level 4
Group Icon

Group: Member
Posts: 56
Type: Writer
RM Skill: Skilled




This works great, but I'm trying to get it so only the outside in the town has the map popup. So In an town, none of the houses, or shops would say anything, just the town name when you enter it or leave a building back into it. Can anyone help me with this?


__________________________
Current Projects:

Moonlight Dreams-Paused

Shimmering Darkness-In Progress




Moonlight Dreams Preview <--------Check it out
!!!
Go to the top of the page
 
+Quote Post
   
YanXie
post May 25 2008, 03:47 PM
Post #10


Because Tomorrow Will Surely Come...
Group Icon

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled




Put the map ID that you don't want to have the pop up show in this :

CODE
Exclude_Maps = []


Example, you don't want the map name pop up in map 20 and 34 :

CODE
Exclude_Maps = [20, 34]


cheers, puppeto4. wink.gif


__________________________
how make teleport to graveyard then your character die?

AWAY FOR VACATION.
NOT HERE UNTIL JAN/FEB 2010 -w-/
Go to the top of the page
 
+Quote Post
   
Tris
post Jun 10 2008, 03:26 PM
Post #11


Level 7
Group Icon

Group: Member
Posts: 97
Type: Scripter
RM Skill: Beginner




This dont even work for me?
Go to the top of the page
 
+Quote Post
   
Phili
post Jul 2 2008, 11:08 AM
Post #12


Level 2
Group Icon

Group: Member
Posts: 22
Type: Artist
RM Skill: Advanced




Looks like the guy who post this don't know about the scripts he post... maybe we should talk to the one who built up the script


__________________________
[font="Franklin Gothic Medium"][/font]Philou
Go to the top of the page
 
+Quote Post
   
ddescallar
post Jul 18 2008, 08:23 PM
Post #13


Level 1
Group Icon

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




for anyone who is having trouble with:

1. WINDOW SIZE
2. WINDOW POSITION
3.TEXT POSITION

[Show/Hide] Refer to this script to edit the window size and position
def initialize(name="", count=128)
super(0, 0, 300, 64)
self.visible = false
self.openness = 0
@name = name
@count = count
end


[Show/Hide] and to this script for the text position
def refresh
#return unless $game_map.display_name
self.visible = true
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0,0,300,WLH,@name,1)
$game_map.show_name = false
end


don't bother reading this if you already know how tongue.gif
Go to the top of the page
 
+Quote Post
   
bleachx
post Jul 19 2008, 02:07 AM
Post #14


Level 4
Group Icon

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




good...i use it!!
Go to the top of the page
 
+Quote Post
   
JoRu
post Jul 19 2008, 02:52 AM
Post #15


The 15-year old Swedish Meatball
Group Icon

Group: Revolutionary
Posts: 280
Type: Developer
RM Skill: Advanced




I can change the X-position of the window but not Y. I've tried several things but I still can't do that. Does someone know why?


__________________________


Stay tuned for more information about Fairytale. To stay updated on all my project videos, visit my YouTube page!

QUOTE (JoRu)
Life is a game!
Go to the top of the page
 
+Quote Post
   
Aleema
post Aug 5 2008, 12:10 PM
Post #16



Group Icon

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




QUOTE (JoRu @ Jul 19 2008, 05:14 AM) *
I can change the X-position of the window but not Y. I've tried several things but I still can't do that. Does someone know why?

Works for me. Edit the second variable of "super(x, y, width, height)" under 'Object Initialization'.

To the scripter -- thanks for the script! It works beautifully and was just what I needed. MOG's map name displayer is pretty, but doesn't overlap everything like a message box does.
Thanks!
Go to the top of the page
 
+Quote Post
   
bryce6250
post Mar 10 2009, 05:05 PM
Post #17



Group Icon

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




This sux it didn't even work find a new job sad.gif
Go to the top of the page
 
+Quote Post
   
HeroOfHyla
post Mar 10 2009, 05:52 PM
Post #18


Twirling towards freedom
Group Icon

Group: +Gold Member
Posts: 2,791
Type: Scripter
RM Skill: Advanced




...what?
Please don't post in threads this old, unless you have real questions for the script creator.

lock.gif


__________________________
Asexual - Arizonan - Atheist
I've got a gmail account and a yahoo mail account under this name, if you need to contact me.
You can find me on facebook too. facebook.com/heroofhyla . If you send me a friend request, tell me who you are so I don't get confused.

PlagueRPG SITE IS WORKING! (if you see "test page," hit ctrl+f5)
Latest update: New battle system demo, April 19, 2010

http://heroofhyla.deviantart.com/ ----- http://heroofhyla.livejournal.com/ ----- http://thatonecomic.smackjeeves.com
Go to the top of the page
 
+Quote Post
   

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 - 10:18 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker