VX 스크립트

HUD
2010.10.03 15:55

맵 이름 스크립트

조회 수 4365 추천 수 0 댓글 21
Atachment
첨부 '2'

#_______________________________________________________________________________
# MOG_Location_Name_VX V1.0           
#_______________________________________________________________________________
# By Moghunter      
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Apresenta uma janela com o nome do map.
# É necessário ter uma imagem com o nome de  MAPNAME
# dentro da pasta Graphics/System.
#_______________________________________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF(True - False).
MPNMFD = true
#Fade Time.
MPNMTM = 10
#Window Position.
# 0 = Upper Left.
# 1 = Lower Left.
# 2 = Upper Right.
# 3 = Lower Right.
MPNMPS = 2
# Disable Switch(ID).
WM_SWITCH_VIS_DISABLE = 15
end
#_________________________________________________
###############
# Game_System #
###############
class Game_System
attr_accessor :fdtm
attr_accessor :mpnm_x
attr_accessor :mpnm_y
alias mog_vx06_initialize initialize
def initialize
mog_vx06_initialize
@fdtm = 255 + 40 * MOG::MPNMTM
if MOG::MPNMPS == 0
@mpnm_x = -300
@mpnm_y = 0
elsif MOG::MPNMPS == 1
@mpnm_x = -300
@mpnm_y = 320
elsif MOG::MPNMPS == 2
@mpnm_x = 640
@mpnm_y = 0
else
@mpnm_x = 640
@mpnm_y = 320
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.rvdata")
$mpname[@map_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_mapic
mapic = Cache.system("")    
end 
def draw_mpname(x,y)
mapic = Cache.system("Mpname") rescue nd_mapic  
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 = 22
self.contents.font.bold = true
self.contents.font.shadow = true
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(x , y)
super($game_system.mpnm_x, $game_system.mpnm_y, 250, WLH + 70)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpname(10,0)   
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog_vx06_start start
def start
@mpnm = Mpname.new($game_system.mpnm_x, $game_system.mpnm_y)
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false 
end 
mog_vx06_start 
end 
alias mog_vx06_terminate terminate
def terminate
mog_vx06_terminate
@mpnm.dispose
end
alias mog_vx06_update update
def update
mog_vx06_update 
location_name_update
end
def location_name_update
$game_system.mpnm_x = @mpnm.x
$game_system.mpnm_y = @mpnm.y
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == true or $game_system.fdtm <= 0
@mpnm.visible = false 
else
@mpnm.visible = true
end
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1
if @mpnm.x < 0
@mpnm.x += 5
elsif @mpnm.x >= 0
@mpnm.x = 0
end  
else
if @mpnm.x > 300
@mpnm.x -= 5
elsif @mpnm.x <= 300
@mpnm.x = 300
end    
end
@mpnm.contents_opacity = $game_system.fdtm
if MOG::MPNMFD == true
$game_system.fdtm -= 3
end
end
alias mog_vx06_update_transfer_player update_transfer_player
def update_transfer_player
return unless $game_player.transfer?
@mpnm.contents_opacity = 0
mog_vx06_update_transfer_player
if MOG::MPNMPS == 0
$game_system.mpnm_x = -340
$game_system.mpnm_y = 0
elsif MOG::MPNMPS == 1
$game_system.mpnm_x = -340
$game_system.mpnm_y = 320
elsif MOG::MPNMPS == 2
$game_system.mpnm_x = 640
$game_system.mpnm_y = 0
else
$game_system.mpnm_x = 640
$game_system.mpnm_y = 320
end 
@mpnm.y = $game_system.mpnm_y
@mpnm.x = $game_system.mpnm_x
$game_system.fdtm = 255 + 60 * MOG::MPNMTM
@mpnm.refresh
end
end
$mogscript = {} if $mogscript == nil
$mogscript["location_name_vx"] = true

 

맨 위에 있는 사진을 GraphicsSystem에 저장하면  그림과 같이 뜹니다.

(태스트 사진은 첨부로 ^ ^)

 


 

Comment '21'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
517 기타 Kylock 밤낮 스크립트 부분 한글화 + 달력 모드 (모드는 자작) 31 file RMdude 2009.02.15 4100
516 기타 Kylock1.2+(RMDude-Kylock1.5) Time System Script 4 file communnn 2011.10.20 2595
515 스킬 Learn Skills By Use 10 비극ㆍ 2010.04.19 2037
514 LevelMe v1.2 3 Man... 2008.10.27 1154
513 Limit Break VX 3 Man... 2008.10.28 1777
512 기타 Lock Screen 3 비극ㆍ 2010.04.19 2012
511 맵/타일 Map Saver 17 file 비극ㆍ 2010.04.18 2415
510 미니맵 Map-System by AmIMeYet [미니맵] 9 Man... 2008.10.28 2746
509 변수/스위치 MapSwitch VX Version: 1.1 1 Man... 2008.10.27 1327
508 MAX Level Limitation System 3 Man... 2008.10.28 1198
507 Menu Background Effects(온라인 스크립트 올릴려고 했다가 못 올렸음)아깝다.. Man... 2008.10.28 1665
506 메시지 MessageSound v2.0 글자에 소리 다다닥 스크립트 21 할렘 2009.02.02 3510
505 미니맵 MiniMap 1.0 미니맵 스크립트. 39 아방스 2010.12.02 4740
504 기타 Modified Advanced Weather Script VX 1.1 3 file Alkaid 2010.10.08 1967
503 상태/속성 MOG - Menu Status V 2.0 16 아방스 2011.01.01 3316
502 메뉴 MOG - Scroll Bar for VX file 습작 2014.07.06 1115
501 MOG 스토리 씬 22 file RPGbooster 2008.10.08 3345
500 이름입력 MOG 이름바꾸기 11 file RPGbooster 2008.10.08 3285
499 More SaveFlies(대박) 2 Man... 2008.10.28 2125
498 기타 MSX - XP Characters on VX/VX Ace 2 Alkaid 2013.01.26 1346
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32