Age : 28 Inscrit le : 30/12/2009 Messages : 1067
| Sujet: Re: [Résolu] Problème avec Requiem 9 Ven 9 Aoû 2013 - 15:58 | |
| Remplace le script "Requiem Bestiary" par ça : - Spoiler:
- Code:
-
#============================================================================== # Requiem Bewstiary #============================================================================== Requiem_Masterpiece.register("Requiem Bestiary", 1.1, "07/28/2009") #------------------------------------------------------------------------------ # Show all enemies? (true = yes / false = no) Show_All = false
# Show Character Sprotes of enemies? Show_Chars = true
# ID's of Enemies that will not appear in bestiary: Dont_Appear = []
# Attributes Icons: Attribute_Icons = [1, 131, 4, 132, 16, 12, 115, 130, 104, 105, 106, 107, 108, 109, 110, 111] #------------------------------------------------------------------------------ class Window_RequiemBestiaryMenu < Window_Selectable def initialize super(0, 0, 128, 416) @index = 0 refresh end def refresh @data = [] self.contents.clear for i in $data_enemies next if Dont_Appear.include?(i.id) @data << i end @data.compact! @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end def enemy return @data[@index] end def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 4 self.contents.clear_rect(rect) i = @data[index] return if i.nil? self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 if $game_system.enemy_defeated[i.id] >= 1 or Show_All self.contents.draw_text(rect, "#{i.name}") else self.contents.draw_text(rect, "?????") end end end
#------------------------------------------------------------------------------ class Window_RequiemBestiaryInfo < Window_Base def initialize super(128, 0, 416, 416) @enemy = nil end def update(enemy) return if @enemy == enemy @enemy = enemy refresh end def refresh self.contents.clear if Show_All == false return if $game_system.enemy_defeated[@enemy.id] < 1 end bitmap = Cache.battler(@enemy.battler_name, @enemy.battler_hue) self.contents.blt(0, WLH, bitmap, bitmap.rect) if Requiem_Masterpiece.enabled?("Requiem ABS", 8.0) and Show_Chars enemy = Game_Enemy.new(0, @enemy.id) draw_character(enemy.character_name, enemy.character_index, 180, 190) end self.contents.font.color = crisis_color self.contents.draw_text(0, 0, contents.width, WLH, @enemy.name, 1) self.contents.font.color = system_color self.contents.draw_text(224, WLH, 128, WLH, "#{Vocab.hp}:") self.contents.draw_text(224, WLH*2, 128, WLH, "#{Vocab.mp}:") self.contents.draw_text(224, WLH*3, 128, WLH, "#{Vocab.atk}:") self.contents.draw_text(224, WLH*4, 128, WLH, "#{Vocab.def}:") self.contents.draw_text(224, WLH*5, 128, WLH, "#{Vocab.spi}:") self.contents.draw_text(224, WLH*6, 128, WLH, "#{Vocab.agi}:") self.contents.draw_text(224, WLH*8, 128, WLH, "EXP:") self.contents.draw_text(224, WLH*10, 128, WLH, "Drop:") self.contents.draw_text(224, WLH*11, 128, WLH, Vocab::gold) self.contents.draw_text(224, WLH*15, 128, WLH, "Killed:") self.contents.font.color = normal_color self.contents.draw_text(288, WLH, 96, WLH, @enemy.maxhp, 2) self.contents.draw_text(288, WLH*2, 96, WLH, @enemy.maxmp, 2) self.contents.draw_text(288, WLH*3, 96, WLH, @enemy.atk, 2) self.contents.draw_text(288, WLH*4, 96, WLH, @enemy.def, 2) self.contents.draw_text(288, WLH*5, 96, WLH, @enemy.spi, 2) self.contents.draw_text(288, WLH*6, 96, WLH, @enemy.agi, 2) self.contents.draw_text(288, WLH*8, 96, WLH, @enemy.exp, 2) self.contents.draw_text(288, WLH*11, 96, WLH, @enemy.gold, 2) self.contents.draw_text(288, WLH*15, 96, WLH, "#{$game_system.enemy_defeated[@enemy.id]}", 2) draw_dropped_item(224, WLH*12) draw_weakness(0, WLH*8) draw_resistences(0, WLH*12) end def draw_dropped_item(x, y) items = [] for i in [@enemy.drop_item1, @enemy.drop_item2] case i.kind when 1 items.push($data_items[i.item_id]) when 2 items.push($data_weapons[i.weapon_id]) when 3 items.push($data_armors[i.armor_id]) end end for i in 0...items.size next if i.nil? draw_item_name(items[i], x, y+(i*24)) end end def draw_weakness(x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 96, WLH, "Weakness:") enemy = Game_Enemy.new(0, @enemy.id) weakness = [] for i in 0...$data_system.elements.size-1 next unless enemy.element_rate(i+1) > 100 weakness << i end for i in 0...weakness.size x2 = 32*(i%7) y2 = WLH*(i/7) a = Attribute_Icons draw_icon(a[weakness[i]], x+x2, y+WLH+y2) end end def draw_resistences(x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 128, WLH, "Resistences:") enemy = Game_Enemy.new(0, @enemy.id) resistences = [] for i in 0...$data_system.elements.size-1 next unless enemy.element_rate(i+1) < 100 resistences << i end for i in 0...resistences.size x2 = 32*(i%7) y2 = WLH*(i/7) a = Attribute_Icons draw_icon(a[resistences[i]], x+x2, y+WLH+y2) end end end
#------------------------------------------------------------------------------ class Game_System attr_accessor:enemy_defeated alias requiem_abs_gsystem_initialize initialize def initialize requiem_abs_gsystem_initialize @enemy_defeated = {} for i in 0...$data_enemies.size @enemy_defeated[i] = 0 end end end
#------------------------------------------------------------------------------ class Game_Troop < Game_Unit def kill_count for enemy in dead_members $game_system.enemy_defeated[enemy.enemy_id] += 1 end end end
#------------------------------------------------------------------------------ if Requiem_Masterpiece.enabled?("Requiem ABS", 5.0) class Game_Event < Game_Character alias requiem_bestiary_gevent_dying dying def dying if ! $game_system.enemy_defeated[@enemy_id] $game_system.enemy_defeated[@enemy_id] = 0 end $game_system.enemy_defeated[@enemy_id] += 1 requiem_bestiary_gevent_dying end end
end
#------------------------------------------------------------------------------ if Requiem_Masterpiece.enabled?("Requiem ABS", 8.0) class Game_Monster < Game_Character alias requiem_bestiary_gmonster_get_rewards get_rewards def get_rewards if ! $game_system.enemy_defeated[@enemy_id] $game_system.enemy_defeated[@enemy_id] = 0 end $game_system.enemy_defeated[@enemy_id] += 1 requiem_bestiary_gmonster_get_rewards end end
end
#------------------------------------------------------------------------------ class Scene_Battle < Scene_Base alias requiem_bestiary_display_exp_and_gold display_exp_and_gold def display_exp_and_gold requiem_bestiary_display_exp_and_gold $game_troop.kill_count end end
#------------------------------------------------------------------------------ class Scene_RequiemBestiary < Scene_Base def initialize(from_menu=false) @from_menu = from_menu end def start super create_menu_background @menu_window = Window_RequiemBestiaryMenu.new @info_window = Window_RequiemBestiaryInfo.new end def update super update_menu_background @menu_window.update @info_window.update(@menu_window.enemy) if Input.trigger?(Input::B) Sound.play_cancel $scene = (@from_menu ? Scene_Menu.new : Scene_Map.new) end end def terminate super dispose_menu_background @menu_window.dispose @info_window.dispose end end
Si ça marche pas, je sais pas ce que ça peut être d'autre ^^ Bonne continuation, hésite pas à demander si t'as encore des problèmes |
|