Sujet: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 7:50
Bonjour à tous! Voilà, je vais exposer mon problème. J'utilise le menu avec les icones de Redux(celui qui permet d'ajouter des commandes au menu par le biais d'un array) Pour faire plus simple, le voilà:
Spoiler:
Code:
#=============================================================================== # # Yanfly Engine RD - Scene Menu ReDux + KGC Custom Menu Command # Last Date Updated: 2009.06.22 # Level: Normal, Hard, Lunatic # # This is more or less a revision of the menu scene. Included in the script are # a couple of features. Note that I will NOT take credit for KGC's custom menu # command script as all I did was merely import it into this script and finished # up the excluded functions that he's left behind. Everything else I did add # to the script. # # COMMAND CONTROL - by KGC # Add, remove, and re-order commands akin to KGC's CustomMenuCommands. Akin to # this feature will include what KGC's original script was missing and that was # easy functionality to include custom menu commands without hassling the core # script itself. Also added is the ability to launch common events from the # main menu itself for those who wish to event unique commands. # # REDUX MENUS # The redux menus are completely optional and are mostly nothing other than # visual changes to the menu scene. You can add icons to the command window, # display more than just gold on the main menu screen, and added experience # bars to the party window. # #=============================================================================== # Updates: # ---------------------------------------------------------------------------- # o 2009.06.22 - Fixed time calculation. # o 2009.06.10 - Added Time, Steps, and Map Name to MultiVariable Window. # o 2009.06.06 - Finished script. # o 2009.06.05 - Started script. #=============================================================================== # Instructions #=============================================================================== # # Note that the placement of this script is extremely important. # # 1. Place all of the non-KGC and non-Yanfly scripts that have new scenes above # this script. That way, they will not alter the menu. # 2. Place all KGC and Yanfly scripts below this script to develop compatibility # amongst all of the scripts. # # Note that the special rules other scripts may use to disable their respective # commands will not follow those rules. You'll have to mimic them through usage # of switches. Make sure you understand how and when those scripts disable their # own commands before toggling your switches. # # Scroll down to MENU_COMMANDS to add/remove/reorder your own menu commands. # Adjust any of the ReDux menu options if desired. # #=============================================================================== # # Compatibility # - Works With: KGC scripts, Yanfly scripts, etc. # - Alias: Game_Temp, initialize # - Overwrites: Scene_Menu: anything regarding command window # - Overwrites: Scene_Equip, Scene_Skill, and Scene_Status's return_scene # #=============================================================================== # Credits: # All credits will go to KGC as I did not write the majority of this code. # KGC for Custom Menu Command base coding and pretty much everything. #===============================================================================
$imported = {} if $imported == nil $imported["SceneMenuReDux"] = true
module YE module REDUX module MENU
#----------------------------------------------------------------------- # BASIC MENU FUNCTIONS #-----------------------------------------------------------------------
# This adjusts the input button used to call the main menu. By default, # the input command is Input::B. MENU_BUTTON = Input::B
# The following determines which option the menu will place the cursor # at whenever launched. START_INDEX = 0
# This will place the command window on the right hand side and all the # rest on the left hand side if set to true. RIGHT_SIDE_COMMAND = true
#----------------------------------------------------------------------- # Instructions on how to set up the MENU_COMMANDS order. #------------------------------------------------------------------------ # This array will let you determine how you want your menu command list # to be ordered. Each command is assigned a number and these are the # following numbers. The following are the default menu commands: # # 0..Items 1..Skills 2..Equipment 3..Status 4..Save 5..System # # The following are imports from KGC's original CustomMenuCommand. # # 10: Party .............. KGC_LargeParty # 11: View AP ............ KGC_EquipLearnSkill # 12: Skill Slots ........ KGC_SkillCPSystem # 13: Difficulty ......... KGC_BattleDifficulty # 14: Level Up ........... KGC_DistributeParameter # 15: Bestiary ........... KGC_MonsterGuide # 16: Outline ............ KGC_Outline # # The following are menu items for Yanfly Engine ReDux scripts. # # 51: Change Class ....... Yanfly's Subclass Selection System # 52: Learn Skill ........ Yanfly's Subclass Selection System # 53: Skill Slots ........ Yanfly's Equip Skill Slots # 54: Bestiary ........... Yanfly's Bestiary + Display Scanned Enemy # # For commands 101 to 200, common events can be bound. Make sure you # set up the COMMON_EVENTS hash to get the right common events you want. # # From command 201 and onward, custom scripted scenes can be launched. # Already imported are a few rather popular scripts found throughout the # RPG Maker VX community. # # 201: Quest Journal ..... Modern Algebra's Quest Journal # 202: Factions .......... SojaBird's Factions # 203: Rows .............. originalwij's Row Changer # 204: Record Window ..... Stilleas' Record Window # 205: Crafting .......... Cmpsr2000's Crafting Scene # # If you wish to add your own commands, you'll need to register them # under the lunatic mode portion of the script. #----------------------------------------------------------------------- MENU_COMMANDS =[ # Make sure you've read the instructions above. 0, # Items 1, # Skills 2, # Equipment 3, # Status 201, # Bestiary 10,#LargeParty 4, # Save # 5, # System
] # Do not remove this
# The following determines the maximum number of displayed rows for the # customized command window. MAX_ROWS = 11
#----------------------------------------------------------------------- # How to Use: Lunatic Mode - Menu Command - Common Events #----------------------------------------------------------------------- # The following allows you to bind common events to the menu commands. # When a common event is selected, it will exit the menu, go back to the # map screen, and launch the common event there. Bind these ID's from # 101 to 200. Here is what each of the categories mean: # # HideSw - Switch used to hide the command. Set to nil if not used. # DisbSw - Switch used to disable the command. Set to nil if not used. # Debug? - Only appears in test mode. Does not appear in normal play. # CEvent - The ID of the common event that will be launched. # Title - The title text that appears for the event. # # After binding your common events to ID's, go back to MENU_COMMANDS # and insert the proper command ID at the proper location. #----------------------------------------------------------------------- COMMON_EVENTS ={ # These can only be from 101 to 199. # -ID => [HideSw, DisbSw, Debug?, CEvent, Title Name] 102 => [ nil, nil, false, 30, "Se reposer"], } # Do not remove this.
#----------------------------------------------------------------------- # How to Use: Lunatic Mode - Menu Command - Imported Scripts #----------------------------------------------------------------------- # The following is what KGC originally was going to have in his script # but was actually missing it in his publicized script. This will regain # functionality and also lift the "limit" of only 100 extra commands. # The following will explain how to set up the individual options. # # HideSw - Switch used to hide the command. Set to nil if not used. # DisbSw - Switch used to disable the command. Set to nil if not used. # Actor? - Does this select an actor. Set to true if it does. # Title - The title text that appears for the event. # Scene - The scene used to launch the respective scene. # # Note that this does not automatically detect what will and will not # disable the command ingame. You must understand and create a work # around with them (if they do disable the commands) with switches. # After binding your imported commands, go back to MENU_COMMANDS and # insert the proper command ID at the proper location. #----------------------------------------------------------------------- IMPORTED_COMMANDS ={ # These can only be from 201 onward. # -ID => [HideSw, DisbSw, Actor?, Title Name, Scene Name.new] 201 => [ nil, nil, false, "Bestiaire", "Scene_Bestiaire"], 203 => [ nil, nil, false, "Rows", "Scene_Row"], 204 => [ nil, nil, false, "Records", "Scene_Record"], 205 => [ nil, nil, false, "Crafting", "Scene_Crafting"], } # Do not remove this.
#----------------------------------------------------------------------- # REDUX MENU FUNCTIONS #-----------------------------------------------------------------------
# For those who would like to add icons to their commands, set this to # true, then go to ICON_SETS and bind text to the icon desired. COMMAND_ICONS = true
# Match the ingame command names with the icons. The reason this isn't # implemented together with the index numbers is because this can allow # for varying icons dependent on the command name (such as difficulty). ICON_SETS ={ # "Unlisted" must exist for the unlisted commands. "Unlisted" => 176, # -----Vocab----- => Icon "Bestiaire" => 141, "Se reposer" => 117, "Class Change" => 131, "Equiper" => 44, "Objets" => 144, "Learn Skills" => 133, "Quests" => 99, "Sauvegarder" => 149, "Quitter" => 143, "Slots" => 103, "Compétences" => 159, "Statut" => 137, "System" => 134, "Equipe" =>133, "Bestiary" => 141, } # Do not remove this.
# This part will trigger usage of the "new" party status window. Set it # to false if you do not wish to use it. The "new" status window simply # adds the experience bar to the menu and raises the coordinates of the # various status items by a little bit. USE_REDUX_STATUS = true
# This part will adjust the font size for the text shown in the Redux # Status Menu. Affects all text. REDUX_FONT_SIZE = 20
# The following determines how things are shown on the Redux Status Menu. DRAWN_ACTOR_SETUP = 0 # 0 - Face only, 1 - Sprite only, 2 - Both SPRITE_OFFSET = 32 # Sets the y offset for actor sprites FACE_OPACITY = 128 # Sets the face opacity for setting 2
# The following adjusts the EXP bar. Fill out the info properly. EXP_TEXT = "EXP" # Text used for EXP PERCENT_EXP = "%#.04g%%" # Text format used for EXP percentage EXP_GAUGE_1 = 28 # Colour 1 for the EXP Gauge EXP_GAUGE_2 = 29 # Colour 2 for the EXP Gauge
# This part adjusts the multi-variable window. It will replace the gold # window and allows you to display multiple variables (including gold) in # the small bow at the bottom of the screen. USE_MULTI_VARIABLE_WINDOW = true
# Variables will be shown in this order. Use 0 to show gold. Adjust the # following information as seen necessary. VARIABLES_SHOWN = [-5, -1, -2, 0, ] VARIABLES_ICONS = true VARIABLES_HASH ={ # Note that value zero must exist. # VarID => [Icon, Text] -5 => [ 153, "Map"], -2 => [ 48, "Steps"], -1 => [ 188, "Time"], 0 => [ 205, "Gold"], }# Do not remove this.
end end end
#=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #===============================================================================
#-------------------------------------------------------------------------- # create_command_list #-------------------------------------------------------------------------- def create_command_list commands = [] @ex_cmds = {} index_list = {} YE::REDUX::MENU::MENU_COMMANDS.each_with_index { |c, i| case c when 0 # Items index_list[:item] = commands.size commands.push(Vocab.item)
when 1 # Skills index_list[:skill] = commands.size commands.push(Vocab.skill)
when 2 # Equip index_list[:equip] = commands.size commands.push(Vocab.equip)
when 3 # Status index_list[:status] = commands.size commands.push(Vocab.status)
when 4 # Save index_list[:save] = commands.size commands.push(Vocab.save)
when 5 # System index_list[:game_end] = commands.size commands.push(Vocab.game_end)
when 10 # KGC's Large Party next unless $imported["LargeParty"] index_list[:partyform] = commands.size @__command_partyform_index = commands.size commands.push(Vocab.partyform)
when 11 # KGC's AP Viewer next unless $imported["EquipLearnSkill"] index_list[:ap_viewer] = commands.size @__command_ap_viewer_index = commands.size commands.push(Vocab.ap_viewer)
when 12 # KGC's CP Skill System next unless $imported["SkillCPSystem"] index_list[:set_battle_skill] = commands.size @__command_set_battle_skill_index = commands.size commands.push(Vocab.set_battle_skill)
when 13 # KGC's Battle Difficulty next unless $imported["BattleDifficulty"] index_list[:set_difficulty] = commands.size @__command_set_difficulty_index = commands.size commands.push(KGC::BattleDifficulty.get[:name])
when 14 # KGC's Distribute Parameter next unless $imported["DistributeParameter"] index_list[:distribute_parameter] = commands.size @__command_distribute_parameter_index = commands.size commands.push(Vocab.distribute_parameter)
when 15 # KGC's Enemy Guide next unless $imported["EnemyGuide"] index_list[:enemy_guide] = commands.size @__command_enemy_guide_index = commands.size commands.push(Vocab.enemy_guide)
when 16 # KGC's Outline next unless $imported["Outline"] index_list[:outline] = commands.size @__command_outline_index = commands.size commands.push(Vocab.outline)
when 51 # Yanfly Subclass Class Change next unless $imported["SubclassSelectionSystem"] next unless YE::SUBCLASS::MENU_CLASS_CHANGE_OPTION next unless $game_switches[YE::SUBCLASS::ENABLE_CLASS_CHANGE_SWITCH] index_list[:classchange] = commands.size @command_class_change = commands.size commands.push(YE::SUBCLASS::MENU_CLASS_CHANGE_TITLE)
when 52 # Yanfly Subclass Learn Skill next unless $imported["SubclassSelectionSystem"] next unless YE::SUBCLASS::USE_JP_SYSTEM and YE::SUBCLASS::LEARN_SKILL_OPTION next unless $game_switches[YE::SUBCLASS::ENABLE_LEARN_SKILLS_SWITCH] index_list[:learnskill] = commands.size @command_learn_skill = commands.size commands.push(YE::SUBCLASS::LEARN_SKILL_TITLE)
when 53 # Yanfly Equip Skill System next unless $imported["EquipSkillSlots"] next unless $game_switches[YE::EQUIPSKILL::ENABLE_SLOTS_SWITCH] index_list[:equipskill] = commands.size @command_equip_skill = commands.size commands.push(YE::EQUIPSKILL::MENU_TITLE)
when 54 # Yanfly Bestiary next unless $imported["DisplayScannedEnemy"] next unless $game_switches[YE::MENU::MONSTER::BESTIARY_SWITCH] index_list[:bestiary] = commands.size @command_bestiary = commands.size commands.push(YE::MENU::MONSTER::BESTIARY_TITLE)
when 101..200 next unless YE::REDUX::MENU::COMMON_EVENTS.include?(c) common_event = YE::REDUX::MENU::COMMON_EVENTS[c] next if !$TEST and common_event[2] next if common_event[0] != nil and $game_switches[common_event[0]] index_list[c] = commands.size @ex_cmds[c] = commands.size commands.push(common_event[4])
else next unless YE::REDUX::MENU::IMPORTED_COMMANDS.include?(c) command_array = YE::REDUX::MENU::IMPORTED_COMMANDS[c] next if command_array[0] != nil and $game_switches[command_array[0]] index_list[c] = commands.size @ex_cmds[c] = commands.size commands.push(command_array[3])
end } # Do not remove this. $game_temp.menu_command_index = index_list return commands end
#-------------------------------------------------------------------------- # set_command_enabled #-------------------------------------------------------------------------- def set_command_enabled disable_items = [] @disabled_command_index = [] # If zero party members are present if $game_party.members.size == 0 disable_items.push(:item, :skill, :equip, :status, :partyform, :ap_viewer, :set_battle_skill, :distribute_parameter, :classchange, :learnskill, :equipskill) end # If saving has been disabled if $game_system.save_disabled disable_items.push(:save) end # If party changing is disabled if $imported["LargeParty"] and !$game_party.partyform_enable? disable_items.push(:partyform) end for key in YE::REDUX::MENU::COMMON_EVENTS next unless $game_temp.menu_command_index.has_key?(key[0]) next if key[1][1] == nil disable_items.push(key[0]) if $game_switches[key[1][1]] end for key in YE::REDUX::MENU::IMPORTED_COMMANDS next unless $game_temp.menu_command_index.has_key?(key[0]) next if key[1][1] == nil disable_items.push(key[0]) if $game_switches[key[1][1]] end # Disable each of the items. disable_items.each { |i| if $game_temp.menu_command_index.has_key?(i) index = $game_temp.menu_command_index[i] @command_window.draw_item(index, false) @disabled_command_index.push(index) end } end
#-------------------------------------------------------------------------- # overwrite update_command_selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) index = @command_window.index unless command_enabled?(index) Sound.play_buzzer return end Sound.play_decision case index # Item Command when $game_temp.menu_command_index[:item] $scene = Scene_Item.new # Skill, Equip, and Status Commands when $game_temp.menu_command_index[:skill], $game_temp.menu_command_index[:equip], $game_temp.menu_command_index[:status] start_actor_selection # Save Command when $game_temp.menu_command_index[:save] $scene = Scene_File.new(true, false, false) # System Command when $game_temp.menu_command_index[:game_end] $scene = Scene_End.new else # Custom Commands return_check = true for key in @ex_cmds if @ex_cmds[key[0]] == index return_check = false found_key = key[0] break end end return if return_check if found_key >= 101 and found_key <= 200 # Play a common event common_event = YE::REDUX::MENU::COMMON_EVENTS[found_key] $game_temp.common_event_id = common_event[3] $scene = Scene_Map.new else # Play an imported scene menu_command = YE::REDUX::MENU::IMPORTED_COMMANDS[found_key] if menu_command[2] start_actor_selection else $scene = eval(menu_command[4] + ".new") end end # End found_key end # End case check end end
#-------------------------------------------------------------------------- # overwrite update_actor_selection #-------------------------------------------------------------------------- def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when $game_temp.menu_command_index[:skill] # Skill Command $scene = Scene_Skill.new(@status_window.index) when $game_temp.menu_command_index[:equip] # Equip Command $scene = Scene_Equip.new(@status_window.index) when $game_temp.menu_command_index[:status] # Status Command $scene = Scene_Status.new(@status_window.index) else # Custom Commands return_check = true for key in @ex_cmds if @ex_cmds[key[0]] == @command_window.index return_check = false found_key = key[0] break end end return if return_check menu_command = YE::REDUX::MENU::IMPORTED_COMMANDS[found_key] $scene = eval(menu_command[4] + ".new(@status_window.index)") end end end
#-------------------------------------------------------------------------- # command_enabled? #-------------------------------------------------------------------------- def command_enabled?(index) if $game_system.save_disabled and index == $game_temp.menu_command_index[:save] return false end if $game_party.members.size == 0 and @disabled_command_index.include?(index) return false end for key in @ex_cmds if @ex_cmds[key[0]] == index return false if @disabled_command_index.include?(index) end end return true end
#-------------------------------------------------------------------------- # alias start #-------------------------------------------------------------------------- alias start_menurd start unless $@ def start start_menurd if YE::REDUX::MENU::USE_REDUX_STATUS @status_window.dispose @status_window = Window_ReDuxMenuStatus.new(160, 0) end if YE::REDUX::MENU::USE_MULTI_VARIABLE_WINDOW @gold_window.dispose @gold_window = Window_MultiVariableWindow.new end if YE::REDUX::MENU::RIGHT_SIDE_COMMAND @status_window.x = 0 @command_window.x = Graphics.width - 160 @gold_window.x = Graphics.width - 160 end end
#-------------------------------------------------------------------------- # overwrite update_call_menu #-------------------------------------------------------------------------- def update_call_menu if Input.trigger?(YE::REDUX::MENU::MENU_BUTTON) return if $game_map.interpreter.running? return if $game_system.menu_disabled $game_temp.menu_beep = true $game_temp.next_scene = "menu" end end
end # Scene_Map
#============================================================================== # Imported from KGC's Custom Menu Command # to improve compatibility amongst KGC scripts #============================================================================== $imported["CustomMenuCommand"] = true class Game_Temp attr_accessor :menu_command_index attr_accessor :next_scene_actor_index
alias initialize_KGC_CustomMenuCommand initialize unless $@ def initialize initialize_KGC_CustomMenuCommand
@menu_command_index = {} @next_scene_actor_index = 0 end end
module KGC module Commands module_function def call_item return if $game_temp.in_battle $game_temp.next_scene = :menu_item $game_temp.next_scene_actor_index = 0 $game_temp.menu_command_index = {} end def call_skill(actor_index = 0) return if $game_temp.in_battle $game_temp.next_scene = :menu_skill $game_temp.next_scene_actor_index = actor_index $game_temp.menu_command_index = {} end def call_equip(actor_index = 0) return if $game_temp.in_battle $game_temp.next_scene = :menu_equip $game_temp.next_scene_actor_index = actor_index $game_temp.menu_command_index = {} end def call_status(actor_index = 0) return if $game_temp.in_battle $game_temp.next_scene = :menu_status $game_temp.next_scene_actor_index = actor_index $game_temp.menu_command_index = {} end end end
class Game_Interpreter include KGC::Commands end
class Scene_Map < Scene_Base alias update_scene_change_KGC_CustomMenuCommand update_scene_change unless $@ def update_scene_change return if $game_player.moving? case $game_temp.next_scene when :menu_item call_menu_item when :menu_skill call_menu_skill when :menu_equip call_menu_equip when :menu_status call_menu_status else update_scene_change_KGC_CustomMenuCommand end end def call_menu_item $game_temp.next_scene = nil $scene = Scene_Item.new end def call_menu_skill $game_temp.next_scene = nil $scene = Scene_Skill.new($game_temp.next_scene_actor_index) $game_temp.next_scene_actor_index = 0 end def call_menu_equip $game_temp.next_scene = nil $scene = Scene_Equip.new($game_temp.next_scene_actor_index) $game_temp.next_scene_actor_index = 0 end def call_menu_status $game_temp.next_scene = nil $scene = Scene_Status.new($game_temp.next_scene_actor_index) $game_temp.next_scene_actor_index = 0 end end
class Scene_Item < Scene_Base def return_scene if $game_temp.menu_command_index.has_key?(:item) $scene = Scene_Menu.new($game_temp.menu_command_index[:item]) else $scene = Scene_Map.new end end end
unless $imported["SceneSkillReDux"] class Scene_Skill < Scene_Base def return_scene if $game_temp.menu_command_index.has_key?(:skill) $scene = Scene_Menu.new($game_temp.menu_command_index[:skill]) else $scene = Scene_Map.new end end end end
unless $imported["SceneEquipReDux"] class Scene_Equip < Scene_Base def return_scene if $game_temp.menu_command_index.has_key?(:equip) $scene = Scene_Menu.new($game_temp.menu_command_index[:equip]) else $scene = Scene_Map.new end end end end
unless $imported["SceneStatusReDux"] class Scene_Status < Scene_Base def return_scene if $game_temp.menu_command_index.has_key?(:status) $scene = Scene_Menu.new($game_temp.menu_command_index[:status]) else $scene = Scene_Map.new end end end end
class Scene_File < Scene_Base alias return_scene_KGC_CustomMenuCommand return_scene unless $@ def return_scene if @from_title || @from_event return_scene_KGC_CustomMenuCommand elsif $game_temp.menu_command_index.has_key?(:save) $scene = Scene_Menu.new($game_temp.menu_command_index[:save]) else $scene = Scene_Map.new end end end
class Scene_End < Scene_Base def return_scene if $game_temp.menu_command_index.has_key?(:game_end) $scene = Scene_Menu.new($game_temp.menu_command_index[:game_end]) else $scene = Scene_Map.new end end end
#-------------------------------------------------------------------------- # map name #-------------------------------------------------------------------------- unless method_defined?(:map_name) def map_name data = load_data("Data/MapInfos.rvdata") text = data[@map_id].name.gsub(/\[.*\]/) { "" } return text end end
#-------------------------------------------------------------------------- # Now Exp - The experience gained for the current level. #-------------------------------------------------------------------------- def now_exp return @exp - @exp_list[@level] end
#-------------------------------------------------------------------------- # Next Exp - The experience needed for the next level. #-------------------------------------------------------------------------- def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end
#-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh @item_max = $game_party.members.size create_contents fill_stand_by_background if $imported["LargeParty"] for actor in $game_party.members draw_rd_menu_actor(actor) x = 104 y = actor.index * 96 draw_actor_name(actor, x, y) draw_actor_class(actor, x + 120, y) draw_actor_level(actor, x, y + WLH * 1) draw_actor_state(actor, x, y + WLH * 2) draw_actor_hp(actor, x + 120, y + WLH * 1, 120) draw_actor_mp(actor, x + 120, y + WLH * 2, 120) draw_rd_menu_exp(actor, x + 120, y + WLH * 3, 120) end end
#-------------------------------------------------------------------------- # refresh #-------------------------------------------------------------------------- def refresh @data = [] for i in YE::REDUX::MENU::VARIABLES_SHOWN next unless YE::REDUX::MENU::VARIABLES_HASH.include?(i) @time_index = @data.size if i == -1 @data.push(i) end @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end
#-------------------------------------------------------------------------- # draw_item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) sw = self.width - 32 dy = WLH * index self.contents.clear_rect(rect) i = @data[index] case i when -5 # Draw Map Name self.contents.draw_text(0, dy, sw, WLH, $game_map.map_name, 1)
when -2 # Draw Steps if YE::REDUX::MENU::VARIABLES_ICONS text = $game_party.steps self.contents.draw_text(0, dy, sw-24, WLH, text, 2) draw_icon(YE::REDUX::MENU::VARIABLES_HASH[-2][0], sw-24, dy) else text = YE::REDUX::MENU::VARIABLES_HASH[-2][1] value = $game_party.steps cx = contents.text_size(text).width self.contents.font.color = normal_color self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(0, dy, sw, WLH, text, 2) end
when -1 # Draw Time if YE::REDUX::MENU::VARIABLES_ICONS text = game_time self.contents.draw_text(0, dy, sw-24, WLH, text, 2) draw_icon(YE::REDUX::MENU::VARIABLES_HASH[-1][0], sw-24, dy) else self.contents.font.color = normal_color text = game_time self.contents.draw_text(0, dy, sw, WLH, text, 1) end
when 0 # Draw Gold if YE::REDUX::MENU::VARIABLES_ICONS text = $game_party.gold self.contents.draw_text(0, dy, sw-24, WLH, text, 2) draw_icon(YE::REDUX::MENU::VARIABLES_HASH[0][0], sw-24, dy) else draw_currency_value($game_party.gold, 4, dy, 120) end
else # Draw Variables if YE::REDUX::MENU::VARIABLES_ICONS text = $game_variables[i] self.contents.draw_text(0, dy, sw-24, WLH, text, 2) draw_icon(YE::REDUX::MENU::VARIABLES_HASH[i][0], sw-24, dy) else text = YE::REDUX::MENU::VARIABLES_HASH[i][1] value = $game_variables[i] cx = contents.text_size(text).width self.contents.font.color = normal_color self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(0, dy, sw, WLH, text, 2) end end end
#-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- if YE::REDUX::MENU::VARIABLES_SHOWN.include?(-1) def update if @gametime != (Graphics.frame_count / Graphics.frame_rate) draw_item(@time_index) end end end
end # Window_MultiVariableWindow
#=============================================================================== # # END OF FILE # #===============================================================================
Je confirme qu'il marche très bien mais j'ai eu un problème avec le script de bestiaire de KGC(celui avec les descriptions de monstres(comme Somnia Memorias)).
Donc je mets mon bestiaire en dessous du script de menu comme précisé dans celui-ci, je configure quelques trucs(les textes seulement) et je teste mon projet. Je vais combattre un monstre et je le bats. Après le combat je vais dans le menu, puis dans le bestiaire. Là, je vois que le monstre y est. Je regarde les données du monstre, mais là, rien. Pas de texte, pvs inconnus, bref, rien. De plus, les mots qui défilent(battus, completé etc...)en haut à gauche du bestiaire restent en anglais. Il n'y a rien dans le script qui permette de modifier ça. J'ai pourtant bien noté la description du monstre en cmmentaire entre les balises précisées.
La suite au prochain post(trop long)
Dernière édition par BARVACHE le Mar 10 Aoû 2010 - 7:29, édité 1 fois
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 7:53
Le bestiaire: (Juste une partie)
Spoiler:
Code:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ Enemy Guide - KGC_EnemyGuide ◆ VX ◆ #_/ ◇ Last Update: 2008/09/08 ◇ #_/ ◆ Translation by Mr. Anonymous ◆ #_/ ◆ KGC Site: ◆ #_/ ◆ http://f44.aaa.livedoor.jp/~ytomy/ ◆ #_/ ◆ Translator's Blog: ◆ #_/ ◆ http://mraprojects.wordpress.com ◆ #_/----------------------------------------------------------------------------- #_/ This script implements a customizable enemy guide, or "beastiary" to your #_/ game. Such fields as HP, MP, and other parameters, as well as weakness, #_/ resistance, gold given, experience given, and items dropped are included. #_/============================================================================ #_/ Install: Insert above KGC_ExtraDropItem, and below KGC_CustomMenuCommand. #_/============================================================================ #_/ ◆ Instructions For Usage ◆ #_/ To assign a description to an enemy/monster, the following must be added #_/ enemy's "Note" box in the database: #_/ #_/ <enemy_info> #_/ Description Text #_/ </enemy_info> #_/ #_/ Alternatively, you can use <GUIDE_DESCRIPTION> and </GUIDE_DESCRIPTION> #_/ #_/ ◆ Event Script Functions ◆ #_/ The following commands are available using the "Script" item in events. #_/ #_/ * call_enemy_guide #_/ Switches the scene to the enemy guide screen. #_/ #_/ * get_enemy_guide_completion(VariableID) #_/ Obtains the current amount of completion and stores it in a variable. #_/ #_/ * complete_enemy_guide #_/ Sets all enemies as "Defeated", thereby completing the Enemy Guide. #_/ #_/ * reset_enemy_guide #_/ Resets the Enemy Guide completely. #_/ #_/ * set_enemy_encountered(EnemyID, Flag) #_/ Sets a specified enemy as "Encountered" (or unencountered). If the Flag #_/ is omitted, it is automatically assumed to be true. #_/ Example: set_enemy_encountered(1) #_/ Sets "Slime" as encountered. #_/ Example: set_enemy_encountered(1, false) #_/ Sets "Slime" as unencountered. #_/ #_/ * set_monster_defeated(EnemyID, flag) #_/ Sets a specified enemy as "Defeated" (or undefeated). If the Flag is #_/ omitted, it is automatically assumed to be true. #_/ Example: set_enemy_defeated(1) #_/ Sets "Slime" as defeated. #_/ Example: set_enemy_defeated(1, false) #_/ Sets "Slime" as undefeated. #_/ #_/ * set_enemy_item_dropped(EnemyID, Item_Index, Flag) #_/ Sets a specified enemy's drop item as "Dropped" (or not dropped). If Flag #_/ is omitted, it is automatically assumed to be true. #_/ Example: set_enemy_item_dropped(1, 0) #_/ Sets "Slime"'s first dropped item as dropped. #_/ Example: set_enemy_item_dropped(1, 1, false) #_/ Sets "Slime"'s second dropped item as not dropped. #_/ #_/ * set_enemy_object_stolen(EnemyID, Object_Index, Flag) #_/ Sets a specified enemy's stealable item(s) as "stolen" (or not) when used #_/ in conjunction with KGC_Steal. If flag is omitted, it is automatically #_/ assumed to be true. #_/ Example: set_enemy_object_stolen(1, 0) #_/ Sets "Slime"'s first stealable item as stolen. #_/ #_/ [ Quick Key: ] #_/ [ VariableID = The in-game variable number used to store data. ] #_/ [ ] #_/ [ EnemyID = The ID number of the desired enemy (found in the database). ] #_/ [ ] #_/ [ Flag = A true or false value. ] #_/ [ ] #_/ [ Item_Index = The current index of the enemy's dropped item. ] #_/ [ A value of 0 returns the first item, while 1 returns the second. ] #_/ [ ] #_/ [ Object_Index = The current index of the enemy's stealable items. ] #_/ [ A value of 0 returns the first item, while 1 returns the second, etc. ] #_/ #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
module KGC module EnemyGuide # ◆ Use Background Image ◆ # This toggle allows you to use a custom background image for the enemy guide # window's background rather than the window skin. # true : Use background image defined below ( BACKGROUND_FILENAME ) # false : Use Window Skin USE_BACKGROUND_IMAGE = true # ◆ Background Image File Name # Here, you may designate an image in the "Graphics/System/" folder to be # used as described above. The file extension is automatically recognized. BACKGROUND_FILENAME = "EnemyGuideBack" # ◆ Completed Display Interval [In Frames] # This allows you to specify the amount of time in frames from which the # Encountered, Defeated, & Completion percentile field are displayed before # switching to the next. To get a better understanding of this, test the game # and open the enemy guide. The field at hand is in the upper left corner. INFO_INTERVAL = 90
# ◆ Enemy Selection Serial Number Display ◆ # This toggle allows you to show enemies' serial number before the name. This # is pulled strictly by the enemy's ID number in the database. # For example, when true, Slime's command entry would be: [001] Slime # true = enable display of enemy serial number # false = ID/Serial number is hidden. SHOW_SERIAL_NUMBER = true # ◆ Enemy Selection Order By Serial Number # This toggle causes the script to arrange the enemies by ID/serial number. # true = Enemies are sorted by serial numbers (Enemy ID) # false = Supposed to sort another way? This doesn't seem to make any impact. # ====================MORE RESEARCHING NEEDED======================= SERIAL_NUM_FOLLOW = true # ◆ Serial Number Format # This is the format in which the serial numbers are displayed in conjunction # with the enemy name. %03d = Serial Number. SERIAL_NUM_FORMAT = "%03d: " # ◆ Unencountered Enemy Name Mask # This allows you to set text for enemy entries that have not yet been # encountered. By setting one character, such as "?", the entire enemy's # name will be masked by that character, such as "Slime" becoming "?????". UNKNOWN_ENEMY_NAME = "?" # ◆ Uncountered enemy text. UNENCOUNTERED_DATA = "- No Data -" # ◆ Parameter Names text. PARAMETER_NAME = { :defeat_count => "Defeated", :weak_element => "Weakness", :resist_element => "Resistance", :weak_state => "Susceptible", :resist_state => "Resistant", :exp => "Experience", :treasure => "Drops", :drop_prob => "Chance", :steal_obj => "Steal", :steal_prob => "Chance", } # ← No not delete! # ◆ Undefeated Enemy Parameter Text Mask UNDEFEATED_PARAMETER = "???" # ◆ Undropped Item Text Mask # By setting one character, such as "?", the entire item's name will be masked # by that character, such as "Potion" becoming "?????". UNDROPPED_ITEM_NAME = "?"
# ◆ Element Weakness and Resistance Range # Here you may specify what elements are shown under the Monster Guide's # Weakness and Resistance field. By default, 1..16 includes everything from # element ID 1 to 16. ELEMENT_RANGE = [1..16] # ◆ Element Icon Display # In this array, you may define the icons used for the elements displayed for # weakness/resistance/state fields. These are ordered by the ranged defined # in ELEMENT_RANGE, above. To find the icon's index, simply look at your # IconSet and count each from left to right, top to bottom, starting with 0. ELEMENT_ICON = [nil, # ID:0 Dummy(Don't alter this line) 50, 1, 4, 14, 24, 12, 189, 136, # Melee ~ Absorbing 104, 105, 106, 107, 108, 109, 110, 111, # Fire ~ Darkness ] # ← Do not remove!
# ◆ Hidden Enemies ◆ # You may specify enemies that you do not wish to appear in the monster guide # here within the brackets by EnemyID. # Example: MG_HIDE_ENEMIES = [2, 4, 8, 16, 32] HIDDEN_ENEMIES = []
# ◆ Enemy Selection Order ◆ # Here, you may manually specify the order in which enemies appear in the # selection list. This is handled by the enemy's ID number in the database. # You must separate each number or number range with commas. # A number range is a range of numbers separated by .. - for example, 1..3 # is the same as saying 1, 2, 3 # Enemies hidden by HIDDEN_ENEMIES will not appear. # Set this function to nil if you do not wish to use it. # Example: ENEMY_ORDER = [1..5, 8..13, 6, 7, 14, 15] ENEMY_ORDER = nil
# ◆ Transformed Enemy Handling ◆ # true = If an enemy transforms into another enemy, the original enemy is # flagged as defeated as well as the transformed enemy. ORIGINAL_DEFEAT = true
# ◆ Command Menu ◆ # This toggle adds a command to the menu command selection to the main command # menu. To set this command anywhere other than the bottom, please use # KGC_CustomMenuCommand. USE_MENU_ENEMY_GUIDE_COMMAND = true # ◆ Text of displayed for Enemy Guide selection on the main command window. VOCAB_MENU_ENEMY_GUIDE = "Beastiary" end end
#=============================================================================# # ★ End Customization ★ # #=============================================================================#
#============================================================================== # □ KGC #============================================================================== module KGC module_function #-------------------------------------------------------------------------- # ○ Character String Mask # str : String Object # mask : Character Mask #-------------------------------------------------------------------------- def mask_string(str, mask) text = mask if mask.scan(/./).size == 1 text = mask * str.scan(/./).size end return text end end
#============================================================================== # □ KGC::EnemyGuide::Regexp #============================================================================== # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # # Note Field Tag Strings # # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * # # Whatever word(s) are after the separator ( | ) in the following lines are # what are used to determine what is searched for in the "Note" section of # an enemy.
module KGC::EnemyGuide # Regular Expressions Module module Regexp # Enemy Module module Enemy # Begin Description tag string BEGIN_GUIDE_DESCRIPTION = /<(?:GUIDE_DESCRIPTION|enemy_info)>/i # End Description tag string END_GUIDE_DESCRIPTION = /<\/(?:GUIDE_DESCRIPTION|enemy_info)>/i end end
module_function #-------------------------------------------------------------------------- # ○ Range & Integer # Obtain array and convert into integer. (Repeditive elements are excluded.) #-------------------------------------------------------------------------- def convert_integer_array(array) result = [] array.each { |i| case i when Range result |= i.to_a when Integer result |= [i] end } return result end #-------------------------------------------------------------------------- # ○ Is the enemy to be shown? #-------------------------------------------------------------------------- def enemy_show?(enemy_id) return false if HIDDEN_ENEMY_LIST.include?(enemy_id) if ENEMY_ORDER_ID != nil return false unless ENEMY_ORDER_ID.include?(enemy_id) end
return true end
#-------------------------------------------------------------------------- # ○ Array Sorting #-------------------------------------------------------------------------- # Hidden Enemy List HIDDEN_ENEMY_LIST = convert_integer_array(HIDDEN_ENEMIES) # Enemy IDs in the display order ENEMY_ORDER_ID = (ENEMY_ORDER == nil ? nil : convert_integer_array(ENEMY_ORDER)) # Check element list CHECK_ELEMENT_LIST = convert_integer_array(ELEMENT_RANGE) end
module KGC module Commands module_function #-------------------------------------------------------------------------- # ○ 遭遇状態取得 # enemy_id : 敵 ID #-------------------------------------------------------------------------- def enemy_encountered?(enemy_id) return $game_system.enemy_encountered[enemy_id] end #-------------------------------------------------------------------------- # ○ 撃破状態取得 # enemy_id : 敵 ID #-------------------------------------------------------------------------- def enemy_defeated?(enemy_id) return $game_system.enemy_defeated[enemy_id] end #-------------------------------------------------------------------------- # ○ アイテムドロップ状態取得 # enemy_id : 敵 ID # item_index : ドロップアイテム番号 #-------------------------------------------------------------------------- def enemy_item_dropped?(enemy_id, item_index) if $game_system.enemy_item_dropped[enemy_id] == nil return false end result = $game_system.enemy_item_dropped[enemy_id] & (1 << item_index) return (result != 0) end #-------------------------------------------------------------------------- # ○ 盗み成功済み状態取得 # enemy_id : 敵 ID # obj_index : オブジェクト番号 #-------------------------------------------------------------------------- def enemy_object_stolen?(enemy_id, obj_index) if $game_system.enemy_object_stolen[enemy_id] == nil return false end result = $game_system.enemy_object_stolen[enemy_id] & (1 << obj_index) return (result != 0) end #-------------------------------------------------------------------------- # ○ 遭遇状態設定 # enemy_id : 敵 ID # enabled : true..遭遇済み false..未遭遇 #-------------------------------------------------------------------------- def set_enemy_encountered(enemy_id, enabled = true) $game_system.enemy_encountered[enemy_id] = enabled end #-------------------------------------------------------------------------- # ○ 撃破状態設定 # enemy_id : 敵 ID # enabled : true..撃破済み false..未撃破 #-------------------------------------------------------------------------- def set_enemy_defeated(enemy_id, enabled = true) $game_system.enemy_defeated[enemy_id] = enabled end #-------------------------------------------------------------------------- # ○ アイテムドロップ状態設定 # enemy_id : 敵 ID # item_index : ドロップアイテム番号 # enabled : true..ドロップ済み false..未ドロップ #-------------------------------------------------------------------------- def set_enemy_item_dropped(enemy_id, item_index, enabled = true) if $game_system.enemy_item_dropped[enemy_id] == nil $game_system.enemy_item_dropped[enemy_id] = 0 end if enabled $game_system.enemy_item_dropped[enemy_id] |= (1 << item_index) else $game_system.enemy_item_dropped[enemy_id] &= ~(1 << item_index) end end #-------------------------------------------------------------------------- # ○ 盗み成功状態設定 # enemy_id : 敵 ID # obj_index : オブジェクト番号 # enabled : true..成功済み false..未成功 #-------------------------------------------------------------------------- def set_enemy_object_stolen(enemy_id, obj_index, enabled = true) if $game_system.enemy_object_stolen[enemy_id] == nil $game_system.enemy_object_stolen[enemy_id] = 0 end if enabled $game_system.enemy_object_stolen[enemy_id] |= (1 << obj_index) else $game_system.enemy_object_stolen[enemy_id] &= ~(1 << obj_index) end end #-------------------------------------------------------------------------- # ○ 図鑑リセット #-------------------------------------------------------------------------- def reset_enemy_guide $game_system.enemy_encountered = [] $game_system.enemy_defeated = [] $game_system.enemy_item_dropped = [] $game_system.enemy_object_stolen = [] end #-------------------------------------------------------------------------- # ○ 図鑑完成 #-------------------------------------------------------------------------- def complete_enemy_guide (1...$data_enemies.size).each { |i| set_enemy_encountered(i) set_enemy_defeated(i)
enemy = $data_enemies[i]
items = [enemy.drop_item1, enemy.drop_item2] if $imported["ExtraDropItem"] items += enemy.extra_drop_items end items.each_index { |j| set_enemy_item_dropped(i, j) }
if $imported["Steal"] objs = enemy.steal_objects objs.each_index { |j| set_enemy_object_stolen(i, j) } end } end #-------------------------------------------------------------------------- # ○ 図鑑に含めるか # enemy_id : 敵 ID #-------------------------------------------------------------------------- def enemy_guide_include?(enemy_id) return false unless KGC::EnemyGuide.enemy_show?(enemy_id) enemy = $data_enemies[enemy_id] return (enemy != nil && enemy.name != "") end #-------------------------------------------------------------------------- # ○ 存在する敵の種類数取得 # variable_id : 取得した値を代入する変数の ID #-------------------------------------------------------------------------- def get_all_enemies_number(variable_id = 0) n = 0 (1...$data_enemies.size).each { |i| n += 1 if enemy_guide_include?(i) } $game_variables[variable_id] = n if variable_id > 0 return n end #-------------------------------------------------------------------------- # ○ 遭遇した敵の種類数取得 # variable_id : 取得した値を代入する変数の ID #-------------------------------------------------------------------------- def get_encountered_enemies_number(variable_id = 0) n = 0 (1...$data_enemies.size).each { |i| if enemy_guide_include?(i) && $game_system.enemy_encountered[i] n += 1 end } $game_variables[variable_id] = n if variable_id > 0 return n end #-------------------------------------------------------------------------- # ○ 撃破した敵の種類数取得 # variable_id : 取得した値を代入する変数の ID #-------------------------------------------------------------------------- def get_defeated_enemies_number(variable_id = 0) n = 0 (1...$data_enemies.size).each { |i| if enemy_guide_include?(i) && $game_system.enemy_encountered[i] && $game_system.enemy_defeated[i] n += 1 end } $game_variables[variable_id] = n if variable_id > 0 return n end #-------------------------------------------------------------------------- # ○ モンスター図鑑完成度の取得 # variable_id : 取得した値を代入する変数の ID #-------------------------------------------------------------------------- def get_enemy_guide_completion(variable_id = 0) num = get_all_enemies_number value = (num > 0 ? (get_defeated_enemies_number * 100 / num) : 0) $game_variables[variable_id] = value if variable_id > 0 return value end #-------------------------------------------------------------------------- # ○ モンスター図鑑呼び出し #-------------------------------------------------------------------------- def call_enemy_guide return if $game_temp.in_battle $game_temp.next_scene = :enemy_guide end end end
#=================================================# # INCLUDE COMMANDS # #=================================================# # Include KGC::Commands in Game_Interpreter # #=================================================#
description_flag = false self.note.each_line { |line| case line when KGC::EnemyGuide::Regexp::Enemy::BEGIN_GUIDE_DESCRIPTION # 説明文開始 description_flag = true when KGC::EnemyGuide::Regexp::Enemy::END_GUIDE_DESCRIPTION # 説明文終了 description_flag = false else if description_flag @__enemy_guide_description += line end end } end #-------------------------------------------------------------------------- # ○ 図鑑説明文 #-------------------------------------------------------------------------- def enemy_guide_description create_enemy_guide_cache if @__enemy_guide_description == nil return @__enemy_guide_description end end
class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● オブジェクト初期化 # index : 敵グループ内インデックス # enemy_id : 敵キャラ ID #-------------------------------------------------------------------------- alias initialize_KGC_EnemyGuide initialize def initialize(index, enemy_id) initialize_KGC_EnemyGuide(index, enemy_id)
@original_ids = [] # 変身前の ID # 遭遇済みフラグをオン KGC::Commands.set_enemy_encountered(enemy_id) unless hidden end #-------------------------------------------------------------------------- # ● コラプスの実行 #-------------------------------------------------------------------------- alias perform_collapse_KGC_EnemyGuide perform_collapse def perform_collapse last_collapsed = @collapse
perform_collapse_KGC_EnemyGuide
if !last_collapsed && @collapse # 撃破済みフラグをオン KGC::Commands.set_enemy_defeated(enemy_id) # 変身前の敵も撃破済みにする if KGC::EnemyGuide::ORIGINAL_DEFEAT @original_ids.compact.each { |i| KGC::Commands.set_enemy_defeated(i) } end end end #-------------------------------------------------------------------------- # ● 変身 # enemy_id : 変身先の敵キャラ ID #-------------------------------------------------------------------------- alias transform_KGC_EnemyGuide transform def transform(enemy_id) # 変身前のIDを保存 @original_ids << @enemy_id
transform_KGC_EnemyGuide(enemy_id)
# 変身後の敵も遭遇済みにする KGC::Commands.set_enemy_encountered(enemy_id) end #-------------------------------------------------------------------------- # ● 隠れ状態設定 #-------------------------------------------------------------------------- alias hidden_equal_KGC_EnemyGuide hidden= unless $@ def hidden=(value) hidden_equal_KGC_EnemyGuide(value) # 出現した場合は遭遇済みフラグをオン KGC::Commands.set_enemy_encountered(enemy_id) unless value end end
class Window_EnemyGuideList < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, WLH + 32, 240, Graphics.height - (WLH + 32)) self.index = 0 refresh if KGC::EnemyGuide::USE_BACKGROUND_IMAGE self.opacity = 0 self.height -= (self.height - 32) % WLH end end #-------------------------------------------------------------------------- # ○ 選択モンスターの取得 #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # ○ エネミーをリストに含めるか # enemy_id : 敵 ID #-------------------------------------------------------------------------- def include?(enemy_id) return KGC::Commands.enemy_guide_include?(enemy_id) end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh @data = [] if KGC::EnemyGuide::ENEMY_ORDER_ID == nil # ID順 enemy_list = 1...$data_enemies.size else # 指定順 enemy_list = KGC::EnemyGuide::ENEMY_ORDER_ID end enemy_list.each { |i| @data << $data_enemies[i] if include?(i) } @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) enemy = @data[index] self.contents.font.color = normal_color unless KGC::Commands.enemy_defeated?(enemy.id) self.contents.font.color.alpha = 128 end rect = item_rect(index) self.contents.clear_rect(rect)
if KGC::EnemyGuide::SHOW_SERIAL_NUMBER s_num = sprintf(KGC::EnemyGuide::SERIAL_NUM_FORMAT, KGC::EnemyGuide::SERIAL_NUM_FOLLOW ? (index + 1) : enemy.id) end
text = (KGC::EnemyGuide::SHOW_SERIAL_NUMBER ? s_num : "") if KGC::Commands.enemy_encountered?(enemy.id) # 遭遇済み text += enemy.name else # 未遭遇 mask = KGC::EnemyGuide::UNKNOWN_ENEMY_NAME if mask.scan(/./).size == 1 mask = mask * enemy.name.scan(/./).size end text += mask end self.contents.draw_text(rect, text) end end
Voici maintenant la liste des scripts que je possède:
Spoiler:
-interface de magasin modifiée -bulles au dessus des pnjs(de La Meche) -Neo Save System -Pop up avec le nom de la map -Brouillard comme rmxp -name box -champ de vision -fusion de compétences -Plus de commandes équipement(optimiser, tout enlever...) -Curseur de KGC -Objets classés en catégories -Compétences classées en catégories -effets de lumière -kgc-forge -phs de kgc -afficher les objets reçus sur la map(de Blockade) -Enduits pour lames
Voilà, je crois que c'est tout. Si mes explications ne sont pas claires, je les modifierais.
Merci de m'aider!
Voilà
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 8:21
Plus simple, upload une démo.
Ça ira plus vite plutôt qu'essayer de décortiquer les script sur le forum.
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 9:18
Voilà: http://www.megaupload.com/?d=YM9L9KR0 Désolé, la balise lien ne marchait pas, je cliquais dessus mais y s'passait rien^^'
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 9:35
Je viens d'essayer, aucun problème...
( J'ai commencé le jeu, j'ai shooté le voleur juste au dessus de l'équipe, il est bien apparu dans le bestiaire )
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 13:12
... Je crois que y'a une erreur. C'est bien le bestiaire avec la description du monstre(genre ça explique son mode de vie, ses habitudes...) qui est dans SM? Si c'est lui, est-ce que les PV du monstre s'affichaient?
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 13:16
Le problème, c'est que dans ta démo y'a qu'un bestiaire et c'est celui de Krazplay, alors que toi tu parle de celui ce KGC, c'est vrai que ca m'a paru bizarre mais bon...
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 13:28
Ouais, j'ai uploadé une mauvaise démo. J'avais déjà enlevé celui de KGC. Donc voilà une démo qui marche(désolé de t'faire perdre ton temps^^'): Là
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:09
J'ai testé, c'est un problème du au SBS. Change de bestiaire... Ou fais une demande dans la partie demande de script pour adapter ce script au SBS.
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:20
OK. Tu vois d'où ça vient précisement? Parce que dans SM ça marche(et j'utilise le même SBS(même version)).Donc ça doit venir d'une de mes add-on. T'en penses quoi?
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:25
J'ai désactivé tous les add-ons. J'ai testé que avec le SBS et le bestiaire, ça ne marchait pas. J'ai essayé sans le SBS ca marchait.
Donc le problème vient du SBS.
Après, je pense que s'il marchait pas Blockade a du faire en sorte qu'il marche. Peut être qu'elle pourrait te donner "ce patch", si jamais il y en avait un.
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:49
Ok merci de l'aide. J'vais envoyer un MP à Block' ça sera plus simple^^
Blockade
Ex-Admin Cruelle
Age : 32 Inscrit le : 03/07/2008 Messages : 2441
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:56
Sinon tu cherche sur le topic officiel ! http://www.rpgmakervx.net/index.php?showtopic=3781
Oh mais.. Que vois-je sur la page ?
Oh mais ouais ! Un patch pour le bestiaire de KGC §§§§
(en plus t'a juste à cliquer sur le lien, j'suis gentille hein..)
Faudrait que vous appreniez à chercher un jour..
Dernière édition par Blockade le Sam 7 Aoû 2010 - 14:58, édité 1 fois
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 14:58
AH! Euh... Merci! Désolé du MP inutile alors^^'
Zangther
Maître des Duels
Age : 32 Inscrit le : 29/07/2009 Messages : 7841
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 15:00
>< Bah, j'aurais du y penser ... Mais la flemme de chercher x)
Blockade
Ex-Admin Cruelle
Age : 32 Inscrit le : 03/07/2008 Messages : 2441
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Sam 7 Aoû 2010 - 15:08
Bah t'es mauvais Zang' c'tout =D
T'oublie rien par hasard BARVACHE ?..
BARVACHE
Vache Folle
Age : 29 Inscrit le : 22/05/2010 Messages : 3005
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu] Mar 10 Aoû 2010 - 7:28
Si! Désolé... Donc: RESOLU
Contenu sponsorisé
Sujet: Re: Poblème avec le bestiaire de KGC[Résolu]