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

Project1

 找回密码
 注册会员
搜索

请教 怎么 学习 查看 使用 脚本 指令

查看数: 122 | 评论数: 9 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2025-3-5 11:33

正文摘要:

请教 怎么 学习 查看 使用 脚本 指令 一般指令都在开头,也有说明, 有些脚本指令说明很详细。有的说明又看不懂,有的脚本没指令。 要怎么来找脚本的指令???? 我发两个脚本出来。       ...

回复

djs789783 发表于 5 天前
chen12311 发表于 2025-3-6 08:49
http://izumiwhite.web.fc2.com/
自己翻墙去看

打不开。。三个字都不能回复,还得要十个字才能回复
chen12311 发表于 5 天前
本帖最后由 chen12311 于 2025-3-6 10:48 编辑
djs789783 发表于 2025-3-6 03:15
有指令的网站???能给个么~~谢谢。


http://izumiwhite.web.fc2.com/
自己翻墙去看
djs789783 发表于 5 天前
soulsaga 发表于 2025-3-5 17:34
那搜include WD_monsterdictionary

都说了作者网站有写..你去看作者网站就知道什么指令了 ...

有指令的网站???能给个么~~谢谢。
soulsaga 发表于 6 天前
那搜include WD_monsterdictionary

都说了作者网站有写..你去看作者网站就知道什么指令了
djs789783 发表于 6 天前
chen12311 发表于 2025-3-5 14:57
感觉你没发完,还有就是第二个可以直接从module WD_monsterdictionary中调用函数 ...

发完了呀,想知道 要怎么找脚本指令。这个只是例子。一般在开头,我刚好看到这两个脚本没有指令说明使用。就问下,遇到了要怎么找指令调用。
chen12311 发表于 6 天前
本帖最后由 chen12311 于 2025-3-5 17:49 编辑

就是找 Game_Interpreter ,里面找函数,然后调用,有说明就看说明,就拿你第二个脚本举例
RUBY 代码复制
  1. #==============================================================================
  2. # ■ RGSS3   ver 1.00 本体プログラム
  3. #------------------------------------------------------------------------------
  4. #  配布元:
  5. #     白の魔 http://izumiwhite.web.fc2.com/
  6. #
  7. #  利用規約:
  8. #     RPGツクールVXの正規の登録者のみご利用になれます。
  9. #     利用報告・著作権表示とかは必要ありません。
  10. #     改造もご自由にどうぞ。
  11. #     何か問題が発生しても責任は持ちません。
  12. #==============================================================================
  13.  
  14. #==============================================================================
  15. # ■ WD_monsterdictionary
  16. #------------------------------------------------------------------------------
  17. #   共通メソッドです。
  18. #==============================================================================
  19.  
  20. module WD_monsterdictionary
  21.  
  22.  
  23.  
  24.   def m_dictionary_encount_switch_on(id)
  25.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
  26.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
  27.     $game_system.m_dic_encount_sw[id] = true
  28.   end
  29.   def m_dictionary_encount_switch_off(id)
  30.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
  31.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
  32.     $game_system.m_dic_encount_sw[id] = false
  33.   end
  34.   def m_dictionary_encount_switch_on?(id)
  35.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
  36.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
  37.     return $game_system.m_dic_encount_sw[id]
  38.   end
  39.   def m_dictionary_victory_switch_on(id)
  40.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
  41.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
  42.     $game_system.m_dic_victory_sw[id] = true
  43.   end
  44.   def m_dictionary_victory_switch_off(id)
  45.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
  46.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
  47.     $game_system.m_dic_victory_sw[id] = false
  48.   end
  49.   def m_dictionary_victory_switch_on?(id)
  50.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
  51.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
  52.     return $game_system.m_dic_victory_sw[id]
  53.   end
  54.   def m_dictionary_drop_switch_on(id, n)
  55.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
  56.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
  57.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
  58.     $game_system.m_dic_drop_sw[id][n] = true
  59.   end
  60.   def m_dictionary_drop_switch_off(id, n)
  61.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
  62.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
  63.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
  64.     $game_system.m_dic_drop_sw[id][n] = false
  65.   end
  66.   def m_dictionary_drop_switch_on?(id, n)
  67.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
  68.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
  69.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
  70.     return $game_system.m_dic_drop_sw[id][n]
  71.   end
  72.   def m_dictionary_genoside_number_add(id, n)
  73.     $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil
  74.     $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil
  75.     $game_system.m_dic_genoside_num[id] += n
  76.   end
  77.   def m_dictionary_genoside_number(id)
  78.     $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil
  79.     $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil
  80.     return $game_system.m_dic_genoside_num[id]
  81.   end
  82.  
  83.   def print_dictionary?(enemy)
  84.     if enemy != nil
  85.       if enemy.name.size > 0
  86.         hantei = /<图鉴无效>/ =~ enemy.note
  87.         if hantei == nil
  88.           return true
  89.         end
  90.       end
  91.     end
  92.     return false
  93.   end
  94.   def monster_dictionary_perfection
  95.     dic_max = 0
  96.     dic_num = 0
  97.     $data_enemies.each do |enemy|
  98.       if print_dictionary?(enemy)
  99.         dic_max += 1
  100.         if WD_monsterdictionary_layout::Perfection_timing == 1
  101.           if m_dictionary_encount_switch_on?(enemy.id) == true
  102.             dic_num += 1
  103.           end
  104.         elsif WD_monsterdictionary_layout::Perfection_timing == 2
  105.           if m_dictionary_victory_switch_on?(enemy.id) == true
  106.             dic_num += 1
  107.           end
  108.         end
  109.       end
  110.     end
  111.     return (100*dic_num)/dic_max
  112.   end
  113. end
  114.  
  115. class Game_Interpreter
  116.   include WD_monsterdictionary
  117. end
  118.  
  119. class Game_System
  120.   #--------------------------------------------------------------------------
  121.   # ● 公開インスタンス変数
  122.   #--------------------------------------------------------------------------
  123.   attr_accessor :m_dic_encount_sw
  124.   attr_accessor :m_dic_victory_sw
  125.   attr_accessor :m_dic_drop_sw
  126.   attr_accessor :m_dic_genoside_num
  127.   #--------------------------------------------------------------------------
  128.   # ● オブジェクト初期化
  129.   #--------------------------------------------------------------------------
  130.   alias wd_orig_initialize002 initialize
  131.   def initialize
  132.     wd_orig_initialize002
  133.     @m_dic_encount_sw = []
  134.     @m_dic_victory_sw = []
  135.     @m_dic_drop_sw = []
  136.     @m_dic_genoside_num = []
  137.   end
  138. end
  139.  
  140. class Game_Troop < Game_Unit
  141.   include WD_monsterdictionary
  142.   #--------------------------------------------------------------------------
  143.   # ● 図鑑への登録(遭遇済み判定)
  144.   #--------------------------------------------------------------------------
  145.   def dictionary1
  146.     for enemy in members
  147.       m_dictionary_encount_switch_on(enemy.enemy_id) unless enemy.hidden? #遭遇済み図鑑登録
  148.     end
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   # ● 図鑑への登録(撃破済み判定)
  152.   #--------------------------------------------------------------------------
  153.   def dictionary2
  154.     for enemy in dead_members
  155.       m_dictionary_victory_switch_on(enemy.enemy_id) unless enemy.hidden? #撃破済み図鑑登録
  156.       m_dictionary_genoside_number_add(enemy.enemy_id, 1) unless enemy.hidden? #撃破数カウント
  157.     end
  158.   end
  159. end
  160.  
  161. class << BattleManager
  162.   #--------------------------------------------------------------------------
  163.   # ● 戦闘開始
  164.   #--------------------------------------------------------------------------
  165.   alias wd_orig_battle_start002 battle_start
  166.   def battle_start
  167.     wd_orig_battle_start002
  168.     $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ● 勝利の処理
  172.   #--------------------------------------------------------------------------
  173.   alias wd_orig_process_victory002 process_victory
  174.   def process_victory
  175.     $game_troop.dictionary2 #図鑑への登録(撃破済み判定)
  176.     wd_orig_process_victory002
  177.   end
  178. end
  179.  
  180. class Game_Interpreter
  181.   #--------------------------------------------------------------------------
  182.   # ● 敵キャラの出現
  183.   #--------------------------------------------------------------------------
  184.   alias wd_orig_command_335_002 command_335
  185.   def command_335
  186.     wd_orig_command_335_002
  187.     $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)
  188.   end
  189. end
  190.  
  191. class Game_Enemy < Game_Battler
  192.   include WD_monsterdictionary
  193.   #--------------------------------------------------------------------------
  194.   # ● ドロップアイテムの配列作成(再定義)
  195.   #--------------------------------------------------------------------------
  196.   def make_drop_items
  197.     n = -1
  198.     enemy.drop_items.inject([]) do |r, di|
  199.       n += 1
  200.       if di.kind > 0 && rand * di.denominator < drop_item_rate
  201.         m_dictionary_drop_switch_on(@enemy_id, n)
  202.         r.push(item_object(di.kind, di.data_id))
  203.       else
  204.         r
  205.       end
  206.     end
  207.   end
  208. end
  209.  
  210. #==============================================================================
  211. # ■ Scene_MonsterDictionary
  212. #------------------------------------------------------------------------------
  213. #  魔物図鑑画面の処理を行うクラスです。
  214. #==============================================================================
  215.  
  216. class Scene_MonsterDictionary < Scene_ItemBase
  217.   #--------------------------------------------------------------------------
  218.   # ● 開始処理
  219.   #--------------------------------------------------------------------------
  220.   def start
  221.     super
  222.  
  223.     create_status_window
  224.     create_item_window
  225.     create_perfection_window
  226.   end
  227.   #--------------------------------------------------------------------------
  228.   # ● アイテムウィンドウの作成
  229.   #--------------------------------------------------------------------------
  230.   def create_item_window
  231.     wy = 0
  232.     wh = Graphics.height - 48
  233.     @item_window = Window_MonsterDictionaryList.new(Graphics.width-172-48, wy, 172+48, wh)
  234.     @item_window.viewport = @viewport
  235.     @item_window.status_window = @status_window
  236.     @item_window.set_handler(:cancel, method(:return_scene))
  237.     @item_window.update_help
  238.   end
  239.  
  240.   def return_scene
  241.     $game_map.autoplay
  242.     SceneManager.return
  243.   end
  244.  
  245.   #--------------------------------------------------------------------------
  246.   # ● アイテムステータスウィンドウの作成
  247.   #--------------------------------------------------------------------------
  248.   def create_status_window
  249.     wy = 0
  250.     wh = Graphics.height
  251.     @status_window = Window_MonsterDictionaryStatus.new(0, wy, Graphics.width-172-48, wh)
  252.     @status_window.viewport = @viewport
  253.   end
  254.   #--------------------------------------------------------------------------
  255.   # ● 図鑑完成度ウィンドウの作成
  256.   #--------------------------------------------------------------------------
  257.   def create_perfection_window
  258.     wy = @item_window.y + @item_window.height
  259.     wh = 48
  260.     @perfection_window = Window_MonsterDictionaryPerfection.new(Graphics.width-172-48, wy, 172+48, wh)
  261.     @perfection_window.viewport = @viewport
  262.   end
  263. end
  264.  
  265.  
  266. #==============================================================================
  267. # ■ Window_MonsterDictionaryList
  268. #------------------------------------------------------------------------------
  269. #  魔物図鑑画面で、魔物の一覧を表示するウィンドウです。
  270. #==============================================================================
  271.  
  272. class Window_MonsterDictionaryList < Window_Selectable
  273.   include WD_monsterdictionary
  274.   #--------------------------------------------------------------------------
  275.   # ● オブジェクト初期化
  276.   #--------------------------------------------------------------------------
  277.   def initialize(x, y, width, height)
  278.     super
  279.     @data = []
  280.     refresh
  281.     activate
  282.     select(0)
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # ● 桁数の取得
  286.   #--------------------------------------------------------------------------
  287.   def col_max
  288.     return 1
  289.   end
  290.   #--------------------------------------------------------------------------
  291.   # ● 項目数の取得
  292.   #--------------------------------------------------------------------------
  293.   def item_max
  294.     @data ? @data.size : 1
  295.   end
  296.   #--------------------------------------------------------------------------
  297.   # ● アイテムの取得
  298.   #--------------------------------------------------------------------------
  299.   def enemy
  300.     @data && index >= 0 ? @data[index] : nil
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● アイテムリストの作成
  304.   #--------------------------------------------------------------------------
  305.   def make_item_list
  306.     @data = []
  307.     $data_enemies.each do |enemy|
  308.       if print_dictionary?(enemy)
  309.         @data.push(enemy)
  310.       end
  311.     end
  312.   end
  313.   #--------------------------------------------------------------------------
  314.   # ● 項目の描画
  315.   #--------------------------------------------------------------------------
  316.   def draw_item(index)
  317.     enemy = @data[index]
  318.     if enemy
  319.       rect = item_rect(index)
  320.       rect.width -= 4
  321.       if m_dictionary_encount_switch_on?(enemy.id)
  322.         change_color(normal_color, true)
  323.         draw_text(rect.x, rect.y, 172, line_height, enemy.name)
  324.       else
  325.         change_color(normal_color, false)
  326.         draw_text(rect.x, rect.y, 172, line_height, "???????")
  327.       end
  328.     end
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● ヘルプウィンドウ更新メソッドの呼び出し
  332.   #--------------------------------------------------------------------------
  333.   def call_update_help
  334.     update_help if active
  335.   end
  336.   #--------------------------------------------------------------------------
  337.   # ● ヘルプテキスト更新
  338.   #--------------------------------------------------------------------------
  339.   def update_help
  340.     if @status_window
  341.       if m_dictionary_encount_switch_on?(enemy.id)
  342.         @status_window.set_item(enemy, @index, true)
  343.       else
  344.         @status_window.set_item(enemy, @index, false)
  345.       end
  346.     end
  347.   end
  348.   #--------------------------------------------------------------------------
  349.   # ● リフレッシュ
  350.   #--------------------------------------------------------------------------
  351.   def refresh
  352.     make_item_list
  353.     create_contents
  354.     draw_all_items
  355.   end
  356.   #--------------------------------------------------------------------------
  357.   # ● ステータスウィンドウの設定
  358.   #--------------------------------------------------------------------------
  359.   def status_window=(status_window)
  360.     @status_window = status_window
  361.   end
  362. end
  363.  
  364. #==============================================================================
  365. # ■ Window_MonsterDictionaryPerfection
  366. #------------------------------------------------------------------------------
  367. #  魔物図鑑画面で、図鑑の完成度を表示するウィンドウです。
  368. #==============================================================================
  369.  
  370. class Window_MonsterDictionaryPerfection < Window_Selectable
  371.   include WD_monsterdictionary
  372.   #--------------------------------------------------------------------------
  373.   # ● オブジェクト初期化
  374.   #--------------------------------------------------------------------------
  375.   def initialize(x, y, width, height)
  376.     super
  377.     refresh(width)
  378.   end
  379.   #--------------------------------------------------------------------------
  380.   # ● リフレッシュ
  381.   #--------------------------------------------------------------------------
  382.   def refresh(width)
  383.     contents.clear
  384.     draw_text(0, 0, width-24, line_height, "图鉴完成度: #{monster_dictionary_perfection} %", 1)
  385.   end
  386. end
  387.  
  388.  
  389. #==============================================================================
  390. # ■ Window_MonsterDictionaryStatus
  391. #------------------------------------------------------------------------------
  392. #  魔物図鑑画面で、エネミーの詳細を表示するウィンドウです。
  393. #==============================================================================
  394.  
  395. class Window_MonsterDictionaryStatus < Window_Selectable
  396.   include WD_monsterdictionary
  397.   #--------------------------------------------------------------------------
  398.   # ● オブジェクト初期化
  399.   #--------------------------------------------------------------------------
  400.   def initialize(x, y, width, height)
  401.     super
  402.     @enemy = nil
  403.     refresh
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # ● アイテムの設定
  407.   #--------------------------------------------------------------------------
  408.   def set_item(enemy, index=-1, print=false)
  409.     return if ((@enemy == enemy) and (@index == index))
  410.     @enemy = enemy
  411.     @index = index
  412.     @print = print
  413.     refresh
  414.   end
  415.   #--------------------------------------------------------------------------
  416.   # ● アイテムオブジェクトの取得
  417.   #--------------------------------------------------------------------------
  418.   def item_object(kind, data_id)
  419.     return $data_items  [data_id] if kind == 1
  420.     return $data_weapons[data_id] if kind == 2
  421.     return $data_armors [data_id] if kind == 3
  422.     return nil
  423.   end
  424.   #--------------------------------------------------------------------------
  425.   # ● リフレッシュ
  426.   #--------------------------------------------------------------------------
  427.   def refresh
  428.     contents.clear
  429.     contents.font.size = 24
  430.  
  431.     if @print
  432.  
  433.       if WD_monsterdictionary_layout::M_id_display
  434.         text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)
  435.         x      = WD_monsterdictionary_layout::M_id_display_x
  436.         y      = WD_monsterdictionary_layout::M_id_display_y
  437.         width  = WD_monsterdictionary_layout::M_id_display_width
  438.         height = line_height
  439.         draw_text(x, y, width, height, text1, 0)
  440.       end
  441.       if WD_monsterdictionary_layout::M_name_display
  442.         text1  = @enemy.name
  443.         x      = WD_monsterdictionary_layout::M_name_display_x
  444.         y      = WD_monsterdictionary_layout::M_name_display_y
  445.         width  = WD_monsterdictionary_layout::M_name_display_width
  446.         height = line_height
  447.         draw_text(x, y, width, height, text1, 0)
  448.       end
  449.       if WD_monsterdictionary_layout::M_pic_display
  450.         pic_name = @enemy.battler_name
  451.         pic_hue  = @enemy.battler_hue
  452.         x      = WD_monsterdictionary_layout::M_pic_display_x
  453.         y      = WD_monsterdictionary_layout::M_pic_display_y
  454.         opacity= WD_monsterdictionary_layout::M_pic_display_opacity
  455.         bitmap = Cache.battler(pic_name, pic_hue)
  456.         rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  457.         contents.blt(x - rect.width/2, y - rect.height, bitmap, rect, opacity)
  458.       end
  459.  
  460.       font_size = WD_monsterdictionary_layout::C_font_size
  461.       contents.font.size = font_size
  462.       if WD_monsterdictionary_layout::M_mhp_display
  463.         text1  = Vocab::param(0)
  464.         text2  = "?"
  465.         text2  = @enemy.params[0] if m_dictionary_victory_switch_on?(@enemy.id)
  466.         x      = WD_monsterdictionary_layout::M_mhp_display_x
  467.         y      = WD_monsterdictionary_layout::M_mhp_display_y
  468.         width  = WD_monsterdictionary_layout::M_mhp_display_width
  469.         change_color(system_color)
  470.         draw_text(x, y, width, font_size, text1, 0)
  471.         change_color(normal_color)
  472.         draw_text(x, y, width, font_size, text2, 2)
  473.       end
  474.       if WD_monsterdictionary_layout::M_mmp_display
  475.         text1  = Vocab::param(1)
  476.         text2  = "?"
  477.         text2  = @enemy.params[1] if m_dictionary_victory_switch_on?(@enemy.id)
  478.         x      = WD_monsterdictionary_layout::M_mmp_display_x
  479.         y      = WD_monsterdictionary_layout::M_mmp_display_y
  480.         width  = WD_monsterdictionary_layout::M_mmp_display_width
  481.         change_color(system_color)
  482.         draw_text(x, y, width, font_size, text1, 0)
  483.         change_color(normal_color)
  484.         draw_text(x, y, width, font_size, text2, 2)
  485.       end
  486.       if WD_monsterdictionary_layout::M_atk_display
  487.         text1  = Vocab::param(2)
  488.         text2  = "?"
  489.         text2  = @enemy.params[2] if m_dictionary_victory_switch_on?(@enemy.id)
  490.         x      = WD_monsterdictionary_layout::M_atk_display_x
  491.         y      = WD_monsterdictionary_layout::M_atk_display_y
  492.         width  = WD_monsterdictionary_layout::M_atk_display_width
  493.         change_color(system_color)
  494.         draw_text(x, y, width, font_size, text1, 0)
  495.         change_color(normal_color)
  496.         draw_text(x, y, width, font_size, text2, 2)
  497.       end
  498.       if WD_monsterdictionary_layout::M_def_display
  499.         text1  = Vocab::param(3)
  500.         text2  = "?"
  501.         text2  = @enemy.params[3] if m_dictionary_victory_switch_on?(@enemy.id)
  502.         x      = WD_monsterdictionary_layout::M_def_display_x
  503.         y      = WD_monsterdictionary_layout::M_def_display_y
  504.         width  = WD_monsterdictionary_layout::M_def_display_width
  505.         change_color(system_color)
  506.         draw_text(x, y, width, font_size, text1, 0)
  507.         change_color(normal_color)
  508.         draw_text(x, y, width, font_size, text2, 2)
  509.       end
  510.       if WD_monsterdictionary_layout::M_mat_display
  511.         text1  = Vocab::param(4)
  512.         text2  = "?"
  513.         text2  = @enemy.params[4] if m_dictionary_victory_switch_on?(@enemy.id)
  514.         x      = WD_monsterdictionary_layout::M_mat_display_x
  515.         y      = WD_monsterdictionary_layout::M_mat_display_y
  516.         width  = WD_monsterdictionary_layout::M_mat_display_width
  517.         change_color(system_color)
  518.         draw_text(x, y, width, font_size, text1, 0)
  519.         change_color(normal_color)
  520.         draw_text(x, y, width, font_size, text2, 2)
  521.       end
  522.       if WD_monsterdictionary_layout::M_mdf_display
  523.         text1  = Vocab::param(5)
  524.         text2  = "?"
  525.         text2  = @enemy.params[5] if m_dictionary_victory_switch_on?(@enemy.id)
  526.         x      = WD_monsterdictionary_layout::M_mdf_display_x
  527.         y      = WD_monsterdictionary_layout::M_mdf_display_y
  528.         width  = WD_monsterdictionary_layout::M_mdf_display_width
  529.         change_color(system_color)
  530.         draw_text(x, y, width, font_size, text1, 0)
  531.         change_color(normal_color)
  532.         draw_text(x, y, width, font_size, text2, 2)
  533.       end
  534.       if WD_monsterdictionary_layout::M_agi_display
  535.         text1  = Vocab::param(6)
  536.         text2  = "?"
  537.         text2  = @enemy.params[6] if m_dictionary_victory_switch_on?(@enemy.id)
  538.         x      = WD_monsterdictionary_layout::M_agi_display_x
  539.         y      = WD_monsterdictionary_layout::M_agi_display_y
  540.         width  = WD_monsterdictionary_layout::M_agi_display_width
  541.         change_color(system_color)
  542.         draw_text(x, y, width, font_size, text1, 0)
  543.         change_color(normal_color)
  544.         draw_text(x, y, width, font_size, text2, 2)
  545.       end
  546.       if WD_monsterdictionary_layout::M_luk_display
  547.         text1  = Vocab::param(7)
  548.         text2  = "?"
  549.         text2  = @enemy.params[7] if m_dictionary_victory_switch_on?(@enemy.id)
  550.         x      = WD_monsterdictionary_layout::M_luk_display_x
  551.         y      = WD_monsterdictionary_layout::M_luk_display_y
  552.         width  = WD_monsterdictionary_layout::M_luk_display_width
  553.         change_color(system_color)
  554.         draw_text(x, y, width, font_size, text1, 0)
  555.         change_color(normal_color)
  556.         draw_text(x, y, width, font_size, text2, 2)
  557.       end
  558.       if WD_monsterdictionary_layout::M_feature_display
  559.         text1  = WD_monsterdictionary_layout::M_feature_display_text1
  560.         text2  = "?"
  561.         text2  = WD_monsterdictionary_layout::M_feature_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
  562.         x      = WD_monsterdictionary_layout::M_feature_display_x
  563.         y      = WD_monsterdictionary_layout::M_feature_display_y
  564.         width  = WD_monsterdictionary_layout::M_feature_display_width
  565.         change_color(system_color)
  566.         draw_text(x, y, width, font_size, text1, 0)
  567.         change_color(normal_color)
  568.         i = 0
  569.         if m_dictionary_victory_switch_on?(@enemy.id)
  570.           @enemy.note.scan(/<图鉴功能:(.*)>/){|matched|
  571.             i += 1
  572.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
  573.           }
  574.         end
  575.         if i == 0
  576.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  577.         end
  578.       end
  579.       if WD_monsterdictionary_layout::M_exp_display
  580.         text1  = WD_monsterdictionary_layout::M_exp_display_text1
  581.         text2  = "?"
  582.         text2  = @enemy.exp if m_dictionary_victory_switch_on?(@enemy.id)
  583.         x      = WD_monsterdictionary_layout::M_exp_display_x
  584.         y      = WD_monsterdictionary_layout::M_exp_display_y
  585.         width  = WD_monsterdictionary_layout::M_exp_display_width
  586.         change_color(system_color)
  587.         draw_text(x, y, width, font_size, text1, 0)
  588.         change_color(normal_color)
  589.         draw_text(x, y, width, font_size, text2, 2)
  590.       end
  591.       if WD_monsterdictionary_layout::M_gold_display
  592.         text1  = WD_monsterdictionary_layout::M_gold_display_text1
  593.         text2  = "?"
  594.         text2  = @enemy.gold if m_dictionary_victory_switch_on?(@enemy.id)
  595.         text3  = Vocab::currency_unit
  596.         x      = WD_monsterdictionary_layout::M_gold_display_x
  597.         y      = WD_monsterdictionary_layout::M_gold_display_y
  598.         width  = WD_monsterdictionary_layout::M_gold_display_width
  599.         change_color(system_color)
  600.         draw_text(x, y, width, font_size, text1, 0)
  601.         cx = text_size(Vocab::currency_unit).width
  602.         change_color(normal_color)
  603.         draw_text(x, y, width - cx - 2, font_size, text2, 2)
  604.         change_color(system_color)
  605.         draw_text(x, y, width, font_size, text3, 2)
  606.         change_color(normal_color)
  607.       end
  608.       if WD_monsterdictionary_layout::M_drop_display
  609.         text1  = WD_monsterdictionary_layout::M_drop_display_text1
  610.         text2  = WD_monsterdictionary_layout::M_drop_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
  611.         x      = WD_monsterdictionary_layout::M_drop_display_x
  612.         y      = WD_monsterdictionary_layout::M_drop_display_y
  613.         width  = WD_monsterdictionary_layout::M_drop_display_width
  614.         change_color(system_color)
  615.         draw_text(x, y, width, font_size, text1, 0)
  616.         change_color(normal_color)
  617.         i = 0
  618.         @enemy.drop_items.each do |di|
  619.           if di.kind > 0
  620.             i += 1
  621.             item = item_object(di.kind, di.data_id)
  622.             n = i -1
  623.             if m_dictionary_drop_switch_on?(@enemy.id, n)
  624.               text2 = item.name
  625.               text3 = "1/#{di.denominator}"
  626.             else
  627.               text2  = "???????"
  628.               text3  = ""
  629.             end
  630.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text2, 0)
  631.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text3, 2)
  632.           end
  633.         end
  634.         if i == 0
  635.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  636.         end
  637.       end
  638.       if WD_monsterdictionary_layout::M_help_display
  639.         text1  = WD_monsterdictionary_layout::M_help_display_text1
  640.         text2  = "?"
  641.         text2  = WD_monsterdictionary_layout::M_help_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
  642.         x      = WD_monsterdictionary_layout::M_help_display_x
  643.         y      = WD_monsterdictionary_layout::M_help_display_y
  644.         width  = WD_monsterdictionary_layout::M_help_display_width
  645.         change_color(system_color)
  646.         draw_text(x, y, width, font_size, text1, 0)
  647.         change_color(normal_color)
  648.         i = 0
  649.         if m_dictionary_victory_switch_on?(@enemy.id)
  650.           @enemy.note.scan(/<图鉴说明:(.*)>/){|matched|
  651.             i += 1
  652.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
  653.           }
  654.         end
  655.         if i == 0
  656.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  657.         end
  658.       end
  659.       if WD_monsterdictionary_layout::M_geno_display
  660.         text1  = WD_monsterdictionary_layout::M_geno_display_text1
  661.         text2  = "#{m_dictionary_genoside_number(@enemy.id)}"
  662.         x      = WD_monsterdictionary_layout::M_geno_display_x
  663.         y      = WD_monsterdictionary_layout::M_geno_display_y
  664.         width  = WD_monsterdictionary_layout::M_geno_display_width
  665.         change_color(system_color)
  666.         draw_text(x, y, width, font_size, text1, 0)
  667.         change_color(normal_color)
  668.         draw_text(x, y, width, font_size, text2, 2)
  669.       end
  670.  
  671.     elsif @enemy != nil
  672.  
  673.       if WD_monsterdictionary_layout::M_id_display
  674.         text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)
  675.         x      = WD_monsterdictionary_layout::M_id_display_x
  676.         y      = WD_monsterdictionary_layout::M_id_display_y
  677.         width  = WD_monsterdictionary_layout::M_id_display_width
  678.         height = line_height
  679.         draw_text(x, y, width, height, text1, 0)
  680.       end
  681.       if WD_monsterdictionary_layout::M_name_display
  682.         text1  = "- 暂无资料 -"
  683.         x      = WD_monsterdictionary_layout::M_name_display_x
  684.         y      = WD_monsterdictionary_layout::M_name_display_y
  685.         width  = WD_monsterdictionary_layout::M_name_display_width
  686.         height = line_height
  687.         draw_text(x, y, width, height, text1, 0)
  688.       end
  689.  
  690.     end
  691.   end
  692. end

从里面中找Game_Interpreter,然后看里面有没有函数,有函数可以在事件中调用就可以了,没有去模块WD_monsterdictionary看
实在不明白就翻墙找作者网站
djs789783 发表于 6 天前
本帖最后由 djs789783 于 2025-3-5 13:43 编辑
soulsaga 发表于 2025-3-5 12:22
第一个脚本作者网站有给脚本指令..

第二个脚本搜class Game_Interpreter可知插入了WD_monsterdictionary_l ...


不会,。。。我把你说的方式 ,用图片重新发了。。。
soulsaga 发表于 6 天前
本帖最后由 soulsaga 于 2025-3-5 12:33 编辑

第一个脚本作者网站有给脚本指令..

第二个脚本搜class Game_Interpreter可知插入了WD_monsterdictionary_layout模块能当脚本指令使用
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2025-3-11 01:14

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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