Project1

标题: 有木有全局改变文字显示速度的脚本? [打印本页]

作者: lllzjsj    时间: 2013-9-25 17:09
标题: 有木有全局改变文字显示速度的脚本?
搜到的全是vx的,没找到va的
作者: 喵呜喵5    时间: 2013-9-25 17:55
本帖最后由 喵呜喵5 于 2016-2-1 00:10 编辑

https://rpg.blue/home.php?mod=sp ... o=blog&id=11939
作者: gaogs123456    时间: 2013-9-25 19:30
本帖最后由 gaogs123456 于 2013-9-25 19:32 编辑

瞬间显示默认有控制符吧
(如果只是想让文字瞬间显示,但是又懒得总是用控制符),可以用“YEA系统调整选项”,在脚本里把75行改为true
因为站内使用的搜索太烂了,我搜不到这个脚本(找不到链接,所以只好直接贴上来):
RUBY 代码复制
  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.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-SystemOptions"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.01.01 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # This script replaces the "Game End" option in the Main Menu with a "System"
  22. # menu where the player can adjust various settings in the game. Of them, the
  23. # player can change the window colour, the volume for BGM, BGS, SFX, set
  24. # automatic dashing, message text to display instantly, and speed up battles by
  25. # hiding battle animations.
  26. #
  27. #==============================================================================
  28. # ▼ Instructions
  29. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. # To install this script, open up your script editor and copy/paste this script
  31. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  32. #
  33. # -----------------------------------------------------------------------------
  34. # Script Calls - These commands are used with script calls.
  35. # -----------------------------------------------------------------------------
  36. # $game_system.volume_change(:bgm, x)
  37. # $game_system.volume_change(:bgs, x)
  38. # $game_system.volume_change(:sfx, x)
  39. # Unlike the previous Yanfly Engines, this version does not bind volume to a
  40. # variable. Use the script call to change the bgm, bgs, or sfx sound rate by
  41. # x increment. Use a negative value to lower the volume.
  42. #
  43. # $game_system.set_autodash(true)
  44. # $game_system.set_autodash(false)
  45. # Turns autodash on (true) or off (false).
  46. #
  47. # $game_system.set_instantmsg(true)
  48. # $game_system.set_instantmsg(false)
  49. # Turns instant messages on (true) or off (false).
  50. #
  51. # $game_system.set_animations(true)
  52. # $game_system.set_animations(false)
  53. # Turns battle animations on (true) or off (false).
  54. #
  55. #==============================================================================
  56. # ▼ Compatibility
  57. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  58. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  59. # it will run with RPG Maker VX without adjusting.
  60. #
  61. #==============================================================================
  62.  
  63. module YEA
  64.   module SYSTEM
  65.  
  66.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  67.     # - General Setting -
  68.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.     # These are the general settings that govern the System settings. This will
  70.     # change the "Game End" vocab, and disable or enable autodash, instant
  71.     # messages, or animations by default.
  72.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  73.     COMMAND_NAME = "系统设置"     # Command name used to replace Game End.
  74.     DEFAULT_AUTODASH   = false   # Enable automatic dashing by default?
  75.     DEFAULT_INSTANTMSG = true   # Enable instant message text by default?
  76.     DEFAULT_ANIMATIONS = true    # Enable battle animations by default?
  77.  
  78.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  79.     # - Command Settings -
  80.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  81.     # These settings adjust the commands shown in the command list. Add, remove
  82.     # or rearrange the commands as you see fit. Here's a list of which commands
  83.     # do what:
  84.     #
  85.     # -------------------------------------------------------------------------
  86.     # :command         Description
  87.     # -------------------------------------------------------------------------
  88.     # :blank           Inserts an empty blank space.
  89.     #
  90.     # :window_red      Changes the red tone for all windows.
  91.     # :window_grn      Changes the green tone for all windows.
  92.     # :window_blu      Changes the blue tone for all windows.
  93.     #
  94.     # :volume_bgm      Changes the BGM volume used.
  95.     # :volume_bgs      Changes the BGS volume used.
  96.     # :volume_sfx      Changes the SFX volume used.
  97.     #
  98.     # :autodash        Sets the player to automatically dash.
  99.     # :instantmsg      Sets message text to appear instantly.
  100.     # :animations      Enables battle animations or disables them.
  101.     #
  102.     # :to_title        Returns to the title screen.
  103.     # :shutdown        Shuts down the game.
  104.     #
  105.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  106.     COMMANDS =[
  107.       :window_red,   # Changes the red tone for all windows.
  108.       :window_grn,   # Changes the green tone for all windows.
  109.       :window_blu,   # Changes the blue tone for all windows.
  110.       :volume_bgm,   # Changes the BGM volume used.
  111.       :volume_bgs,   # Changes the BGS volume used.
  112.       :volume_sfx,   # Changes the SFX volume used.
  113.       :blank,
  114.       :autodash,     # Sets the player to automatically dash.
  115.       :instantmsg,   # Sets message text to appear instantly.
  116.       :animations,   # Enables battle animations or disables them.
  117.     # :switch_1,     # Custom Switch 1. Adjust settings below.
  118.     # :switch_2,     # Custom Switch 2. Adjust settings below.
  119.     # :variable_1,   # Custom Variable 1. Adjust settings below.
  120.     # :variable_2,   # Custom Variable 2. Adjust settings below.
  121.       :blank,
  122.       :to_title,     # Returns to the title screen.
  123.       :shutdown,     # Shuts down the game.
  124.     ] # Do not remove this.
  125.  
  126.     #--------------------------------------------------------------------------
  127.     # - Custom Switches -
  128.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  129.     # If you want your game to have system options other than just the ones
  130.     # listed above, you can insert custom switches here to produce such an
  131.     # effect. Adjust the settings here as you see fit.
  132.     #--------------------------------------------------------------------------
  133.     CUSTOM_SWITCHES ={
  134.     # -------------------------------------------------------------------------
  135.     # :switch    => [Switch, Name, Off Text, On Text,
  136.     #                Help Window Description
  137.     #               ], # Do not remove this.
  138.     # -------------------------------------------------------------------------
  139.       :switch_1  => [ 1, "Custom Switch 1", "OFF", "ON",
  140.                      "Help description used for custom switch 1."
  141.                     ],
  142.     # -------------------------------------------------------------------------
  143.       :switch_2  => [ 2, "Custom Switch 2", "OFF", "ON",
  144.                      "Help description used for custom switch 2."
  145.                     ],
  146.     # -------------------------------------------------------------------------
  147.     } # Do not remove this.
  148.  
  149.     #--------------------------------------------------------------------------
  150.     # - Custom Variables -
  151.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  152.     # If you want your game to have system options other than just the ones
  153.     # listed above, you can insert custom variables here to produce such an
  154.     # effect. Adjust the settings here as you see fit.
  155.     #--------------------------------------------------------------------------
  156.     CUSTOM_VARIABLES ={
  157.     # -------------------------------------------------------------------------
  158.     # :variable   => [Switch, Name, Colour1, Colour2, Min, Max,
  159.     #                 Help Window Description
  160.     #                ], # Do not remove this.
  161.     # -------------------------------------------------------------------------
  162.       :variable_1 => [ 1, "Custom Variable 1", 9, 1, -100, 100,
  163.                       "Help description used for custom variable 1."
  164.                      ],
  165.     # -------------------------------------------------------------------------
  166.       :variable_2 => [ 2, "Custom Variable 2", 10, 2, -10, 10,
  167.                       "Help description used for custom variable 2."
  168.                      ],
  169.     # -------------------------------------------------------------------------
  170.     } # Do not remove this.
  171.  
  172.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  173.     # - Vocab Settings -
  174.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  175.     # This hash adjusts the vocab used for both the commands and the help
  176.     # description that appears above the command window. Note that for the
  177.     # command help descriptions, you may use text codes. Use \n to linebreak.
  178.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  179.     COMMAND_VOCAB ={
  180.     # -------------------------------------------------------------------------
  181.     # :command    => [Command Name, Option1, Option2
  182.     #                 Help Window Description,
  183.     #                ], # Do not remove this.
  184.     # -------------------------------------------------------------------------
  185.       :blank      => ["", "None", "None",
  186.                       ""
  187.                      ], # Do not remove this.
  188.     # -------------------------------------------------------------------------
  189.       :window_red => ["窗口红色", "None", "None",
  190.                       "调整窗口颜色.\n" +
  191.                       "按住shift可增加10."
  192.                      ], # Do not remove this.
  193.     # -------------------------------------------------------------------------
  194.       :window_grn => ["窗口青色", "None", "None",
  195.                       "调整窗口颜色.\n" +
  196.                       "按住shift可增加10."
  197.                      ], # Do not remove this.
  198.     # -------------------------------------------------------------------------
  199.       :window_blu => ["窗口蓝色", "None", "None",
  200.                       "调整窗口颜色.\n" +
  201.                       "按住shift可增加10."
  202.                      ], # Do not remove this.
  203.     # -------------------------------------------------------------------------
  204.       :volume_bgm => ["背景音乐", 12, 4, # Options 1 & 2 are Gauge Colours.
  205.                       "调整音乐音量.\n" +
  206.                       "按住shift可增加10."
  207.                      ], # Do not remove this.
  208.     # -------------------------------------------------------------------------
  209.       :volume_bgs => ["音效", 13, 5, # Options 1 & 2 are Gauge Colours.
  210.                       "调整音效音量.\n" +
  211.                       "按住shift可增加10."
  212.                      ], # Do not remove this.
  213.     # -------------------------------------------------------------------------
  214.       :volume_sfx => ["声效", 14, 6, # Options 1 & 2 are Gauge Colours.
  215.                       "调整按钮音量.\n" +
  216.                       "按住shift可增加10."
  217.                      ], # Do not remove this.
  218.     # -------------------------------------------------------------------------
  219.       :autodash   => ["自动加速", "正常", "加速",
  220.                       "调整行走速度."
  221.                      ], # Do not remove this.
  222.     # -------------------------------------------------------------------------
  223.       :instantmsg => ["对话显示", "普通", "快速",
  224.                       "调整对话显示."
  225.                      ], # Do not remove this.
  226.     # -------------------------------------------------------------------------
  227.       :animations => ["战斗动画", "隐藏", "显示",
  228.                       "调整动画播放."
  229.                      ], # Do not remove this.
  230.     # -------------------------------------------------------------------------
  231.       :to_title   => ["回到标题", "None", "None",
  232.                       "回到标题画面."
  233.                      ], # Do not remove this.
  234.     # -------------------------------------------------------------------------
  235.       :shutdown   => ["离开游戏", "None", "None",
  236.                       "关闭游戏."
  237.                      ], # Do not remove this.
  238.     # -------------------------------------------------------------------------
  239.     } # Do not remove this.
  240.  
  241.   end # SYSTEM
  242. end # YEA
  243.  
  244. #==============================================================================
  245. # ▼ Editting anything past this point may potentially result in causing
  246. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  247. # halitosis so edit at your own risk.
  248. #==============================================================================
  249.  
  250. #==============================================================================
  251. # ■ Vocab
  252. #==============================================================================
  253.  
  254. module Vocab
  255.  
  256.   #--------------------------------------------------------------------------
  257.   # overwrite method: self.game_end
  258.   #--------------------------------------------------------------------------
  259.   def self.game_end
  260.     return YEA::SYSTEM::COMMAND_NAME
  261.   end
  262.  
  263. end # Vocab
  264.  
  265. #==============================================================================
  266. # ■ RPG::BGM
  267. #==============================================================================
  268.  
  269. class RPG::BGM < RPG::AudioFile
  270.  
  271.   #--------------------------------------------------------------------------
  272.   # overwrite method: play
  273.   #--------------------------------------------------------------------------
  274.   def play(pos = 0)
  275.     if @name.empty?
  276.       Audio.bgm_stop
  277.       @@last = RPG::BGM.new
  278.     else
  279.       volume = @volume
  280.       volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
  281.       Audio.bgm_play('Audio/BGM/' + @name, volume, @pitch, pos)
  282.       @@last = self.clone
  283.     end
  284.   end
  285.  
  286. end # RPG::BGM
  287.  
  288. #==============================================================================
  289. # ■ RPG::ME
  290. #==============================================================================
  291.  
  292. class RPG::ME < RPG::AudioFile
  293.  
  294.   #--------------------------------------------------------------------------
  295.   # overwrite method: play
  296.   #--------------------------------------------------------------------------
  297.   def play
  298.     if @name.empty?
  299.       Audio.me_stop
  300.     else
  301.       volume = @volume
  302.       volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
  303.       Audio.me_play('Audio/ME/' + @name, volume, @pitch)
  304.     end
  305.   end
  306.  
  307. end # RPG::ME
  308.  
  309. #==============================================================================
  310. # ■ RPG::BGS
  311. #==============================================================================
  312.  
  313. class RPG::BGS < RPG::AudioFile
  314.  
  315.   #--------------------------------------------------------------------------
  316.   # overwrite method: play
  317.   #--------------------------------------------------------------------------
  318.   def play(pos = 0)
  319.     if @name.empty?
  320.       Audio.bgs_stop
  321.       @@last = RPG::BGS.new
  322.     else
  323.       volume = @volume
  324.       volume *= $game_system.volume(:bgs) * 0.01 unless $game_system.nil?
  325.       Audio.bgs_play('Audio/BGS/' + @name, volume, @pitch, pos)
  326.       @@last = self.clone
  327.     end
  328.   end
  329.  
  330. end # RPG::BGS
  331.  
  332. #==============================================================================
  333. # ■ RPG::SE
  334. #==============================================================================
  335.  
  336. class RPG::SE < RPG::AudioFile
  337.  
  338.   #--------------------------------------------------------------------------
  339.   # overwrite method: play
  340.   #--------------------------------------------------------------------------
  341.   def play
  342.     unless @name.empty?
  343.       volume = @volume
  344.       volume *= $game_system.volume(:sfx) * 0.01 unless $game_system.nil?
  345.       Audio.se_play('Audio/SE/' + @name, volume, @pitch)
  346.     end
  347.   end
  348.  
  349. end # RPG::SE
  350.  
  351. #==============================================================================
  352. # ■ Game_System
  353. #==============================================================================
  354.  
  355. class Game_System
  356.  
  357.   #--------------------------------------------------------------------------
  358.   # alias method: initialize
  359.   #--------------------------------------------------------------------------
  360.   alias game_system_initialize_so initialize
  361.   def initialize
  362.     game_system_initialize_so
  363.     init_volume_control
  364.     init_autodash
  365.     init_instantmsg
  366.     init_animations
  367.   end
  368.  
  369.   #--------------------------------------------------------------------------
  370.   # new method: init_volume_control
  371.   #--------------------------------------------------------------------------
  372.   def init_volume_control
  373.     @volume = {}
  374.     @volume[:bgm] = 100
  375.     @volume[:bgs] = 100
  376.     @volume[:sfx] = 100
  377.   end
  378.  
  379.   #--------------------------------------------------------------------------
  380.   # new method: volume
  381.   #--------------------------------------------------------------------------
  382.   def volume(type)
  383.     init_volume_control if @volume.nil?
  384.     return [[@volume[type], 0].max, 100].min
  385.   end
  386.  
  387.   #--------------------------------------------------------------------------
  388.   # new method: volume_change
  389.   #--------------------------------------------------------------------------
  390.   def volume_change(type, increment)
  391.     init_volume_control if @volume.nil?
  392.     @volume[type] += increment
  393.     @volume[type] = [[@volume[type], 0].max, 100].min
  394.   end
  395.  
  396.   #--------------------------------------------------------------------------
  397.   # new method: init_autodash
  398.   #--------------------------------------------------------------------------
  399.   def init_autodash
  400.     @autodash = YEA::SYSTEM::DEFAULT_AUTODASH
  401.   end
  402.  
  403.   #--------------------------------------------------------------------------
  404.   # new method: autodash?
  405.   #--------------------------------------------------------------------------
  406.   def autodash?
  407.     init_autodash if @autodash.nil?
  408.     return @autodash
  409.   end
  410.  
  411.   #--------------------------------------------------------------------------
  412.   # new method: set_autodash
  413.   #--------------------------------------------------------------------------
  414.   def set_autodash(value)
  415.     @autodash = value
  416.   end
  417.  
  418.   #--------------------------------------------------------------------------
  419.   # new method: init_instantmsg
  420.   #--------------------------------------------------------------------------
  421.   def init_instantmsg
  422.     @instantmsg = YEA::SYSTEM::DEFAULT_INSTANTMSG
  423.   end
  424.  
  425.   #--------------------------------------------------------------------------
  426.   # new method: instantmsg?
  427.   #--------------------------------------------------------------------------
  428.   def instantmsg?
  429.     init_instantmsg if @instantmsg.nil?
  430.     return @instantmsg
  431.   end
  432.  
  433.   #--------------------------------------------------------------------------
  434.   # new method: set_instantmsg
  435.   #--------------------------------------------------------------------------
  436.   def set_instantmsg(value)
  437.     @instantmsg = value
  438.   end
  439.  
  440.   #--------------------------------------------------------------------------
  441.   # new method: init_animations
  442.   #--------------------------------------------------------------------------
  443.   def init_animations
  444.     @animations = YEA::SYSTEM::DEFAULT_ANIMATIONS
  445.   end
  446.  
  447.   #--------------------------------------------------------------------------
  448.   # new method: animations?
  449.   #--------------------------------------------------------------------------
  450.   def animations?
  451.     init_animations if @animations.nil?
  452.     return @animations
  453.   end
  454.  
  455.   #--------------------------------------------------------------------------
  456.   # new method: set_animations
  457.   #--------------------------------------------------------------------------
  458.   def set_animations(value)
  459.     @animations = value
  460.   end
  461.  
  462. end # Game_System
  463.  
  464. #==============================================================================
  465. # ■ Game_Player
  466. #==============================================================================
  467.  
  468. class Game_Player < Game_Character
  469.  
  470.   #--------------------------------------------------------------------------
  471.   # alias method: dash?
  472.   #--------------------------------------------------------------------------
  473.   alias game_player_dash_so dash?
  474.   def dash?
  475.     if $game_system.autodash?
  476.       return false if @move_route_forcing
  477.       return false if $game_map.disable_dash?
  478.       return false if vehicle
  479.       return !Input.press?(:A)
  480.     else
  481.       return game_player_dash_so
  482.     end
  483.   end
  484.  
  485. end # Game_Player
  486.  
  487. #==============================================================================
  488. # ■ Scene_Battle
  489. #==============================================================================
  490.  
  491. class Scene_Battle < Scene_Base
  492.  
  493.   #--------------------------------------------------------------------------
  494.   # alias method: show_fast?
  495.   #--------------------------------------------------------------------------
  496.   alias scene_battle_show_fast_so show_fast?
  497.   def show_fast?
  498.     return true unless $game_system.animations?
  499.     return scene_battle_show_fast_so
  500.   end
  501.  
  502.   #--------------------------------------------------------------------------
  503.   # alias method: show_normal_animation
  504.   #--------------------------------------------------------------------------
  505.   alias scene_battle_show_normal_animation_so show_normal_animation
  506.   def show_normal_animation(targets, animation_id, mirror = false)
  507.     return unless $game_system.animations?
  508.     scene_battle_show_normal_animation_so(targets, animation_id, mirror)
  509.   end
  510.  
  511. end # Scene_Battle
  512.  
  513. #==============================================================================
  514. # ■ Window_Message
  515. #==============================================================================
  516.  
  517. class Window_Message < Window_Base
  518.  
  519.   #--------------------------------------------------------------------------
  520.   # alias method: clear_flags
  521.   #--------------------------------------------------------------------------
  522.   alias window_message_clear_flags_so clear_flags
  523.   def clear_flags
  524.     window_message_clear_flags_so
  525.     @show_fast = true if $game_system.instantmsg?
  526.   end
  527.  
  528. end # Window_Message
  529.  
  530. #==============================================================================
  531. # ■ Window_SystemOptions
  532. #==============================================================================
  533.  
  534. class Window_SystemOptions < Window_Command
  535.  
  536.   #--------------------------------------------------------------------------
  537.   # initialize
  538.   #--------------------------------------------------------------------------
  539.   def initialize(help_window)
  540.     @help_window = help_window
  541.     super(0, @help_window.height)
  542.     refresh
  543.   end
  544.  
  545.   #--------------------------------------------------------------------------
  546.   # window_width
  547.   #--------------------------------------------------------------------------
  548.   def window_width; return Graphics.width; end
  549.  
  550.   #--------------------------------------------------------------------------
  551.   # window_height
  552.   #--------------------------------------------------------------------------
  553.   def window_height; return Graphics.height - @help_window.height; end
  554.  
  555.   #--------------------------------------------------------------------------
  556.   # update_help
  557.   #--------------------------------------------------------------------------
  558.   def update_help
  559.     if current_symbol == :custom_switch || current_symbol == :custom_variable
  560.       text = @help_descriptions[current_ext]
  561.     else
  562.       text = @help_descriptions[current_symbol]
  563.     end
  564.     text = "" if text.nil?
  565.     @help_window.set_text(text)
  566.   end
  567.  
  568.   #--------------------------------------------------------------------------
  569.   # ok_enabled?
  570.   #--------------------------------------------------------------------------
  571.   def ok_enabled?
  572.     return true if [:to_title, :shutdown].include?(current_symbol)
  573.     return false
  574.   end
  575.  
  576.   #--------------------------------------------------------------------------
  577.   # make_command_list
  578.   #--------------------------------------------------------------------------
  579.   def make_command_list
  580.     @help_descriptions = {}
  581.     for command in YEA::SYSTEM::COMMANDS
  582.       case command
  583.       when :blank
  584.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  585.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  586.       when :window_red, :window_grn, :window_blu
  587.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  588.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  589.       when :volume_bgm, :volume_bgs, :volume_sfx
  590.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  591.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  592.       when :autodash, :instantmsg, :animations
  593.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  594.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  595.       when :to_title, :shutdown
  596.         add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
  597.         @help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
  598.       else
  599.         process_custom_switch(command)
  600.         process_custom_variable(command)
  601.       end
  602.     end
  603.   end
  604.  
  605.   #--------------------------------------------------------------------------
  606.   # process_custom_switch
  607.   #--------------------------------------------------------------------------
  608.   def process_custom_switch(command)
  609.     return unless YEA::SYSTEM::CUSTOM_SWITCHES.include?(command)
  610.     name = YEA::SYSTEM::CUSTOM_SWITCHES[command][1]
  611.     add_command(name, :custom_switch, true, command)
  612.     @help_descriptions[command] = YEA::SYSTEM::CUSTOM_SWITCHES[command][4]
  613.   end
  614.  
  615.   #--------------------------------------------------------------------------
  616.   # process_custom_variable
  617.   #--------------------------------------------------------------------------
  618.   def process_custom_variable(command)
  619.     return unless YEA::SYSTEM::CUSTOM_VARIABLES.include?(command)
  620.     name = YEA::SYSTEM::CUSTOM_VARIABLES[command][1]
  621.     add_command(name, :custom_variable, true, command)
  622.     @help_descriptions[command] = YEA::SYSTEM::CUSTOM_VARIABLES[command][6]
  623.   end
  624.  
  625.   #--------------------------------------------------------------------------
  626.   # draw_item
  627.   #--------------------------------------------------------------------------
  628.   def draw_item(index)
  629.     reset_font_settings
  630.     rect = item_rect(index)
  631.     contents.clear_rect(rect)
  632.     case @list[index][:symbol]
  633.     when :window_red, :window_grn, :window_blu
  634.       draw_window_tone(rect, index, @list[index][:symbol])
  635.     when :volume_bgm, :volume_bgs, :volume_sfx
  636.       draw_volume(rect, index, @list[index][:symbol])
  637.     when :autodash, :instantmsg, :animations
  638.       draw_toggle(rect, index, @list[index][:symbol])
  639.     when :to_title, :shutdown
  640.       draw_text(item_rect_for_text(index), command_name(index), 1)
  641.     when :custom_switch
  642.       draw_custom_switch(rect, index, @list[index][:ext])
  643.     when :custom_variable
  644.       draw_custom_variable(rect, index, @list[index][:ext])
  645.     end
  646.   end
  647.  
  648.   #--------------------------------------------------------------------------
  649.   # draw_window_tone
  650.   #--------------------------------------------------------------------------
  651.   def draw_window_tone(rect, index, symbol)
  652.     name = @list[index][:name]
  653.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  654.     #---
  655.     dx = contents.width / 2
  656.     tone = $game_system.window_tone
  657.     case symbol
  658.     when :window_red
  659.       rate = (tone.red + 255.0) / 510.0
  660.       colour1 = Color.new(128, 0, 0)
  661.       colour2 = Color.new(255, 0, 0)
  662.       value = tone.red.to_i
  663.     when :window_grn
  664.       rate = (tone.green + 255.0) / 510.0
  665.       colour1 = Color.new(0, 128, 0)
  666.       colour2 = Color.new(0, 255, 0)
  667.       value = tone.green.to_i
  668.     when :window_blu
  669.       rate = (tone.blue + 255.0) / 510.0
  670.       colour1 = Color.new(0, 0, 128)
  671.       colour2 = Color.new(0, 0, 255)
  672.       value = tone.blue.to_i
  673.     end
  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_volume
  680.   #--------------------------------------------------------------------------
  681.   def draw_volume(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 :volume_bgm
  688.       rate = $game_system.volume(:bgm)
  689.     when :volume_bgs
  690.       rate = $game_system.volume(:bgs)
  691.     when :volume_sfx
  692.       rate = $game_system.volume(:sfx)
  693.     end
  694.     colour1 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][1])
  695.     colour2 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][2])
  696.     value = sprintf("%d%%", rate)
  697.     rate *= 0.01
  698.     draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
  699.     draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
  700.   end
  701.  
  702.   #--------------------------------------------------------------------------
  703.   # draw_toggle
  704.   #--------------------------------------------------------------------------
  705.   def draw_toggle(rect, index, symbol)
  706.     name = @list[index][:name]
  707.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  708.     #---
  709.     dx = contents.width / 2
  710.     case symbol
  711.     when :autodash
  712.       enabled = $game_system.autodash?
  713.     when :instantmsg
  714.       enabled = $game_system.instantmsg?
  715.     when :animations
  716.       enabled = $game_system.animations?
  717.     end
  718.     dx = contents.width/2
  719.     change_color(normal_color, !enabled)
  720.     option1 = YEA::SYSTEM::COMMAND_VOCAB[symbol][1]
  721.     draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
  722.     dx += contents.width/4
  723.     change_color(normal_color, enabled)
  724.     option2 = YEA::SYSTEM::COMMAND_VOCAB[symbol][2]
  725.     draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
  726.   end
  727.  
  728.   #--------------------------------------------------------------------------
  729.   # cursor_right
  730.   #--------------------------------------------------------------------------
  731.   def draw_custom_switch(rect, index, ext)
  732.     name = @list[index][:name]
  733.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  734.     #---
  735.     dx = contents.width / 2
  736.     enabled = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
  737.     dx = contents.width/2
  738.     change_color(normal_color, !enabled)
  739.     option1 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][2]
  740.     draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
  741.     dx += contents.width/4
  742.     change_color(normal_color, enabled)
  743.     option2 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][3]
  744.     draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
  745.   end
  746.  
  747.   #--------------------------------------------------------------------------
  748.   # draw_custom_variable
  749.   #--------------------------------------------------------------------------
  750.   def draw_custom_variable(rect, index, ext)
  751.     name = @list[index][:name]
  752.     draw_text(0, rect.y, contents.width/2, line_height, name, 1)
  753.     #---
  754.     dx = contents.width / 2
  755.     value = $game_variables[YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]]
  756.     colour1 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][2])
  757.     colour2 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][3])
  758.     minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
  759.     maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
  760.     rate = (value - minimum).to_f / [(maximum - minimum).to_f, 0.01].max
  761.     dx = contents.width/2
  762.     draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
  763.     draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
  764.   end
  765.  
  766.   #--------------------------------------------------------------------------
  767.   # cursor_right
  768.   #--------------------------------------------------------------------------
  769.   def cursor_right(wrap = false)
  770.     cursor_change(:right)
  771.     super(wrap)
  772.   end
  773.  
  774.   #--------------------------------------------------------------------------
  775.   # cursor_left
  776.   #--------------------------------------------------------------------------
  777.   def cursor_left(wrap = false)
  778.     cursor_change(:left)
  779.     super(wrap)
  780.   end
  781.  
  782.   #--------------------------------------------------------------------------
  783.   # cursor_change
  784.   #--------------------------------------------------------------------------
  785.   def cursor_change(direction)
  786.     case current_symbol
  787.     when :window_red, :window_blu, :window_grn
  788.       change_window_tone(direction)
  789.     when :volume_bgm, :volume_bgs, :volume_sfx
  790.       change_volume(direction)
  791.     when :autodash, :instantmsg, :animations
  792.       change_toggle(direction)
  793.     when :custom_switch
  794.       change_custom_switch(direction)
  795.     when :custom_variable
  796.       change_custom_variables(direction)
  797.     end
  798.   end
  799.  
  800.   #--------------------------------------------------------------------------
  801.   # change_window_tone
  802.   #--------------------------------------------------------------------------
  803.   def change_window_tone(direction)
  804.     Sound.play_cursor
  805.     value = direction == :left ? -1 : 1
  806.     value *= 10 if Input.press?(:A)
  807.     tone = $game_system.window_tone.clone
  808.     case current_symbol
  809.     when :window_red; tone.red += value
  810.     when :window_grn; tone.green += value
  811.     when :window_blu; tone.blue += value
  812.     end
  813.     $game_system.window_tone = tone
  814.     draw_item(index)
  815.   end
  816.  
  817.   #--------------------------------------------------------------------------
  818.   # change_window_tone
  819.   #--------------------------------------------------------------------------
  820.   def change_volume(direction)
  821.     Sound.play_cursor
  822.     value = direction == :left ? -1 : 1
  823.     value *= 10 if Input.press?(:A)
  824.     case current_symbol
  825.     when :volume_bgm
  826.       $game_system.volume_change(:bgm, value)
  827.       RPG::BGM::last.play
  828.     when :volume_bgs
  829.       $game_system.volume_change(:bgs, value)
  830.       RPG::BGS::last.play
  831.     when :volume_sfx
  832.       $game_system.volume_change(:sfx, value)
  833.     end
  834.     draw_item(index)
  835.   end
  836.  
  837.   #--------------------------------------------------------------------------
  838.   # change_toggle
  839.   #--------------------------------------------------------------------------
  840.   def change_toggle(direction)
  841.     value = direction == :left ? false : true
  842.     case current_symbol
  843.     when :autodash
  844.       current_case = $game_system.autodash?
  845.       $game_system.set_autodash(value)
  846.     when :instantmsg
  847.       current_case = $game_system.instantmsg?
  848.       $game_system.set_instantmsg(value)
  849.     when :animations
  850.       current_case = $game_system.animations?
  851.       $game_system.set_animations(value)
  852.     end
  853.     Sound.play_cursor if value != current_case
  854.     draw_item(index)
  855.   end
  856.  
  857.   #--------------------------------------------------------------------------
  858.   # change_custom_switch
  859.   #--------------------------------------------------------------------------
  860.   def change_custom_switch(direction)
  861.     value = direction == :left ? false : true
  862.     ext = current_ext
  863.     current_case = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
  864.     $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]] = value
  865.     Sound.play_cursor if value != current_case
  866.     draw_item(index)
  867.   end
  868.  
  869.   #--------------------------------------------------------------------------
  870.   # change_custom_variables
  871.   #--------------------------------------------------------------------------
  872.   def change_custom_variables(direction)
  873.     Sound.play_cursor
  874.     value = direction == :left ? -1 : 1
  875.     value *= 10 if Input.press?(:A)
  876.     ext = current_ext
  877.     var = YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]
  878.     minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
  879.     maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
  880.     $game_variables[var] += value
  881.     $game_variables[var] = [[$game_variables[var], minimum].max, maximum].min
  882.     draw_item(index)
  883.   end
  884.  
  885. end # Window_SystemOptions
  886.  
  887. #==============================================================================
  888. # ■ Scene_Menu
  889. #==============================================================================
  890.  
  891. class Scene_Menu < Scene_MenuBase
  892.  
  893.   #--------------------------------------------------------------------------
  894.   # overwrite method: command_game_end
  895.   #--------------------------------------------------------------------------
  896.   def command_game_end
  897.     SceneManager.call(Scene_System)
  898.   end
  899.  
  900. end # Scene_Menu
  901.  
  902. #==============================================================================
  903. # ■ Scene_System
  904. #==============================================================================
  905.  
  906. class Scene_System < Scene_MenuBase
  907.  
  908.   #--------------------------------------------------------------------------
  909.   # start
  910.   #--------------------------------------------------------------------------
  911.   def start
  912.     super
  913.     create_help_window
  914.     create_command_window
  915.   end
  916.  
  917.   #--------------------------------------------------------------------------
  918.   # create_command_window
  919.   #--------------------------------------------------------------------------
  920.   def create_command_window
  921.     @command_window = Window_SystemOptions.new(@help_window)
  922.     @command_window.set_handler(:cancel, method(:return_scene))
  923.     @command_window.set_handler(:to_title, method(:command_to_title))
  924.     @command_window.set_handler(:shutdown, method(:command_shutdown))
  925.   end
  926.  
  927.   #--------------------------------------------------------------------------
  928.   # command_to_title
  929.   #--------------------------------------------------------------------------
  930.   def command_to_title
  931.     fadeout_all
  932.     SceneManager.goto(Scene_Title)
  933.   end
  934.  
  935.   #--------------------------------------------------------------------------
  936.   # command_shutdown
  937.   #--------------------------------------------------------------------------
  938.   def command_shutdown
  939.     fadeout_all
  940.     SceneManager.exit
  941.   end
  942.  
  943. end # Scene_System
  944.  
  945. #==============================================================================
  946. #
  947. # ▼ End of File
  948. #
  949. #==============================================================================


作者: lllzjsj    时间: 2013-9-26 23:05
喵呜喵5 发表于 2013-9-25 17:55
http://bbs.cgyouxi.com/home.php?mod=space&uid=291206&do=blog&id=11939

抱歉我用了之后,无论怎么调整数值都只是让文字瞬间显示了而已
作者: 喵呜喵5    时间: 2013-9-26 23:28
lllzjsj 发表于 2013-9-26 23:05
抱歉我用了之后,无论怎么调整数值都只是让文字瞬间显示了而已

你有没有添加其他的脚本?
没有的话,说下你所调的数值是多少
作者: 水壶里的阶梯    时间: 2013-9-27 19:32
是说......像是改变每个字的显示速度不让它一整句都出来吗?
像是每个字停3帧下一个字才显示这种?http://bbs.cgyouxi.com/forum.php?mod=viewthread&tid=247846
类似上面网址里4楼的那种?




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1