jesus333 Posted October 27, 2010 Share Posted October 27, 2010 Salve a tutti!Su rpg vx usavo uno script meraviglioso per le battaglie standard, vorrei sapere se qualcuno è in grado di adattarlo per xp.questo è lo script: =begin ************************************************************************ Ÿ ‹[Ž—3Dƒoƒgƒ‹ƒ‰ƒCƒ“ Ver0.91 (ƒx[ƒ^”Å) =end # ************************************************************************ module Zii3DBL # ¥ Šî–{Ý’è ( true / false ) LineNum = 3 # ’Êí‚̃‰ƒCƒ“” GazePer = 1.25 # ƒJƒƒ‰‚Ì’Ž‹”{—¦ CameraMove = 40 # ƒJƒƒ‰ˆÚ“®ƒtƒŒ[ƒ€ (¬‚³‚¢‚Ù‚Ç‘¬‚¢) BaseLineY = 272 # Šî–{ƒ‰ƒCƒ“‚ÌYÀ•W VanishingY = 64 # Áޏ“_‚ÌYÀ•W LineDistance = 128 # ƒ‰ƒCƒ“‚ÌŠÔŠu (‰œs‚«) NotUseEnemyY = true # ’n–Ê‚©‚ç‚Ì‚‚³‚ðl—¶‚µ‚È‚¢ (YÀ•W‚ðŽg‚í‚È‚¢) # ¥ F‚ÌÝ’è (Ô, —Î, Â, “§–¾“x) FloorLineC = Color.new(128, 255, 255) # °‚̃‰ƒCƒ“F # ¥ ”z’uŒÅ’èƒnƒbƒVƒ… Disposition = { # “GƒOƒ‹[ƒvID=>[ƒGƒlƒ~[1‚̃‰ƒCƒ“”Ô†, 2, 3, c], 1=>[1, 0, 0, 2, 2], # ƒrƒ{[Aƒtƒ‰ƒbƒg~‚QAƒtƒ‰[ƒ^~‚Q } # ¤ ƒJƒƒ‰ƒ[ƒN ( -1 –³Ž‹ / 0 ‘S‘Ì / 1 ‘ÎÛ / 2 ‘ÎÛ (’–Ú) ) CamAction = 1 # ƒGƒlƒ~[s“®Žž (0`2) CamTarget = 1 # ƒGƒlƒ~[‘ÎÛŽž (0`2) CamSelect = 0 # ƒGƒlƒ~[‘I‘ðŽž (-1`2) end #-mymemo----------------------------------------------------------------------- # ‰æ‘œ"BattleFloor"‚ÍŽg—p‚µ‚È‚¢I # “GƒOƒ‹[ƒv‚ł̒n–Ê‚ÌYÀ•W‚Í 288 # •\ަ”{—¦ŒvŽZ‚Å‚ÍA‹——£‚ÍZÀ•W¬•ª‚Ì‚Ý #------------------------------------------------------------------------------ #****************************************************************************** # ¥ ƒX[ƒp[ƒNƒ‰ƒX #****************************************************************************** class RPG::Skill #-------------------------------------------------------------------------- # œ ƒJƒƒ‰’–Ú”»’è cam3on[] #-------------------------------------------------------------------------- def zii3dbl_cam_on if @zii3dbl_cam_on == nil @zii3dbl_cam_on = (@note[/cam3on\[\]/] != nil ? true : false) end return @zii3dbl_cam_on end end class RPG::Item #-------------------------------------------------------------------------- # œ ƒJƒƒ‰’–Ú”»’è cam3on[] #-------------------------------------------------------------------------- def zii3dbl_cam_on if @zii3dbl_cam_on == nil @zii3dbl_cam_on = (@note[/cam3on\[\]/] != nil ? true : false) end return @zii3dbl_cam_on end end #============================================================================== # ¡ Zii3DBL #============================================================================== module Zii3DBL #-------------------------------------------------------------------------- # œ ’è” #-------------------------------------------------------------------------- ExpRangeY = BaseLineY - VanishingY # ‰ÂŽ‹”ÍˆÍ (YÀ•W¬•ª) #-------------------------------------------------------------------------- # œ •\ަ”{—¦‚̎擾 # d : ‹——£ # w : ‰ÂŽ‹”ÍˆÍ (XÀ•W¬•ª) #-------------------------------------------------------------------------- def self.exp_per(d, w) return Math.exp(- d.to_f / w.to_f) end #-------------------------------------------------------------------------- # œ Z •\ަ’l ‚̎擾 (YÀ•W¬•ª) # p : •\ަ”{—¦ # h : ‰ÂŽ‹”ÍˆÍ (YÀ•W¬•ª) #-------------------------------------------------------------------------- def self.exp_z(p, h) return h * (1 - p) end end #============================================================================== # ¡ ZiiCam_Para3D #------------------------------------------------------------------------------ # ‹[Ž—3D•\ަ‚̊ƂȂéƒJƒƒ‰‚̃Nƒ‰ƒX‚Å‚·B #============================================================================== class ZiiCam_Para3D #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :x # XÀ•W attr_accessor :line # ƒ‰ƒCƒ“’l attr_accessor :zoom # Šg‘å—¦ #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- def initialize clear_values end #-------------------------------------------------------------------------- # œ ’l‚ðƒNƒŠƒA #-------------------------------------------------------------------------- def clear_values @x = 272 @line = 0 @zoom = 1.0 end #-------------------------------------------------------------------------- # œ Ƈ—pî•ñ‚̎擾 #-------------------------------------------------------------------------- def values return [@x, @line, @zoom] end #-------------------------------------------------------------------------- # œ Ƈ—pî•ñ‚ÌÝ’è #-------------------------------------------------------------------------- def values=(values) @x = values[0] @line = values[1] @zoom = values[2] end #-------------------------------------------------------------------------- # œ ƒ‰ƒCƒ“”{—¦‚̎擾 # line_num : ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- def line_per(line_num) @cache_line = {} if @cache_line.nil? # ƒLƒƒƒbƒVƒ…ƒnƒbƒVƒ…‚Ìì¬ n = line_num - self.line # ·ƒ‰ƒCƒ“’l‚ðŒvŽZ if line_num % 1.0 == 0.0 # 1.0‚ÅŠ„‚èØ‚ê‚½‚çƒLƒƒƒbƒVƒ… unless @cache_line.has_key?(n) # ƒLƒƒƒbƒVƒ…ςݔ»’è z , w = Zii3DBL::LineDistance * n , 544 @cache_line[n] = Zii3DBL.exp_per(z, w) # ƒLƒƒƒbƒVƒ…‚ÌÝ’è end return @cache_line[n] end z , w = Zii3DBL::LineDistance * n , 544 return Zii3DBL.exp_per(z, w) end #-------------------------------------------------------------------------- # œ X ŽÀÀ•W‚̎擾 # line_num : ƒ‰ƒCƒ“’l # logic_x : XÀ•W (˜_—) #-------------------------------------------------------------------------- def real_x(line_num, logic_x) n = (logic_x - self.x) * line_per(line_num) * self.zoom + 272 return Integer(n) end #-------------------------------------------------------------------------- # œ Y ŽÀÀ•W‚̎擾 # line_num : ƒ‰ƒCƒ“’l # logic_y : YÀ•W (˜_—) #-------------------------------------------------------------------------- def real_y(line_num, logic_y) lp = line_per(line_num) n = Zii3DBL::BaseLineY n -= Zii3DBL.exp_z(lp, Zii3DBL::ExpRangeY) * self.zoom n -= (288 - logic_y) * lp * self.zoom return Integer(n) end #-------------------------------------------------------------------------- # œ ŽÀŠg‘å—¦‚̎擾 # line_num : ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- def real_zoom(line_num) return line_per(line_num) * self.zoom end end #============================================================================== # ¡ ZiiCam_Para3D_Ctrl #------------------------------------------------------------------------------ # ‹[Ž—3D•\ަƒJƒƒ‰‚Ì‘€ìƒNƒ‰ƒX‚Å‚·B #============================================================================== class ZiiCam_Para3D_Ctrl < ZiiCam_Para3D #-------------------------------------------------------------------------- # œ ’l‚ðƒNƒŠƒA #-------------------------------------------------------------------------- def clear_values super @x_length = 0 @line_length = 0 @zoom_length = 0.0 @count = 0 @max_frame = 1 end #-------------------------------------------------------------------------- # œ –Ú•W’l‚ðÝ’è # x : X À•W # line : ƒ‰ƒCƒ“’l # zoom : Šg‘å—¦ #-------------------------------------------------------------------------- def setup(x, line, zoom) return if self.values == [x, line, zoom] @x , @line , @zoom = x , line , zoom @x_length = $game_temp.zii3d_cam.x - @x @line_length = $game_temp.zii3d_cam.line - @line.to_f @zoom_length = $game_temp.zii3d_cam.zoom - @zoom @count = Zii3DBL::CameraMove @max_frame = @count ** 2 end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update update_camera end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚ðXV #-------------------------------------------------------------------------- def update_camera return if @count == 0 @count -= 1 x = @x + @x_length * @count ** 2 / @max_frame line = @line + @line_length * @count ** 2 / @max_frame zoom = @zoom + @zoom_length * @count ** 2 / @max_frame $game_temp.zii3d_cam.values = [x, line, zoom] end end #============================================================================== # ¡ Game_Temp #============================================================================== class Game_Temp #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :zii3d_cam # ‹[Ž—3DƒJƒƒ‰ #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_temp_initialize :initialize def initialize zii3dbl_temp_initialize @zii3d_cam = ZiiCam_Para3D.new end end #============================================================================== # ¡ Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_writer :zii3dbl_cam_action # ƒJƒƒ‰“®ì s“®Žž attr_writer :zii3dbl_cam_target # ƒJƒƒ‰“®ì ‘ÎÛŽž attr_writer :zii3dbl_cam_select # ƒJƒƒ‰“®ì ‘I‘ðŽž #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_system_initialize :initialize def initialize zii3dbl_system_initialize @zii3dbl_cam_action = Zii3DBL::CamAction @zii3dbl_cam_target = Zii3DBL::CamTarget @zii3dbl_cam_select = Zii3DBL::CamSelect end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì s“®Žž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_action @zii3dbl_cam_action = Zii3DBL::CamAction if @zii3dbl_cam_action == nil return @zii3dbl_cam_action end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì ‘ÎÛŽž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_target @zii3dbl_cam_target = Zii3DBL::CamTarget if @zii3dbl_cam_target == nil return @zii3dbl_cam_target end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì ‘I‘ðŽž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_select @zii3dbl_cam_select = Zii3DBL::CamSelect if @zii3dbl_cam_select == nil return @zii3dbl_cam_select end end #============================================================================== # ¡ Game_Enemy #============================================================================== class Game_Enemy #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :zii3d_line # ‹[Ž—3D ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_enemy_initialize :initialize def initialize(index, enemy_id) zii3dbl_enemy_initialize(index, enemy_id) @zii3d_line = rand(Zii3DBL::LineNum) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X À•W‚Ì’è‹`ˆø‚«Œp‚¬ #-------------------------------------------------------------------------- alias :base_screen_x :screen_x #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾 #-------------------------------------------------------------------------- alias :zii3dbl_enemy_screen_x :screen_x def screen_x n = zii3dbl_enemy_screen_x return $game_temp.zii3d_cam.real_x(@zii3d_line, n) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 #-------------------------------------------------------------------------- alias :zii3dbl_enemy_screen_y :screen_y def screen_y n = zii3dbl_enemy_screen_y n = 288 if Zii3DBL::NotUseEnemyY return $game_temp.zii3d_cam.real_y(@zii3d_line, n) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X •ûŒüŠg‘å—¦ ‚̎擾 #-------------------------------------------------------------------------- def zoom_x return $game_temp.zii3d_cam.real_zoom(@zii3d_line) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê Y •ûŒüŠg‘å—¦ ‚̎擾 #-------------------------------------------------------------------------- def zoom_y return $game_temp.zii3d_cam.real_zoom(@zii3d_line) end end #============================================================================== # ¡ Game_Troop #============================================================================== class Game_Troop #-------------------------------------------------------------------------- # œ ƒZƒbƒgƒAƒbƒv #-------------------------------------------------------------------------- alias :zii3dbl_troop_setup :setup def setup(troop_id) zii3dbl_troop_setup(troop_id) set_enemies_3d_line end #-------------------------------------------------------------------------- # œ ƒGƒlƒ~[‚̃‰ƒCƒ“”z’u #-------------------------------------------------------------------------- def set_enemies_3d_line unless Zii3DBL::Disposition.has_key?(@troop_id) @rear_3d_line = Zii3DBL::LineNum - 1 return end @rear_3d_line = 0 for i in 0...Zii3DBL::Disposition[@troop_id].size next if @enemies[i].nil? line_num = Zii3DBL::Disposition[@troop_id][i] @enemies[i].zii3d_line = line_num @rear_3d_line = line_num if @rear_3d_line < line_num end end #-------------------------------------------------------------------------- # œ Å‘O—ñƒ‰ƒCƒ“’l‚̎擾 (‘¶Ý‚·‚éÅ‘O—ñ‚̃Gƒlƒ~[‚̃‰ƒCƒ“’l‚ð•Ô‚·) #-------------------------------------------------------------------------- def front_3d_line n = 99 for member in @enemies next unless member.exist? n = member.zii3d_line if member.zii3d_line < n end n = 0 if n == 99 return n end #-------------------------------------------------------------------------- # œ ÅŒã”öƒ‰ƒCƒ“’l‚̎擾 (ݒ肵‚Ä‚¨‚¢‚½ƒ‰ƒCƒ“‚©‚çŽæ“¾) #-------------------------------------------------------------------------- def rear_3d_line return @rear_3d_line end end #============================================================================== # ¡ Sprite_BattleLineFloor #------------------------------------------------------------------------------ # @ƒ‰ƒCƒ“ƒtƒB[ƒ‹ƒh‚̃tƒƒA‚ð•\ަ‚·‚éƒNƒ‰ƒX‚Å‚·B #============================================================================== class Sprite_BattleLineFloor < Sprite #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» # viewport : ƒrƒ…[ƒ|[ƒg #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) self.bitmap = Bitmap.new(544, 416) @zii3d_cam = ZiiCam_Para3D.new self.z = 1 refresh end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose super end #-------------------------------------------------------------------------- # œ ƒŠƒtƒŒƒbƒVƒ… #-------------------------------------------------------------------------- def refresh self.bitmap.clear line_max = $game_troop.rear_3d_line + 1 for i in 0..line_max y = $game_temp.zii3d_cam.real_y(i, 288) next unless y.between?(0, 416) x = $game_temp.zii3d_cam.real_x(i, 0) width = $game_temp.zii3d_cam.real_x(i, 544) - x self.bitmap.fill_rect(x, y, width, 1, Zii3DBL::FloorLineC) end end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update super if @zii3d_cam.values != $game_temp.zii3d_cam.values @zii3d_cam.values = $game_temp.zii3d_cam.values refresh end end end #============================================================================== # ¡ Sprite_BattleLineBack (Šg’£—p‚É’è‹`) #------------------------------------------------------------------------------ # @ƒ‰ƒCƒ“ƒtƒB[ƒ‹ƒh”wŒi‚ð•\ަ‚·‚éƒNƒ‰ƒX‚Å‚·B #============================================================================== class Sprite_BattleLineBack < Sprite #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» # viewport : ƒrƒ…[ƒ|[ƒg #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- def dispose super end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update super end end #============================================================================== # ¡ Sprite_Battler #============================================================================== class Sprite_Battler #-------------------------------------------------------------------------- # ™ ƒAƒjƒ[ƒVƒ‡ƒ“‚ÌŠJŽn #-------------------------------------------------------------------------- #alias :zii3dbl_sbattler_start_animation :start_animation def start_animation(animation, mirror = false) super return if @animation == nil # ƒAƒjƒ[ƒVƒ‡ƒ“‚ª‚ ‚é‚©H zii3dbl_animation_set_position # Šî€Ý’è end #-------------------------------------------------------------------------- # œ Šg‘å—¦‚ÌXV #-------------------------------------------------------------------------- def update_zii3d_zoom return if @battler == nil # ƒoƒgƒ‰[‚ª‚¢‚é‚©H return if @battler.actor? # ƒoƒgƒ‰[‚̓AƒNƒ^[‚©H self.zoom_x = @battler.zoom_x # X Šg‘å—¦‚ðÝ’è self.zoom_y = @battler.zoom_y # Y Šg‘å—¦‚ðÝ’è end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- alias :zii3dbl_sbattler_update :update def update update_zii3d_zoom # Šg‘å—¦‚ÌXV zii3dbl_sbattler_update return if @animation == nil # ƒAƒjƒ[ƒVƒ‡ƒ“‚ª‚ ‚é‚©H return if @zii3d_cell_data == nil # ƒZƒ‹ƒf[ƒ^‚ª‚ ‚é‚©H zii3dbl_animation_set_position # Šî€Ý’è zii3dbl_animation_set_sprites # ˆÊ’uÝ’è end #-------------------------------------------------------------------------- # ™ ƒAƒjƒ[ƒVƒ‡ƒ“ƒXƒvƒ‰ƒCƒg‚ÌÝ’è #-------------------------------------------------------------------------- #alias :zii3dbl_sbattler_animation_set_sprites :animation_set_sprites def animation_set_sprites(frame) super @zii3d_cell_data = frame.cell_data # ƒZƒ‹î•ñ‚Ì‹L‰¯ zii3dbl_animation_set_sprites # ˆÊ’uÝ’è end #-------------------------------------------------------------------------- # œ ‹[Ž—3D•\ަ—pƒAƒjƒ[ƒVƒ‡ƒ“Šî€Ý’è (Šg‘å—¦‚𔽉f) #-------------------------------------------------------------------------- def zii3dbl_animation_set_position return if @animation.position == 3 # Šî€ˆÊ’u‚ªƒoƒgƒ‰[‚©H @animation_ox = x @animation_oy = y if @animation.position == 0 @animation_oy -= height * zoom_y elsif @animation.position == 1 @animation_oy -= height / 2 * zoom_y end end #-------------------------------------------------------------------------- # œ ‹[Ž—3D•\ަ—pƒAƒjƒ[ƒVƒ‡ƒ“ˆÊ’uÝ’è #-------------------------------------------------------------------------- def zii3dbl_animation_set_sprites return if @animation.position == 3 # Šî€ˆÊ’u‚ªƒoƒgƒ‰[‚©H for i in 0..15 sprite = @animation_sprites[i] next if sprite == nil pattern = @zii3d_cell_data[i, 0] next if pattern == nil or pattern == -1 if @animation_mirror sprite.x = @animation_ox - zoom_x * @zii3d_cell_data[i, 1] sprite.y = @animation_oy + zoom_y * @zii3d_cell_data[i, 2] else sprite.x = @animation_ox + zoom_x * @zii3d_cell_data[i, 1] sprite.y = @animation_oy + zoom_y * @zii3d_cell_data[i, 2] end sprite.zoom_x = zoom_x * @zii3d_cell_data[i, 3] / 100.0 sprite.zoom_y = zoom_y * @zii3d_cell_data[i, 3] / 100.0 end end end #============================================================================== # ¡ Spriteset_Battle #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_initialize :initialize def initialize zii3dbl_spriteset_battle_initialize create_battleline end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_dispose :dispose def dispose dispose_battleline zii3dbl_spriteset_battle_dispose end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_update :update def update update_battleline zii3dbl_spriteset_battle_update end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“ƒXƒvƒ‰ƒCƒg‚Ìì¬ #-------------------------------------------------------------------------- def create_battleline @battle_line_back = Sprite_BattleLineBack.new(@viewport1) @battle_line_floor = Sprite_BattleLineFloor.new(@viewport1) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“ƒXƒvƒ‰ƒCƒg‚̉ð•ú #-------------------------------------------------------------------------- def dispose_battleline @battle_line_back.dispose @battle_line_floor.dispose end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“‚ÌXV #-------------------------------------------------------------------------- def update_battleline @battle_line_back.update if @battle_line_back != nil @battle_line_floor.update if @battle_line_floor != nil end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒAƒXƒvƒ‰ƒCƒg‚Ìì¬ #-------------------------------------------------------------------------- def create_battlefloor end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒAƒXƒvƒ‰ƒCƒg‚̉ð•ú #-------------------------------------------------------------------------- def dispose_battlefloor end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒA‚ÌXV #-------------------------------------------------------------------------- def update_battlefloor end end #============================================================================== # ¡ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # œ ŠJŽnˆ— #-------------------------------------------------------------------------- alias :zii3dbl_scene_start :start def start zii3dbl_scene_start create_zii3d_cam end #-------------------------------------------------------------------------- # œ Šî–{XVˆ— #-------------------------------------------------------------------------- alias :zii3dbl_scene_update_basic :update_basic def update_basic(main = false) zii3dbl_scene_update_basic(main) update_zii3d_cam end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚Ìì¬ #-------------------------------------------------------------------------- def create_zii3d_cam @zii3d_cam = ZiiCam_Para3D_Ctrl.new update_zii3d_cam end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚ðXV #-------------------------------------------------------------------------- def update_zii3d_cam zii3d_cam_move @zii3d_cam.update end #-------------------------------------------------------------------------- # ~ ƒJƒƒ‰‚̈ړ® #-------------------------------------------------------------------------- def zii3d_cam_move if @active_battler != nil and not @active_battler.actor? x = @active_battler.base_screen_x line = @active_battler.zii3d_line zoom = Zii3DBL::GazePer else x = 272 line = $game_troop.front_3d_line zoom = 1.0 end @zii3d_cam.setup(x, line, zoom) end end Potete aiutarmi? Link to comment Share on other sites More sharing options...
0 Guardian of Irael Posted October 27, 2010 Share Posted October 27, 2010 Che tipo di script è? Magari esiste già l'analogo per XP, conosci il nome? ^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
0 jesus333 Posted October 27, 2010 Author Share Posted October 27, 2010 Che tipo di script è? Magari esiste già l'analogo per XP, conosci il nome? ^ ^è uno pseudo 3d battle, crea quattro linee orizzontali a terra in prospettiva e distribuisce i nemici a caso su di esse, e zooma su chi compie l'azione.Ho cercato molto uno script equivalente ma non l ho trovato.. Link to comment Share on other sites More sharing options...
0 Guardian of Irael Posted October 27, 2010 Share Posted October 27, 2010 Ah capisco, è abbastanza particolare, in effetti non mi viene in mente uno script simile...il fatto è che i BS son complicati e richiedono impegno per l'eventuale scripter che decide di convertirli...eh buona fortuna.^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
0 jesus333 Posted October 27, 2010 Author Share Posted October 27, 2010 Ah capisco, è abbastanza particolare, in effetti non mi viene in mente uno script simile...il fatto è che i BS son complicati e richiedono impegno per l'eventuale scripter che decide di convertirli...eh buona fortuna.^ ^spero di trovare qualcuno di buona volontà xD Link to comment Share on other sites More sharing options...
Question
jesus333
Salve a tutti!
Su rpg vx usavo uno script meraviglioso per le battaglie standard, vorrei sapere se qualcuno è in grado di adattarlo per xp.
questo è lo script:
=begin ************************************************************************ Ÿ ‹[Ž—3Dƒoƒgƒ‹ƒ‰ƒCƒ“ Ver0.91 (ƒx[ƒ^”Å) =end # ************************************************************************ module Zii3DBL # ¥ Šî–{Ý’è ( true / false ) LineNum = 3 # ’Êí‚̃‰ƒCƒ“” GazePer = 1.25 # ƒJƒƒ‰‚Ì’Ž‹”{—¦ CameraMove = 40 # ƒJƒƒ‰ˆÚ“®ƒtƒŒ[ƒ€ (¬‚³‚¢‚Ù‚Ç‘¬‚¢) BaseLineY = 272 # Šî–{ƒ‰ƒCƒ“‚ÌYÀ•W VanishingY = 64 # Áޏ“_‚ÌYÀ•W LineDistance = 128 # ƒ‰ƒCƒ“‚ÌŠÔŠu (‰œs‚«) NotUseEnemyY = true # ’n–Ê‚©‚ç‚Ì‚‚³‚ðl—¶‚µ‚È‚¢ (YÀ•W‚ðŽg‚í‚È‚¢) # ¥ F‚ÌÝ’è (Ô, —Î, Â, “§–¾“x) FloorLineC = Color.new(128, 255, 255) # °‚̃‰ƒCƒ“F # ¥ ”z’uŒÅ’èƒnƒbƒVƒ… Disposition = { # “GƒOƒ‹[ƒvID=>[ƒGƒlƒ~[1‚̃‰ƒCƒ“”Ô†, 2, 3, c], 1=>[1, 0, 0, 2, 2], # ƒrƒ{[Aƒtƒ‰ƒbƒg~‚QAƒtƒ‰[ƒ^~‚Q } # ¤ ƒJƒƒ‰ƒ[ƒN ( -1 –³Ž‹ / 0 ‘S‘Ì / 1 ‘ÎÛ / 2 ‘ÎÛ (’–Ú) ) CamAction = 1 # ƒGƒlƒ~[s“®Žž (0`2) CamTarget = 1 # ƒGƒlƒ~[‘ÎÛŽž (0`2) CamSelect = 0 # ƒGƒlƒ~[‘I‘ðŽž (-1`2) end #-mymemo----------------------------------------------------------------------- # ‰æ‘œ"BattleFloor"‚ÍŽg—p‚µ‚È‚¢I # “GƒOƒ‹[ƒv‚ł̒n–Ê‚ÌYÀ•W‚Í 288 # •\ަ”{—¦ŒvŽZ‚Å‚ÍA‹——£‚ÍZÀ•W¬•ª‚Ì‚Ý #------------------------------------------------------------------------------ #****************************************************************************** # ¥ ƒX[ƒp[ƒNƒ‰ƒX #****************************************************************************** class RPG::Skill #-------------------------------------------------------------------------- # œ ƒJƒƒ‰’–Ú”»’è cam3on[] #-------------------------------------------------------------------------- def zii3dbl_cam_on if @zii3dbl_cam_on == nil @zii3dbl_cam_on = (@note[/cam3on\[\]/] != nil ? true : false) end return @zii3dbl_cam_on end end class RPG::Item #-------------------------------------------------------------------------- # œ ƒJƒƒ‰’–Ú”»’è cam3on[] #-------------------------------------------------------------------------- def zii3dbl_cam_on if @zii3dbl_cam_on == nil @zii3dbl_cam_on = (@note[/cam3on\[\]/] != nil ? true : false) end return @zii3dbl_cam_on end end #============================================================================== # ¡ Zii3DBL #============================================================================== module Zii3DBL #-------------------------------------------------------------------------- # œ ’è” #-------------------------------------------------------------------------- ExpRangeY = BaseLineY - VanishingY # ‰ÂŽ‹”ÍˆÍ (YÀ•W¬•ª) #-------------------------------------------------------------------------- # œ •\ަ”{—¦‚̎擾 # d : ‹——£ # w : ‰ÂŽ‹”ÍˆÍ (XÀ•W¬•ª) #-------------------------------------------------------------------------- def self.exp_per(d, w) return Math.exp(- d.to_f / w.to_f) end #-------------------------------------------------------------------------- # œ Z •\ަ’l ‚̎擾 (YÀ•W¬•ª) # p : •\ަ”{—¦ # h : ‰ÂŽ‹”ÍˆÍ (YÀ•W¬•ª) #-------------------------------------------------------------------------- def self.exp_z(p, h) return h * (1 - p) end end #============================================================================== # ¡ ZiiCam_Para3D #------------------------------------------------------------------------------ # ‹[Ž—3D•\ަ‚̊ƂȂéƒJƒƒ‰‚̃Nƒ‰ƒX‚Å‚·B #============================================================================== class ZiiCam_Para3D #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :x # XÀ•W attr_accessor :line # ƒ‰ƒCƒ“’l attr_accessor :zoom # Šg‘å—¦ #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- def initialize clear_values end #-------------------------------------------------------------------------- # œ ’l‚ðƒNƒŠƒA #-------------------------------------------------------------------------- def clear_values @x = 272 @line = 0 @zoom = 1.0 end #-------------------------------------------------------------------------- # œ Ƈ—pî•ñ‚̎擾 #-------------------------------------------------------------------------- def values return [@x, @line, @zoom] end #-------------------------------------------------------------------------- # œ Ƈ—pî•ñ‚ÌÝ’è #-------------------------------------------------------------------------- def values=(values) @x = values[0] @line = values[1] @zoom = values[2] end #-------------------------------------------------------------------------- # œ ƒ‰ƒCƒ“”{—¦‚̎擾 # line_num : ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- def line_per(line_num) @cache_line = {} if @cache_line.nil? # ƒLƒƒƒbƒVƒ…ƒnƒbƒVƒ…‚Ìì¬ n = line_num - self.line # ·ƒ‰ƒCƒ“’l‚ðŒvŽZ if line_num % 1.0 == 0.0 # 1.0‚ÅŠ„‚èØ‚ê‚½‚çƒLƒƒƒbƒVƒ… unless @cache_line.has_key?(n) # ƒLƒƒƒbƒVƒ…ςݔ»’è z , w = Zii3DBL::LineDistance * n , 544 @cache_line[n] = Zii3DBL.exp_per(z, w) # ƒLƒƒƒbƒVƒ…‚ÌÝ’è end return @cache_line[n] end z , w = Zii3DBL::LineDistance * n , 544 return Zii3DBL.exp_per(z, w) end #-------------------------------------------------------------------------- # œ X ŽÀÀ•W‚̎擾 # line_num : ƒ‰ƒCƒ“’l # logic_x : XÀ•W (˜_—) #-------------------------------------------------------------------------- def real_x(line_num, logic_x) n = (logic_x - self.x) * line_per(line_num) * self.zoom + 272 return Integer(n) end #-------------------------------------------------------------------------- # œ Y ŽÀÀ•W‚̎擾 # line_num : ƒ‰ƒCƒ“’l # logic_y : YÀ•W (˜_—) #-------------------------------------------------------------------------- def real_y(line_num, logic_y) lp = line_per(line_num) n = Zii3DBL::BaseLineY n -= Zii3DBL.exp_z(lp, Zii3DBL::ExpRangeY) * self.zoom n -= (288 - logic_y) * lp * self.zoom return Integer(n) end #-------------------------------------------------------------------------- # œ ŽÀŠg‘å—¦‚̎擾 # line_num : ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- def real_zoom(line_num) return line_per(line_num) * self.zoom end end #============================================================================== # ¡ ZiiCam_Para3D_Ctrl #------------------------------------------------------------------------------ # ‹[Ž—3D•\ަƒJƒƒ‰‚Ì‘€ìƒNƒ‰ƒX‚Å‚·B #============================================================================== class ZiiCam_Para3D_Ctrl < ZiiCam_Para3D #-------------------------------------------------------------------------- # œ ’l‚ðƒNƒŠƒA #-------------------------------------------------------------------------- def clear_values super @x_length = 0 @line_length = 0 @zoom_length = 0.0 @count = 0 @max_frame = 1 end #-------------------------------------------------------------------------- # œ –Ú•W’l‚ðÝ’è # x : X À•W # line : ƒ‰ƒCƒ“’l # zoom : Šg‘å—¦ #-------------------------------------------------------------------------- def setup(x, line, zoom) return if self.values == [x, line, zoom] @x , @line , @zoom = x , line , zoom @x_length = $game_temp.zii3d_cam.x - @x @line_length = $game_temp.zii3d_cam.line - @line.to_f @zoom_length = $game_temp.zii3d_cam.zoom - @zoom @count = Zii3DBL::CameraMove @max_frame = @count ** 2 end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update update_camera end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚ðXV #-------------------------------------------------------------------------- def update_camera return if @count == 0 @count -= 1 x = @x + @x_length * @count ** 2 / @max_frame line = @line + @line_length * @count ** 2 / @max_frame zoom = @zoom + @zoom_length * @count ** 2 / @max_frame $game_temp.zii3d_cam.values = [x, line, zoom] end end #============================================================================== # ¡ Game_Temp #============================================================================== class Game_Temp #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :zii3d_cam # ‹[Ž—3DƒJƒƒ‰ #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_temp_initialize :initialize def initialize zii3dbl_temp_initialize @zii3d_cam = ZiiCam_Para3D.new end end #============================================================================== # ¡ Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_writer :zii3dbl_cam_action # ƒJƒƒ‰“®ì s“®Žž attr_writer :zii3dbl_cam_target # ƒJƒƒ‰“®ì ‘ÎÛŽž attr_writer :zii3dbl_cam_select # ƒJƒƒ‰“®ì ‘I‘ðŽž #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_system_initialize :initialize def initialize zii3dbl_system_initialize @zii3dbl_cam_action = Zii3DBL::CamAction @zii3dbl_cam_target = Zii3DBL::CamTarget @zii3dbl_cam_select = Zii3DBL::CamSelect end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì s“®Žž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_action @zii3dbl_cam_action = Zii3DBL::CamAction if @zii3dbl_cam_action == nil return @zii3dbl_cam_action end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì ‘ÎÛŽž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_target @zii3dbl_cam_target = Zii3DBL::CamTarget if @zii3dbl_cam_target == nil return @zii3dbl_cam_target end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰“®ì ‘I‘ðŽž ‚̎擾 #-------------------------------------------------------------------------- def zii3dbl_cam_select @zii3dbl_cam_select = Zii3DBL::CamSelect if @zii3dbl_cam_select == nil return @zii3dbl_cam_select end end #============================================================================== # ¡ Game_Enemy #============================================================================== class Game_Enemy #-------------------------------------------------------------------------- # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï” #-------------------------------------------------------------------------- attr_accessor :zii3d_line # ‹[Ž—3D ƒ‰ƒCƒ“’l #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_enemy_initialize :initialize def initialize(index, enemy_id) zii3dbl_enemy_initialize(index, enemy_id) @zii3d_line = rand(Zii3DBL::LineNum) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X À•W‚Ì’è‹`ˆø‚«Œp‚¬ #-------------------------------------------------------------------------- alias :base_screen_x :screen_x #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾 #-------------------------------------------------------------------------- alias :zii3dbl_enemy_screen_x :screen_x def screen_x n = zii3dbl_enemy_screen_x return $game_temp.zii3d_cam.real_x(@zii3d_line, n) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾 #-------------------------------------------------------------------------- alias :zii3dbl_enemy_screen_y :screen_y def screen_y n = zii3dbl_enemy_screen_y n = 288 if Zii3DBL::NotUseEnemyY return $game_temp.zii3d_cam.real_y(@zii3d_line, n) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê X •ûŒüŠg‘å—¦ ‚̎擾 #-------------------------------------------------------------------------- def zoom_x return $game_temp.zii3d_cam.real_zoom(@zii3d_line) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹‰æ–Ê Y •ûŒüŠg‘å—¦ ‚̎擾 #-------------------------------------------------------------------------- def zoom_y return $game_temp.zii3d_cam.real_zoom(@zii3d_line) end end #============================================================================== # ¡ Game_Troop #============================================================================== class Game_Troop #-------------------------------------------------------------------------- # œ ƒZƒbƒgƒAƒbƒv #-------------------------------------------------------------------------- alias :zii3dbl_troop_setup :setup def setup(troop_id) zii3dbl_troop_setup(troop_id) set_enemies_3d_line end #-------------------------------------------------------------------------- # œ ƒGƒlƒ~[‚̃‰ƒCƒ“”z’u #-------------------------------------------------------------------------- def set_enemies_3d_line unless Zii3DBL::Disposition.has_key?(@troop_id) @rear_3d_line = Zii3DBL::LineNum - 1 return end @rear_3d_line = 0 for i in 0...Zii3DBL::Disposition[@troop_id].size next if @enemies[i].nil? line_num = Zii3DBL::Disposition[@troop_id][i] @enemies[i].zii3d_line = line_num @rear_3d_line = line_num if @rear_3d_line < line_num end end #-------------------------------------------------------------------------- # œ Å‘O—ñƒ‰ƒCƒ“’l‚̎擾 (‘¶Ý‚·‚éÅ‘O—ñ‚̃Gƒlƒ~[‚̃‰ƒCƒ“’l‚ð•Ô‚·) #-------------------------------------------------------------------------- def front_3d_line n = 99 for member in @enemies next unless member.exist? n = member.zii3d_line if member.zii3d_line < n end n = 0 if n == 99 return n end #-------------------------------------------------------------------------- # œ ÅŒã”öƒ‰ƒCƒ“’l‚̎擾 (ݒ肵‚Ä‚¨‚¢‚½ƒ‰ƒCƒ“‚©‚çŽæ“¾) #-------------------------------------------------------------------------- def rear_3d_line return @rear_3d_line end end #============================================================================== # ¡ Sprite_BattleLineFloor #------------------------------------------------------------------------------ # @ƒ‰ƒCƒ“ƒtƒB[ƒ‹ƒh‚̃tƒƒA‚ð•\ަ‚·‚éƒNƒ‰ƒX‚Å‚·B #============================================================================== class Sprite_BattleLineFloor < Sprite #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» # viewport : ƒrƒ…[ƒ|[ƒg #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) self.bitmap = Bitmap.new(544, 416) @zii3d_cam = ZiiCam_Para3D.new self.z = 1 refresh end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose super end #-------------------------------------------------------------------------- # œ ƒŠƒtƒŒƒbƒVƒ… #-------------------------------------------------------------------------- def refresh self.bitmap.clear line_max = $game_troop.rear_3d_line + 1 for i in 0..line_max y = $game_temp.zii3d_cam.real_y(i, 288) next unless y.between?(0, 416) x = $game_temp.zii3d_cam.real_x(i, 0) width = $game_temp.zii3d_cam.real_x(i, 544) - x self.bitmap.fill_rect(x, y, width, 1, Zii3DBL::FloorLineC) end end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update super if @zii3d_cam.values != $game_temp.zii3d_cam.values @zii3d_cam.values = $game_temp.zii3d_cam.values refresh end end end #============================================================================== # ¡ Sprite_BattleLineBack (Šg’£—p‚É’è‹`) #------------------------------------------------------------------------------ # @ƒ‰ƒCƒ“ƒtƒB[ƒ‹ƒh”wŒi‚ð•\ަ‚·‚éƒNƒ‰ƒX‚Å‚·B #============================================================================== class Sprite_BattleLineBack < Sprite #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» # viewport : ƒrƒ…[ƒ|[ƒg #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- def dispose super end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update super end end #============================================================================== # ¡ Sprite_Battler #============================================================================== class Sprite_Battler #-------------------------------------------------------------------------- # ™ ƒAƒjƒ[ƒVƒ‡ƒ“‚ÌŠJŽn #-------------------------------------------------------------------------- #alias :zii3dbl_sbattler_start_animation :start_animation def start_animation(animation, mirror = false) super return if @animation == nil # ƒAƒjƒ[ƒVƒ‡ƒ“‚ª‚ ‚é‚©H zii3dbl_animation_set_position # Šî€Ý’è end #-------------------------------------------------------------------------- # œ Šg‘å—¦‚ÌXV #-------------------------------------------------------------------------- def update_zii3d_zoom return if @battler == nil # ƒoƒgƒ‰[‚ª‚¢‚é‚©H return if @battler.actor? # ƒoƒgƒ‰[‚̓AƒNƒ^[‚©H self.zoom_x = @battler.zoom_x # X Šg‘å—¦‚ðÝ’è self.zoom_y = @battler.zoom_y # Y Šg‘å—¦‚ðÝ’è end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- alias :zii3dbl_sbattler_update :update def update update_zii3d_zoom # Šg‘å—¦‚ÌXV zii3dbl_sbattler_update return if @animation == nil # ƒAƒjƒ[ƒVƒ‡ƒ“‚ª‚ ‚é‚©H return if @zii3d_cell_data == nil # ƒZƒ‹ƒf[ƒ^‚ª‚ ‚é‚©H zii3dbl_animation_set_position # Šî€Ý’è zii3dbl_animation_set_sprites # ˆÊ’uÝ’è end #-------------------------------------------------------------------------- # ™ ƒAƒjƒ[ƒVƒ‡ƒ“ƒXƒvƒ‰ƒCƒg‚ÌÝ’è #-------------------------------------------------------------------------- #alias :zii3dbl_sbattler_animation_set_sprites :animation_set_sprites def animation_set_sprites(frame) super @zii3d_cell_data = frame.cell_data # ƒZƒ‹î•ñ‚Ì‹L‰¯ zii3dbl_animation_set_sprites # ˆÊ’uÝ’è end #-------------------------------------------------------------------------- # œ ‹[Ž—3D•\ަ—pƒAƒjƒ[ƒVƒ‡ƒ“Šî€Ý’è (Šg‘å—¦‚𔽉f) #-------------------------------------------------------------------------- def zii3dbl_animation_set_position return if @animation.position == 3 # Šî€ˆÊ’u‚ªƒoƒgƒ‰[‚©H @animation_ox = x @animation_oy = y if @animation.position == 0 @animation_oy -= height * zoom_y elsif @animation.position == 1 @animation_oy -= height / 2 * zoom_y end end #-------------------------------------------------------------------------- # œ ‹[Ž—3D•\ަ—pƒAƒjƒ[ƒVƒ‡ƒ“ˆÊ’uÝ’è #-------------------------------------------------------------------------- def zii3dbl_animation_set_sprites return if @animation.position == 3 # Šî€ˆÊ’u‚ªƒoƒgƒ‰[‚©H for i in 0..15 sprite = @animation_sprites[i] next if sprite == nil pattern = @zii3d_cell_data[i, 0] next if pattern == nil or pattern == -1 if @animation_mirror sprite.x = @animation_ox - zoom_x * @zii3d_cell_data[i, 1] sprite.y = @animation_oy + zoom_y * @zii3d_cell_data[i, 2] else sprite.x = @animation_ox + zoom_x * @zii3d_cell_data[i, 1] sprite.y = @animation_oy + zoom_y * @zii3d_cell_data[i, 2] end sprite.zoom_x = zoom_x * @zii3d_cell_data[i, 3] / 100.0 sprite.zoom_y = zoom_y * @zii3d_cell_data[i, 3] / 100.0 end end end #============================================================================== # ¡ Spriteset_Battle #============================================================================== class Spriteset_Battle #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_initialize :initialize def initialize zii3dbl_spriteset_battle_initialize create_battleline end #-------------------------------------------------------------------------- # œ ‰ð•ú #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_dispose :dispose def dispose dispose_battleline zii3dbl_spriteset_battle_dispose end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- alias :zii3dbl_spriteset_battle_update :update def update update_battleline zii3dbl_spriteset_battle_update end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“ƒXƒvƒ‰ƒCƒg‚Ìì¬ #-------------------------------------------------------------------------- def create_battleline @battle_line_back = Sprite_BattleLineBack.new(@viewport1) @battle_line_floor = Sprite_BattleLineFloor.new(@viewport1) end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“ƒXƒvƒ‰ƒCƒg‚̉ð•ú #-------------------------------------------------------------------------- def dispose_battleline @battle_line_back.dispose @battle_line_floor.dispose end #-------------------------------------------------------------------------- # œ ƒoƒgƒ‹ƒ‰ƒCƒ“‚ÌXV #-------------------------------------------------------------------------- def update_battleline @battle_line_back.update if @battle_line_back != nil @battle_line_floor.update if @battle_line_floor != nil end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒAƒXƒvƒ‰ƒCƒg‚Ìì¬ #-------------------------------------------------------------------------- def create_battlefloor end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒAƒXƒvƒ‰ƒCƒg‚̉ð•ú #-------------------------------------------------------------------------- def dispose_battlefloor end #-------------------------------------------------------------------------- # ™ ƒoƒgƒ‹ƒtƒƒA‚ÌXV #-------------------------------------------------------------------------- def update_battlefloor end end #============================================================================== # ¡ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # œ ŠJŽnˆ— #-------------------------------------------------------------------------- alias :zii3dbl_scene_start :start def start zii3dbl_scene_start create_zii3d_cam end #-------------------------------------------------------------------------- # œ Šî–{XVˆ— #-------------------------------------------------------------------------- alias :zii3dbl_scene_update_basic :update_basic def update_basic(main = false) zii3dbl_scene_update_basic(main) update_zii3d_cam end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚Ìì¬ #-------------------------------------------------------------------------- def create_zii3d_cam @zii3d_cam = ZiiCam_Para3D_Ctrl.new update_zii3d_cam end #-------------------------------------------------------------------------- # œ ƒJƒƒ‰‚ðXV #-------------------------------------------------------------------------- def update_zii3d_cam zii3d_cam_move @zii3d_cam.update end #-------------------------------------------------------------------------- # ~ ƒJƒƒ‰‚̈ړ® #-------------------------------------------------------------------------- def zii3d_cam_move if @active_battler != nil and not @active_battler.actor? x = @active_battler.base_screen_x line = @active_battler.zii3d_line zoom = Zii3DBL::GazePer else x = 272 line = $game_troop.front_3d_line zoom = 1.0 end @zii3d_cam.setup(x, line, zoom) end endPotete aiutarmi?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now