查看: 7253|回复: 7

[已经过期] VA超级脚本整合(90个系统)的問題

[复制链接]
梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
回帖
49
发表于 2013-7-19 19:58:35 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 ji3rul4coco 于 2013-7-20 20:20 编辑

VA超级脚本整合(90个系统)的問題有三個,標題我有標上紅字,另兩個在腳本下面。

一、是關於怪物圖鑑系統:

1.不是很清楚怪物圖鑑系統怎麼設定「敵人類型」

2.還有,在測試時用此腳本,就會出現一個問題
不知為何,能用鍵盤左右健控制辨識度?

3.要如何設定一些怪物「不要列入圖鑑」?

要怎麼樣才能把這三個問題解決?

核心腳本如下
  1. module Snstar
  2.   module EnemyList
  3.     # 敵人類型      0       1       2       3       4
  4.     ENEMY_TYPE = ["下級", "普通", "出色", "菁英", "未知"]
  5.     ENEMY_TYPE_DEFAULT = 4       # 敵人的默認類型
  6.     ENCOUNTER_PERCENT = 1        # 敵人現身所提升的辨識度
  7.     DEFEAT_PERCENT = 5           # 敵人戰敗所提升的辨識度
  8.     TEST_PERCENT = 5             # 測試用調整的辨識度
  9.     INCLUDE_ALL_CATEGORY = true  # 是否包含“全部”類型
  10.     ALL_CATEGORY_TEXT = "全部"   # “全部”類型的文字
  11.     ENEMY_MORE_INFO_BUTTON = :X  # 顯示敵人更多資訊的按鍵
  12.     ENEMY_MORE_INFO = false      # 是否顯示更多訊息(擴充用)
  13.    
  14.     DRAW_ENEMY_ICON = false # 需要使用繪製單張圖標才能使用
  15.    
  16.     # 敵人圖像大小限定
  17.     ENEMY_IMAGE_MAX_WIDTH = 170  # 敵人圖像寬度限定
  18.     ENEMY_IMAGE_MAX_HEIGHT = 192 # 敵人圖像高度限定
  19.     ENEMY_IMAGE_FOLDER = "Graphics/EnemyImages/" # 敵人指定圖像資料夾
  20.     ENEMY_HUE_SYNC_DB = false # 敵人指定圖像是否使用資料庫設定的色相
  21.    
  22.     # 文字設定
  23.     ENEMY_LIST_COMMAND_TEXT = "怪物圖鑑" # 主選單命令用字
  24.     ENEMY_LIST_SWITCH_ID    = 0        # 主選單命令顯示的控制開關
  25.     ENEMY_LIST_ENABLE_ID    = 0        # 主選單命令有效的控制開關
  26.    
  27.     ENEMY_PERCENT_VOCAB = "辨識度"   # 辨識度用字
  28.     ENEMY_PERCENT_BASE_COLOR = Color.new(0, 255, 0)#Color.new(0, 0, 0)
  29.     ENEMY_PERCENT_FILL_COLOR = Color.new(255, 255, 0)
  30.     NO_DISPLAY_MASK = "??"         # 無法顯示時的替代文字
  31.     EST_DISPLAY_MASK = "大約是%s"    # 顯示估算數值時的文字
  32.     DROP_GOLD_VOCAB  = "金錢"
  33.     DROP_ITEM_VOCAB  = "掉落物"
  34.     FEA_WEAK_ELE_RATE = "弱點"    # 屬性有效度 > 100% 的文字
  35.     FEA_RES_ELE_RATE  = "抵抗"    # 屬性有效度 < 100% 的文字
  36.     FEA_DEBUFF_RATE   = "弱化屬性"    # 弱化屬性的文字
  37.     FEA_ATK_ELEMENT   = "屬性"    # 攻擊附帶屬性的文字
  38.    
  39.     # 辨識度提升數值
  40.     PERCENTAGE_ON_ENCOUNTER = 0 # 敵人現身時提升辨識度
  41.     PERCENTAGE_ON_DEFEAT    = 5 # 敵人落敗時提升辨識度
  42.    
  43.     # 辨識度顯示參數數值
  44.     NAME_DISPLAY_PERC   = 1   # 名稱顯示百分比
  45.     HP_EST_DISPLAY_PERC = 5   # HP估算顯示百分比
  46.     HP_DISPLAY_PERC     = 10  # HP顯示百分比
  47.     MP_EST_DISPLAY_PERC = 10  # MP估算顯示百分比
  48.     MP_DISPLAY_PERC     = 15  # MP顯示百分比
  49.     ATK_DISPLAY_PERC    = 50  # 攻擊力顯示百分比
  50.     DEF_DISPLAY_PERC    = 50  # 防禦力顯示百分比
  51.     MAT_DISPLAY_PERC    = 75  # 魔法攻擊顯示百分比
  52.     MDF_DISPLAY_PERC    = 75  # 魔法防禦顯示百分比
  53.     AGI_DISPLAY_PERC    = 75  # 敏捷顯示百分比
  54.     LUK_DISPLAY_PERC    = 75  # 幸運顯示百分比
  55.     GOLD_DISPLAY_PERC   = 100 # 掉落金錢顯示百分比
  56.     ITEM_DISPLAY_PERC   = 100 # 掉落物顯示百分比
  57.     #TYPE_BOSS
  58.   end
  59. end
  60. class RPG::Enemy < RPG::BaseItem
  61.   include Snstar::EnemyList
  62.   def list_type
  63.     self.note.split(/[\r\n]+/).each{ |line|
  64.       if line =~ /\[(?:ltype) (\d+)\]/
  65.         return $1 ? $1.to_i : ENEMY_TYPE_DEFAULT
  66.       end}
  67.     return ENEMY_TYPE_DEFAULT
  68.   end
  69.   def list_image
  70.     self.note.split(/[\r\n]+/).each{ |line|
  71.       if line =~ /\[(?:limage) (\S+)\]/
  72.         return $1
  73.       end}
  74.     return nil # battler_name
  75.   end
  76.   def no_list?
  77.     self.note.split(/[\r\n]+/).each{ |line|
  78.       return true if line =~ /\[no_list\]/
  79.       }
  80.     return false
  81.   end
  82. end
  83. class Game_Party < Game_Unit
  84.   include Snstar::EnemyList
  85.   #--------------------------------------------------------------------------
  86.   # ● 初始化
  87.   #--------------------------------------------------------------------------
  88.   alias enemy_list_initialize initialize
  89.   def initialize
  90.     enemy_list_initialize
  91.     @enemy_know_percentage=[]
  92.     $data_enemies.each{ |e|
  93.       next unless e
  94.       set_enemy_percentage(e.id, 0)
  95.     }
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 設置敵人百分比
  99.   #--------------------------------------------------------------------------
  100.   def set_enemy_percentage(e_id, percentage=100)
  101.     temp_p = [[0, percentage].max ,100].min
  102.     @enemy_know_percentage[e_id] = temp_p
  103.   end
  104.   #--------------------------------------------------------------------------
  105.   # ● 獲取敵人百分比
  106.   #--------------------------------------------------------------------------
  107.   def enemy_percent(e_id)
  108.     return 0 unless seen_enemy?(e_id)
  109.     return @enemy_know_percentage[e_id]
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 提升敵人百分比
  113.   #--------------------------------------------------------------------------
  114.   def see_enemy(e_id, percentage = 1)
  115.     temp_p = @enemy_know_percentage[e_id] + percentage
  116.     set_enemy_percentage(e_id, temp_p)
  117.   end
  118.   def know_enemy(e_id)
  119.     set_enemy_percentage(e_id, 100)
  120.   end
  121.   #--------------------------------------------------------------------------
  122.   # ● 判斷是否見過敵人
  123.   #--------------------------------------------------------------------------
  124.   def seen_enemy?(e_id)
  125.     return @enemy_know_percentage[e_id] > 0
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● 判斷是否熟知敵人
  129.   #--------------------------------------------------------------------------
  130.   def known_enemy?(e_id, percentage=100)
  131.     return false unless seen_enemy?(e_id)
  132.     return enemy_percent(e_id) == percentage
  133.   end
  134.   #--------------------------------------------------------------------------
  135.   # ● 戰鬥開始提升辨識度
  136.   #--------------------------------------------------------------------------
  137.   alias enemy_list_on_battle_start on_battle_start
  138.   def on_battle_start
  139.     enemy_list_on_battle_start
  140.     $game_troop.members.each{ |m|
  141.       e_id = m.enemy.id
  142.       see_enemy(e_id, ENCOUNTER_PERCENT)
  143.     }
  144.   end
  145. end
  146. class Game_Enemy < Game_Battler
  147.   #--------------------------------------------------------------------------
  148.   # ● 敵人戰敗提升辨識度
  149.   #--------------------------------------------------------------------------
  150.   alias enemy_list_perform_collapse_effect perform_collapse_effect
  151.   def perform_collapse_effect
  152.     enemy_list_perform_collapse_effect
  153.     $game_party.see_enemy(@enemy_id, Snstar::EnemyList::DEFEAT_PERCENT)
  154.   end
  155. end
  156. class Game_Interpreter
  157.   #--------------------------------------------------------------------------
  158.   # ● 呼叫敵人圖鑒場景
  159.   #--------------------------------------------------------------------------
  160.   def call_enemy_list
  161.     SceneManager.call(Scene_List)
  162.   end
  163.   #--------------------------------------------------------------------------
  164.   # ● 提升敵人辨識度
  165.   #--------------------------------------------------------------------------
  166.   def gain_enemy_percentage(e_id, per)
  167.     $game_party.see_enemy(e_id, per)
  168.   end
  169. end
复制代码



二、是ace菜單
雖然她說很簡單,不過我還是不會用
請解釋一下用法

腳本如下
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Menu Engine v1.07
  4. # -- Last Updated: 2012.01.03
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-AceMenuEngine"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.03 - Compatibility Update: Ace Item Menu
  15. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  16. #            - Compatibility Update: Kread-EX's Grathnode Install
  17. #            - Compatibility Update: Yami's Slot Battle
  18. # 2011.12.23 - Script efficiency optimized.
  19. # 2011.12.19 - Compatibility Update: Class System
  20. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  21. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  22. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  23. # 2011.12.06 - Started Script and Finished.
  24. #
  25. #==============================================================================
  26. # ▼ Introduction
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  29. # customization that RPG Maker 2003 allowed. With this script, you can add,
  30. # remove, and rearrange menu commands as you see fit. In addition to that, you
  31. # can add in menu commands that lead to common events or even custom commands
  32. # provided through other scripts.
  33. #
  34. # This script also provides window appearance management such as setting almost
  35. # all command windows to be center aligned or changing the position of the
  36. # help window. You can also opt to show the TP Gauge in the main menu as well
  37. # as in the skill menu.
  38. #
  39. #==============================================================================
  40. # ▼ Instructions
  41. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  42. # To install this script, open up your script editor and copy/paste this script
  43. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  44. #
  45. # Edit the settings in the module below as you see fit.
  46. #
  47. #==============================================================================
  48. # ▼ Compatibility
  49. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  50. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  51. # it will run with RPG Maker VX without adjusting.
  52. #
  53. #==============================================================================

  54. module YEA
  55.   module MENU
  56.    
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     # - General Menu Settings -
  59.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  60.     # This changes the way menus appear in your game. You can change their
  61.     # alignment, and the location of the help window, Note that any non-Yanfly
  62.     # Engine Ace scripts may not conform to these menu styles.
  63.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  64.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  65.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  66.    
  67.     # These settings below adjust the visual appearance of the main menu.
  68.     # Change the settings as you see fit.
  69.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  70.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  71.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  72.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  73.    
  74.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  75.     # - Main Menu Settings -
  76.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  77.     # These settings adjust the main menu, the order at which commands appear,
  78.     # what text is displayed, and what the commands are linked to. Here's a
  79.     # list of which commands do what:
  80.     #
  81.     # -------------------------------------------------------------------------
  82.     # :command         Description
  83.     # -------------------------------------------------------------------------
  84.     # :item            Opens up the item menu. Default menu item.
  85.     # :skill           Opens up the skill menu. Default menu item.
  86.     # :equip           Opens up the equip menu. Default menu item.
  87.     # :status          Opens up the status menu. Default menu item.
  88.     # :formation       Lets player manage party. Default menu item.
  89.     # :save            Opens up the save menu. Default menu item.
  90.     # :game_end        Opens up the shutdown menu. Default menu item.
  91.     #
  92.     # :class           Requires YEA - Class System
  93.     #
  94.     # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
  95.     # :grathnode       Requires Kread-EX's Grathnote Install
  96.     # :sslots          Requires Yami's YSA - Slot Battle
  97.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  98.     COMMANDS =[
  99.       :item,         # Opens up the item menu. Default menu item.
  100.       :skill,        # Opens up the skill menu. Default menu item.
  101.       :equip,        # Opens up the equip menu. Default menu item.
  102.       :class,        # Requires YEA - Class System.
  103.       :guardian,
  104.       :formation,
  105.       :status,       # Opens up the status menu. Default menu item.
  106.     #:formation,    # Lets player manage party. Default menu item.
  107.       :event_3,      # Launches Common Event 3. Common Event Command.
  108.       :event_4,      # Launches Common Event 4. Common Event Command.
  109.       :event_11,      # Launches Common Event 13. Common Event Command.
  110.       :event_12,      # Launches Common Event 13. Common Event Command.
  111.       :event_13,      # Launches Common Event 13. Common Event Command.
  112.       :event_14,      # Launches Common Event 14. Common Event Command.
  113.       :event_15,      # Launches Common Event 15. Common Event Command.
  114.       :event_16,      # Launches Common Event 16. Common Event Command.
  115.       :event_21,      # Launches Common Event 16. Common Event Command.
  116.       :event_22,      # Launches Common Event 16. Common Event Command.
  117.       :event_53,      # Launches Common Event 16. Common Event Command.
  118.       :event_54,
  119.       :event_55,
  120.     # :debug,        # Opens up debug menu. Custom Command.
  121.       :shop,         # Opens up a shop to pawn items. Custom Command.
  122.       :save,         # Opens up the save menu. Default menu item.
  123.       :game_end,     # Opens up the shutdown menu. Default menu item.
  124.     ] # Do not remove this.
  125.    
  126.     #--------------------------------------------------------------------------
  127.     # - Common Event Commands -
  128.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  129.     # If you insert one of the following commands into the COMMANDS array, the
  130.     # player can trigger a common event to launch. You can disable certain
  131.     # commands in the menu by binding them to a switch. If you don't want to
  132.     # disable them, set the switch to 0 and it will always be enabled. The
  133.     # ShowSwitch will prevent a command from appear if that switch is false.
  134.     # Set it to 0 for it to have no impact.
  135.     #--------------------------------------------------------------------------
  136.    
  137.     #--------------------------------------------------------------------------
  138.     # - Custom Commands -
  139.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  140.     # For those who use scripts that may lead to other menu scenes, use this
  141.     # hash to manage custom commands that run specific script calls. You can
  142.     # disable certain commands in the menu by binding them to a switch. If you
  143.     # don't want to disable them, set the switch to 0. The ShowSwitch will
  144.     # prevent a command from appear if that switch is false. Set it to 0 for
  145.     # it to have no impact.
  146.     #--------------------------------------------------------------------------
  147.     CUSTOM_COMMANDS ={
  148.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  149.       :debug   => [       "Debug",            0,          0, :command_debug],
  150.       :formation => ["整隊",            0,        0,  :command_formation],
  151.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  152.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  153.       :guardian => [ "御眾雇",            0,        0, :command_guardian],
  154.     } # Do not remove this.
  155.    
  156.   end # MENU
  157. end # YEA

  158. #==============================================================================
  159. # ▼ Editting anything past this point may potentially result in causing
  160. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  161. # halitosis so edit at your own risk.
  162. #==============================================================================

  163. #==============================================================================
  164. # ■ Window_MenuCommand
  165. #------------------------------------------------------------------------------
  166. # This class is kept towards the top of the script to provide easier access.
  167. #==============================================================================

  168. class Window_MenuCommand < Window_Command
  169.   
  170.   #--------------------------------------------------------------------------
  171.   # overwrite method: make_command_list
  172.   #--------------------------------------------------------------------------
  173.   def make_command_list
  174.     for command in YEA::MENU::COMMANDS
  175.       case command
  176.       #--- Default Commands ---
  177.       when :item
  178.         add_command(Vocab::item,   :item,   main_commands_enabled)
  179.       when :skill
  180.         add_command(Vocab::skill,  :skill,  main_commands_enabled)
  181.       when :equip
  182.         add_command(Vocab::equip,  :equip,  main_commands_enabled)
  183.       when :status
  184.         add_command(Vocab::status, :status, main_commands_enabled)
  185.       when :formation
  186.         add_formation_command
  187.       when :save
  188.         add_original_commands
  189.         add_save_command
  190.       when :game_end
  191.         add_game_end_command
  192.       #--- Yanfly Engine Ace Commands ---
  193.       when :class
  194.         next unless $imported["YEA-ClassSystem"]
  195.         add_class_command
  196.       #--- Imported Commands ---
  197.       when :sslots
  198.         next unless $imported["YSA-SlotBattle"]
  199.         add_sslots_command
  200.       when :grathnode
  201.         next unless $imported["KRX-GrathnodeInstall"]
  202.         process_custom_command(command)
  203.       when :gogototori
  204.         next unless $imported["KRX-AlchemicSynthesis"]
  205.         process_custom_command(command)
  206.       #--- Imported Commands ---
  207.       else
  208.         process_common_event_command(command)
  209.         process_custom_command(command)
  210.       end
  211.     end
  212.   end
  213.   
  214.   #--------------------------------------------------------------------------
  215.   # new method: process_common_event_command
  216.   #--------------------------------------------------------------------------
  217.   def process_common_event_command(command)
  218.   end
  219.   
  220.   #--------------------------------------------------------------------------
  221.   # new method: process_custom_command
  222.   #--------------------------------------------------------------------------
  223.   def process_custom_command(command)
  224.     return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  225.     show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  226.     continue = show <= 0 ? true : $game_switches[show]
  227.     return unless continue
  228.     text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  229.     switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  230.     enabled = switch <= 0 ? true : $game_switches[switch]
  231.     add_command(text, command, enabled)
  232.   end
  233.   
  234. end # Window_MenuCommand

  235. #==============================================================================
  236. # ■ Menu
  237. #==============================================================================

  238. module Menu
  239.   
  240.   #--------------------------------------------------------------------------
  241.   # self.help_window_location
  242.   #--------------------------------------------------------------------------
  243.   def self.help_window_location
  244.     return YEA::MENU::HELP_WINDOW_LOCATION
  245.   end
  246.   
  247.   #--------------------------------------------------------------------------
  248.   # self.command_window_align
  249.   #--------------------------------------------------------------------------
  250.   def self.command_window_align
  251.     return YEA::MENU::COMMAND_WINDOW_ALIGN
  252.   end
  253.   
  254.   #--------------------------------------------------------------------------
  255.   # self.main_menu_align
  256.   #--------------------------------------------------------------------------
  257.   def self.main_menu_align
  258.     return YEA::MENU::MAIN_MENU_ALIGN
  259.   end
  260.   
  261.   #--------------------------------------------------------------------------
  262.   # self.main_menu_right
  263.   #--------------------------------------------------------------------------
  264.   def self.main_menu_right
  265.     return YEA::MENU::MAIN_MENU_RIGHT
  266.   end
  267.   
  268. end # Menu

  269. #==============================================================================
  270. # ■ Game_Actor
  271. #==============================================================================

  272. class Game_Actor < Game_Battler
  273.   
  274.   #--------------------------------------------------------------------------
  275.   # new method: draw_mp?
  276.   #--------------------------------------------------------------------------
  277.   def draw_mp?
  278.     return true unless draw_tp?
  279.     for skill in skills
  280.       next unless added_skill_types.include?(skill.stype_id)
  281.       return true if skill.mp_cost > 0
  282.     end
  283.     return false
  284.   end
  285.   
  286.   #--------------------------------------------------------------------------
  287.   # new method: draw_tp?
  288.   #--------------------------------------------------------------------------
  289.   def draw_tp?
  290.     return false unless $data_system.opt_display_tp
  291.     for skill in skills
  292.       next unless added_skill_types.include?(skill.stype_id)
  293.       return true if skill.tp_cost > 0
  294.     end
  295.     return false
  296.   end
  297.   
  298. end # Game_Actor

  299. #==============================================================================
  300. # ■ Window_Base
  301. #==============================================================================

  302. class Window_Base < Window
  303.   
  304.   #--------------------------------------------------------------------------
  305.   # overwrite method: draw_actor_simple_status
  306.   #--------------------------------------------------------------------------
  307.   def draw_actor_simple_status(actor, dx, dy)
  308.     dy -= line_height / 2
  309.     draw_actor_name(actor, dx, dy)
  310.     draw_actor_level(actor, dx, dy + line_height * 1)
  311.     draw_actor_icons(actor, dx, dy + line_height * 2)
  312.     dw = contents.width - dx - 124
  313.     draw_actor_class(actor, dx + 120, dy, dw)
  314.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  315.     if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  316.       draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
  317.     elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  318.       if $imported["YEA-BattleEngine"]
  319.         draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  320.         draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  321.       else
  322.         draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  323.         draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  324.       end
  325.     else
  326.       draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  327.     end
  328.   end
  329.   
  330. end # Window_Base

  331. #==============================================================================
  332. # ■ Window_Command
  333. #==============================================================================

  334. class Window_Command < Window_Selectable
  335.   
  336.   #--------------------------------------------------------------------------
  337.   # overwrite method: alignment
  338.   #--------------------------------------------------------------------------
  339.   def alignment
  340.     return Menu.command_window_align
  341.   end
  342.   
  343. end # Window_Command

  344. #==============================================================================
  345. # ■ Window_MenuCommand
  346. #==============================================================================

  347. class Window_MenuCommand < Window_Command
  348.   
  349.   #--------------------------------------------------------------------------
  350.   # alias method: init_command_position
  351.   #--------------------------------------------------------------------------
  352.   class <<self; alias init_command_position_ame init_command_position; end
  353.   def self.init_command_position
  354.     init_command_position_ame
  355.     @@last_command_oy = nil
  356.   end
  357.   
  358.   #--------------------------------------------------------------------------
  359.   # overwrite method: visible_line_number
  360.   #--------------------------------------------------------------------------
  361.   def visible_line_number
  362.     return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  363.   end
  364.   
  365.   #--------------------------------------------------------------------------
  366.   # overwrite method: alignment
  367.   #--------------------------------------------------------------------------
  368.   def alignment
  369.     return Menu.main_menu_align
  370.   end
  371.   
  372.   #--------------------------------------------------------------------------
  373.   # alias method: process_ok
  374.   #--------------------------------------------------------------------------
  375.   alias window_menucommand_process_ok_ame process_ok
  376.   def process_ok
  377.     @@last_command_oy = self.oy
  378.     window_menucommand_process_ok_ame
  379.   end
  380.   
  381.   #--------------------------------------------------------------------------
  382.   # alias method: select_last
  383.   #--------------------------------------------------------------------------
  384.   alias window_menucommand_select_last_ame select_last
  385.   def select_last
  386.     window_menucommand_select_last_ame
  387.     self.oy = @@last_command_oy unless @@last_command_oy.nil?
  388.     @@last_command_oy = nil
  389.   end
  390.   
  391. end # Window_MenuCommand

  392. #==============================================================================
  393. # ■ Scene_Menu
  394. #==============================================================================

  395. class Scene_Menu < Scene_MenuBase
  396.   
  397.   #--------------------------------------------------------------------------
  398.   # alias method: start
  399.   #--------------------------------------------------------------------------
  400.   alias scene_menu_start_ame start
  401.   def start
  402.     scene_menu_start_ame
  403.     relocate_windows
  404.   end
  405.   
  406.   #--------------------------------------------------------------------------
  407.   # new method: relocate_windows
  408.   #--------------------------------------------------------------------------
  409.   def relocate_windows
  410.     return unless Menu.main_menu_right
  411.     @command_window.x = Graphics.width - @command_window.width
  412.     @gold_window.x = Graphics.width - @gold_window.width
  413.     @status_window.x = 0
  414.   end
  415.   
  416.   def return_scene
  417.     $game_map.autoplay
  418.     SceneManager.return
  419.   end
  420.   
  421. end # Scene_Menu

  422. #==============================================================================
  423. # ■ Scene_Item
  424. #==============================================================================

  425. class Scene_Item < Scene_ItemBase
  426.   
  427.   #--------------------------------------------------------------------------
  428.   # alias method: start
  429.   #--------------------------------------------------------------------------
  430.   alias scene_item_start_ame start
  431.   def start
  432.     scene_item_start_ame
  433.     return if $imported["YEA-ItemMenu"]
  434.     relocate_windows
  435.   end
  436.   
  437.   #--------------------------------------------------------------------------
  438.   # new method: relocate_windows
  439.   #--------------------------------------------------------------------------
  440.   def relocate_windows
  441.     case Menu.help_window_location
  442.     when 0 # Top
  443.       @help_window.y = 0
  444.       @category_window.y = @help_window.height
  445.       @item_window.y = @category_window.y + @category_window.height
  446.     when 1 # Middle
  447.       @category_window.y = 0
  448.       @help_window.y = @category_window.height
  449.       @item_window.y = @help_window.y + @help_window.height
  450.     else # Bottom
  451.       @category_window.y = 0
  452.       @item_window.y = @category_window.height
  453.       @help_window.y = @item_window.y + @item_window.height
  454.     end
  455.     if $imported["YEA-ItemMenu"]
  456.       @types_window.y = @category_window.y
  457.       @status_window.y = @category_window.y
  458.     end
  459.   end
  460.   
  461. end # Scene_Item

  462. #==============================================================================
  463. # ■ Scene_Skill
  464. #==============================================================================

  465. class Scene_Skill < Scene_ItemBase
  466.   
  467.   #--------------------------------------------------------------------------
  468.   # alias method: start
  469.   #--------------------------------------------------------------------------
  470.   alias scene_skill_start_ame start
  471.   def start
  472.     scene_skill_start_ame
  473.     relocate_windows
  474.   end
  475.   
  476.   #--------------------------------------------------------------------------
  477.   # new method: relocate_windows
  478.   #--------------------------------------------------------------------------
  479.   def relocate_windows
  480.     case Menu.help_window_location
  481.     when 0 # Top
  482.       @help_window.y = 0
  483.       @command_window.y = @help_window.height
  484.       @status_window.y = @help_window.height
  485.       @item_window.y = @status_window.y + @status_window.height
  486.     when 1 # Middle
  487.       @command_window.y = 0
  488.       @status_window.y = 0
  489.       @help_window.y = @status_window.y + @status_window.height
  490.       @item_window.y = @help_window.y + @help_window.height
  491.     else # Bottom
  492.       @command_window.y = 0
  493.       @status_window.y = 0
  494.       @item_window.y = @status_window.y + @status_window.height
  495.       @help_window.y = @item_window.y + @item_window.height
  496.     end
  497.   end
  498.   
  499. end # Scene_Skill

  500. #==============================================================================
  501. # ■ Scene_Equip
  502. #==============================================================================

  503. class Scene_Equip < Scene_MenuBase
  504.   
  505.   #--------------------------------------------------------------------------
  506.   # alias method: start
  507.   #--------------------------------------------------------------------------
  508.   alias scene_equip_start_ame start
  509.   def start
  510.     scene_equip_start_ame
  511.     relocate_windows
  512.     relocate_aee_windows
  513.   end
  514.   
  515.   #--------------------------------------------------------------------------
  516.   # new method: relocate_windows
  517.   #--------------------------------------------------------------------------
  518.   def relocate_windows
  519.     return if $imported["YEA-AceEquipEngine"]
  520.     case Menu.help_window_location
  521.     when 0 # Top
  522.       @help_window.y = 0
  523.       @status_window.y = @help_window.height
  524.       @command_window.y = @help_window.height
  525.       @slot_window.y = @command_window.y + @command_window.height
  526.       @item_window.y = @slot_window.y + @slot_window.height
  527.     when 1 # Middle
  528.       @status_window.y = 0
  529.       @command_window.y = 0
  530.       @slot_window.y = @command_window.y + @command_window.height
  531.       @help_window.y = @slot_window.y + @slot_window.height
  532.       @item_window.y = @help_window.y + @help_window.height
  533.     else # Bottom
  534.       @status_window.y = 0
  535.       @command_window.y = 0
  536.       @slot_window.y = @command_window.y + @command_window.height
  537.       @item_window.y = @slot_window.y + @slot_window.height
  538.       @help_window.y = @item_window.y + @item_window.height
  539.     end
  540.   end
  541.   
  542.   #--------------------------------------------------------------------------
  543.   # new method: relocate_aee_windows
  544.   #--------------------------------------------------------------------------
  545.   def relocate_aee_windows
  546.     return unless $imported["YEA-AceEquipEngine"]
  547.     case Menu.help_window_location
  548.     when 0 # Top
  549.       @help_window.y = 0
  550.       @command_window.y = @help_window.height
  551.       @slot_window.y = @command_window.y + @command_window.height
  552.     when 1 # Middle
  553.       @command_window.y = 0
  554.       @help_window.y = @command_window.height
  555.       @slot_window.y = @help_window.y + @help_window.height
  556.     else # Bottom
  557.       @command_window.y = 0
  558.       @slot_window.y = @command_window.height
  559.       @help_window.y = @slot_window.y + @slot_window.height
  560.     end
  561.     @actor_window.y = @command_window.y
  562.     @item_window.y = @slot_window.y
  563.     @status_window.y = @slot_window.y
  564.   end
  565.   
  566. end # Scene_Equip

  567. #==============================================================================
  568. # ■ Scene_Menu
  569. #==============================================================================

  570. class Scene_Menu < Scene_MenuBase
  571.   
  572.   #--------------------------------------------------------------------------
  573.   # new method: process_common_event_commands
  574.   #--------------------------------------------------------------------------
  575.   def process_common_event_commands
  576.     for command in YEA::MENU::COMMANDS
  577.       next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  578.       @command_window.set_handler(command, method(:command_common_event))
  579.     end
  580.   end
  581.   
  582.   #--------------------------------------------------------------------------
  583.   # new method: command_common_event
  584.   #--------------------------------------------------------------------------
  585.   def command_common_event
  586.     event_id = @command_window.current_ext
  587.     return return_scene if event_id.nil?
  588.     return return_scene if $data_common_events[event_id].nil?
  589.     $game_temp.reserve_common_event(event_id)
  590.     return_scene
  591.   end
  592.   
  593.   #--------------------------------------------------------------------------
  594.   # new method: command_debug
  595.   #--------------------------------------------------------------------------
  596.   def command_debug
  597.     SceneManager.call(Scene_Debug)
  598.   end
  599.   
  600.   #--------------------------------------------------------------------------
  601.   # new method: command_shop
  602.   #--------------------------------------------------------------------------
  603.   def command_shop
  604.     goods = []
  605.     SceneManager.call(Scene_Shop)
  606.     SceneManager.scene.prepare(goods, false)
  607.   end
  608.   
  609.   #--------------------------------------------------------------------------
  610.   # new method: command_totori
  611.   #--------------------------------------------------------------------------
  612.   def command_totori
  613.     return unless $imported['KRX-AlchemicSynthesis']
  614.     SceneManager.call(Scene_Alchemy)
  615.   end
  616.   
  617. end # Scene_Menu

  618. #==============================================================================
  619. #
  620. # ▼ End of File
  621. #
  622. #==============================================================================
复制代码



三、中英雙字體
我設定了,測試時還是不甩我

請解釋一下用法

腳本如下
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ [PS0]雙默認字體
  4. #        Draw_Text_DF
  5. #------------------------------------------------------------------------------
  6. #  對 Bitmap.draw_text 進行了重定義。
  7. #------------------------------------------------------------------------------
  8. #   若檢測為純中文,則使用默認字體;
  9. #   若檢測為純英文,則使用另一套字體。
  10. #   若檢測結果為中英文混雜,則逐字描繪。
  11. #==============================================================================
  12. # [更新記錄]
  13. #    - 2012.01.27 By 各種壓力的貓君
  14. #      * 新寫法自定義匹配更直觀;
  15. #      * 更改一些語句的執行順序以優化效率;
  16. #      * 重寫基礎x坐標獲取方法,以兼容非等寬字體;
  17. #      * BUILD2: 修正基礎x坐標的一處筆誤
  18. #    - 2012.01.26 By 各種壓力的貓君
  19. #      * 修正居中及居右坐標計算錯誤
  20. #    - 2012.01.25 By 各種壓力的貓君
  21. #      * 重寫逐字描繪方法,修正當對齊方式不為0時的錯誤
  22. #    - 2012.01.23 By 各種壓力的貓君
  23. #      * 初版
  24. #------------------------------------------------------------------------------
  25. # [使用方法]
  26. #    - 插入到MAIN以上即可。
  27. #==============================================================================
  28. $_PS0 = {} if $_PS0 == nil  
  29. $_PS0["Draw_Text_DF"] = 20120127.2
  30. #==============================================================================
  31. # [PS0] 通用配置模塊  
  32. #==============================================================================
  33. module PS0
  34.   module Draw_Text_DF

  35.     # 是否對str做前檢測(若設定為false則一直使用逐字描繪/兩次描繪)
  36.     DO_PRE_CHECK = true

  37.     # 默認字體(在這裡指定了就不要再在MAIN裡指定了)
  38.     Font.default_name = "C"

  39.     # 英文字體
  40.     ENG_FONT = "E"

  41.     # 作用範圍
  42.     # 0:全部字體
  43.     # 1:僅默認字體(即特殊指定的除外)
  44.     DO_CHANGE = 1

  45.     # 中英文混排時的描繪方式
  46.     # 0:逐字描繪
  47.     # 1:分段描繪
  48.     DRAW_TYPE = 0

  49.     # 自定義匹配
  50.     # 若不需要符號請將REG2、REG3清空但保留外側半角雙引號
  51.     REG1 = "0-9A-Za-z "                 # 數字、大小寫字母、半角空格
  52.     REG2 = ";:?!@#%^&*(){}[]=-+_/|,.<>" # 一般符號
  53.     REG3 = ""\'\$\"                   # 特殊符號(要在前面加"")

  54.     # 生成真正的正則式(若不清楚切勿隨意修改下一行)
  55.     REG = /[#{REG1 + (REG2+REG3).gsub!(/./) { "\" + $& }}]/

  56.   end
  57. end
  58. #==============================================================================

  59. class Bitmap
  60.   #--------------------------------------------------------------------------
  61.   # ● Draw text
  62.   #--------------------------------------------------------------------------
  63.   alias old_draw_text draw_text
  64.   def draw_text(*args)
  65.   #--------------------------------------------------------------------------
  66.   # 當特殊字體且設定為不對特殊字體進行替換時,直接調用原有方式
  67.   if self.font.name != Font.default_name && PS0::Draw_Text_DF::DO_CHANGE == 1
  68.     old_draw_text(*args)
  69.   else
  70.   #--------------------------------------------------------------------------
  71.     # 記錄默認字體
  72.     last_font_name = self.font.name
  73.     # 獲取參數
  74.     if args[0].is_a?(Rect)
  75.       rect, str, align = args[0..2]
  76.       x, y, width, height = rect.x, rect.y, rect.width, rect.height
  77.     else
  78.       x, y, width, height, str, align = args[0..5]
  79.     end
  80.     str = str.to_s
  81.     align = 0 if align.nil?
  82.     # 執行前檢測
  83.     if PS0::Draw_Text_DF::DO_PRE_CHECK == true
  84.       if str.scan(PS0::Draw_Text_DF::REG).size == 0 # 純中文
  85.         old_draw_text(*args)
  86.       elsif str.scan(PS0::Draw_Text_DF::REG).size == str.size # 純英文
  87.         change_to_eng_font
  88.         old_draw_text(*args)
  89.       else
  90.         case PS0::Draw_Text_DF::DRAW_TYPE
  91.         when 0 ; draw_text_1by1(x, y, width, height, str, align)
  92.         when 1 ; draw_text_npass(x, y, width, height, str, align)
  93.         end
  94.       end
  95.     else
  96.       case PS0::Draw_Text_DF::DRAW_TYPE
  97.       when 0 ; draw_text_1by1(x, y, width, height, str, align)
  98.       when 1 ; draw_text_npass(x, y, width, height, str, align)
  99.       end
  100.     end
  101.     # 還原默認字體
  102.     self.font.name = last_font_name
  103.   end # <- 檢測特殊字體
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ○ 逐字描繪
  107.   #--------------------------------------------------------------------------
  108.   def draw_text_1by1(x, y, width, height, str, align)
  109.     # 記錄默認字體
  110.     last_font_name = self.font.name
  111.     # 臨時變量(x坐標偏移量)
  112.     ox = 0
  113.     # 根據不同對齊方式計算基礎x坐標
  114.     if align == 0 # 居左
  115.       bx = x
  116.     else
  117.       # 分離兩種字體對應的str以實現非等寬字體的長度識別
  118.       str1 = str.clone.gsub!(PS0::Draw_Text_DF::REG)            { "" }
  119.       str2 = str.clone.gsub!(/(?!#{PS0::Draw_Text_DF::REG})./)  { "" }
  120.       str_width = text_size(str1).width
  121.       change_to_eng_font
  122.       str_width += text_size(str2).width
  123.       case align
  124.       when 0 # 居左
  125.         bx = x
  126.       when 1 # 居中
  127.         bx = x + (width - str_width) / 2
  128.       when 2 # 居右
  129.         bx = x + (width - str_width)
  130.       end
  131.     end
  132.     # 給字符串結尾添加特殊符號
  133.     str += "\P"
  134.     # 提取單個文字
  135.     while (!(c = str.slice!(/./m)).nil?)
  136.       # 還原默認字體
  137.       self.font.name = last_font_name
  138.       # 當滿足正則匹配則替換字體
  139.       change_to_eng_font if c.slice(PS0::Draw_Text_DF::REG)
  140.       # 把前面的特殊符號刪去(兼容Window_Command類的矩形選框)
  141.       if c == "\P"
  142.         c = ""
  143.       else
  144.         # 調用原方法
  145.         old_draw_text((bx + ox), y, width, height, c, 0)
  146.         # 橫坐標偏移量
  147.         ox += text_size(c).width
  148.       end
  149.     end
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ○ 變更為英文字體
  153.   #--------------------------------------------------------------------------
  154.   def change_to_eng_font
  155.     self.font.name = PS0::Draw_Text_DF::ENG_FONT
  156.   end
  157. end
复制代码





梦石
0
星屑
110
在线时间
210 小时
注册时间
2012-6-25
回帖
44
发表于 2013-7-20 02:55:11 | 显示全部楼层
敵人類型,你到按顶上按钮工具,再按敌人,在到右下角备注里面写上[ltype 2],那个数字2是代表怪物的种类是第2种、、、、调节怪物的辨识度只是在测试游戏时候才可以调的、、、、第3个问题就不懂了,是怪物,为什么又不设置在图鉴里呢?

评分

参与人数 1星屑 +100 收起 理由
Sion + 100 感谢帮忙

查看全部评分

回复

使用道具 举报

梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
回帖
49
 楼主| 发表于 2013-7-20 10:01:47 | 显示全部楼层
Ayahiyano 发表于 2013-7-20 02:55
敵人類型,你到按顶上按钮工具,再按敌人,在到右下角备注里面写上[ltype 2],那个数字2是代表怪物的种类是 ...

第三個問題的原因是,我在設定怪物時,在某些欄位放了分類的標記,所以並不是真正的怪物,可是卻出現在圖鑑中,所以想刪掉


2.JPG
紅框處為分類

点评

中英双字体 http://bbs.66rpg.com/thread-220477-1-1.html  发表于 2013-7-20 17:39
那个ACE菜单你在141行到163行改就行了,只是该选项的名称,不要哪项删除就行了。  发表于 2013-7-20 17:38
你弄这个分类的标记只是为了方便,那你做好了游戏删掉它们就行了。  发表于 2013-7-20 17:34
回复

使用道具 举报

梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2013-7-20 11:57:36 | 显示全部楼层
你从哪里下的这玩意···把链接发来···
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
回帖
49
 楼主| 发表于 2013-7-20 12:31:36 | 显示全部楼层
chd114 发表于 2013-7-20 11:57
你从哪里下的这玩意···把链接发来···

http://www.66rpg.com/articles/5129

回复

使用道具 举报

梦石
0
星屑
50
在线时间
144 小时
注册时间
2011-7-18
回帖
151
发表于 2013-7-22 09:32:25 | 显示全部楼层
物品颜色 怎么用?

点评

在备注的第一行填上 <品质 1> 就是第一种颜色了。self.contents.fill_rect(x, y, 24, 1, color)至self.contents.fill_rect(x+23, y, 1, 24, color)共四行删除不显示边框。  发表于 2013-7-22 13:32
回复

使用道具 举报

梦石
0
星屑
473
在线时间
487 小时
注册时间
2011-10-12
回帖
394
发表于 2013-7-22 13:38:24 | 显示全部楼层
我就发个 怪物图鉴 使用方法的传送门。http://rpg.blue/forum.php?mod=viewthread&tid=223640

评分

参与人数 1星屑 +100 收起 理由
Sion + 100 感谢帮忙

查看全部评分

莺莺飞蛾夜灯寻,小路迷途飞满庭;
追爱明光夜夜怜,不觉天明为谁晴。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部