RPGXP 스크립트
2013.10.01 06:52

파이널 판타지 7 스타일 메뉴

조회 수 2024 추천 수 0 댓글 6
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
#*********************************************************
#Final Fantasy VII menu setup
#*********************************************************
#To use:
#If you do not want Faces, go to line 94
#and change delete the # of draw_actor_graphic
#and put a # infront of draw_actor_face
#
#Create a new folder in the Characters folder, and call it Faces
#Adding faces: add a 80x80 picture with the same name as the characterset it
#corrosponds with in the Faces folder


#========================================
#?ˇ Window_Base
#--------------------------------------------------------------------------------
# Setting functions for the "Base"
#========================================


class Window_Base < Window

def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end
end
def draw_actor_battler_graphic(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end

#========================================
#?ˇ Game_Map
#--------------------------------------------------------------------------------
# Setting functions for the Map
#========================================
class Game_Map

def name
$map_infos[@map_id]
end
end

#========================================
#?ˇ Window_Title
#--------------------------------------------------------------------------------
# Setting functions for the Title
#========================================
class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end




#==============================================================================
# ?ˇ Window_MenuStatus
#------------------------------------------------------------------------------
# Sets up the Choosing.
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 560, 454)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial"
self.contents.font.size = 18
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# Drawing Info on Screen
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 94
y = i * 110
actor = $game_party.actors[i]
# draw_actor_face(actor, 12, y + 90) #To get rid of the Face, put a "#" before the draw_ of this line
draw_actor_graphic(actor, 48, y + 65) #and delete the "#" infront of draw of this line
draw_actor_name(actor, x, y)
draw_actor_level(actor, x + 144, y)
draw_actor_state(actor, x + 280, y )
draw_actor_exp(actor, x+ 144, y + 38)
draw_actor_hp(actor, x, y + 38)
draw_actor_sp(actor, x, y + 58)

end
end
#--------------------------------------------------------------------------
# Update of Cursor
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 110, self.width - 32, 96)
end
end
end

#=======================================#
# ?ˇWindow_GameStats #
# written by AcedentProne #
#------------------------------------------------------------------------------#

class Window_GameStats < Window_Base
def initialize
super(0, 0, 160, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial"
self.contents.font.size = 18
refresh
end

def refresh
self.contents.clear
#Drawing gold into separate commas by Dubealex
case $game_party.gold
when 0..9999
gold = $game_party.gold
when 10000..99999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+array[1].to_s+","+array[2].to_s+array[3].to_s+array[4].to_s
when 100000..999999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+array[1].to_s+array[2].to_s+","+array[3].to_s+array[4].to_s+array[5].to_s
when 1000000..9999999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s+","+array[4].to_s+array[5].to_s+array[6].to_s
end
#Draw Gold
self.contents.font.color = system_color
gold_word = $data_system.words.gold.to_s
cx = contents.text_size(gold_word).width
cx2=contents.text_size(gold.to_s).width
self.contents.draw_text(4, 4, 120-cx-2, 32, gold_word)
self.contents.font.color = normal_color
self.contents.draw_text(124-cx2+1, 4, cx2, 32, gold.to_s, 2)
self.contents.font.color = system_color
# Draw "Time"
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, -10, 120, 32, text, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, -10, 120, 32, "Time")
end
#--------------------------------------------------------------------------
# Update of The count
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end

#==============================================================================
# ?ˇ Window_Mapname
#------------------------------------------------------------------------------
# ?@Draws the Map name
#==============================================================================

class Window_Mapname < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 44)
self.contents = Bitmap.new(width - 60, height - 32)
self.contents.font.name = "Arial"
self.contents.font.size = 17
refresh
end
#--------------------------------------------------------------------------
# Draws info on screen
#--------------------------------------------------------------------------
def refresh
self.contents.clear

# Map Name
#map = $game_map.name
self.contents.font.color = system_color
self.contents.draw_text(4, -10, 220, 32, "Location")
self.contents.font.color = normal_color
self.contents.draw_text(175, -10, 80, 32, $game_map.name)
end
end

#==============================================================================
# ?ˇ Scene_Menu
#------------------------------------------------------------------------------
# FF7 menu layout as requested by AcedentProne.
#==============================================================================

class Scene_Menu
#--------------------------- edit-------------------------------
attr_reader :status_window
#/--------------------------- edit-------------------------------

def initialize(menu_index = 0)
@menu_index = menu_index
end
def main

s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Quit"


#--------------------------- edit-------------------------------
# Command menu
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,])
@command_window.x = 640 - @command_window.width
@command_window.y = 480
@command_window.z = 110
@command_window.index = @menu_index
#If certain options are avaliable
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
#Showing location window
@map = Window_Mapname.new
@map.x = 640 - @map.width
@map.y = 0 - @map.height - 1
@map.z = 110
#Showing the game stats
@game_stats_window = Window_GameStats.new
@game_stats_window.x = 0 - @game_stats_window.width
@game_stats_window.y = 480 - @map.height - @game_stats_window.height
@game_stats_window.z =110

#Showing the Menu Status window
@status_window = Window_MenuStatus.new
@status_window.x = 640
@status_window.y = 8
@status_window.z = 100


Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@game_stats_window.dispose
@status_window.dispose
@map.dispose
end
#--------------------------------------------------------------------------
#Defining the delay
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
#--------------------------------------------------------------------------
# Updating
#--------------------------------------------------------------------------
def update
@command_window.update
@game_stats_window.update
@status_window.update
@map.update
#Moving Windows inplace
gamepos = 640 - @game_stats_window.width
mappos = 480 - @map.height - 1
if @command_window.y > 0
@command_window.y -= 60
end
if @game_stats_window.x < gamepos
@game_stats_window.x += 80
end
if @map.y < mappos
@map.y += 80
end
if @status_window.x > 0
@status_window.x -= 80
end
#Saying if options are active
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# Updating the Command Selection
#--------------------------------------------------------------------------
def update_command
# If B button is pushed
if Input.trigger?(Input::B)
# Plays assigned SE
$game_system.se_play($data_system.cancel_se)
#Looping for moving windows out
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
# Go to Map
$scene = Scene_Map.new
return
end
# If C button is pused
if Input.trigger?(Input::C)
# Checks actor size
if $game_party.actors.size == 0 and @command_window.index < 4
# plays SE
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0

when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
$scene = Scene_End.new
return
end
end
#--------------------------------------------------------------------------
# Updating Status Screen
#--------------------------------------------------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1 # ƒXƒLƒ‹
# ‚?‚ĚƒAƒNƒ^?[‚ĚŤs“???ŚŔ‚Ş 2 ˆČŹă‚̏ꍇ
if $game_party.actors[@status_window.index].restriction >= 2
# ƒuƒU?[ SE ‚đ‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Śˆ’č SE ‚đ‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒLƒ‹‰ć–Ę‚ɐŘ‚č‘֦#8218;?
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
loop do
if @command_window.y < 480
@command_window.y += 40
end
if @game_stats_window.x > 0 - @game_stats_window.width
@game_stats_window.x -= 40
end
if @map.y > 0 - @map.height
@map.y -= 40
end
if @status_window.x < 640
@status_window.x += 40
end
delay(0.5)
if @status_window.x >= 640
break
end
end
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
end
?
  • ?
    Scissor 2013.10.27 04:39
    감사합니다! 잘쓸게여
  • ?
    exam 2013.11.10 00:36
    잘 보고갑니다
  • ?
    Go_So 2014.01.29 20:30
    감사합니다!!
  • ?
    슈퍼겨털맨 2014.07.28 09:10
    멋진스크립트네요,감사합니다!
  • ?
    만두카레 2014.08.18 01:53
    감사합니다!
  • ?
    콩의귀환 2015.09.17 23:47
    이 메뉴모양을 쓴 상태에서 장비나 스테이터스를 없애고 세이브불가 지역에서 메뉴를 누르면 튕기는데 어떻게 해야하죠 ㅠㅜ
    에러코드는 window_command 40번째줄이 문제라는데 초기화 시켜도 아무것도 안변해요ㅠ

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
228 RPGXP 스크립트 횡스크롤 점프 [버튼허용스위치추가] 3  운 2014.06.01 1626 0
227 RPGXP 스크립트 말풍선 메세지 스크립트 2 천둥번들 2014.02.24 1853 0
226 RPGXP 스크립트 스텟찍기스크립트 12 천둥번들 2014.02.22 1761 3
225 RPGXP 스크립트 달리기스크립트 4 천둥번들 2014.02.22 2306 2
224 RPGXP 스크립트 8방향 이동스크립트 5 천둥번들 2014.02.22 1723 6
223 RPGXP 스크립트 AraLab_MultiStartingPoint (다중 출발점 스크립트, 캐릭터 선택 스크립트) ver.0.2beta 3  운 2014.01.21 1973 1
222 RPGXP 스크립트 3D스크립트!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6 공박사 2014.01.18 2805 2
221 RPGVX Ace 스크립트 Rpg Vx Ace 에서 이벤트 이름 팝업 3 빙냥이 2014.01.17 1895 0
220 RPGXP 스크립트 타이틀 로고 띄우기 + 로고 SE 가능(예제있음) 6 데노제 2013.12.13 2391 3
219 RPGXP 스크립트 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트 1 데노제 2013.12.10 1616 0
218 RPGXP 스크립트 모션 스크립트 3  운 2013.12.06 2053 0
217 RPGXP 스크립트 아이템 조합 스크립트 7  운 2013.12.06 2712 0
216 RPGXP 스크립트 이름조합스크립트 16 Scissor 2013.10.27 2764 0
215 RPGXP 스크립트 문과 상자를 쉽게 만들수 있는 스크립트 18 2013.10.21 2242 0
214 RPGXP 스크립트 메뉴에 퀘스트 있는거 2  운 2013.10.12 1957 2
213 RPGXP 스크립트 퀘스트 스크립트 21  운 2013.10.12 3100 2
212 RPGXP 스크립트 로고를 띄우는 스크립트 14 XEONSOFT블로그 2013.10.07 1677 0
211 RPGXP 스크립트 맵이름 표시 스크립트 18  운 2013.10.05 2244 0
210 RPGXP 스크립트 요청하신 게이지바 스크립트 입니다. 8 소년영남 2013.10.04 1919 1
» RPGXP 스크립트 파이널 판타지 7 스타일 메뉴 6 2013.10.01 2024 0
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)