Così ho deciso di renderlo compatibile per Ace e... ce l'ho fatta! :D
Per le istruzioni su come funziona vi rimando al topic originale del progetto (dove trovate anche la FONDAMENTALE grafica da mettere nel progetto per farlo funzionare)
Se invece volete aiutarmi nel migliorarlo ancora di più potete andare al
Spoiler
#=============================================================================== # ** BUBBLE BS Ace #------------------------------------------------------------------------------- # di Shuuchan # su suggerimento di Omivino # convertito da Retrolexip # versione B1.0 # basata su versione 1.1 del 31-01-2009 # 16-01-2015 # RGSS3 / RPG Maker VX Ace #------------------------------------------------------------------------------- #=============================================================================== # .--** ISTRUZIONI **--. #------------------------------------------------------------------------------- # 1) Copiare lo script sotto "Materials", o appena sopra "Main" nello Script # Editor. # 2) Copiare/importare il file immagine PNG "Energy Ball" nella cartella # "Graphics/Characters" del proprio progetto. # 3) Regolare le Impostazioni Generali. #------------------------------------------------------------------------------- # ** PER CREARE UN NEMICO ** #------------------------------------------------------------------------------- # 1) Creare un Nuovo Evento. # 2) Inserire la Grafica del character, e impostare le Opzioni Movimento # preferite (in un nemico "serio" di solito il movimento è "Vicino", ovvero # il nemico si muove in direzione dell'Eroe. Ma si possono creare anche # nemici con movimento personalizzato, o fissi, come delle Trappole). # 3) Inserire nella casella "Nome:" (in alto a sinistra nell'editor dell'evento) # le opzioni per creare il nemico. Le opzioni sono le seguenti: # # .enemy --> l'evento viene considerato un nemico, e perciò può essere # attaccato e distrutto dalle sfere sparate dall'Eroe. # Un evento senza .enemy nel Nome sarà ignorato dal BS, e # considerato solo un ostacolo. # da .01 a .99 --> indica il numero di sfere necessarie per uccidere il # nemico. ATTENZIONE: il numero deve essere SEMPRE A DUE # CIFRE. Per i numeri minori di 10 inserire uno 0 davanti # (perciò 5 sarà da scrivere .05). # .noatt --> il nemico può essere distrutto, ma NON attacca (opzione # utile per creare oggetti da distruggere). # # ATTENZIONE: ricordarsi sempre di scrivere il . davanti all'opzione desiderata. # # Quindi, per esempio, un nemico da uccidere in 2 colpi, avrà nel Nome: # # .enemy.02 # # Oppure, un "nemico" che non attacca da uccidere in 12 colpi, per esempio una # "porta" da sfondare con le sfere, avrà scritto nel Nome: # # .enemy.12.noatt # #------------------------------------------------------------------------------- # ** PER ATTACCARE CON UNA SFERA #------------------------------------------------------------------------------- # Premere il Tasto D sulla tastiera all'interno di una mappa. Dall'Eroe # scaturirà una sfera. # Attenzione: se lo Switch che attiva il BS è OFF (vedi Impostazioni Generali # qui sotto), sia l'Eroe che i nemici NON spareranno sfere. #------------------------------------------------------------------------------- module Shuu_Bubble #=============================================================================== # .--** IMPOSTAZIONI GENERALI **--. #------------------------------------------------------------------------------- ID_SWITCH_BUBBLE_BS = 1 # Id dello switch che permette di attivare il # Bubble BS. Se lo switch è ON è possibile # utilizzare il BS, altrimenti è disattivato. #------------------------------------------------------------------------------- SE_MORTE = "Audio/SE/Collapse1" # Nome del file Audio utilizzato alla morte # di un nemico (SE, effetto sonoro). #------------------------------------------------------------------------------- SE_SFERA = "Audio/SE/Wind7" # Nome del file Audio usato quando viene # "sparata" una sfera. #------------------------------------------------------------------------------- INDICE_SFERA_EROE = 0 # Da 0 a 7, indice della sfera sparata # dall'Eroe (da scegliere nel file PNG # "Energy Ball": 0 è il primo chara in alto # a sinistra, 1 è il chara immediatamente # alla sua destra, e così via fino al 7, che # è l'ultimo chara in basso a destra). #------------------------------------------------------------------------------- INDICE_SFERA_NEMICI = 1 # Da 0 a 7, indice della sfera sparata # dai nemici (da scegliere anche questo nel # file PNG "Energy Ball"). #------------------------------------------------------------------------------- VELOCITA = 5 # Da 2 a 7, velocità delle sfere sparate sia # dall'Eroe che dai nemici. #------------------------------------------------------------------------------- DISTANZA = 7 # Da 1 a 16 (consigliato: 7), distanza # massima a cui possono giungere le sfere # sparate da Eroe e nemici. #------------------------------------------------------------------------------- MOLT_EXP = 2 # Da 1 a 5 (consigliato: 2), indica la # il "grado" di Punti Esperienza guadagnati # all'uccisione di un nemico: maggiore sarà # il numero, maggiori gli EXP ottenuti. #------------------------------------------------------------------------------- ANIM_LEVEL_UP = 37 # Id dell'Animzaione usata quando l'Eroe # sale di Livello (da scegliere tra le # Animazioni in Database --> Animazioni). #------------------------------------------------------------------------------- ANIM_SFERA = 14 # Id dell'Animazione usata quando una sfera # colpisce un bersaglio (anche questa da # scegliere tra le Animazioni del Database). #------------------------------------------------------------------------------- MOLT_DANNO_NEMICI = 20 # Da 1 a 100 (consigliato: 20), indica il # "grado" di danni ai PV subiti dall'Eroe # quando viene colpito da una sfera: maggiore # sarà il numero, maggiori i danni. #------------------------------------------------------------------------------- TEMPO_ATTACCO_EROE = 30 # Indica il tempo di attacco (ovvero il tempo # minimo per il lancio di due sfere # consecutive) dell'Eroe. 60 = 1 secondo #------------------------------------------------------------------------------- TEMPO_ATTACCO_NEMICI = 30 # Indica il tempo di attacco dei nemici. #=============================================================================== # .--** FINE IMPOSTAZIONI **--. #=============================================================================== end class Game_Map attr_accessor :nemici alias shuu_bubble_initialize initialize alias shuu_bubble_setup_events setup_events def initialize shuu_bubble_initialize @nemici = [] end def setup_events shuu_bubble_setup_events @nemici.clear for evento in @events.values next if evento == nil if evento.nome.include?(".enemy") @nemici.push(evento) end end end end class Game_Actor def change_exp(exp, show) @exp[@class_id] = [exp, 0].max last_level = @level last_skills = skills level_up while !max_level? && self.exp >= next_level_exp level_down while self.exp < current_level_exp #display_level_up(skills - last_skills) if show && @level > last_level if show and @level > last_level and SceneManager.scene_is?(Scene_Map) $game_player.animation_id = Shuu_Bubble::ANIM_LEVEL_UP $game_player.damage = "Level Up!" end refresh end end class Game_Character def move_type_toward_player sx = @x - $game_player.x sy = @y - $game_player.y if sx.abs + sy.abs >= 12 # modifica Move Approach by Shuuchan move_random elsif sx.abs + sy.abs <= 4 move_toward_player else case rand(12) when 0..9; move_toward_player when 10; move_random when 11; move_forward end end end end class Game_Player < Game_Character attr_accessor :tempo_attacco alias shuu_bubblebs_initialize initialize alias shuu_bubblebs_update update def initialize shuu_bubblebs_initialize @tempo_attacco = 0 end def update shuu_bubblebs_update @actor = $game_party.members[0] SceneManager.goto(Scene_Gameover) if @actor.hp <= 0 @tempo_attacco -= 1 if @tempo_attacco > 0 if $game_switches[Shuu_Bubble::ID_SWITCH_BUBBLE_BS] == true if Input.trigger?(Input::Z) and @tempo_attacco <= 0 @tempo_attacco = Shuu_Bubble::TEMPO_ATTACCO_EROE - @actor.level*2 @tempo_attacco = 30 if @tempo_attacco < 30 Audio.se_play(Shuu_Bubble::SE_SFERA) indice = Shuu_Bubble::INDICE_SFERA_EROE $distanza.push(Game_Distanza.new($game_player, indice)) end end end end class Game_Event < Game_Character attr_accessor :per_morire attr_accessor :nome attr_accessor :morto attr_accessor :hp attr_accessor :esperienza attr_accessor :original_hp attr_accessor :tempo_attacco attr_accessor :wait_count alias shuu_bubble_initialize initialize alias shuu_bubble_update update def initialize(map_id, event) shuu_bubble_initialize(map_id, event) @nome = @event.name @morto = false @per_morire = 0 @hp = 1 @esperienza = 0 @tempo_attacco = 0 if @nome.include?(".enemy") for i in 1..99 sbstr = "." sbstr += "0" if i < 10 sbstr += i.to_s if @nome.include?(sbstr) hp_nemico = (sbstr.slice(1,2)).to_i break end end if hp_nemico.is_a?(Numeric) @original_hp = hp_nemico @hp = hp_nemico @tempo_attacco = Shuu_Bubble::TEMPO_ATTACCO_NEMICI @esperienza += @hp*(($game_party.members[0]).level)*Shuu_Bubble::MOLT_EXP end end end def attacca_pg Audio.se_play(Shuu_Bubble::SE_SFERA) indice = Shuu_Bubble::INDICE_SFERA_NEMICI $distanza.push(Game_Distanza.new(self, indice)) end def update shuu_bubble_update if $game_switches[Shuu_Bubble::ID_SWITCH_BUBBLE_BS] == true if @hp <= 0 and not @morto Audio.se_play(Shuu_Bubble::SE_MORTE, 80) @morto = true ($game_party.members[0]).gain_exp(@esperienza) @per_morire = 255 lock end if @per_morire != 0 and @morto @per_morire -= 4 @per_morire = 0 if @per_morire < 0 @opacity = @per_morire end if @per_morire == 0 and @morto erase end if not @morto if @nome.include?(".enemy") and not @nome.include?(".noatt") sx = @x - $game_player.x sy = @y - $game_player.y @tempo_attacco -= 1 if @tempo_attacco > 0 and (sx.abs + sy.abs <= 12) and @wait_count <= 0 @wait_count -= 1 if @wait_count > 0 if @tempo_attacco <= 0 if sx.abs + sy.abs <= 12 and @wait_count <= 0 @tempo_attacco = Shuu_Bubble::TEMPO_ATTACCO_NEMICI - @original_hp*4 @tempo_attacco = 100 if @tempo_attacco < 100 attacca_pg end end end end end end end module DataManager class << self alias shuu_bubble_game_objects create_game_objects alias shuu_bubble_write make_save_contents alias shuu_bubble_read extract_save_contents end def self.create_game_objects shuu_bubble_game_objects $distanza = [] end def self.make_save_contents contents = shuu_bubble_write contents[:distanza] = $distanza contents end def self.extract_save_contents(contents) shuu_bubble_read(contents) $distanza = contents[:distanza] end end class Game_Distanza < Game_Character attr_accessor :draw attr_accessor :destroy attr_accessor :character_name def initialize(parent,chara_index=0,speed=4,range=0) super() @parent = parent @character_name = "Energy Ball" @character_index = chara_index @move_speed = Shuu_Bubble::VELOCITA @range = Shuu_Bubble::DISTANZA @step = 0 pd = @parent.direction moveto(@parent.x,@parent.y) set_direction(pd) @destroy = false @draw = false end def update super return @destroy = true if @step >= @range move_route check_event_trigger_touch(@x, @y) end def move_route return unless movable? d = @direction move_straight(d) @step += 1 end def movable? return false if moving? return false if @move_route_forcing return true end def check_event_trigger_touch(x, y) return if @destroy if @parent.is_a?(Game_Player) for nemico in $game_map.nemici if nemico.x == x and nemico.y == y and not nemico.morto nemico.animation_id = Shuu_Bubble::ANIM_SFERA colpisci_nemico(nemico) end end else if $game_player.x == x and $game_player.y == y $game_player.animation_id = Shuu_Bubble::ANIM_SFERA colpisci_eroe(@parent) end end end def colpisci_nemico(bersaglio) @destroy = true bersaglio.jump(0,0) danno = 1 bersaglio.hp -= danno bersaglio.wait_count = 60 end def colpisci_eroe(source) @destroy = true $game_player.jump(0,0) colpo = rand(5 + ($game_party.members[0]).level) + (Shuu_Bubble::MOLT_DANNO_NEMICI*($game_party.members[0]).level)/3 danno = ((source.original_hp)*Shuu_Bubble::MOLT_DANNO_NEMICI) - ((($game_party.members[0]).def)) + colpo danno = 1 if danno <= 0 ($game_party.members[0]).hp -= danno end end class Spriteset_Map alias shuu_bubblebs_create_characters create_characters alias shuu_bubblebs_update_characters update_characters alias shuu_bubblebs_dispose dispose def create_characters @range_sprites = [] for range in $distanza next if range == nil @range_sprites.push(Sprite_Character.new(@viewport1,range)) end shuu_bubblebs_create_characters end def update_characters shuu_bubblebs_update_characters for range in @range_sprites next if range == nil range.update end for range in $distanza next if range == nil if range.draw == false @range_sprites.push(Sprite_Character.new(@viewport1,range)) range.draw = true end if range.destroy == true $distanza.delete(range) range.character_name = "" end end end def dispose for range in @range_sprites next if range == nil range.dispose end shuu_bubblebs_dispose end end class Scene_Map < Scene_Base alias shuu_bubble_update update def update for range in $distanza next if range == nil range.update end shuu_bubble_update end end class Game_Character attr_accessor :damage attr_accessor :specialtext alias shuu_abs2_initialize initialize def initialize shuu_abs2_initialize @damage = nil @specialtext = nil end end class Sprite_Base #~ alias animation animation_set_sprites #~ def 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] #~ if pattern == nil or pattern == -1 #~ sprite.visible = false #~ next #~ end #~ if pattern < 100 #~ sprite.bitmap = @animation_bitmap1 #~ else #~ sprite.bitmap = @animation_bitmap2 #~ end #~ sprite.visible = true #~ sprite.src_rect.set(pattern % 5 * 192, #~ pattern % 100 / 5 * 192, 192, 192) #~ if @animation_mirror #~ sprite.x = @animation_ox - cell_data[i, 1] / 2 #~ sprite.y = @animation_oy - cell_data[i, 2] / 2 #~ sprite.angle = (360 - cell_data[i, 4]) #~ sprite.mirror = (cell_data[i, 5] == 0) #~ else #~ sprite.x = @animation_ox + cell_data[i, 1] / 2 #~ sprite.y = @animation_oy + cell_data[i, 2] / 2 #~ sprite.angle = cell_data[i, 4] #~ sprite.mirror = (cell_data[i, 5] == 1) #~ end #~ sprite.z = self.z + 300 #~ sprite.ox = 96 #~ sprite.oy = 96 #~ sprite.zoom_x = cell_data[i, 3] / 200.0 #~ sprite.zoom_y = cell_data[i, 3] / 200.0 #~ sprite.opacity = cell_data[i, 6] * self.opacity / 255.0 #~ sprite.blend_type = cell_data[i, 7] #~ end #~ end end class Sprite_Character < Sprite_Base alias shuu_abs2_sprch_update update alias shuu_abs2_sprch_dispose dispose def initialize(viewport, character = nil) super(viewport) @character = character @balloon_duration = 0 @_damage_duration = 0 @last_hp = 0 @hpbar_duration = 0 update end def update super if @hpbar_duration > 0 @hpbar_duration -=1 @hpbar_sprite.x = self.x if @hpbar_sprite != nil @hpbar_sprite.y = self.y - self.oy / 2 - 40 if @hpbar_sprite != nil if @hpbar_duration <= 0 or @_damage_duration > 0 dispose_hpbar end end if @character != nil and @character.is_a?(Game_Player) and @last_hp > ($game_party.members[0]).hp hpbar end @last_hp = ($game_party.members[0]).hp if @_damage_duration > 0 @_damage_duration -=1 @_damage_sprite.x = self.x if @_damage_duration <= 0 dispose_damage end end if @character != nil and @character.damage != nil damage(@character.damage) @character.damage = nil end shuu_abs2_sprch_update end def dispose shuu_abs2_sprch_dispose dispose_damage dispose_hpbar end def hpbar dispose_hpbar @hpbar_duration = 120 bitmap = Bitmap.new(160, 48) gw = 30 * ($game_party.members[0]).hp / ($game_party.members[0]).mhp gc1 = Color.new(224,128,64) gc2 = Color.new(240,192,64) gbc = Color.new(32,32,64) bitmap.fill_rect(65, 34, 30, 4, gbc) bitmap.gradient_fill_rect(65, 34, gw, 4, gc1, gc2) @hpbar_sprite = ::Sprite.new(self.viewport) @hpbar_sprite.bitmap = bitmap @hpbar_sprite.ox = 80 @hpbar_sprite.oy = 20 @hpbar_sprite.x = self.x @hpbar_sprite.y = self.y - self.oy / 2 - 40 @hpbar_sprite.z += 99990 end def damage(value) dispose_damage if value.is_a?(Numeric) damage_string = value.abs.to_s @_damage_duration = 30 else damage_string = value.to_s @_damage_duration = 60 end bitmap = Bitmap.new(160, 48) bitmap.font.name = "Arial" bitmap.font.size = 20 bitmap.font.bold = true if value.is_a?(Numeric) and value <= 0 bitmap.font.color.set(255, 255, 128) else bitmap.font.color.set(255, 255, 255) end bitmap.draw_text(1, 13, 160, 36, damage_string, 1) bitmap.draw_text(0, 12, 160, 36, damage_string, 1) @_damage_sprite = ::Sprite.new(self.viewport) @_damage_sprite.bitmap = bitmap @_damage_sprite.ox = 80 @_damage_sprite.oy = 20 @_damage_sprite.x = self.x @_damage_sprite.y = self.y - self.oy / 2 - 40 @_damage_sprite.z += 99999 end def dispose_damage if @_damage_sprite != nil @_damage_sprite.dispose @_damage_sprite = nil end end def dispose_hpbar if @hpbar_sprite != nil @hpbar_sprite.dispose @hpbar_sprite = nil end end end
~ Retrolexip
Modificato da Retrolexip, 16 January 2015 - 14:27 PM.