赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 8533 |
最后登录 | 2017-7-6 |
在线时间 | 125 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 125 小时
- 注册时间
- 2006-7-19
- 帖子
- 336
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 天涯孤客 于 2016-1-3 20:33 编辑
经过再次寻找,又找到了能用的脚本,不好意思,此贴就此关闭。
[line]
#============================================================================== # 变量控制完美时间天气系统 V0.90 整合与重制作:牛肉面 # 原地图显变量脚本来自66rpg # 请使用本人配套范例工程 #============================================================================== VAR_SWITCH = 5 # 工作开关 VAR_REFRESH_SWITCH = 6 # 强制刷新 COLOURMAPID = [] # 使用天气明暗效果的地图ID #1、把窗口由透明变为不透明(包括第一次使用时),2、游戏中用脚本更改了$var $var = [] $var = [[2,20,0],[1,70,0],[6,130,0],[5,210,0],[3,260,0]] #所有需要显示在地图并且刷新的变量,可在游戏中用脚本更改。 #格式:[变量编号,x坐标,y坐标] #============================================================================== # ■ Window_XY #------------------------------------------------------------------------------ # 显示坐标的窗口。 #============================================================================== class Window_MapVar < Window_Base #注意前面那个window_var是文件名 #-------------------------------------------------------------------------- # ● 初始化窗口 #-------------------------------------------------------------------------- def initialize #=======================此处可任意调整窗口位置 super(0,0,640,64) # 窗口内容的不透明度 self.contents_opacity=255 self.contents = Bitmap.new(width - 32, height - 32) self.z=9999 #======================= @var_value_old = -1 @var = $var @var_a = [] for var_draw in $var @var_a[var_draw[0]] = $game_variables[var_draw[0]] end refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh if $game_switches[VAR_SWITCH] @var = $var # 记录现在变量数组结构 self.contents.clear # 清除以前的东西 for var_draw in @var @var_a[var_draw[0]] = $game_variables[var_draw[0]] # 记录现在的游戏变量 self.contents.draw_text(var_draw[1],var_draw[2],640,32,@var_a[var_draw[0]].to_s) self.contents.draw_text(45, 0, 32, 32, '时') self.contents.draw_text(95, 0, 32, 32, '分') self.contents.draw_text(185, 0, 32, 32, '年') self.contents.draw_text(235, 0, 32, 32, '月') self.contents.draw_text(285, 0, 32, 32, '日') #self.contents.draw_text(330, 0, 64, 32, '星期') @game_variables = $game_variables case @game_variables[20]# 控制窗口背景变量 1显示0消失 when 1 self.opacity=150 # 窗口的不透明度 self.back_opacity=150 # 窗口背景的不透明度 when 0 self.opacity=0 self.back_opacity=0 end case @game_variables[4] when 1 self.contents.draw_text(330, 0, 96, 32, '星期一') when 2 self.contents.draw_text(330, 0, 96, 32, '星期二') when 3 self.contents.draw_text(330, 0, 96, 32, '星期三') when 4 self.contents.draw_text(330, 0, 96, 32, '星期四') when 5 self.contents.draw_text(330, 0, 96, 32, '星期五') when 6 self.contents.draw_text(330, 0, 96, 32, '星期六') when 7 self.contents.draw_text(330, 0, 96, 32, '星期日') else self.contents.draw_text(330, 0, 96, 32, '星期日') end case @game_variables[7] when 1 self.contents.draw_text(420, 0, 64, 32, '春季') when 2 self.contents.draw_text(420, 0, 64, 32, '夏天') when 3 self.contents.draw_text(420, 0, 64, 32, '秋日') when 4 self.contents.draw_text(420, 0, 64, 32, '寒冬') end @game_switches = $game_switches if COLOURMAPID.include?($game_map.map_id) #@game_switches[4] case @game_variables[2] when 1 $game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5) when 2 $game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5) when 3 $game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5) when 4 $game_screen.start_tone_change(Tone.new(-51,-51,-85,0),5) when 5 $game_screen.start_tone_change(Tone.new(-51,-51,-85,0),5) when 6 $game_screen.start_tone_change(Tone.new(-17,-17,-51,0),5) when 7 $game_screen.start_tone_change(Tone.new(-17,-17,-51,0),5) when 8 $game_screen.start_tone_change(Tone.new(0,0,0,0),5) when 9 $game_screen.start_tone_change(Tone.new(0,0,0,0),5) when 10 $game_screen.start_tone_change(Tone.new(0,0,0,0),5) when 11 $game_screen.start_tone_change(Tone.new(34,34,0,0),5) when 12 $game_screen.start_tone_change(Tone.new(34,34,0,0),5) when 13 $game_screen.start_tone_change(Tone.new(34,34,0,0),5) when 14 $game_screen.start_tone_change(Tone.new(17,17,0,0),5) when 15 $game_screen.start_tone_change(Tone.new(17,17,0,0),5) when 16 $game_screen.start_tone_change(Tone.new(17,17,0,0),5) when 17 $game_screen.start_tone_change(Tone.new(-17,-34,-68,0),5) when 18 $game_screen.start_tone_change(Tone.new(-17,-34,-68,0),5) when 19 $game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5) when 20 $game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5) when 21 $game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5) when 22 $game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5) when 23 $game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5) when 0 $game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5) end else $game_screen.start_tone_change(Tone.new(0,0,0,0),5) end end end end #-------------------------------------------------------------------------- # ● 判断文字刷新。节约内存用 #-------------------------------------------------------------------------- def judge for var_draw in $var if @var_a[var_draw[0]] != $game_variables[var_draw[0]] #如果现在记录的变量和游戏变量不同,刷新 return true end end if $game_switches[VAR_REFRESH_SWITCH] # 强制刷新的时候,刷新 $game_switches[VAR_REFRESH_SWITCH] = false return true end return false end end class Scene_Map alias var_66rpg_main main def main @var_window = Window_MapVar.new # @var_window.opacity = 0 var_66rpg_main @var_window.dispose end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- alias var_66rpg_update update def update var_66rpg_update if $game_switches[VAR_SWITCH] @var_window.visible = true @var_window.refresh #if @var_window.judge else @var_window.visible = false end end end
#==============================================================================
# 变量控制完美时间天气系统 V0.90 整合与重制作:牛肉面
# 原地图显变量脚本来自66rpg
# 请使用本人配套范例工程
#==============================================================================
VAR_SWITCH = 5 # 工作开关
VAR_REFRESH_SWITCH = 6 # 强制刷新
COLOURMAPID = [] # 使用天气明暗效果的地图ID
#1、把窗口由透明变为不透明(包括第一次使用时),2、游戏中用脚本更改了$var
$var = []
$var = [[2,20,0],[1,70,0],[6,130,0],[5,210,0],[3,260,0]]
#所有需要显示在地图并且刷新的变量,可在游戏中用脚本更改。
#格式:[变量编号,x坐标,y坐标]
#==============================================================================
# ■ Window_XY
#------------------------------------------------------------------------------
# 显示坐标的窗口。
#==============================================================================
class Window_MapVar < Window_Base #注意前面那个window_var是文件名
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
#=======================此处可任意调整窗口位置
super(0,0,640,64)
# 窗口内容的不透明度
self.contents_opacity=255
self.contents = Bitmap.new(width - 32, height - 32)
self.z=9999
#=======================
@var_value_old = -1
@var = $var
@var_a = []
for var_draw in $var
@var_a[var_draw[0]] = $game_variables[var_draw[0]]
end
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if $game_switches[VAR_SWITCH]
@var = $var # 记录现在变量数组结构
self.contents.clear # 清除以前的东西
for var_draw in @var
@var_a[var_draw[0]] = $game_variables[var_draw[0]] # 记录现在的游戏变量
self.contents.draw_text(var_draw[1],var_draw[2],640,32,@var_a[var_draw[0]].to_s)
self.contents.draw_text(45, 0, 32, 32, '时')
self.contents.draw_text(95, 0, 32, 32, '分')
self.contents.draw_text(185, 0, 32, 32, '年')
self.contents.draw_text(235, 0, 32, 32, '月')
self.contents.draw_text(285, 0, 32, 32, '日')
#self.contents.draw_text(330, 0, 64, 32, '星期')
@game_variables = $game_variables
case @game_variables[20]# 控制窗口背景变量 1显示0消失
when 1
self.opacity=150 # 窗口的不透明度
self.back_opacity=150 # 窗口背景的不透明度
when 0
self.opacity=0
self.back_opacity=0
end
case @game_variables[4]
when 1
self.contents.draw_text(330, 0, 96, 32, '星期一')
when 2
self.contents.draw_text(330, 0, 96, 32, '星期二')
when 3
self.contents.draw_text(330, 0, 96, 32, '星期三')
when 4
self.contents.draw_text(330, 0, 96, 32, '星期四')
when 5
self.contents.draw_text(330, 0, 96, 32, '星期五')
when 6
self.contents.draw_text(330, 0, 96, 32, '星期六')
when 7
self.contents.draw_text(330, 0, 96, 32, '星期日')
else
self.contents.draw_text(330, 0, 96, 32, '星期日')
end
case @game_variables[7]
when 1
self.contents.draw_text(420, 0, 64, 32, '春季')
when 2
self.contents.draw_text(420, 0, 64, 32, '夏天')
when 3
self.contents.draw_text(420, 0, 64, 32, '秋日')
when 4
self.contents.draw_text(420, 0, 64, 32, '寒冬')
end
@game_switches = $game_switches
if COLOURMAPID.include?($game_map.map_id)
#@game_switches[4]
case @game_variables[2]
when 1
$game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5)
when 2
$game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5)
when 3
$game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5)
when 4
$game_screen.start_tone_change(Tone.new(-51,-51,-85,0),5)
when 5
$game_screen.start_tone_change(Tone.new(-51,-51,-85,0),5)
when 6
$game_screen.start_tone_change(Tone.new(-17,-17,-51,0),5)
when 7
$game_screen.start_tone_change(Tone.new(-17,-17,-51,0),5)
when 8
$game_screen.start_tone_change(Tone.new(0,0,0,0),5)
when 9
$game_screen.start_tone_change(Tone.new(0,0,0,0),5)
when 10
$game_screen.start_tone_change(Tone.new(0,0,0,0),5)
when 11
$game_screen.start_tone_change(Tone.new(34,34,0,0),5)
when 12
$game_screen.start_tone_change(Tone.new(34,34,0,0),5)
when 13
$game_screen.start_tone_change(Tone.new(34,34,0,0),5)
when 14
$game_screen.start_tone_change(Tone.new(17,17,0,0),5)
when 15
$game_screen.start_tone_change(Tone.new(17,17,0,0),5)
when 16
$game_screen.start_tone_change(Tone.new(17,17,0,0),5)
when 17
$game_screen.start_tone_change(Tone.new(-17,-34,-68,0),5)
when 18
$game_screen.start_tone_change(Tone.new(-17,-34,-68,0),5)
when 19
$game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5)
when 20
$game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5)
when 21
$game_screen.start_tone_change(Tone.new(-102,-102,-68,17),5)
when 22
$game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5)
when 23
$game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5)
when 0
$game_screen.start_tone_change(Tone.new(-136,-136,-85,34),5)
end
else
$game_screen.start_tone_change(Tone.new(0,0,0,0),5)
end
end
end
end
#--------------------------------------------------------------------------
# ● 判断文字刷新。节约内存用
#--------------------------------------------------------------------------
def judge
for var_draw in $var
if @var_a[var_draw[0]] != $game_variables[var_draw[0]] #如果现在记录的变量和游戏变量不同,刷新
return true
end
end
if $game_switches[VAR_REFRESH_SWITCH] # 强制刷新的时候,刷新
$game_switches[VAR_REFRESH_SWITCH] = false
return true
end
return false
end
end
class Scene_Map
alias var_66rpg_main main
def main
@var_window = Window_MapVar.new
# @var_window.opacity = 0
var_66rpg_main
@var_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
alias var_66rpg_update update
def update
var_66rpg_update
if $game_switches[VAR_SWITCH]
@var_window.visible = true
@var_window.refresh
#if @var_window.judge
else
@var_window.visible = false
end
end
end
@牛肉面
这套脚本是很早以前在6R上找到的,XP的时间系统脚本。好像是“牛肉面”君做的。
之所以我希望有大神帮忙移植。
主要原因是,这套脚本实在非常好用。他结合了公共事件,控制时间的变量相当容易。也可以通过这个,非常方便的达到某时间发生某事件。
举个例子,我希望晚上6点,在X地出现一只幽灵。
那么我只需要条件分歧控制“时”的变量,就可以了。
而恕我眼拙。我在6R用搜索功能,和一页一页翻页的方式,找了很久,也没找到VA有那么方便的时间控制软件。。
看见过一些昼夜交替的,,但是好像都没有配合变量值。如果要更改或者说要使用条件分歧的话,恐怕要动用脚本。这个,我就不太懂了。
所以,用来用去, 还是只有这套系统最方便。。希望有大神帮忙移植一下。
XP移植到VA [/line]
|
|