Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Need a small edit on this script (Solved), Map name script
Vexus
post Jan 15 2012, 03:49 AM
Post #1


Level 19
Group Icon

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




Hi, I got this script from moghunter and it works fine and all but if I use a picture to make less light in a dungeon the words of the map name show under the picture.

I tried solving it myself as I had the same problem on my custom menu but no matter what I try the words still appear under the picture.

I'm no scripter I know very very very basic lines.

Anyways here's the script:

Clicky
CODE
#_______________________________________________________________________________
# MOG_Window Map Name V1.0            
#_______________________________________________________________________________
# By Moghunter              
#_______________________________________________________________________________
if true # True = Enable / False = Disable (Script)
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF(True - False).
MPNMFD = true
#Fade Time.
MPNMTM = 500
#Window Position.
# 0 = Upper Left.
# 1 = Lower Left.
# 2 = Upper Right.
# 3 = Lower Right.
MPNMPS = 2
# Disable Window Switch.
WM_SWITCH_VIS_DISABLE = 500
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mpmapname"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdtm
attr_accessor :mpnm_x
attr_accessor :mpnm_y
alias mog24_initialize initialize
def initialize
mog24_initialize
@fdtm = MOG::MPNMTM
if MOG::MPNMPS == 0
@mpnm_x = -300
@mpnm_y = 0
elsif MOG::MPNMPS == 1
@mpnm_x = -300
@mpnm_y = 380
elsif MOG::MPNMPS == 2
@mpnm_x = 640
@mpnm_y = 0
else
@mpnm_x = 640
@mpnm_y = 380
end  
end
def mpnm_x
return @mpnm_x
end
def mpnm_y
return @mpnm_y
end
def fdtm
if @fdtm <= 0
@fdtm = 0
end
return @fdtm
end
end
############
# Game_Map #
############
class Game_Map
attr_reader   :map_id  
def mpname
$mpname = load_data("Data/MapInfos.rxdata")
$mpname[@map_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def draw_mpname(x,y)
mapic = RPG::Cache.picture("")    
cw = mapic.width  
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 16 #14
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1)
end
end
##########
# Mpname #
##########
class Mpname < Window_Base
def initialize
super($game_system.mpnm_x, $game_system.mpnm_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpname(10,0)    
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog24_main main
def main
@mpnm = Mpname.new
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false  
end  
mog24_main
@mpnm.dispose
end
alias mog24_update update
def update
mog24_update  
$game_system.mpnm_x = @mpnm.x
$game_system.mpnm_y = @mpnm.y
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false  
end
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1
if @mpnm.x < 0
  @mpnm.x += 8
elsif @mpnm.x >= 0
  @mpnm.x = 0
end  
else
if @mpnm.x > 400
  @mpnm.x -= 8
elsif @mpnm.x <= 400
  @mpnm.x = 400
end    
end
@mpnm.contents_opacity = $game_system.fdtm
if MOG::MPNMFD == true
$game_system.fdtm -= 3
end
end
alias mog24_transfer_player transfer_player
def transfer_player
mog24_transfer_player
if MOG::MPNMPS == 0
$game_system.mpnm_x = -300
$game_system.mpnm_y = 0
elsif MOG::MPNMPS == 1
$game_system.mpnm_x = -300
$game_system.mpnm_y = 380
elsif MOG::MPNMPS == 2
$game_system.mpnm_x = 640
$game_system.mpnm_y = 0
else
$game_system.mpnm_x = 640
$game_system.mpnm_y = 380
end  
@mpnm.y = $game_system.mpnm_y
@mpnm.x = $game_system.mpnm_x
$game_system.fdtm = MOG::MPNMTM
@mpnm.refresh
end
end
end


So anyone could help me make the z angle higher than pictures and is it possible to increase the limit of the words shown before they appear very small?

Thanks.

This post has been edited by Vexus: Jan 16 2012, 01:36 PM


__________________________
Current Project/s:
Go to the top of the page
 
+Quote Post
   
Jens of Zanicuud
post Jan 16 2012, 01:01 PM
Post #2


Dark Jentleman
Group Icon

Group: Local Mod
Posts: 904
Type: Scripter
RM Skill: Skilled
Rev Points: 120




As regards the number of letters displayed, this mod should work...

CODE
###############
# Window Base #
###############
class Window_Base < Window
def draw_mpname(x,y)
mapic = RPG::Cache.picture("")    
cw = mapic.width  
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 16 #14
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 27, 180, 32, $game_map.mpname.to_s,1)   #line modified - width increased
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 26, 180, 32, $game_map.mpname.to_s,1)   #line modified - width increased
end
end


As regards screen_z, just modify the script in this way:

CODE
#############
# Scene_Map #
#############
class Scene_Map
alias mog24_main main
def main
@mpnm = Mpname.new
@mpnm.z = 9999                        #line modified - z increased
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false  
end  
mog24_main
@mpnm.dispose
end


Hope this can help,

Jens


__________________________
"Thorns are the rose's sweetest essence..."
-Jens of Zanicuud


Games I'm working on:
>

official website: TryAdIne eFfeCt

>

Games I worked on (mainly as a scripter):
>
(Warning: it's a 3rr3's project and it's in Italian!)


Awards

Go to the top of the page
 
+Quote Post
   
Vexus
post Jan 16 2012, 01:36 PM
Post #3


Level 19
Group Icon

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




Thanks it worked!

When I tried the z lines they didn't seem to do anything on this script (tough on the menu worked) tongue.gif

Thanks again.


__________________________
Current Project/s:
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 06:46 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker