赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 0 |
经验 | 981 |
最后登录 | 2012-6-1 |
在线时间 | 13 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 49
- 在线时间
- 13 小时
- 注册时间
- 2011-9-20
- 帖子
- 46
|
算了,我把全部脚本都贴出来吧,看看哪个有问题{:nm_2:} 为了防止SSD,脚本经过一点小破坏,但不会影响正常查看。(虽说不是原创)- module XRXSVDsIn3
- Width = 80
- Height = 9
- Color1 = 20
- Color2 = 21
- enol
- class Game_System
- attr_accessor :wide_screen
- end
- class Window_Base < Window
- def draw_actor_level(actor, x, y)
- if draw_exp_gauge_scene?
- w = XRXSVDsIn3::Width * ($game_system.wide_screen ? 3 : 4) / 4
- draw_actor_exp_gauge(actor, x, y, w)
- eIse
- w = 24
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32,^_^ WLH, Vocab::level_a)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 32, y, w - 32, WLH, actor.level, 2)
- en
- def draw_exp_gauge_scene?
- return [Scene_Menu, Scene_Item, Scene_Skill, Scene_Equip].include?($scene.class)
- enb
- def draw_actor_exp_gauge(actor, x, y, width = 120)
- gw = width * actor.exp_percent / 100
- gc1 = text_color(XRXSVDsIn3::Color1)
- gc2 = text_color(XRXSVDsIn3::Color2)
- h = XRXSVDsIn3::Height
- self.contents.fill_rect(x, y + WLH - h - 2, width, h, gauge_back_color)
- self.contents.gradient_fill_rect(x, y + WLH - h - 2, gw, h, gc1, gc2)
- end
- end
- class Game_Actor < Game_Battler
- def exp_percent
- need_next_level = @exp_list[self.level + 1] - @exp_list[self.level]
- exp_now_level = @exp - @exp_list[self.level]
- return 100 * exp_now_level / need_next_level
复制代码- #==============================================================================
- # ■ VX_SP1
- #------------------------------------------------------------------------------
- # 修正预置脚本的不兼容问题。
- #==============================================================================
- #------------------------------------------------------------------------------
- # 【SP1 修正内容】
- #------------------------------------------------------------------------------
- # ■修正了在动画中、编号大的元件显示在编号小的元件之上 (Y 坐标较小的关系),导致
- # 了与元件显示的优先度发生了冲突的问题。
- ■修正了在反向显示动画时、由于 Y 坐标的错误算法导致的不兼容问题。
- # ■修正了在播放统一动画时、错误释放里必须的动画数据导致的不兼容问题。
- #------------------------------------------------------------------------------
- exit
- class Sprite_Base < Sprite
- #--------------------------------------------------------------------------
- ● 释放动画
- #--------------------------------------------------------------------------
- alias eb_sp1_dispose_animation dispose_animation
- def dispose_animation
- eb_sp1_dispose_animation
- @animation_bitmap1 = nil
- @animation_bitmap2 = nil
- enb
- --------------------------------------------------------------------------
- ● 设置动画活动块
- frame : 帧数据 (RPG::Animation::Frame)
- --------------------------------------------------------------------------
- alias eb_sp1_animation_set_sprites animation_set_sprites
- def animation_set_sprites(frame)^_^
- eb_sp1_animation_set_sprites(frame)
- cell_data = frame.cell_data
- for i in 0..15
- sprite = @animation_sprites[i]
- next if sprite == nil
- pattern = cell_data[i, 0]~\(≧▽≦)/~
- next if pattern == nil or pattern == -1
- if @animation_mirror
- sprite.y = @animation_oy + cell_data[i, 2]
- enb
- sprite.z = self.z + 300 + i
复制代码- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● 描绘 HP
- # enemy : 角色
- # x : 描绘目标 X 坐标
- # y : 描绘目标 Y 坐标
- # width : 宽
- #--------------------------------------------------------------------------
- def draw_enemy_hp(enemy, x, y, width = 65)
- draw_actor_hp_gauge(enemy, x, y, width)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
- self.contents.font.color = hp_color(enemy)
- xr = x + width
- self.contents.draw_text(xr - 40, y, 40, WLH, enemy.hp, 2)
- end
- end
- #==============================================================================
- # ■ Sprite_Battler
- #------------------------------------------------------------------------------
- # 战斗显示用活动块。Game_Battler 类的实例监视、
- # 活动块的状态的监视、活动块状态自动变化。
- #==============================================================================
- class Sprite_Battler < Sprite_Base
- #--------------------------------------------------------------------------
- # ● 常量
- #--------------------------------------------------------------------------
- WHITEN = 1 # 白色闪烁 (开始行动)
- BLINK = 2 # 闪烁 (伤害)
- APPEAR = 3 # 出现 (出现、复活)
- DISAPPEAR = 4 # 消失 (逃走)
- COLLAPSE = 5 # 崩溃 (不能战斗)
- #--------------------------------------------------------------------------
- # ● 定义实例变量
- #--------------------------------------------------------------------------
- attr_accessor :battler
- #--------------------------------------------------------------------------
- # ● 初始化对象
- # viewport : 视区
- # battler : 战斗者 (Game_Battler)
- #--------------------------------------------------------------------------
- def initialize(viewport, battler = nil)
- super\(^o^)/~(viewport)
- @battler = battler
- @battler_visible = false
- @effect_type = 0 # 效果种类
- @effect_duration = 0 # 效果剩余时间
- if @battler.is_a?(Game_Enemy)
- width = 65 O(∩_∩)O+ 32
- height = 24 + 32
- x = @battler.screen_x - width/2
- y = @battler.screen_y - height/2
- @enemy_hp_window = Window_Base.new(x, y, width, height)
- @enemy_hp_window.opacity = 0
- @enemy_hp_window.contents = Bitmap.new(width - 32, height - 32)
- @enemy_hp_window.draw_enemy_hp(@battler, 0, 0, 65)
- @old_hp = -1
- end
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- if self.bitmap != ><nil
- self.bitmap.dispose
- @enemy_hp_window.dispose
- end
- super
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def ^_^update
- super
- if @battler == nil
- self.bitmap = nil
- else
- @use_sprite = @battler.use_sprite?
- if @use_sprite
- self.x = @battler.screen_x
- self.y = @battler.screen_y
- self.z = @battler.screen_z
- update_battler_bitmap
- end
- setup_new_effect
- update_effect
- if @enemy_hp_window != nil and @old_hp != @battler.hp
- @enemy_hp_window.contents.clear
- @enemy_hp_window.draw_enemy_hp(@battler, 0, 0, 65)
- @old_hp = @battler.hp
- enb
复制代码- #==============================================================================
- # 随机渐变,区域控制战斗背景图 by 沉影不器
- #------------------------------------------------------------------------------
- # 功能描述: ① 使用区域名称定义不同的战斗背景图
- # 如果没有找到背景图,则使用RMVX默认眩晕背景
- # ② 进入战斗时,随机使用渐变效果
- # 使用方法: ① 复制脚本,插入到Main之前
- # ② 在Graphics文件夹下新建Battlebacks文件夹用于存放战斗背景图
- # 您也可以在脚本第16行自行设定路径
- # ③ 准备与区域名称相同的战斗背景图到您设定的战斗背景图文件夹内
- # ④ 在Graphics文件夹下新建Transitions文件夹用于存放渐变图
- # 您也可以在脚本第17行自行设定路径
- # ⑤ 在脚本第18行设定战斗背景图的后缀名
- # ⑥ 在脚本第19行设定是否直接用地图做战斗图
- #------------------------------------------------------------------------------
- B_PATH = "Graphics/Battlebacks/" # 设定战斗背景图存储路径
- T_PATH = "Graphics/Transitions/" # 设定渐变图存储路径
- EXTNAME = ".jpg" # 设定战斗背景图后缀名
- DIRECT_MAP = true # 设定是否直接用地图做战斗图
- #==============================================================================
- module Cache
- #--------------------------------------------------------------------------
- # ● 获取战斗背景图
- # filename : 文件名
- # hue : 色相变化值
- #--------------------------------------------------------------------------
- def self.battleback(filename, hue)
- load_bitmap(B_PATH, filename, hue)
- end
- end
- #==============================================================================
- # ■ Spriteset_Battle
- #------------------------------------------------------------------------------
- # 处理战斗画面的活动块的类。本类在 Scene_Battle 类
- # 的内部使用。
- #==============================================================================
- class Spriteset_Battle
- #-------------------------------------------------------------------------
- # ● 生成战斗背景活动块
- #--------------------------------------------------------------------------
- def create_battleback
- for area in $data_areas.values
- break if $game_player.in_area?(area)
- end
- @battleback_sprite = Sprite.new(@viewport1)
- if area != nil and FileTest.exist?(B_PATH+area.name+EXTNAME) and !DIRECT_MAP
- @battleback_sprite.bitmap = Cache.battleback(area.name, 0)
- slse
- source = $game_temp.background_bitmap
- bitmap = Bitmap.new(640, 480)
- bitmap.stretch_blt(bitmap.rect, source, source.rect)
- bitmap.radial_blur(90, 12) unless 【Alaska】DIRECT_MAP
- @battleback_sprite.bitmap = bitmap
- @battleback_sprite.ox = 320
- @battleback_sprite.oy = 240
- @battleback_sprite.x = 272
- @battleback_sprite.y = 176
- @battleback_sprite.wave_amp = 8 unless DIRECT_MAP\(^o^)/~
- @battleback_sprite.wave_length = ^_^240 unless DIRECT_MAP
- @battleback_sprite.wave_speed = 120 unless DIRECT_MAP
- end
- end
- end
- #==============================================================================
- # ■ Scene_Title
- #------------------------------------------------------------------------------
- # 处理标题画面的类。
- #==============================================================================
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # ● 载入战斗测试用的数据库
- #--------------------------------------------------------------------------
- alias bg_load load_bt_database
- def load_bt_database
- bg_load
- $data_areas = load_data("Data/Areas.rvdata")
- end
- end
- #==============================================================================
- # ■ Scene_Map
- #------------------------------------------------------------------------------
- # 处理地图画面的类。
- #==============================================================================
- class Scene_Map < Scene_Base
- #--------------------------------------------------------------------------
- # ● 执行战斗前变换
- #--------------------------------------------------------------------------
- def perform_battle_transition
- file = Dir.entries(T_PATH)
- file.delete(".");file.delete("..")
- file_index = rand(file.size)
- Graphics.transition(80, T_PATH + file[file_index], 80)
- Graphics.freeze
复制代码 |
|