设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3177|回复: 7
打印 上一主题 下一主题

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
帖子
83
跳转到指定楼层
1
发表于 2013-7-19 19:58:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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

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

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

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

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

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

核心腳本如下
RUBY 代码复制
  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菜單
雖然她說很簡單,不過我還是不會用
請解釋一下用法

腳本如下
RUBY 代码复制
  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.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-AceMenuEngine"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.01.03 - Compatibility Update: Ace Item Menu
  17. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  18. #            - Compatibility Update: Kread-EX's Grathnode Install
  19. #            - Compatibility Update: Yami's Slot Battle
  20. # 2011.12.23 - Script efficiency optimized.
  21. # 2011.12.19 - Compatibility Update: Class System
  22. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  23. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  24. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  25. # 2011.12.06 - Started Script and Finished.
  26. #
  27. #==============================================================================
  28. # ▼ Introduction
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  31. # customization that RPG Maker 2003 allowed. With this script, you can add,
  32. # remove, and rearrange menu commands as you see fit. In addition to that, you
  33. # can add in menu commands that lead to common events or even custom commands
  34. # provided through other scripts.
  35. #
  36. # This script also provides window appearance management such as setting almost
  37. # all command windows to be center aligned or changing the position of the
  38. # help window. You can also opt to show the TP Gauge in the main menu as well
  39. # as in the skill menu.
  40. #
  41. #==============================================================================
  42. # ▼ Instructions
  43. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  44. # To install this script, open up your script editor and copy/paste this script
  45. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  46. #
  47. # Edit the settings in the module below as you see fit.
  48. #
  49. #==============================================================================
  50. # ▼ Compatibility
  51. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  52. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  53. # it will run with RPG Maker VX without adjusting.
  54. #
  55. #==============================================================================
  56.  
  57. module YEA
  58.   module MENU
  59.  
  60.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  61.     # - General Menu Settings -
  62.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  63.     # This changes the way menus appear in your game. You can change their
  64.     # alignment, and the location of the help window, Note that any non-Yanfly
  65.     # Engine Ace scripts may not conform to these menu styles.
  66.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  68.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  69.  
  70.     # These settings below adjust the visual appearance of the main menu.
  71.     # Change the settings as you see fit.
  72.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  73.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  74.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  75.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  76.  
  77.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78.     # - Main Menu Settings -
  79.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  80.     # These settings adjust the main menu, the order at which commands appear,
  81.     # what text is displayed, and what the commands are linked to. Here's a
  82.     # list of which commands do what:
  83.     #
  84.     # -------------------------------------------------------------------------
  85.     # :command         Description
  86.     # -------------------------------------------------------------------------
  87.     # :item            Opens up the item menu. Default menu item.
  88.     # :skill           Opens up the skill menu. Default menu item.
  89.     # :equip           Opens up the equip menu. Default menu item.
  90.     # :status          Opens up the status menu. Default menu item.
  91.     # :formation       Lets player manage party. Default menu item.
  92.     # :save            Opens up the save menu. Default menu item.
  93.     # :game_end        Opens up the shutdown menu. Default menu item.
  94.     #
  95.     # :class           Requires YEA - Class System
  96.     #
  97.     # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
  98.     # :grathnode       Requires Kread-EX's Grathnote Install
  99.     # :sslots          Requires Yami's YSA - Slot Battle
  100.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  101.     COMMANDS =[
  102.       :item,         # Opens up the item menu. Default menu item.
  103.       :skill,        # Opens up the skill menu. Default menu item.
  104.       :equip,        # Opens up the equip menu. Default menu item.
  105.       :class,        # Requires YEA - Class System.
  106.       :guardian,
  107.       :formation,
  108.       :status,       # Opens up the status menu. Default menu item.
  109.     #:formation,    # Lets player manage party. Default menu item.
  110.       :event_3,      # Launches Common Event 3. Common Event Command.
  111.       :event_4,      # Launches Common Event 4. Common Event Command.
  112.       :event_11,      # Launches Common Event 13. Common Event Command.
  113.       :event_12,      # Launches Common Event 13. Common Event Command.
  114.       :event_13,      # Launches Common Event 13. Common Event Command.
  115.       :event_14,      # Launches Common Event 14. Common Event Command.
  116.       :event_15,      # Launches Common Event 15. Common Event Command.
  117.       :event_16,      # Launches Common Event 16. Common Event Command.
  118.       :event_21,      # Launches Common Event 16. Common Event Command.
  119.       :event_22,      # Launches Common Event 16. Common Event Command.
  120.       :event_53,      # Launches Common Event 16. Common Event Command.
  121.       :event_54,
  122.       :event_55,
  123.     # :debug,        # Opens up debug menu. Custom Command.
  124.       :shop,         # Opens up a shop to pawn items. Custom Command.
  125.       :save,         # Opens up the save menu. Default menu item.
  126.       :game_end,     # Opens up the shutdown menu. Default menu item.
  127.     ] # Do not remove this.
  128.  
  129.     #--------------------------------------------------------------------------
  130.     # - Common Event Commands -
  131.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  132.     # If you insert one of the following commands into the COMMANDS array, the
  133.     # player can trigger a common event to launch. You can disable certain
  134.     # commands in the menu by binding them to a switch. If you don't want to
  135.     # disable them, set the switch to 0 and it will always be enabled. The
  136.     # ShowSwitch will prevent a command from appear if that switch is false.
  137.     # Set it to 0 for it to have no impact.
  138.     #--------------------------------------------------------------------------
  139.  
  140.     #--------------------------------------------------------------------------
  141.     # - Custom Commands -
  142.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  143.     # For those who use scripts that may lead to other menu scenes, use this
  144.     # hash to manage custom commands that run specific script calls. You can
  145.     # disable certain commands in the menu by binding them to a switch. If you
  146.     # don't want to disable them, set the switch to 0. The ShowSwitch will
  147.     # prevent a command from appear if that switch is false. Set it to 0 for
  148.     # it to have no impact.
  149.     #--------------------------------------------------------------------------
  150.     CUSTOM_COMMANDS ={
  151.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  152.       :debug   => [       "Debug",            0,          0, :command_debug],
  153.       :formation => ["整隊",            0,        0,  :command_formation],
  154.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  155.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  156.       :guardian => [ "御眾雇",            0,        0, :command_guardian],
  157.     } # Do not remove this.
  158.  
  159.   end # MENU
  160. end # YEA
  161.  
  162. #==============================================================================
  163. # ▼ Editting anything past this point may potentially result in causing
  164. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  165. # halitosis so edit at your own risk.
  166. #==============================================================================
  167.  
  168. #==============================================================================
  169. # ■ Window_MenuCommand
  170. #------------------------------------------------------------------------------
  171. # This class is kept towards the top of the script to provide easier access.
  172. #==============================================================================
  173.  
  174. class Window_MenuCommand < Window_Command
  175.  
  176.   #--------------------------------------------------------------------------
  177.   # overwrite method: make_command_list
  178.   #--------------------------------------------------------------------------
  179.   def make_command_list
  180.     for command in YEA::MENU::COMMANDS
  181.       case command
  182.       #--- Default Commands ---
  183.       when :item
  184.         add_command(Vocab::item,   :item,   main_commands_enabled)
  185.       when :skill
  186.         add_command(Vocab::skill,  :skill,  main_commands_enabled)
  187.       when :equip
  188.         add_command(Vocab::equip,  :equip,  main_commands_enabled)
  189.       when :status
  190.         add_command(Vocab::status, :status, main_commands_enabled)
  191.       when :formation
  192.         add_formation_command
  193.       when :save
  194.         add_original_commands
  195.         add_save_command
  196.       when :game_end
  197.         add_game_end_command
  198.       #--- Yanfly Engine Ace Commands ---
  199.       when :class
  200.         next unless $imported["YEA-ClassSystem"]
  201.         add_class_command
  202.       #--- Imported Commands ---
  203.       when :sslots
  204.         next unless $imported["YSA-SlotBattle"]
  205.         add_sslots_command
  206.       when :grathnode
  207.         next unless $imported["KRX-GrathnodeInstall"]
  208.         process_custom_command(command)
  209.       when :gogototori
  210.         next unless $imported["KRX-AlchemicSynthesis"]
  211.         process_custom_command(command)
  212.       #--- Imported Commands ---
  213.       else
  214.         process_common_event_command(command)
  215.         process_custom_command(command)
  216.       end
  217.     end
  218.   end
  219.  
  220.   #--------------------------------------------------------------------------
  221.   # new method: process_common_event_command
  222.   #--------------------------------------------------------------------------
  223.   def process_common_event_command(command)
  224.   end
  225.  
  226.   #--------------------------------------------------------------------------
  227.   # new method: process_custom_command
  228.   #--------------------------------------------------------------------------
  229.   def process_custom_command(command)
  230.     return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  231.     show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  232.     continue = show <= 0 ? true : $game_switches[show]
  233.     return unless continue
  234.     text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  235.     switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  236.     enabled = switch <= 0 ? true : $game_switches[switch]
  237.     add_command(text, command, enabled)
  238.   end
  239.  
  240. end # Window_MenuCommand
  241.  
  242. #==============================================================================
  243. # ■ Menu
  244. #==============================================================================
  245.  
  246. module Menu
  247.  
  248.   #--------------------------------------------------------------------------
  249.   # self.help_window_location
  250.   #--------------------------------------------------------------------------
  251.   def self.help_window_location
  252.     return YEA::MENU::HELP_WINDOW_LOCATION
  253.   end
  254.  
  255.   #--------------------------------------------------------------------------
  256.   # self.command_window_align
  257.   #--------------------------------------------------------------------------
  258.   def self.command_window_align
  259.     return YEA::MENU::COMMAND_WINDOW_ALIGN
  260.   end
  261.  
  262.   #--------------------------------------------------------------------------
  263.   # self.main_menu_align
  264.   #--------------------------------------------------------------------------
  265.   def self.main_menu_align
  266.     return YEA::MENU::MAIN_MENU_ALIGN
  267.   end
  268.  
  269.   #--------------------------------------------------------------------------
  270.   # self.main_menu_right
  271.   #--------------------------------------------------------------------------
  272.   def self.main_menu_right
  273.     return YEA::MENU::MAIN_MENU_RIGHT
  274.   end
  275.  
  276. end # Menu
  277.  
  278. #==============================================================================
  279. # ■ Game_Actor
  280. #==============================================================================
  281.  
  282. class Game_Actor < Game_Battler
  283.  
  284.   #--------------------------------------------------------------------------
  285.   # new method: draw_mp?
  286.   #--------------------------------------------------------------------------
  287.   def draw_mp?
  288.     return true unless draw_tp?
  289.     for skill in skills
  290.       next unless added_skill_types.include?(skill.stype_id)
  291.       return true if skill.mp_cost > 0
  292.     end
  293.     return false
  294.   end
  295.  
  296.   #--------------------------------------------------------------------------
  297.   # new method: draw_tp?
  298.   #--------------------------------------------------------------------------
  299.   def draw_tp?
  300.     return false unless $data_system.opt_display_tp
  301.     for skill in skills
  302.       next unless added_skill_types.include?(skill.stype_id)
  303.       return true if skill.tp_cost > 0
  304.     end
  305.     return false
  306.   end
  307.  
  308. end # Game_Actor
  309.  
  310. #==============================================================================
  311. # ■ Window_Base
  312. #==============================================================================
  313.  
  314. class Window_Base < Window
  315.  
  316.   #--------------------------------------------------------------------------
  317.   # overwrite method: draw_actor_simple_status
  318.   #--------------------------------------------------------------------------
  319.   def draw_actor_simple_status(actor, dx, dy)
  320.     dy -= line_height / 2
  321.     draw_actor_name(actor, dx, dy)
  322.     draw_actor_level(actor, dx, dy + line_height * 1)
  323.     draw_actor_icons(actor, dx, dy + line_height * 2)
  324.     dw = contents.width - dx - 124
  325.     draw_actor_class(actor, dx + 120, dy, dw)
  326.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  327.     if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  328.       draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
  329.     elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  330.       if $imported["YEA-BattleEngine"]
  331.         draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  332.         draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  333.       else
  334.         draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  335.         draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  336.       end
  337.     else
  338.       draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  339.     end
  340.   end
  341.  
  342. end # Window_Base
  343.  
  344. #==============================================================================
  345. # ■ Window_Command
  346. #==============================================================================
  347.  
  348. class Window_Command < Window_Selectable
  349.  
  350.   #--------------------------------------------------------------------------
  351.   # overwrite method: alignment
  352.   #--------------------------------------------------------------------------
  353.   def alignment
  354.     return Menu.command_window_align
  355.   end
  356.  
  357. end # Window_Command
  358.  
  359. #==============================================================================
  360. # ■ Window_MenuCommand
  361. #==============================================================================
  362.  
  363. class Window_MenuCommand < Window_Command
  364.  
  365.   #--------------------------------------------------------------------------
  366.   # alias method: init_command_position
  367.   #--------------------------------------------------------------------------
  368.   class <<self; alias init_command_position_ame init_command_position; end
  369.   def self.init_command_position
  370.     init_command_position_ame
  371.     @@last_command_oy = nil
  372.   end
  373.  
  374.   #--------------------------------------------------------------------------
  375.   # overwrite method: visible_line_number
  376.   #--------------------------------------------------------------------------
  377.   def visible_line_number
  378.     return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  379.   end
  380.  
  381.   #--------------------------------------------------------------------------
  382.   # overwrite method: alignment
  383.   #--------------------------------------------------------------------------
  384.   def alignment
  385.     return Menu.main_menu_align
  386.   end
  387.  
  388.   #--------------------------------------------------------------------------
  389.   # alias method: process_ok
  390.   #--------------------------------------------------------------------------
  391.   alias window_menucommand_process_ok_ame process_ok
  392.   def process_ok
  393.     @@last_command_oy = self.oy
  394.     window_menucommand_process_ok_ame
  395.   end
  396.  
  397.   #--------------------------------------------------------------------------
  398.   # alias method: select_last
  399.   #--------------------------------------------------------------------------
  400.   alias window_menucommand_select_last_ame select_last
  401.   def select_last
  402.     window_menucommand_select_last_ame
  403.     self.oy = @@last_command_oy unless @@last_command_oy.nil?
  404.     @@last_command_oy = nil
  405.   end
  406.  
  407. end # Window_MenuCommand
  408.  
  409. #==============================================================================
  410. # ■ Scene_Menu
  411. #==============================================================================
  412.  
  413. class Scene_Menu < Scene_MenuBase
  414.  
  415.   #--------------------------------------------------------------------------
  416.   # alias method: start
  417.   #--------------------------------------------------------------------------
  418.   alias scene_menu_start_ame start
  419.   def start
  420.     scene_menu_start_ame
  421.     relocate_windows
  422.   end
  423.  
  424.   #--------------------------------------------------------------------------
  425.   # new method: relocate_windows
  426.   #--------------------------------------------------------------------------
  427.   def relocate_windows
  428.     return unless Menu.main_menu_right
  429.     @command_window.x = Graphics.width - @command_window.width
  430.     @gold_window.x = Graphics.width - @gold_window.width
  431.     @status_window.x = 0
  432.   end
  433.  
  434.   def return_scene
  435.     $game_map.autoplay
  436.     SceneManager.return
  437.   end
  438.  
  439. end # Scene_Menu
  440.  
  441. #==============================================================================
  442. # ■ Scene_Item
  443. #==============================================================================
  444.  
  445. class Scene_Item < Scene_ItemBase
  446.  
  447.   #--------------------------------------------------------------------------
  448.   # alias method: start
  449.   #--------------------------------------------------------------------------
  450.   alias scene_item_start_ame start
  451.   def start
  452.     scene_item_start_ame
  453.     return if $imported["YEA-ItemMenu"]
  454.     relocate_windows
  455.   end
  456.  
  457.   #--------------------------------------------------------------------------
  458.   # new method: relocate_windows
  459.   #--------------------------------------------------------------------------
  460.   def relocate_windows
  461.     case Menu.help_window_location
  462.     when 0 # Top
  463.       @help_window.y = 0
  464.       @category_window.y = @help_window.height
  465.       @item_window.y = @category_window.y + @category_window.height
  466.     when 1 # Middle
  467.       @category_window.y = 0
  468.       @help_window.y = @category_window.height
  469.       @item_window.y = @help_window.y + @help_window.height
  470.     else # Bottom
  471.       @category_window.y = 0
  472.       @item_window.y = @category_window.height
  473.       @help_window.y = @item_window.y + @item_window.height
  474.     end
  475.     if $imported["YEA-ItemMenu"]
  476.       @types_window.y = @category_window.y
  477.       @status_window.y = @category_window.y
  478.     end
  479.   end
  480.  
  481. end # Scene_Item
  482.  
  483. #==============================================================================
  484. # ■ Scene_Skill
  485. #==============================================================================
  486.  
  487. class Scene_Skill < Scene_ItemBase
  488.  
  489.   #--------------------------------------------------------------------------
  490.   # alias method: start
  491.   #--------------------------------------------------------------------------
  492.   alias scene_skill_start_ame start
  493.   def start
  494.     scene_skill_start_ame
  495.     relocate_windows
  496.   end
  497.  
  498.   #--------------------------------------------------------------------------
  499.   # new method: relocate_windows
  500.   #--------------------------------------------------------------------------
  501.   def relocate_windows
  502.     case Menu.help_window_location
  503.     when 0 # Top
  504.       @help_window.y = 0
  505.       @command_window.y = @help_window.height
  506.       @status_window.y = @help_window.height
  507.       @item_window.y = @status_window.y + @status_window.height
  508.     when 1 # Middle
  509.       @command_window.y = 0
  510.       @status_window.y = 0
  511.       @help_window.y = @status_window.y + @status_window.height
  512.       @item_window.y = @help_window.y + @help_window.height
  513.     else # Bottom
  514.       @command_window.y = 0
  515.       @status_window.y = 0
  516.       @item_window.y = @status_window.y + @status_window.height
  517.       @help_window.y = @item_window.y + @item_window.height
  518.     end
  519.   end
  520.  
  521. end # Scene_Skill
  522.  
  523. #==============================================================================
  524. # ■ Scene_Equip
  525. #==============================================================================
  526.  
  527. class Scene_Equip < Scene_MenuBase
  528.  
  529.   #--------------------------------------------------------------------------
  530.   # alias method: start
  531.   #--------------------------------------------------------------------------
  532.   alias scene_equip_start_ame start
  533.   def start
  534.     scene_equip_start_ame
  535.     relocate_windows
  536.     relocate_aee_windows
  537.   end
  538.  
  539.   #--------------------------------------------------------------------------
  540.   # new method: relocate_windows
  541.   #--------------------------------------------------------------------------
  542.   def relocate_windows
  543.     return if $imported["YEA-AceEquipEngine"]
  544.     case Menu.help_window_location
  545.     when 0 # Top
  546.       @help_window.y = 0
  547.       @status_window.y = @help_window.height
  548.       @command_window.y = @help_window.height
  549.       @slot_window.y = @command_window.y + @command_window.height
  550.       @item_window.y = @slot_window.y + @slot_window.height
  551.     when 1 # Middle
  552.       @status_window.y = 0
  553.       @command_window.y = 0
  554.       @slot_window.y = @command_window.y + @command_window.height
  555.       @help_window.y = @slot_window.y + @slot_window.height
  556.       @item_window.y = @help_window.y + @help_window.height
  557.     else # Bottom
  558.       @status_window.y = 0
  559.       @command_window.y = 0
  560.       @slot_window.y = @command_window.y + @command_window.height
  561.       @item_window.y = @slot_window.y + @slot_window.height
  562.       @help_window.y = @item_window.y + @item_window.height
  563.     end
  564.   end
  565.  
  566.   #--------------------------------------------------------------------------
  567.   # new method: relocate_aee_windows
  568.   #--------------------------------------------------------------------------
  569.   def relocate_aee_windows
  570.     return unless $imported["YEA-AceEquipEngine"]
  571.     case Menu.help_window_location
  572.     when 0 # Top
  573.       @help_window.y = 0
  574.       @command_window.y = @help_window.height
  575.       @slot_window.y = @command_window.y + @command_window.height
  576.     when 1 # Middle
  577.       @command_window.y = 0
  578.       @help_window.y = @command_window.height
  579.       @slot_window.y = @help_window.y + @help_window.height
  580.     else # Bottom
  581.       @command_window.y = 0
  582.       @slot_window.y = @command_window.height
  583.       @help_window.y = @slot_window.y + @slot_window.height
  584.     end
  585.     @actor_window.y = @command_window.y
  586.     @item_window.y = @slot_window.y
  587.     @status_window.y = @slot_window.y
  588.   end
  589.  
  590. end # Scene_Equip
  591.  
  592. #==============================================================================
  593. # ■ Scene_Menu
  594. #==============================================================================
  595.  
  596. class Scene_Menu < Scene_MenuBase
  597.  
  598.   #--------------------------------------------------------------------------
  599.   # new method: process_common_event_commands
  600.   #--------------------------------------------------------------------------
  601.   def process_common_event_commands
  602.     for command in YEA::MENU::COMMANDS
  603.       next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  604.       @command_window.set_handler(command, method(:command_common_event))
  605.     end
  606.   end
  607.  
  608.   #--------------------------------------------------------------------------
  609.   # new method: command_common_event
  610.   #--------------------------------------------------------------------------
  611.   def command_common_event
  612.     event_id = @command_window.current_ext
  613.     return return_scene if event_id.nil?
  614.     return return_scene if $data_common_events[event_id].nil?
  615.     $game_temp.reserve_common_event(event_id)
  616.     return_scene
  617.   end
  618.  
  619.   #--------------------------------------------------------------------------
  620.   # new method: command_debug
  621.   #--------------------------------------------------------------------------
  622.   def command_debug
  623.     SceneManager.call(Scene_Debug)
  624.   end
  625.  
  626.   #--------------------------------------------------------------------------
  627.   # new method: command_shop
  628.   #--------------------------------------------------------------------------
  629.   def command_shop
  630.     goods = []
  631.     SceneManager.call(Scene_Shop)
  632.     SceneManager.scene.prepare(goods, false)
  633.   end
  634.  
  635.   #--------------------------------------------------------------------------
  636.   # new method: command_totori
  637.   #--------------------------------------------------------------------------
  638.   def command_totori
  639.     return unless $imported['KRX-AlchemicSynthesis']
  640.     SceneManager.call(Scene_Alchemy)
  641.   end
  642.  
  643. end # Scene_Menu
  644.  
  645. #==============================================================================
  646. #
  647. # ▼ End of File
  648. #
  649. #==============================================================================



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

請解釋一下用法

腳本如下
RUBY 代码复制
  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.  
  36.     # 是否對str做前檢測(若設定為false則一直使用逐字描繪/兩次描繪)
  37.     DO_PRE_CHECK = true
  38.  
  39.     # 默認字體(在這裡指定了就不要再在MAIN裡指定了)
  40.     Font.default_name = "C"
  41.  
  42.     # 英文字體
  43.     ENG_FONT = "E"
  44.  
  45.     # 作用範圍
  46.     # 0:全部字體
  47.     # 1:僅默認字體(即特殊指定的除外)
  48.     DO_CHANGE = 1
  49.  
  50.     # 中英文混排時的描繪方式
  51.     # 0:逐字描繪
  52.     # 1:分段描繪
  53.     DRAW_TYPE = 0
  54.  
  55.     # 自定義匹配
  56.     # 若不需要符號請將REG2、REG3清空但保留外側半角雙引號
  57.     REG1 = "0-9A-Za-z "                 # 數字、大小寫字母、半角空格
  58.     REG2 = ";:?!@#%^&*(){}[]=-+_/|,.<>" # 一般符號
  59.     REG3 = "\"\'\$\\"                   # 特殊符號(要在前面加"\")
  60.  
  61.     # 生成真正的正則式(若不清楚切勿隨意修改下一行)
  62.     REG = /[#{REG1 + (REG2+REG3).gsub!(/./) { "\\" + $& }}]/
  63.  
  64.   end
  65. end
  66. #==============================================================================
  67.  
  68. class Bitmap
  69.   #--------------------------------------------------------------------------
  70.   # ● Draw text
  71.   #--------------------------------------------------------------------------
  72.   alias old_draw_text draw_text
  73.   def draw_text(*args)
  74.   #--------------------------------------------------------------------------
  75.   # 當特殊字體且設定為不對特殊字體進行替換時,直接調用原有方式
  76.   if self.font.name != Font.default_name && PS0::Draw_Text_DF::DO_CHANGE == 1
  77.     old_draw_text(*args)
  78.   else
  79.   #--------------------------------------------------------------------------
  80.     # 記錄默認字體
  81.     last_font_name = self.font.name
  82.     # 獲取參數
  83.     if args[0].is_a?(Rect)
  84.       rect, str, align = args[0..2]
  85.       x, y, width, height = rect.x, rect.y, rect.width, rect.height
  86.     else
  87.       x, y, width, height, str, align = args[0..5]
  88.     end
  89.     str = str.to_s
  90.     align = 0 if align.nil?
  91.     # 執行前檢測
  92.     if PS0::Draw_Text_DF::DO_PRE_CHECK == true
  93.       if str.scan(PS0::Draw_Text_DF::REG).size == 0 # 純中文
  94.         old_draw_text(*args)
  95.       elsif str.scan(PS0::Draw_Text_DF::REG).size == str.size # 純英文
  96.         change_to_eng_font
  97.         old_draw_text(*args)
  98.       else
  99.         case PS0::Draw_Text_DF::DRAW_TYPE
  100.         when 0 ; draw_text_1by1(x, y, width, height, str, align)
  101.         when 1 ; draw_text_npass(x, y, width, height, str, align)
  102.         end
  103.       end
  104.     else
  105.       case PS0::Draw_Text_DF::DRAW_TYPE
  106.       when 0 ; draw_text_1by1(x, y, width, height, str, align)
  107.       when 1 ; draw_text_npass(x, y, width, height, str, align)
  108.       end
  109.     end
  110.     # 還原默認字體
  111.     self.font.name = last_font_name
  112.   end # <- 檢測特殊字體
  113.   end
  114.   #--------------------------------------------------------------------------
  115.   # ○ 逐字描繪
  116.   #--------------------------------------------------------------------------
  117.   def draw_text_1by1(x, y, width, height, str, align)
  118.     # 記錄默認字體
  119.     last_font_name = self.font.name
  120.     # 臨時變量(x坐標偏移量)
  121.     ox = 0
  122.     # 根據不同對齊方式計算基礎x坐標
  123.     if align == 0 # 居左
  124.       bx = x
  125.     else
  126.       # 分離兩種字體對應的str以實現非等寬字體的長度識別
  127.       str1 = str.clone.gsub!(PS0::Draw_Text_DF::REG)            { "" }
  128.       str2 = str.clone.gsub!(/(?!#{PS0::Draw_Text_DF::REG})./)  { "" }
  129.       str_width = text_size(str1).width
  130.       change_to_eng_font
  131.       str_width += text_size(str2).width
  132.       case align
  133.       when 0 # 居左
  134.         bx = x
  135.       when 1 # 居中
  136.         bx = x + (width - str_width) / 2
  137.       when 2 # 居右
  138.         bx = x + (width - str_width)
  139.       end
  140.     end
  141.     # 給字符串結尾添加特殊符號
  142.     str += "\P"
  143.     # 提取單個文字
  144.     while (!(c = str.slice!(/./m)).nil?)
  145.       # 還原默認字體
  146.       self.font.name = last_font_name
  147.       # 當滿足正則匹配則替換字體
  148.       change_to_eng_font if c.slice(PS0::Draw_Text_DF::REG)
  149.       # 把前面的特殊符號刪去(兼容Window_Command類的矩形選框)
  150.       if c == "\P"
  151.         c = ""
  152.       else
  153.         # 調用原方法
  154.         old_draw_text((bx + ox), y, width, height, c, 0)
  155.         # 橫坐標偏移量
  156.         ox += text_size(c).width
  157.       end
  158.     end
  159.   end
  160.   #--------------------------------------------------------------------------
  161.   # ○ 變更為英文字體
  162.   #--------------------------------------------------------------------------
  163.   def change_to_eng_font
  164.     self.font.name = PS0::Draw_Text_DF::ENG_FONT
  165.   end
  166. end





Lv1.梦旅人

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

评分

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

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

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

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



紅框處為分類

点评

中英双字体 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
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

4
发表于 2013-7-20 11:57:36 | 只看该作者
你从哪里下的这玩意···把链接发来···
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
帖子
83
5
 楼主| 发表于 2013-7-20 12:31:36 | 只看该作者
chd114 发表于 2013-7-20 11:57
你从哪里下的这玩意···把链接发来···

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

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2011-7-18
帖子
169
6
发表于 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
回复 支持 反对

使用道具 举报

Lv2.观梦者

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

评分

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

查看全部评分

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

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-17 13:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表