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

Project1

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

[已经过期] 关于地图名美化和自动换行脚本的问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
34 小时
注册时间
2016-6-19
帖子
38
跳转到指定楼层
1
发表于 2016-9-8 20:09:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
嗯有两个问题,第一个问题是关于@Majirefy 大大的地图名美化的问题,https://rpg.blue/forum.php?mod=viewthread&tid=230447&extra=&page=1嗯这个是脚本的原网址, 和这个图一样,目测是间距小了但是我找不到改的地方………



RUBY 代码复制
  1. # encoding: utf-8
  2. #==============================================================================
  3. # ** Window_MapNamePlus
  4. #------------------------------------------------------------------------------
  5. #  This window displays the map name.
  6. #------------------------------------------------------------------------------
  7. #  使用方法:
  8. #    新建脚本页,复制粘贴
  9. #    在“Scene_Map”中找到“Window_MapName.new”,改成"Window_MapNamePlus.new"(大概在
  10. #     159行左右)
  11. #    在地图属性的设置窗口,“显示名称”中的地图名格式:“中文名@EnglishName”,即用“@”分割中文
  12. #     和英文地图名
  13. #==============================================================================
  14.  
  15. class Window_MapNamePlus < Window_Base
  16.   #--------------------------------------------------------------------------
  17.   # * Settings
  18.   #--------------------------------------------------------------------------
  19.   FONT_NAME_CH = ["PMingLiU", "黑体"]       # Chinese Font Name
  20.   FONT_SIZE_CH = 42                             # Chinese Font Size
  21.   FONT_NAME_EN = ["Monotype Corsiva"]           # English Font Name
  22.   FONT_SIZE_EN = 28                             # English Font Size
  23.   FONT_BOLD    = false                          # True if Font in Bold
  24.   FONT_COLOR   = Color.new(255, 255, 255, 255)  # Color of Font
  25.   FONT_OUT     = true                           # True if Font Has Outline
  26.   OUT_COLOR    = Color.new(0, 0, 0, 200)        # Color of Outline Color of Font
  27.   FONT_SHADOW  = false                          # True if Text Drops Shadow
  28.   MODIFIER     = "|"                            # Modifier Added beside Map Name
  29.   PADDING      = 12                              # Padding between Window's Frame and Contents
  30.   LINE_HEIGHT  = 6                              # Height of Split Line
  31.   #--------------------------------------------------------------------------
  32.   # * Public Instance Variables
  33.   #--------------------------------------------------------------------------
  34.   attr_reader :map_name_ch                      # Chinese Map Name
  35.   attr_reader :map_name_en                      # English Map Name
  36.   attr_reader :line_x                           # Split Line X Coordinate
  37.   attr_reader :line_y                           # Split Line Y Coordinate
  38.   #--------------------------------------------------------------------------
  39.   # * Object Initialization
  40.   #--------------------------------------------------------------------------
  41.   def initialize
  42.     #----------------------------------------------------------------------
  43.     # * Set the window in the middle of screen.
  44.     #----------------------------------------------------------------------
  45.     super(((Graphics.width - window_width) / 2),
  46.       ((Graphics.height - (FONT_SIZE_CH + FONT_SIZE_EN + PADDING * 4 + LINE_HEIGHT)) / 2),
  47.       window_width, FONT_SIZE_CH + FONT_SIZE_EN + PADDING * 4 + LINE_HEIGHT)
  48.     #----------------------------------------------------------------------
  49.     # * Custom font and style.
  50.     #----------------------------------------------------------------------
  51.     contents.font.bold      = FONT_BOLD
  52.     contents.font.color     = FONT_COLOR
  53.     contents.font.outline   = FONT_OUT
  54.     contents.font.out_color = OUT_COLOR
  55.     contents.font.shadow    = FONT_SHADOW
  56.     #----------------------------------------------------------------------
  57.     # * Set Window Opacity
  58.     #----------------------------------------------------------------------
  59.     self.opacity = 0
  60.     self.contents_opacity = 0
  61.     @show_count = 0
  62.     refresh
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # * Get Window Width
  66.   #--------------------------------------------------------------------------
  67.   def window_width
  68.     return Graphics.width
  69.   end
  70.   #--------------------------------------------------------------------------
  71.   # * Frame Update
  72.   #--------------------------------------------------------------------------
  73.   def update
  74.     super
  75.     if @show_count > 0 && $game_map.name_display
  76.       update_fadein
  77.       @show_count -= 1
  78.     else
  79.       update_fadeout
  80.     end
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # * Update Fadein
  84.   #--------------------------------------------------------------------------
  85.   def update_fadein
  86.     self.contents_opacity += 16
  87.   end
  88.   #--------------------------------------------------------------------------
  89.   # * Update Fadeout
  90.   #--------------------------------------------------------------------------
  91.   def update_fadeout
  92.     self.contents_opacity -= 16
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # * Open Window
  96.   #--------------------------------------------------------------------------
  97.   def open
  98.     refresh
  99.     @show_count = 150
  100.     self.contents_opacity = 0
  101.     self
  102.   end
  103.   #--------------------------------------------------------------------------
  104.   # * Close Window
  105.   #--------------------------------------------------------------------------
  106.   def close
  107.     @show_count = 0
  108.     self
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   # * Refresh
  112.   #--------------------------------------------------------------------------
  113.   def refresh
  114.     contents.clear
  115.     set_map_name
  116.     unless $game_map.display_name.empty?
  117.       draw_map_name
  118.     end
  119.   end
  120.   #--------------------------------------------------------------------------
  121.   # * Draw Line
  122.   #--------------------------------------------------------------------------
  123.   def draw_line(rect)
  124.     temp_rect = rect.clone
  125.     temp_rect.height = LINE_HEIGHT
  126.     temp_rect.width /= 4
  127.     contents.gradient_fill_rect(temp_rect, color2, color1)
  128.     temp_rect.x += temp_rect.width
  129.     temp_rect.width *= 2
  130.     contents.fill_rect(temp_rect, color1)
  131.     temp_rect.x += temp_rect.width
  132.     temp_rect.width /= 2
  133.     contents.gradient_fill_rect(temp_rect, color1, color2)
  134.   end
  135.   #--------------------------------------------------------------------------
  136.   # * Set Map Name
  137.   #--------------------------------------------------------------------------
  138.   def set_map_name
  139.     temp_map_name = $game_map.display_name.split("@")
  140.     @map_name_ch  = temp_map_name[0].to_s
  141.     @map_name_en  = MODIFIER + " " + temp_map_name[1].to_s + " " + MODIFIER
  142.   end
  143.   #--------------------------------------------------------------------------
  144.   # * Draw Map Name
  145.   #--------------------------------------------------------------------------
  146.   def draw_map_name
  147.     set_line_position
  148.     set_line_width
  149.     temp_line_rect = Rect.new(@line_x, @line_y, set_line_width, LINE_HEIGHT)
  150.     draw_line(temp_line_rect)
  151.     temp_name_rect_ch = Rect.new(0, 0, contents.width, FONT_SIZE_CH)
  152.     contents.font.name = FONT_NAME_CH
  153.     contents.font.size = FONT_SIZE_CH
  154.     draw_text(temp_name_rect_ch, @map_name_ch, 1)
  155.     temp_name_rect_en = Rect.new(0, FONT_SIZE_CH, contents.width, FONT_SIZE_EN)
  156.     contents.font.size = FONT_SIZE_EN
  157.     contents.font.name = FONT_NAME_EN
  158.     draw_text(temp_name_rect_en, @map_name_en, 1)
  159.   end
  160.   #--------------------------------------------------------------------------
  161.   # * Set Line Width
  162.   #--------------------------------------------------------------------------
  163.   def set_line_width
  164.     text_width_ch = text_size(@map_name_ch).width * 1.5
  165.     text_width_en = text_size(@map_name_en).width * 1.5
  166.     (text_width_ch >= text_width_en) ?
  167.       (text_width_ch) : (text_width_en)
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # * Set Line Position
  171.   #--------------------------------------------------------------------------
  172.   def set_line_position
  173.     @line_x = (contents.width - set_line_width) / 2
  174.     @line_y = (contents.height - LINE_HEIGHT) / 2
  175.   end
  176.   #--------------------------------------------------------------------------
  177.   # * Get Color 1
  178.   #--------------------------------------------------------------------------
  179.   def color1
  180.     Color.new(255, 255, 255, 255)
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   # * Get Color 2
  184.   #--------------------------------------------------------------------------
  185.   def color2
  186.     Color.new(255, 255, 255, 0)
  187.   end
  188. end




第二个问题是关于@iisnow 大大的自动换行脚本 https://rpg.blue/forum.php?mod=viewthread&tid=224184
差不多就是这样的悲剧,我想要每一句都有一个新的对话框,而不是强行合并,在每句话后面加\K也没用_(:з」∠)_ 求回答





RUBY 代码复制
  1. class Window_Base
  2.  
  3.   alias :iisnow_convert_escape_characters :convert_escape_characters
  4.   def convert_escape_characters(text)
  5.     result = iisnow_convert_escape_characters(text)
  6.     result.gsub!(/\ek/)          { "\k" }
  7.     result
  8.   end
  9.  
  10.   def process_character(c, text, pos)
  11.     case c
  12.     when "\r"  
  13.       return
  14.     when "\n"  
  15.       process_new_line(text, pos) if !@auto_n
  16.     when "\k"
  17.       @auto_n = false
  18.     when "\f"   
  19.       process_new_page(text, pos)
  20.     when "\e"   
  21.       process_escape_character(obtain_escape_code(text), text, pos)
  22.     else      
  23.       process_normal_character(c,text,pos)
  24.     end
  25.   end
  26.  
  27.   def process_normal_character(c,text,pos)
  28.     @auto_n = true
  29.     text_width = text_size(c).width
  30.     if real_width - pos[:x] > text_width
  31.       draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
  32.       pos[:x] += text_width
  33.     else
  34.       process_new_line(text,pos)
  35.       process_normal_character(c,text,pos)
  36.     end
  37.   end
  38.  
  39.   def real_width
  40.     return self.width - 2 * standard_padding
  41.   end
  42.  
  43. end
  44.  
  45. class Window_Message
  46.  
  47.   def process_normal_character(c,text,pos)
  48.     super
  49.     wait_for_one_character
  50.   end
  51.  
  52. end

点评

如果英文被吃了一部分的那个问题的话,我认为是RM描绘Monotype Corsiva这种斜体字体时本身就存在的问题,修改并不方便;不能容忍就只能换一个字体  发表于 2016-9-12 16:46

Lv2.观梦者

梦石
0
星屑
508
在线时间
1478 小时
注册时间
2011-9-17
帖子
1316

开拓者贵宾

2
发表于 2016-9-9 11:11:32 | 只看该作者
本帖最后由 iisnow 于 2016-9-9 11:19 编辑

对于第2个问题:
那个自动换行小脚本没有自动合并的功能,所以应该是你另外显示文字插件(比如那个显示名称)的干扰;
提供一种只修改这个小脚本的办法:

RUBY 代码复制
  1. class Window_Base
  2.  
  3.   alias :iisnow_convert_escape_characters :convert_escape_characters
  4.   def convert_escape_characters(text)
  5.     result = iisnow_convert_escape_characters(text)
  6.     result.gsub!(/\ek/)          { "\k" }
  7.     result.gsub!(/\ef/)          { "\f" }
  8.     result
  9.   end
  10.  
  11.   def process_character(c, text, pos)
  12.     case c
  13.     when "\r"  
  14.       return
  15.     when "\n"  
  16.       process_new_line(text, pos) if !@auto_n
  17.     when "\k"
  18.       @auto_n = false
  19.     when "\f"   
  20.       process_new_page(text, pos)
  21.     when "\e"   
  22.       process_escape_character(obtain_escape_code(text), text, pos)
  23.     else      
  24.       process_normal_character(c,text,pos)
  25.     end
  26.   end
  27.  
  28.   def process_normal_character(c,text,pos)
  29.     @auto_n = true
  30.     text_width = text_size(c).width
  31.     if real_width - pos[:x] > text_width
  32.       draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
  33.       pos[:x] += text_width
  34.     else
  35.       process_new_line(text,pos)
  36.       process_normal_character(c,text,pos)
  37.     end
  38.   end
  39.  
  40.   def real_width
  41.     return self.width - 2 * standard_padding
  42.   end
  43.  
  44. end
  45.  
  46. class Window_Message
  47.  
  48.   def process_normal_character(c,text,pos)
  49.     super
  50.     wait_for_one_character
  51.   end
  52.  
  53. end


然后请使用 \f 强制翻页;
假如问题还是没有解决或者觉得还是很麻烦,请提供你的那个显示名称的脚本


另外第一个问题:
请尝试对脚本的151 或者 155 行代码的 Rect.new 的第2个参数进行调整;
例如:
RUBY 代码复制
  1. temp_name_rect_en = Rect.new(0, FONT_SIZE_CH + 5, contents.width, FONT_SIZE_EN)

点评

\f 的成功了ww 但是第一个问题的还是没有解决 感觉没有变化?  发表于 2016-9-11 14:11
我帖子中要有是不HX的空白,请Ctrl + A
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21631
在线时间
9415 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

3
发表于 2016-9-9 20:12:03 | 只看该作者

点评

0.0现在很多对话都加了\k了,要换太麻烦了、  发表于 2016-9-12 21:44
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
34 小时
注册时间
2016-6-19
帖子
38
4
 楼主| 发表于 2016-9-12 21:45:11 | 只看该作者
iisnow 发表于 2016-9-9 11:11
对于第2个问题:
那个自动换行小脚本没有自动合并的功能,所以应该是你另外显示文字插件(比如那个显示名称 ...

但是他中文字也被吃了啊_(:з」∠)_
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
34 小时
注册时间
2016-6-19
帖子
38
5
 楼主| 发表于 2016-9-15 11:43:43 | 只看该作者
@iisnow 还有一个问题,我想用一个关于音量的脚本,但是介绍里面换不了行。\k 或者自带的\n 都没用

  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - System Options v1.00
  4. # -- Last Updated: 2012.01.01
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.01 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # This script replaces the "Game End" option in the Main Menu with a "System"
  20. # menu where the player can adjust various settings in the game. Of them, the
  21. # player can change the window colour, the volume for BGM, BGS, SFX, set
  22. # automatic dashing, message text to display instantly, and speed up battles by
  23. # hiding battle animations.
  24. #
  25. #==============================================================================
  26. # ▼ Instructions
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # To install this script, open up your script editor and copy/paste this script
  29. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  30. #
  31. # -----------------------------------------------------------------------------
  32. # Script Calls - These commands are used with script calls.
  33. # -----------------------------------------------------------------------------
  34. # $game_system.volume_change(:bgm, x)
  35. # $game_system.volume_change(:bgs, x)
  36. # $game_system.volume_change(:sfx, x)
  37. # Unlike the previous Yanfly Engines, this version does not bind volume to a
  38. # variable. Use the script call to change the bgm, bgs, or sfx sound rate by
  39. # x increment. Use a negative value to lower the volume.
  40. #
  41. # $game_system.set_autodash(true)
  42. # $game_system.set_autodash(false)
  43. # Turns autodash on (true) or off (false).
  44. #
  45. # $game_system.set_instantmsg(true)
  46. # $game_system.set_instantmsg(false)
  47. # Turns instant messages on (true) or off (false).
  48. #
  49. # $game_system.set_animations(true)
  50. # $game_system.set_animations(false)
  51. # Turns battle animations on (true) or off (false).
  52. #
  53. #==============================================================================
  54. # ▼ Compatibility
  55. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  56. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  57. # it will run with RPG Maker VX without adjusting.
  58. #
  59. #==============================================================================

  60. module YEA
  61.   module SYSTEM
  62.    
  63.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  64.     # - General Setting -
  65.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  66.     # These are the general settings that govern the System settings. This will
  67.     # change the "Game End" vocab, and disable or enable autodash, instant
  68.     # messages, or animations by default.
  69.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  70.     COMMAND_NAME = "系统"      # Command name used to replace Game End.
  71.     DEFAULT_AUTODASH   = true    # Enable automatic dashing by default?
  72.     DEFAULT_INSTANTMSG = false   # Enable instant message text by default?
  73.     DEFAULT_ANIMATIONS = true    # Enable battle animations by default?
  74.    
  75.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  76.     # - Command Settings -
  77.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78.     # These settings adjust the commands shown in the command list. Add, remove
  79.     # or rearrange the commands as you see fit. Here's a list of which commands
  80.     # do what:
  81.     #
  82.     # -------------------------------------------------------------------------
  83.     # :command         Description
  84.     # -------------------------------------------------------------------------
  85.     # :blank           Inserts an empty blank space.
  86.     #
  87.     # :window_red      Changes the red tone for all windows.
  88.     # :window_grn      Changes the green tone for all windows.
  89.     # :window_blu      Changes the blue tone for all windows.
  90.     #
  91.     # :volume_bgm      Changes the BGM volume used.
  92.     # :volume_bgs      Changes the BGS volume used.
  93.     # :volume_sfx      Changes the SFX volume used.
  94.     #
  95.     # :autodash        Sets the player to automatically dash.
  96.     # :instantmsg      Sets message text to appear instantly.
  97.     # :animations      Enables battle animations or disables them.
  98.     #
  99.     # :to_title        Returns to the title screen.
  100.     # :shutdown        Shuts down the game.
  101.     #
  102.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  103.     COMMANDS =[
  104.       :window_red,   # Changes the red tone for all windows.
  105.       :window_grn,   # Changes the green tone for all windows.
  106.       :window_blu,   # Changes the blue tone for all windows.
  107.       :volume_bgm,   # Changes the BGM volume used.
  108.       :volume_bgs,   # Changes the BGS volume used.
  109.       :volume_sfx,   # Changes the SFX volume used.
  110.       :blank,
  111.       :autodash,     # Sets the player to automatically dash.
  112.       :instantmsg,   # Sets message text to appear instantly.
  113.       :animations,   # Enables battle animations or disables them.
  114.     # :switch_1,     # Custom Switch 1. Adjust settings below.
  115.     # :switch_2,     # Custom Switch 2. Adjust settings below.
  116.     # :variable_1,   # Custom Variable 1. Adjust settings below.
  117.     # :variable_2,   # Custom Variable 2. Adjust settings below.
  118.       :blank,
  119.       :to_title,     # Returns to the title screen.
  120.       :shutdown,     # Shuts down the game.
  121.     ] # Do not remove this.
  122.    
  123.     #--------------------------------------------------------------------------
  124.     # - Custom Switches -
  125.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  126.     # If you want your game to have system options other than just the ones
  127.     # listed above, you can insert custom switches here to produce such an
  128.     # effect. Adjust the settings here as you see fit.
  129.     #--------------------------------------------------------------------------
  130.     CUSTOM_SWITCHES ={
  131.     # -------------------------------------------------------------------------
  132.     # :switch    => [Switch, Name, Off Text, On Text,
  133.     #                Help Window Description
  134.     #               ], # Do not remove this.
  135.     # -------------------------------------------------------------------------
  136.       :switch_1  => [ 1, "Custom Switch 1", "OFF", "ON",
  137.                      "Help description used for custom switch 1."
  138.                     ],
  139.     # -------------------------------------------------------------------------
  140.       :switch_2  => [ 2, "Custom Switch 2", "OFF", "ON",
  141.                      "Help description used for custom switch 2."
  142.                     ],
  143.     # -------------------------------------------------------------------------
  144.     } # Do not remove this.
  145.    
  146.     #--------------------------------------------------------------------------
  147.     # - Custom Variables -
  148.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  149.     # If you want your game to have system options other than just the ones
  150.     # listed above, you can insert custom variables here to produce such an
  151.     # effect. Adjust the settings here as you see fit.
  152.     #--------------------------------------------------------------------------
  153.     CUSTOM_VARIABLES ={
  154.     # -------------------------------------------------------------------------
  155.     # :variable   => [Switch, Name, Colour1, Colour2, Min, Max,
  156.     #                 Help Window Description
  157.     #                ], # Do not remove this.
  158.     # -------------------------------------------------------------------------
  159.       :variable_1 => [ 1, "Custom Variable 1", 9, 1, -100, 100,
  160.                       "Help description used for custom variable 1."
  161.                      ],
  162.     # -------------------------------------------------------------------------
  163.       :variable_2 => [ 2, "Custom Variable 2", 10, 2, -10, 10,
  164.                       "Help description used for custom variable 2."
  165.                      ],
  166.     # -------------------------------------------------------------------------
  167.     } # Do not remove this.
  168.    
  169.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  170.     # - Vocab Settings -
  171.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  172.     # This hash adjusts the vocab used for both the commands and the help
  173.     # description that appears above the command window. Note that for the
  174.     # command help descriptions, you may use text codes. Use \n to linebreak.
  175.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  176.     COMMAND_VOCAB ={
  177.     # -------------------------------------------------------------------------
  178.     # :command    => [Command Name, Option1, Option2
  179.     #                 Help Window Description,
  180.     #                ], # Do not remove this.
  181.     # -------------------------------------------------------------------------
  182.       :blank      => ["", "None", "None",
  183.                       ""
  184.                      ], # Do not remove this.
  185.     # -------------------------------------------------------------------------
  186.       :window_red => ["红", "None", "None",
  187.                       "改变窗口的颜色,请根据自己的喜好ww顺便一提,原本是85\n" +
  188.                       "按住SHIFT,每次变化10"
  189.                      ], # Do not remove this.
  190.     # -------------------------------------------------------------------------
  191.       :window_grn => ["绿", "None", "None",
  192.                       "改变窗口的颜色,请根据自己的喜好ww顺便一提,原本是85\n" +
  193.                       "按住SHIFT,每次变化10"
  194.                      ], # Do not remove this.
  195.     # -------------------------------------------------------------------------
  196.       :window_blu => ["蓝", "None", "None",
  197.                       "改变窗口的颜色,请根据自己的喜好ww顺便一提,原本是102\n" +
  198.                       "按住SHIFT,每次变化10"
  199.                      ], # Do not remove this.
  200.     # -------------------------------------------------------------------------
  201.       :volume_bgm => ["BGM音量", 12, 4, # Options 1 & 2 are Gauge Colours.
  202.                       "改变背景音乐的音量\k" +
  203.                       "按住SHIFT,每次变化10"
  204.                      ], # Do not remove this.
  205.     # -------------------------------------------------------------------------
  206.       :volume_bgs => ["背景声音音量", 13, 5, # Options 1 & 2 are Gauge Colours.
  207.                       "改变背景声音的音量\k" +
  208.                       "按住SHIFT,每次变化10"
  209.                      ], # Do not remove this.
  210.     # -------------------------------------------------------------------------
  211.       :volume_sfx => ["系统音效音量", 14, 6, # Options 1 & 2 are Gauge Colours.
  212.                       "改变系统音效音量啦~~" +
  213.                       "按住SHIFT,每次变化10"
  214.                      ], # Do not remove this.
  215.     # -------------------------------------------------------------------------
  216.       :autodash   => ["自动跑步", "走", "跑",
  217.                       "简单而言不需要选这个,因为游戏已经自带了。"
  218.                      ], # Do not remove this.
  219.     # -------------------------------------------------------------------------
  220.       :instantmsg => ["跳过等待时间", "正常", "跳过",
  221.                       "让对话一次性弹出来。(不推荐)"
  222.                      ], # Do not remove this.
  223.     # -------------------------------------------------------------------------
  224.       :animations => ["战斗图片", "隐藏", "显示",
  225.                       "是否隐藏战斗图片去加速战斗?(不推荐)"
  226.                      ], # Do not remove this.
  227.     # -------------------------------------------------------------------------
  228.       :to_title   => ["回到标题画面", "None", "None",
  229.                       "听主题曲啦~~"
  230.                      ], # Do not remove this.
  231.     # -------------------------------------------------------------------------
  232.       :shutdown   => ["关闭游戏", "None", "None",
  233.                       "你要离开我吗QAQ"
  234.                      ], # Do not remove this.
  235.     # -------------------------------------------------------------------------
  236.     } # Do not remove this.
  237.    
  238.   end # SYSTEM
  239. end # YEA

  240. #==============================================================================
  241. # ▼ Editting anything past this point may potentially result in causing
  242. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  243. # halitosis so edit at your own risk.
  244. #==============================================================================

  245. #==============================================================================
  246. # ■ Vocab
  247. #==============================================================================

  248. module Vocab
  249.   
  250.   #--------------------------------------------------------------------------
  251.   # overwrite method: self.game_end
  252.   #--------------------------------------------------------------------------
  253.   def self.game_end
  254.     return YEA::SYSTEM::COMMAND_NAME
  255.   end
  256.   
  257. end # Vocab

  258. #==============================================================================
  259. # ■ RPG::BGM
  260. #==============================================================================

  261. class RPG::BGM < RPG::AudioFile
  262.   
  263.   #--------------------------------------------------------------------------
  264.   # overwrite method: play
  265.   #--------------------------------------------------------------------------
  266.   def play(pos = 0)
  267.     if @name.empty?
  268.       Audio.bgm_stop
  269.       @@last = RPG::BGM.new
  270.     else
  271.       volume = @volume
  272.       volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
  273.       Audio.bgm_play('Audio/BGM/' + @name, volume, @pitch, pos)
  274.       @@last = self.clone
  275.     end
  276.   end
  277.   
  278. end # RPG::BGM

  279. #==============================================================================
  280. # ■ RPG::ME
  281. #==============================================================================

  282. class RPG::ME < RPG::AudioFile
  283.   
  284.   #--------------------------------------------------------------------------
  285.   # overwrite method: play
  286.   #--------------------------------------------------------------------------
  287.   def play
  288.     if @name.empty?
  289.       Audio.me_stop
  290.     else
  291.       volume = @volume
  292.       volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
  293.       Audio.me_play('Audio/ME/' + @name, volume, @pitch)
  294.     end
  295.   end
  296.   
  297. end # RPG::ME

  298. #==============================================================================
  299. # ■ RPG::BGS
  300. #==============================================================================

  301. class RPG::BGS < RPG::AudioFile
  302.   
  303.   #--------------------------------------------------------------------------
  304.   # overwrite method: play
  305.   #--------------------------------------------------------------------------
  306.   def play(pos = 0)
  307.     if @name.empty?
  308.       Audio.bgs_stop
  309.       @@last = RPG::BGS.new
  310.     else
  311.       volume = @volume
  312.       volume *= $game_system.volume(:bgs) * 0.01 unless $game_system.nil?
  313.       Audio.bgs_play('Audio/BGS/' + @name, volume, @pitch, pos)
  314.       @@last = self.clone
  315.     end
  316.   end
  317.   
  318. end # RPG::BGS

  319. #==============================================================================
  320. # ■ RPG::SE
  321. #==============================================================================

  322. class RPG::SE < RPG::AudioFile
  323.   
  324.   #--------------------------------------------------------------------------
  325.   # overwrite method: play
  326.   #--------------------------------------------------------------------------
  327.   def play
  328.     unless @name.empty?
  329.       volume = @volume
  330.       volume *= $game_system.volume(:sfx) * 0.01 unless $game_system.nil?
  331.       Audio.se_play('Audio/SE/' + @name, volume, @pitch)
  332.     end
  333.   end
  334.   
  335. end # RPG::SE

  336. #==============================================================================
  337. # ■ Game_System
  338. #==============================================================================

  339. class Game_System
  340.   
  341.   #--------------------------------------------------------------------------
  342.   # alias method: initialize
  343.   #--------------------------------------------------------------------------
  344.   alias game_system_initialize_so initialize
  345.   def initialize
  346.     game_system_initialize_so
  347.     init_volume_control
  348.     init_autodash
  349.     init_instantmsg
  350.     init_animations
  351.   end
  352.   
  353.   #--------------------------------------------------------------------------
  354.   # new method: init_volume_control
  355.   #--------------------------------------------------------------------------
  356.   def init_volume_control
  357.     @volume = {}
  358.     @volume[:bgm] = 100
  359.     @volume[:bgs] = 100
  360.     @volume[:sfx] = 100
  361.   end
  362.   
  363.   #--------------------------------------------------------------------------
  364.   # new method: volume
  365.   #--------------------------------------------------------------------------
  366.   def volume(type)
  367.     init_volume_control if @volume.nil?
  368.     return [[@volume[type], 0].max, 100].min
  369.   end
  370.   
  371.   #--------------------------------------------------------------------------
  372.   # new method: volume_change
  373.   #--------------------------------------------------------------------------
  374.   def volume_change(type, increment)
  375.     init_volume_control if @volume.nil?
  376.     @volume[type] += increment
  377.     @volume[type] = [[@volume[type], 0].max, 100].min
  378.   end
  379.   
  380.   #--------------------------------------------------------------------------
  381.   # new method: init_autodash
  382.   #--------------------------------------------------------------------------
  383.   def init_autodash
  384.     @autodash = YEA::SYSTEM::DEFAULT_AUTODASH
  385.   end
  386.   
  387.   #--------------------------------------------------------------------------
  388.   # new method: autodash?
  389.   #--------------------------------------------------------------------------
  390.   def autodash?
  391.     init_autodash if @autodash.nil?
  392.     return @autodash
  393.   end
  394.   
  395.   #--------------------------------------------------------------------------
  396.   # new method: set_autodash
  397.   #--------------------------------------------------------------------------
  398.   def set_autodash(value)
  399.     @autodash = value
  400.   end
  401.   
  402.   #--------------------------------------------------------------------------
  403.   # new method: init_instantmsg
  404.   #--------------------------------------------------------------------------
  405.   def init_instantmsg
  406.     @instantmsg = YEA::SYSTEM::DEFAULT_INSTANTMSG
  407.   end
  408.   
  409.   #--------------------------------------------------------------------------
  410.   # new method: instantmsg?
  411.   #--------------------------------------------------------------------------
  412.   def instantmsg?
  413.     init_instantmsg if @instantmsg.nil?
  414.     return @instantmsg
  415.   end
  416.   
  417.   #--------------------------------------------------------------------------
  418.   # new method: set_instantmsg
  419.   #--------------------------------------------------------------------------
  420.   def set_instantmsg(value)
  421.     @instantmsg = value
  422.   end
  423.   
  424.   #--------------------------------------------------------------------------
  425.   # new method: init_animations
  426.   #--------------------------------------------------------------------------
  427.   def init_animations
  428.     @animations = YEA::SYSTEM::DEFAULT_ANIMATIONS
  429.   end
  430.   
  431.   #--------------------------------------------------------------------------
  432.   # new method: animations?
  433.   #--------------------------------------------------------------------------
  434.   def animations?
  435.     init_animations if @animations.nil?
  436.     return @animations
  437.   end
  438.   
  439.   #--------------------------------------------------------------------------
  440.   # new method: set_animations
  441.   #--------------------------------------------------------------------------
  442.   def set_animations(value)
  443.     @animations = value
  444.   end
  445.   
  446. end # Game_System

  447. #==============================================================================
  448. # ■ Game_Player
  449. #==============================================================================

  450. class Game_Player < Game_Character
  451.   
  452.   #--------------------------------------------------------------------------
  453.   # alias method: dash?
  454.   #--------------------------------------------------------------------------
  455.   alias game_player_dash_so dash?
  456.   def dash?
  457.     if $game_system.autodash?
  458.       return false if @move_route_forcing
  459.       return false if $game_map.disable_dash?
  460.       return false if vehicle
  461.       return !Input.press?(:A)
  462.     else
  463.       return game_player_dash_so
  464.     end
  465.   end
  466.   
  467. end # Game_Player

  468. #==============================================================================
  469. # ■ Scene_Battle
  470. #==============================================================================

  471. class Scene_Battle < Scene_Base
  472.   
  473.   #--------------------------------------------------------------------------
  474.   # alias method: show_fast?
  475.   #--------------------------------------------------------------------------
  476.   alias scene_battle_show_fast_so show_fast?
  477.   def show_fast?
  478.     return true unless $game_system.animations?
  479.     return scene_battle_show_fast_so
  480.   end
  481.   
  482.   #--------------------------------------------------------------------------
  483.   # alias method: show_normal_animation
  484.   #--------------------------------------------------------------------------
  485.   alias scene_battle_show_normal_animation_so show_normal_animation
  486.   def show_normal_animation(targets, animation_id, mirror = false)
  487.     return unless $game_system.animations?
  488.     scene_battle_show_normal_animation_so(targets, animation_id, mirror)
  489.   end
  490.   
  491. end # Scene_Battle

  492. #==============================================================================
  493. # ■ Window_Message
  494. #==============================================================================

  495. class Window_Message < Window_Base
  496.   
  497.   #--------------------------------------------------------------------------
  498.   # alias method: clear_flags
  499.   #--------------------------------------------------------------------------
  500.   alias window_message_clear_flags_so clear_flags
  501.   def clear_flags
  502.     window_message_clear_flags_so
  503.     @show_fast = true if $game_system.instantmsg?
  504.   end
  505.   
  506. end # Window_Message

  507. #==============================================================================
  508. # ■ Window_SystemOptions
  509. #==============================================================================

  510. class Window_SystemOptions < Window_Command
  511.   
  512.   #--------------------------------------------------------------------------
  513.   # initialize
  514.   #--------------------------------------------------------------------------
  515.   def initialize(help_window)
  516.     @help_window = help_window
  517.     super(0, @help_window.height)
  518.     refresh
  519.   end
  520.   
  521.   #--------------------------------------------------------------------------
  522.   # window_width
  523.   #--------------------------------------------------------------------------
  524.   def window_width; return Graphics.width; end
  525.   
  526.   #--------------------------------------------------------------------------
  527.   # window_height
  528.   #--------------------------------------------------------------------------
  529.   def window_height; return Graphics.height - @help_window.height; end
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # update_help
  533.   #--------------------------------------------------------------------------
  534.   def update_help
  535.     if current_symbol == :custom_switch || current_symbol == :custom_variable
  536.       text = @help_descriptions[current_ext]
  537.     else
  538.       text = @help_descriptions[current_symbol]
  539.     end
  540.     text = "" if text.nil?
  541.     @help_window.set_text(text)
  542.   end
  543.   
  544.   #--------------------------------------------------------------------------
  545.   # ok_enabled?
  546.   #--------------------------------------------------------------------------
  547.   def ok_enabled?
  548.     return true if [:to_title, :shutdown].include?(current_symbol)
  549.     return false
  550.   end
  551.   
  552.   #--------------------------------------------------------------------------
  553.   # make_command_list
  554.   #--------------------------------------------------------------------------
  555.   def make_command_list
  556.     @help_descriptions = {}
  557.     for command in YEA::SYSTEM::COMMANDS
  558.       case command
  559.       when :blank
  560.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  561.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  562.       when :window_red, :window_grn, :window_blu
  563.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  564.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  565.       when :volume_bgm, :volume_bgs, :volume_sfx
  566.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  567.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  568.       when :autodash, :instantmsg, :animations
  569.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  570.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  571.       when :to_title, :shutdown
  572.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  573.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  574.       else
  575.         process_custom_switch(command)
  576.         process_custom_variable(command)
  577.       end
  578.     end
  579.   end
  580.   
  581.   #--------------------------------------------------------------------------
  582.   # process_custom_switch
  583.   #--------------------------------------------------------------------------
  584.   def process_custom_switch(command)
  585.     return unless YEA::SYSTEM::CUSTOM_SWITCHES.include?(command)
  586.     name = YEA::SYSTEM::CUSTOM_SWITCHES[command][1]
  587.     add_command(name, :custom_switch, true, command)
  588.     @help_descriptions[command] = YEA::SYSTEM::CUSTOM_SWITCHES[command][4]
  589.   end
  590.   
  591.   #--------------------------------------------------------------------------
  592.   # process_custom_variable
  593.   #--------------------------------------------------------------------------
  594.   def process_custom_variable(command)
  595.     return unless YEA::SYSTEM::CUSTOM_VARIABLES.include?(command)
  596.     name = YEA::SYSTEM::CUSTOM_VARIABLES[command][1]
  597.     add_command(name, :custom_variable, true, command)
  598.     @help_descriptions[command] = YEA::SYSTEM::CUSTOM_VARIABLES[command][6]
  599.   end
  600.   
  601.   #--------------------------------------------------------------------------
  602.   # draw_item
  603.   #--------------------------------------------------------------------------
  604.   def draw_item(index)
  605.     reset_font_settings
  606.     rect = item_rect(index)
  607.     contents.clear_rect(rect)
  608.     case @list[index][:symbol]
  609.     when :window_red, :window_grn, :window_blu
  610.       draw_window_tone(rect, index, @list[index][:symbol])
  611.     when :volume_bgm, :volume_bgs, :volume_sfx
  612.       draw_volume(rect, index, @list[index][:symbol])
  613.     when :autodash, :instantmsg, :animations
  614.       draw_toggle(rect, index, @list[index][:symbol])
  615.     when :to_title, :shutdown
  616.       draw_text(item_rect_for_text(index), command_name(index), 1)
  617.     when :custom_switch
  618.       draw_custom_switch(rect, index, @list[index][:ext])
  619.     when :custom_variable
  620.       draw_custom_variable(rect, index, @list[index][:ext])
  621.     end
  622.   end
  623.   
  624.   #--------------------------------------------------------------------------
  625.   # draw_window_tone
  626.   #--------------------------------------------------------------------------
  627.   def draw_window_tone(rect, index, symbol)
  628.     name = @list[index][:name]
  629.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  630.     #---
  631.     dx = contents.width / 2
  632.     tone = $game_system.window_tone
  633.     case symbol
  634.     when :window_red
  635.       rate = (tone.red + 255.0) / 510.0
  636.       colour1 = Color.new(128, 0, 0)
  637.       colour2 = Color.new(255, 0, 0)
  638.       value = tone.red.to_i
  639.     when :window_grn
  640.       rate = (tone.green + 255.0) / 510.0
  641.       colour1 = Color.new(0, 128, 0)
  642.       colour2 = Color.new(0, 255, 0)
  643.       value = tone.green.to_i
  644.     when :window_blu
  645.       rate = (tone.blue + 255.0) / 510.0
  646.       colour1 = Color.new(0, 0, 128)
  647.       colour2 = Color.new(0, 0, 255)
  648.       value = tone.blue.to_i
  649.     end
  650.     draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
  651.     draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
  652.   end
  653.   
  654.   #--------------------------------------------------------------------------
  655.   # draw_volume
  656.   #--------------------------------------------------------------------------
  657.   def draw_volume(rect, index, symbol)
  658.     name = @list[index][:name]
  659.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  660.     #---
  661.     dx = contents.width / 2
  662.     case symbol
  663.     when :volume_bgm
  664.       rate = $game_system.volume(:bgm)
  665.     when :volume_bgs
  666.       rate = $game_system.volume(:bgs)
  667.     when :volume_sfx
  668.       rate = $game_system.volume(:sfx)
  669.     end
  670.     colour1 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][1])
  671.     colour2 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][2])
  672.     value = sprintf("%d%%", rate)
  673.     rate *= 0.01
  674.     draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
  675.     draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
  676.   end
  677.   
  678.   #--------------------------------------------------------------------------
  679.   # draw_toggle
  680.   #--------------------------------------------------------------------------
  681.   def draw_toggle(rect, index, symbol)
  682.     name = @list[index][:name]
  683.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  684.     #---
  685.     dx = contents.width / 2
  686.     case symbol
  687.     when :autodash
  688.       enabled = $game_system.autodash?
  689.     when :instantmsg
  690.       enabled = $game_system.instantmsg?
  691.     when :animations
  692.       enabled = $game_system.animations?
  693.     end
  694.     dx = contents.width/2
  695.     change_color(normal_color, !enabled)
  696.     option1 = YEA::SYSTEM::COMMAND_VOCAB[symbol][1]
  697.     draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
  698.     dx += contents.width/4
  699.     change_color(normal_color, enabled)
  700.     option2 = YEA::SYSTEM::COMMAND_VOCAB[symbol][2]
  701.     draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
  702.   end
  703.   
  704.   #--------------------------------------------------------------------------
  705.   # cursor_right
  706.   #--------------------------------------------------------------------------
  707.   def draw_custom_switch(rect, index, ext)
  708.     name = @list[index][:name]
  709.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  710.     #---
  711.     dx = contents.width / 2
  712.     enabled = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
  713.     dx = contents.width/2
  714.     change_color(normal_color, !enabled)
  715.     option1 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][2]
  716.     draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
  717.     dx += contents.width/4
  718.     change_color(normal_color, enabled)
  719.     option2 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][3]
  720.     draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
  721.   end
  722.   
  723.   #--------------------------------------------------------------------------
  724.   # draw_custom_variable
  725.   #--------------------------------------------------------------------------
  726.   def draw_custom_variable(rect, index, ext)
  727.     name = @list[index][:name]
  728.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  729.     #---
  730.     dx = contents.width / 2
  731.     value = $game_variables[YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]]
  732.     colour1 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][2])
  733.     colour2 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][3])
  734.     minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
  735.     maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
  736.     rate = (value - minimum).to_f / [(maximum - minimum).to_f, 0.01].max
  737.     dx = contents.width/2
  738.     draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
  739.     draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
  740.   end
  741.   
  742.   #--------------------------------------------------------------------------
  743.   # cursor_right
  744.   #--------------------------------------------------------------------------
  745.   def cursor_right(wrap = false)
  746.     cursor_change(:right)
  747.     super(wrap)
  748.   end
  749.   
  750.   #--------------------------------------------------------------------------
  751.   # cursor_left
  752.   #--------------------------------------------------------------------------
  753.   def cursor_left(wrap = false)
  754.     cursor_change(:left)
  755.     super(wrap)
  756.   end
  757.   
  758.   #--------------------------------------------------------------------------
  759.   # cursor_change
  760.   #--------------------------------------------------------------------------
  761.   def cursor_change(direction)
  762.     case current_symbol
  763.     when :window_red, :window_blu, :window_grn
  764.       change_window_tone(direction)
  765.     when :volume_bgm, :volume_bgs, :volume_sfx
  766.       change_volume(direction)
  767.     when :autodash, :instantmsg, :animations
  768.       change_toggle(direction)
  769.     when :custom_switch
  770.       change_custom_switch(direction)
  771.     when :custom_variable
  772.       change_custom_variables(direction)
  773.     end
  774.   end
  775.   
  776.   #--------------------------------------------------------------------------
  777.   # change_window_tone
  778.   #--------------------------------------------------------------------------
  779.   def change_window_tone(direction)
  780.     Sound.play_cursor
  781.     value = direction == :left ? -1 : 1
  782.     value *= 10 if Input.press?(:A)
  783.     tone = $game_system.window_tone.clone
  784.     case current_symbol
  785.     when :window_red; tone.red += value
  786.     when :window_grn; tone.green += value
  787.     when :window_blu; tone.blue += value
  788.     end
  789.     $game_system.window_tone = tone
  790.     draw_item(index)
  791.   end
  792.   
  793.   #--------------------------------------------------------------------------
  794.   # change_window_tone
  795.   #--------------------------------------------------------------------------
  796.   def change_volume(direction)
  797.     Sound.play_cursor
  798.     value = direction == :left ? -1 : 1
  799.     value *= 10 if Input.press?(:A)
  800.     case current_symbol
  801.     when :volume_bgm
  802.       $game_system.volume_change(:bgm, value)
  803.       RPG::BGM::last.play
  804.     when :volume_bgs
  805.       $game_system.volume_change(:bgs, value)
  806.       RPG::BGS::last.play
  807.     when :volume_sfx
  808.       $game_system.volume_change(:sfx, value)
  809.     end
  810.     draw_item(index)
  811.   end
  812.   
  813.   #--------------------------------------------------------------------------
  814.   # change_toggle
  815.   #--------------------------------------------------------------------------
  816.   def change_toggle(direction)
  817.     value = direction == :left ? false : true
  818.     case current_symbol
  819.     when :autodash
  820.       current_case = $game_system.autodash?
  821.       $game_system.set_autodash(value)
  822.     when :instantmsg
  823.       current_case = $game_system.instantmsg?
  824.       $game_system.set_instantmsg(value)
  825.     when :animations
  826.       current_case = $game_system.animations?
  827.       $game_system.set_animations(value)
  828.     end
  829.     Sound.play_cursor if value != current_case
  830.     draw_item(index)
  831.   end
  832.   
  833.   #--------------------------------------------------------------------------
  834.   # change_custom_switch
  835.   #--------------------------------------------------------------------------
  836.   def change_custom_switch(direction)
  837.     value = direction == :left ? false : true
  838.     ext = current_ext
  839.     current_case = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
  840.     $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]] = value
  841.     Sound.play_cursor if value != current_case
  842.     draw_item(index)
  843.   end
  844.   
  845.   #--------------------------------------------------------------------------
  846.   # change_custom_variables
  847.   #--------------------------------------------------------------------------
  848.   def change_custom_variables(direction)
  849.     Sound.play_cursor
  850.     value = direction == :left ? -1 : 1
  851.     value *= 10 if Input.press?(:A)
  852.     ext = current_ext
  853.     var = YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]
  854.     minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
  855.     maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
  856.     $game_variables[var] += value
  857.     $game_variables[var] = [[$game_variables[var], minimum].max, maximum].min
  858.     draw_item(index)
  859.   end
  860.   
  861. end # Window_SystemOptions

  862. #==============================================================================
  863. # ■ Scene_Menu
  864. #==============================================================================

  865. class Scene_Menu < Scene_MenuBase
  866.   
  867.   #--------------------------------------------------------------------------
  868.   # overwrite method: command_game_end
  869.   #--------------------------------------------------------------------------
  870.   def command_game_end
  871.     SceneManager.call(Scene_System)
  872.   end
  873.   
  874. end # Scene_Menu

  875. #==============================================================================
  876. # ■ Scene_System
  877. #==============================================================================

  878. class Scene_System < Scene_MenuBase
  879.   
  880.   #--------------------------------------------------------------------------
  881.   # start
  882.   #--------------------------------------------------------------------------
  883.   def start
  884.     super
  885.     create_help_window
  886.     create_command_window
  887.   end
  888.   
  889.   #--------------------------------------------------------------------------
  890.   # create_command_window
  891.   #--------------------------------------------------------------------------
  892.   def create_command_window
  893.     @command_window = Window_SystemOptions.new(@help_window)
  894.     @command_window.set_handler(:cancel, method(:return_scene))
  895.     @command_window.set_handler(:to_title, method(:command_to_title))
  896.     @command_window.set_handler(:shutdown, method(:command_shutdown))
  897.   end
  898.   
  899.   #--------------------------------------------------------------------------
  900.   # command_to_title
  901.   #--------------------------------------------------------------------------
  902.   def command_to_title
  903.     fadeout_all
  904.     SceneManager.goto(Scene_Title)
  905.   end
  906.   
  907.   #--------------------------------------------------------------------------
  908.   # command_shutdown
  909.   #--------------------------------------------------------------------------
  910.   def command_shutdown
  911.     fadeout_all
  912.     SceneManager.exit
  913.   end
  914.   
  915. end # Scene_System

  916. #==============================================================================
  917. #
  918. # ▼ End of File
  919. #
  920. #==============================================================================
复制代码

点评

好吧打错字了,@iisnow  发表于 2016-9-15 11:46
@illsnow QAQ  发表于 2016-9-15 11:45
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 23:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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