Project1
标题:
“装备扩展系统-10装备”与“整合 标题画面”冲突
[打印本页]
作者:
lcg0593
时间:
2010-9-12 09:41
标题:
“装备扩展系统-10装备”与“整合 标题画面”冲突
我使用了“装备扩展系统-10装备”与“整合 标题画面”脚本,但是在标题画面选择“开始游戏”时弹出窗口
1.PNG
(8.32 KB, 下载次数: 10)
下载附件
保存到相册
2010-9-12 09:40 上传
装备扩展:
http://rpg.blue/forum.php?mod=viewthread&tid=139476&highlight=%E8%A3%85%E5%A4%87%E6%89%A9%E5%B1%95
标题画面脚本:
#==============================================================================
# ■ 高自由度设定 图片标题菜单 动态标题画面 闪烁文字 整合
#
# §§ 简称:高自由度 整合 标题画面设置
#------------------------------------------------------------------------------
# 整合作者:TERENCE (龙皇)
#
# 图片标题菜单:By chaochao From 幻想森林论坛
# http://www.66rpg.com/htm/news167.htm
#
# 动态标题画面(流星雨版):By 柳柳
# http://www.66rpg.com/htm/news92.htm
#
# 闪烁标题脚本:未知作者,来源日本
# http://www.66rpg.com/htm/news107.htm
#==============================================================================
class Scene_Title
## ===================== ↓自定义设置区↓ ===================== ##
#--------------------------------------------------------------------------
# ● 标题画面闪烁文字自定义设定
#--------------------------------------------------------------------------
TITLE_STR = "序章·战火" # 闪烁文字
FONT_NAME = ["標楷體","黑体", "楷体", "宋体"]
# 字体列表,当玩家电脑没有安装第一种字体会顺序往下寻找第二种
FONT_SIZE = 28 # 字体大小
FONT_BOLD = true # 加粗 ( true 是 / false 否 )
FONT_ITALIC = false # 斜体 ( true 是 / false 否 )
STR_COLOR = Color.new( 173,255,47 ) # 文字颜色
# 文字颜色可以參考此帖
# [增补功能]136种颜色表 By 禾西
# http://rpg.blue/forumTopicRead.asp?id=88854
# 查考数字的地方→ def self.pink(opacity = 255);new(***,***,***,opacity);end
# 查考颜色的地方→ def self.***(opacity........
DRAW_FRAME = true
# 文字是否勾边 ( true 是 / false 否 )
FRAME_COLOR = Color.new(0, 0, 0) # 勾边颜色
LOCATE_X = 351 # 闪烁文字 X 座标
LOCATE_Y = 174 # 闪烁文字 Y 座标
DRAW_X = 0 # X 座标修正値(相对中心)
DRAW_Y = -100 # Y 座标修正値(相对中心)
BLINK = true # 闪烁
#--------------------------------------------------------------------------
# ● 标题画面SE音效自定义设定
#--------------------------------------------------------------------------
Cursor_SE = "Audio/SE/标题-光标.wav" # Title 游标音效SE 文件名 路径
Buzzer_SE = "Audio/SE/标题-错误.wav" # Title 无效音效SE 文件名 路径
Decision_SE = "Audio/SE/标题-确定.wav" # Title 确定音效SE 文件名 路径
#--------------------------------------------------------------------------
# ● 图片标题菜单自定义常量及相关设定
#--------------------------------------------------------------------------
STAR1 = "Graphics/Pictures/开始2.png" # 游标没在 "开始游戏" 所显示图片 的路径
STAR2 = "Graphics/Pictures/开始1.png" # 游标位在 "开始游戏" 所显示图片 的路径
Start_x = 0 # 开始游戏 图片X座标 (P.S.原点是左上)
Start_y = 264 # 开始游戏 图片Y座标 (P.S.原点是左上)
CONTINUE1 = "Graphics/Pictures/继续2.png" # 游标没在 "读取进度" 所显示图片 的路径
CONTINUE2 = "Graphics/Pictures/继续1.png" # 游标位在 "读取进度" 所显示图片 的路径
Continue_x = 50 # 读取进度 图片X座标 (P.S.原点是左上)
Continue_y = 334 # 读取进度 图片Y座标 (P.S.原点是左上)
EXIT1 = "Graphics/Pictures/离开2.png" # 游标没在 "离开游戏" 所显示图片 的路径
EXIT2 = "Graphics/Pictures/离开1.png" # 游标位在 "离开游戏" 所显示图片 的路径
Exit_x = 100 # 离开游戏 图片X座标 ( P.S.原点是左上 )
Exit_y = 404 # 离开游戏 图片Y座标 ( P.S.原点是左上 )
TitleTable_opacity = 210 # 标题图片透明度
TitleTable_change = 10 # 标题图片透明度变化速度( 建议范围:10~30 )
#--------------------------------------------------------------------------
# ● 动态标题画面自定义常量及相关设定
#--------------------------------------------------------------------------
WEATHER = 4 # 使用自定义效果(0:无,1:雨,2:暴风雨,3:雪,4:自定义)
MAXNUMBER = 10 # 天气图片数量
WEATHER_FILE = "Graphics/Pictures/2.png" # 自定义图片路径
BLEND_TYPE = 1 # 合成方式(0:普通,1:加法,2:减法)
WEATHER_X = 0 # X方向每回合减少象素
WEATHER_Y = -1 # Y方向每回合减少象素
WEATHER_OPACITY = 0.5 # 每回合减低透明度
START_OPACITY = 200 # 出现时的透明度
RAND_X = 1200 # 随机X范围
RAND_Y = 600 # 随机Y范围
HEIGHT = 300 # 出现时候的屏幕Y
WIDTH = 0 # 出现时候的屏幕X
#--------------------------------------------------------------------------
# ● 题画面图片先后顺序设定 (值越大图片越上一层)
#--------------------------------------------------------------------------
TITLE_NAME_Z = 0 # 闪烁文字
CHAOCHAO_Z = 3 # 图片标题
WEATHER_Z = 1 # 动态天气
## ===================== ↑自定义设置区↑ ===================== ##
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
if $BTEST
battle_test
return
end
# 载入资料库
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# 生成二為阵列的Sprite.new
@sprite = [Sprite.new]
for i in 0..3
for j in 0..1
@sprite[i] = [Sprite.new]
@sprite[i][j] = Sprite.new
@sprite[i][j].opacity = 0
end
end
# 生成标题图形
@sprite[0][0].bitmap = RPG::Cache.title($data_system.title_name)
@sprite[0][0].opacity = 0
#开始游戏的图片
@sprite[1][0].bitmap = Bitmap.new(STAR1)
@sprite[1][1].bitmap = Bitmap.new(STAR2)
#继续游戏的图片
@sprite[2][0].bitmap = Bitmap.new(CONTINUE1)
@sprite[2][1].bitmap = Bitmap.new(CONTINUE2)
#结束游戏的图片
@sprite[3][0].bitmap = Bitmap.new(EXIT1)
@sprite[3][1].bitmap = Bitmap.new(EXIT2)
#图片位置 及 初始透明度
for j in 0..1
@sprite[1][j].opacity = 0
@sprite[1][j].x = Start_x
@sprite[1][j].y = Start_y
@sprite[1][j].z = CHAOCHAO_Z
@sprite[2][j].opacity = 0
@sprite[2][j].x = Continue_x
@sprite[2][j].y = Continue_y
@sprite[2][j].z = CHAOCHAO_Z
@sprite[3][j].opacity = 0
@sprite[3][j].x = Exit_x
@sprite[3][j].y = Exit_y
@sprite[3][j].z = CHAOCHAO_Z
end
### ↓生成动态标题画面相关图片↓ ###
@ox = 0
@oy = 0
color1 = Color.new(255, 255, 255, 255)
color2 = Color.new(255, 255, 255, 128)
# 生成雨
@rain_bitmap = Bitmap.new(7, 56)
for i in 0..6
@rain_bitmap.fill_rect(6-i, i*8, 1, 8, color1)
end
# 生成风
@storm_bitmap = Bitmap.new(34, 64)
for i in 0..31
@storm_bitmap.fill_rect(33-i, i*2, 1, 2, color2)
@storm_bitmap.fill_rect(32-i, i*2, 1, 2, color1)
@storm_bitmap.fill_rect(31-i, i*2, 1, 2, color2)
end
# 生成雪
@snow_bitmap = Bitmap.new(6, 6)
@snow_bitmap.fill_rect(0, 1, 6, 4, color2)
@snow_bitmap.fill_rect(1, 0, 4, 6, color2)
@snow_bitmap.fill_rect(1, 2, 4, 2, color1)
@snow_bitmap.fill_rect(2, 1, 2, 4, color1)
@sprites = []
# 使用自定义判别
for i in 1..40
sprite = Sprite.new
case WEATHER
when 1
sprite.bitmap = @rain_bitmap
when 2
sprite.bitmap = @storm_bitmap
when 3
sprite.bitmap = @snow_bitmap
when 4
sprite.bitmap = Bitmap.new(WEATHER_FILE)
end
sprite.z = WEATHER_Z
sprite.x = -1000
sprite.y = -1000
sprite.visible = (i <= MAXNUMBER)
sprite.blend_type = BLEND_TYPE
sprite.opacity = START_OPACITY
@sprites.push(sprite)
end
weather_update
### ↑生成动态标题画面相关图片↑ ###
### ↓スプライトの作成↓ ###
@title_name_sprite = RPG::Sprite.new
@title_name_sprite.z = TITLE_NAME_Z
@title_name_sprite.opacity = 0
bitmap = Bitmap.new(32, 32)
bitmap.font.name = FONT_NAME
bitmap.font.size = FONT_SIZE
bitmap.font.bold = FONT_BOLD
rect = bitmap.text_size(TITLE_STR)
bitmap.dispose
bitmap = nil
@title_name_sprite.bitmap = Bitmap.new(rect.width, rect.height)
@title_name_sprite.bitmap.font.name = FONT_NAME
@title_name_sprite.bitmap.font.size = FONT_SIZE
@title_name_sprite.bitmap.font.bold = FONT_BOLD
@title_name_sprite.bitmap.font.italic = FONT_ITALIC
str = TITLE_STR
if DRAW_FRAME
@title_name_sprite.bitmap.font.color = FRAME_COLOR
if defined?(@title_name_sprite.bitmap.draw_text_plan_frame)
@title_name_sprite.bitmap.draw_text_plan_frame(0, 0, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text_plan_frame(2, 0, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text_plan_frame(0, 2, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text_plan_frame(2, 2, rect.width, rect.height, str)
@title_name_sprite.bitmap.font.color = STR_COLOR
@title_name_sprite.bitmap.draw_text_plan_frame(1, 1, rect.width, rect.height, str)
else
@title_name_sprite.bitmap.draw_text(0, 0, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text(2, 0, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text(0, 2, rect.width, rect.height, str)
@title_name_sprite.bitmap.draw_text(2, 2, rect.width, rect.height, str)
@title_name_sprite.bitmap.font.color = STR_COLOR
@title_name_sprite.bitmap.draw_text(1, 1, rect.width, rect.height, str)
end
else
@title_name_sprite.bitmap.font.color = STR_COLOR
@title_name_sprite.bitmap.draw_text(rect, str)
end
@title_name_sprite.x = LOCATE_X
@title_name_sprite.y = LOCATE_Y
if BLINK
@title_name_sprite.blink_on
end
### ↑スプライトの作成↑ ###
# 判定读取进度的有效性
# 游戏存档一个也不存在的时候也调查
# 有效為 @continue_enabled 為 true、无效為 false
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# 读取进度為有效的情况下、游标停止在读取进度上
# 无效的情况下、读取进度的文字显示為灰色
if @continue_enabled
@command_index = 1
else
@command_index = 0
@sprite[2][0].tone = Tone.new(0, 0, 0, 255)
@sprite[2][1].tone = Tone.new(0, 0, 0, 255)
end
# 演奏标题 BGM
$game_system.bgm_play($data_system.title_bgm)
# 停止演奏 ME、BGS
Audio.me_stop
Audio.bgs_stop
# 执行过渡
Graphics.transition
# 主循环
loop do
# 更新游戏画面
Graphics.update
#淡出背景图形 闪烁文字
if @sprite[0][0].opacity <= 255
@sprite[0][0].opacity += 15
@title_name_sprite.opacity += 15
end
# 更新输入讯息
Input.update
# 更新画面
update
# 如果画面被切换就中断循环
if $scene != self
break
end
end
# 装备过渡
Graphics.freeze
# 释放图片标题
for i in 0..3
for j in 0..1
unless i==0 and j==1
@sprite[i][j].bitmap.dispose
@sprite[i][j].dispose
end
end
end
# 释放天气图片
for sprite in @sprites
sprite.dispose
end
@rain_bitmap.dispose
@storm_bitmap.dispose
@snow_bitmap.dispose
# スプライトの解放
@title_name_sprite.bitmap.dispose
@title_name_sprite.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
chaochaocommandchaochao
# スプライトの更新
@title_name_sprite.update
if Input.trigger?(Input::C)
case @command_index
when 0 # 新游戏
command_new_game
when 1 # 继续
command_continue
when 2 # 退出
command_shutdown
end
end
weather_update
end
#--------------------------------------------------------------------------
# ● 命令 : 新的游戏
#--------------------------------------------------------------------------
def command_new_game
# 演奏确定 SE
Audio.se_play(Decision_SE,100,100)
# 停止 BGM
Audio.bgm_stop
# 重置测量游戏时间用的画面计数器
Graphics.frame_count = 0
# 產生各种游戏物件
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# 设定初期同伴位置
$game_party.setup_starting_members
# 设定初期位置的地图
$game_map.setup($data_system.start_map_id)
# 主角向初期位置移动
$game_player.moveto($data_system.start_x, $data_system.start_y)
# 更新主角
$game_player.refresh
# 执行地图设定的 BGM 与 BGS 的自动切换
$game_map.autoplay
# 更新地图 (执行并行事件)
$game_map.update
# 切换地图画面
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# ● 命令 : 读取进度
#--------------------------------------------------------------------------
def command_continue
# 继续无效的情况下
unless @continue_enabled
# 演奏无效 SE
Audio.se_play(Buzzer_SE,80,100)
return
end
# 演奏确定 SE
Audio.se_play(Decision_SE,100,100)
# 切换到读取画面
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# ● 命令 : 结束游戏
#--------------------------------------------------------------------------
def command_shutdown
# 演奏确定 SE
Audio.se_play(Decision_SE,100,100)
# BGM、BGS、ME 的淡入淡出
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# 结束游戏
$scene = nil
end
#--------------------------------------------------------------------------
# ● 刷新天气
#--------------------------------------------------------------------------
def weather_update
return if WEATHER == 0
for i in 1..MAXNUMBER
sprite = @sprites[i]
if sprite == nil
break
end
if WEATHER == 1
sprite.x -= 2
sprite.y += 16
sprite.opacity -= 8
end
if WEATHER == 2
sprite.x -= 8
sprite.y += 16
sprite.opacity -= 12
end
if WEATHER == 3
sprite.x -= 2
sprite.y += 8
sprite.opacity -= 8
end
if WEATHER == 4
sprite.x -= WEATHER_X
sprite.y += WEATHER_Y
sprite.opacity -= WEATHER_OPACITY
end
x = sprite.x - @ox
y = sprite.y - @oy
if sprite.opacity < 32 or x < -100 or x > 750 or y < -1000 or y > 500
sprite.x = rand(RAND_X) + WIDTH + @ox
sprite.y = rand(RAND_Y) + HEIGHT + @oy
sprite.opacity = START_OPACITY
end
end
end
#--------------------------------------------------------------------------
# ● 刷新选项
#--------------------------------------------------------------------------
def chaochaocommandchaochao
if Input.trigger?(Input::UP)
@command_index -= 1
if @command_index < 0
@command_index = 2
end
Audio.se_play(Cursor_SE,80,100)
end
if Input.trigger?(Input::DOWN)
@command_index += 1
if @command_index > 2
@command_index = 0
end
Audio.se_play(Cursor_SE,80,100)
end
case @command_index
when 0
if @sprite[1][0].opacity >= 0
@sprite[1][0].opacity -= TitleTable_change
end
if @sprite[1][1].opacity <= TitleTable_opacity #240
@sprite[1][1].opacity += TitleTable_change #30
end
if @sprite[2][0].opacity <= TitleTable_opacity #240
@sprite[2][0].opacity += TitleTable_change #30
end
if @sprite[2][1].opacity >= 0
@sprite[2][1].opacity -= TitleTable_change #30
end
if @sprite[3][0].opacity <= TitleTable_opacity #240
@sprite[3][0].opacity += TitleTable_change #30
end
if @sprite[3][1].opacity >= 0
@sprite[3][1].opacity -= TitleTable_change #30
end
when 1
if @sprite[1][0].opacity <= TitleTable_opacity #210
@sprite[1][0].opacity += TitleTable_change #30
end
if @sprite[1][1].opacity >= 0
@sprite[1][1].opacity -= TitleTable_change #30
end
if @sprite[2][0].opacity >= 0
@sprite[2][0].opacity -= TitleTable_change #30
end
if @sprite[2][1].opacity <= TitleTable_opacity #240
@sprite[2][1].opacity += TitleTable_change #30
end
if @sprite[3][0].opacity <= TitleTable_opacity #240
@sprite[3][0].opacity += TitleTable_change #30
end
if @sprite[3][1].opacity >= 0
@sprite[3][1].opacity -= TitleTable_change #30
end
when 2
if @sprite[1][0].opacity <= TitleTable_opacity #210
@sprite[1][0].opacity += TitleTable_change #30
end
if @sprite[1][1].opacity >= 0
@sprite[1][1].opacity -= TitleTable_change #30
end
if @sprite[2][0].opacity <= TitleTable_opacity #240
@sprite[2][0].opacity += TitleTable_change #30
end
if @sprite[2][1].opacity >= 0
@sprite[2][1].opacity -= TitleTable_change #30
end
if @sprite[3][0].opacity >= 0
@sprite[3][0].opacity -= TitleTable_change #30
end
if @sprite[3][1].opacity <= TitleTable_opacity #240
@sprite[3][1].opacity += TitleTable_change #30
end
end
end
end
复制代码
作者:
逸豫
时间:
2010-9-12 09:58
看到我的脚本还真是压力很大- -|||
麻烦把标题测试素材和工程发过来……
作者:
lcg0593
时间:
2010-9-12 10:28
Project3.rar
(464.49 KB, 下载次数: 33)
2010-9-12 10:28 上传
点击文件名下载附件
作者:
逸豫
时间:
2010-9-12 11:54
整合标题画面脚本117行 $data_actors = load_data("Data/Actors.rxdata")下面添加
for i in $data_actors
i.setup if i != nil
end
复制代码
作者:
qaz4633063
时间:
2010-9-12 11:56
提示:
作者被禁止或删除 内容自动屏蔽
作者:
lcg0593
时间:
2010-9-12 13:47
两个的效果一样,多谢了
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1