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

Project1

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

[已经解决] 如何搞出“设置”

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
109 小时
注册时间
2014-1-12
帖子
35
跳转到指定楼层
1
发表于 2014-9-20 14:19:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
就是在菜单里的,可以更改声音字体奔跑的

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

2
发表于 2014-9-20 21:03:08 | 只看该作者
  1. # Yanfly Engine Melody - System Game Options
  2. # Last Date Updated: 2010.06.12
  3. # Level: Normal
  4. #
  5. # System Game Options replaces the "Game End" scene found in the default RPG
  6. # Maker VX with a system options menu. In this menu, the player can readjust
  7. # sound volumes, automatic dashing, and more. This changes one of the unused
  8. # game end scene into something a whole lot more useful.
  9. #
  10. #===============================================================================
  11. # Updates
  12. # -----------------------------------------------------------------------------
  13. # o 2010.06.12 - Bugfix for disposing the skins window.
  14. # o 2010.05.14 - Finished Script.
  15. # o 2010.05.12 - Started Script.
  16. #===============================================================================
  17. # Instructions
  18. # -----------------------------------------------------------------------------
  19. # To install this script, open up your script editor and copy/paste this script
  20. # to an open slot below ? Materials but above ? Main. Remember to save.
  21. #
  22. # 1. Scroll down, adjust the various Switches and Variable values to something
  23. #    empty or predetermined.
  24. # 2. Make a "Windows" folder in your project's "Graphics" folder. Insert the
  25. #    window skins you want to use there and adjust the WINDOW_HASH accordingly.
  26. #
  27. #===============================================================================
  28. # Compatibility
  29. # -----------------------------------------------------------------------------
  30. # - Replaces ALL of Scene_End. Expect no functionality with any scripts that
  31. #   will also replace Scene_End.
  32. # - This script is made to be specifically compatible with Battle Engine Melody.
  33. #===============================================================================

  34. $imported = {} if $imported == nil
  35. $imported["SystemGameOptions"] = true

  36. module YEM
  37.   module SYSTEM

  38.     # This replaces the Game End title with the following text. And although
  39.     # script itself doesn't provide the icon, any script that may potentially
  40.     # link towards the System menu will reveal the System icon below.
  41.     TITLE = "系統設置"
  42.     ICON  = 134

  43.     #===========================================================================
  44.     # Game System Commands
  45.     # --------------------------------------------------------------------------
  46.     # The following adjusts the order at which you would like the menu system
  47.     # commands to appear. Here is the reference table to their command ID's.
  48.     #      :blank        - Blank Item.
  49.     #      :volume_bgm   - Adjusts BGM volume.
  50.     #      :volume_bgs   - Adjusts BGS volume.
  51.     #      :volume_sfx   - Adjusts SFX volume.
  52.     #      :animations   - Turns on/off battle animations.
  53.     #      :autocursor   - Requires BEM. Memorized cursor position.
  54.     #      :skill_help   - Requires BEM. Display skill help.
  55.     #      :next_actor   - Requires BEM. Automatic Next Actor.
  56.     #      :atb_active   - Requires BEM. Sets ATB type.
  57.     #      :atb_speed    - Requires BEM. Sets ATB speed.
  58.     #      :auto_dash    - Controls if need to hold down dash button to run.
  59.     #      :instant_text - Whether or not text appears instantly in messages.
  60.     #      :windowskin   - Changes the windowskin.
  61.     #      :return_title - Return back to the title screen.
  62.     #      :return_menu  - Return back to the menu screen.
  63.     #===========================================================================

  64.     # This array modifies the order your system menu options appear in from
  65.     # top to bottom. Rearrange them as you see fit or remove them if desired.
  66.     COMMANDS =[
  67.       :windowskin,   # Adjusts window skins.
  68.       :skill_help,   # Requires BEM. Shows skill help.
  69.       :atb_active,   # Requires BEM. Sets ATB type.
  70.       :atb_speeds,   # Requires BEM. Sets ATB speed.
  71.       :animations,   # Turns on/off battle animations.
  72.       :autocursor,   # Requires BEM. Memory cursor.
  73.       :next_actor,   # Requires BEM. Automatic Next Actor.
  74.       :bgm_volume,   # Adjusts BGM volume.
  75.       :bgs_volume,   # Adjusts BGS volume.
  76.       :sfx_volume,   # Adjusts SFX volume.
  77.       :auto_dash,    # Controls need to hold down dash button to run.
  78.       :instant_text, # Makes text appear instantly.
  79.       :blank,        # A blank space.
  80.       :return_title, # Return to the title screen.
  81.       :return_menu,  # Return back to the main menu.
  82.     ] # Do not remove this.

  83.     # The following hash determines what variables and switches are used to
  84.     # adjust the system options menu. It's very important that you bind the
  85.     # values to the proper variables and switches in order for your game to
  86.     # run properly. In addition to adjusting the switches, you also apply
  87.     # text descriptions of each of the items here, too.
  88.      OPTIONS ={
  89.     # Option => Value
  90.       :bgm_variable  => 190,  # Variable used to adjust BGM volume.
  91.       :bgm_mute_sw   => 201,  # Switch used to mute/unmute the BGM.
  92.         :bgm_volume  => "BGM 音量",
  93.         :bgm_des     => "设置BGM音量 左右鍵調節音量 確定鍵  切换有無BGM",
  94.       :bgs_variable  => 191,  # Variable used to adjust BGS volume.
  95.       :bgs_mute_sw   => 202,  # Switch used to mute/unmute the BGS.
  96.         :bgs_volume  => "BGS 音量",
  97.         :bgs_des     => "设置BGS音量 左右鍵調節音量 確定鍵  切换有無BGS",
  98.       :sfx_variable  => 192,  # Variable used to adjust SFX volume.
  99.       :sfx_mute_sw   => 203,  # Switch used to mute/unmute the SFX.
  100.         :sfx_volume  => "SE 音量",
  101.         :sfx_des     => "设置SE音量 左右鍵調節音量 確定鍵 切换有無SE",
  102.         :mute        => "静音",
  103.         :audio       => "音量 %d%%",
  104.       :atb_avariable => 193,  # Variable used for ATB Active Type.
  105.         :atb_aname   => "ActiveType",
  106.         :wait_0      => "Full",
  107.         :wait_0_des  => "ATB Gauge does not stop with battle menus open.",
  108.         :wait_1      => "Semi",
  109.         :wait_1_des  => "ATB Gauge stops during target selection.",
  110.         :wait_2      => "Stop",
  111.         :wait_2_des  => "ATB Gauge stops with battle menus open.",
  112.         :wait_3      => "Wait",
  113.         :wait_3_des  => "ATB Gauge stops with any member ready for action.",
  114.         :atb_svariable => 194,  # Variable used for ATB Speeds.
  115.         :atb_sname   => "Turn Speed",
  116.         :atb_s_des   => "Adjusts battle speed. Higher values are faster.",
  117.       :animation_sw  => 204,  # Switch used to display/hide animations.
  118.         :animations  => "動畫設定",
  119.         :ani_des     => "顯示/隱藏動畫",
  120.         :ani_show    => "隱藏",
  121.         :ani_hide    => "顯示",
  122.       :autocursor_sw => 205,  # Switch used for autocursors.
  123.         :autocursor  => "AutoCursor",
  124.         :curmem_des  => "Enables/Disables cursor memory for actions.",
  125.         :curmem_on   => "Memory",
  126.         :curmem_off  => "Reset",
  127.       :next_actor_sw => 206,  # Switch used for automatic next actor.
  128.         :next_actor  => "Next Actor",
  129.         :next_des    => "Move to next actor after selecting commands",
  130.         :next_on     => "Auto",
  131.         :next_off    => "Manual",
  132.       :skill_help_sw => 207,  # Switch used to enable skill help.
  133.         :skill_help  => "Skill Help",
  134.         :help_des    => "Display skill descriptions during battle phase.",
  135.         :help_on     => "Enabled",
  136.         :help_off    => "Disable",
  137.       :auto_dash_sw  => 208,  # Switch used to enable auto-dashing.
  138.         :auto_dash   => "自動跑步",
  139.         :dash_des    => "不需要按住Shift,角色会自动跑步",
  140.         :dash_on     => "跑步",
  141.         :dash_off    => "步行",
  142.       :inst_text_sw  => 209,  # Switch used to control instant text.
  143.         :instant_text => "即時文體",
  144.         :inst_des    => "文字会一次出现,而不是一個一個的出現",
  145.         :inst_on     => "即时",
  146.         :inst_off    => "正常",
  147.       :return_title  => "返回標題",
  148.         :retitle_des => "返回到標題菜單,返回前请存檔",
  149.       :return_menu   => "返回到主菜單",
  150.         :remenu_des  => "返回到主菜單",
  151.       :window_var    => 195,  # Variable used to change windowskins.
  152.         :windowskin  => "窗體",
  153.         :wind_des    => "更改遊戲窗口",
  154.     } # Do not remove this.

  155.     # This sets the default fonts used for your windows. Note that in this
  156.     # array, if a player doesn't have the font in front, it'll use the next one
  157.     # onward until the player does have that font installed.
  158.    DEFAULT = ["黑体"]
  159.    WRITING = [""]

  160.     # The following adjusts the window skins used for your game. Match the
  161.     # Window skins with the names accordingly. Within the windowskin hash,
  162.     # the following settings are adjusted as such:
  163.     #     Name - File Name
  164.     #     Opac - Back Opacity
  165.     #     Bold - Bold font?
  166.     #   Italic - Italic font?
  167.     #   Shadow - Use shadows?
  168.     #     Size - Font Size
  169.     #     Font - Font Set
  170.     DEFAULT_SKIN_VALUE  = 2
  171.     WINDOW_HASH ={
  172.     # Window ID => [      Name, Opac,      Bold, Italic, Shadow, Size,    Font],
  173.       1 => [  "基础窗口",     200, false,  false,   true,   16, DEFAULT],
  174.       2=>  [  "默认有爱",     200, false,  false,   true,   16, DEFAULT],
  175.       
  176.       
  177.     } # Do not remove this.

  178.   end # SYSTEM
  179. end # YEM

  180. #===============================================================================
  181. # Editting anything past this point may potentially result in causing computer
  182. # damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
  183. # Therefore, edit at your own risk.
  184. #===============================================================================

  185. #===============================================================================
  186. # Vocab
  187. #===============================================================================

  188. module Vocab

  189.   #--------------------------------------------------------------------------
  190.   # overwrite method: self.game_end
  191.   #--------------------------------------------------------------------------
  192.   def self.game_end
  193.     return YEM::SYSTEM::TITLE
  194.   end

  195. end # Vocab

  196. #===============================================================================
  197. # module Icon
  198. #===============================================================================

  199. module Icon

  200.   #--------------------------------------------------------------------------
  201.   # new method: self.system
  202.   #--------------------------------------------------------------------------
  203.   def self.system
  204.     return YEM::SYSTEM::ICON
  205.   end

  206. end # Icon

  207. #===============================================================================
  208. # module Cache
  209. #===============================================================================

  210. module Cache

  211.   #--------------------------------------------------------------------------
  212.   # new method: self.windows
  213.   #--------------------------------------------------------------------------
  214.   def self.windows(filename); load_bitmap("Graphics/Windows/", filename); end

  215. end # Cache
  216. YEM::SYSTEM::WINDOWSKIN_VARIABLE = YEM::SYSTEM::OPTIONS[:window_var]
  217. #===============================================================================
  218. # RPG::BGM
  219. #===============================================================================
  220. unless $imported["BattleEngineMelody"]
  221. module RPG
  222. class BGM < AudioFile

  223.   #--------------------------------------------------------------------------
  224.   # overwrite method: play
  225.   #--------------------------------------------------------------------------
  226.   def play
  227.     if @name.empty?
  228.       Audio.bgm_stop
  229.       @@last = BGM.new
  230.     else
  231.       vol = @volume
  232.       if $game_variables != nil
  233.         options = YEM::SYSTEM::OPTIONS
  234.         vol = vol * $game_variables[options[:bgm_variable]] / 100
  235.         vol = [[vol, 0].max, 100].min
  236.         vol = 0 if $game_switches[options[:bgm_mute_sw]]
  237.       end
  238.       Audio.bgm_play("Audio/BGM/" + @name, vol, @pitch)
  239.       @@last = self
  240.     end
  241.   end

  242. end # BGM
  243. class ME < AudioFile

  244.   #--------------------------------------------------------------------------
  245.   # overwrite method: play
  246.   #--------------------------------------------------------------------------
  247.   def play
  248.     if @name.empty?
  249.       Audio.me_stop
  250.     else
  251.       vol = @volume
  252.       if $game_variables != nil
  253.         options = YEM::SYSTEM::OPTIONS
  254.         vol = vol * $game_variables[options[:bgm_variable]] / 100
  255.         vol = [[vol, 0].max, 100].min
  256.         vol = 0 if $game_switches[options[:bgm_mute_sw]]
  257.       end
  258.       Audio.me_play("Audio/ME/" + @name, vol, @pitch)
  259.     end
  260.   end

  261. end # ME
  262. class BGS < AudioFile

  263.   #--------------------------------------------------------------------------
  264.   # overwrite method: play
  265.   #--------------------------------------------------------------------------
  266.   def play
  267.     if @name.empty?
  268.       Audio.bgs_stop
  269.       @@last = BGS.new
  270.     else
  271.       vol = @volume
  272.       if $game_variables != nil
  273.         options = YEM::SYSTEM::OPTIONS
  274.         vol = vol * $game_variables[options[:bgs_variable]] / 100
  275.         vol = [[vol, 0].max, 100].min
  276.         vol = 0 if $game_switches[options[:bgs_mute_sw]]
  277.       end
  278.       Audio.bgs_play("Audio/BGS/" + @name, vol, @pitch)
  279.       @@last = self
  280.     end
  281.   end

  282. end # BGS
  283. class SE < AudioFile

  284.   #--------------------------------------------------------------------------
  285.   # overwrite method: play
  286.   #--------------------------------------------------------------------------
  287.   def play
  288.     unless @name.empty?
  289.       vol = @volume
  290.       if $game_variables != nil
  291.         options = YEM::SYSTEM::OPTIONS
  292.         vol = vol * $game_variables[options[:sfx_variable]] / 100
  293.         vol = [[vol, 0].max, 100].min
  294.         vol = 0 if $game_switches[options[:sfx_mute_sw]]
  295.       end
  296.       Audio.se_play("Audio/SE/" + @name, vol, @pitch)
  297.     end
  298.   end

  299. end # SE
  300. end # RPG
  301. end # $imported["BattleEngineMelody"]
  302. #===============================================================================
  303. # Game_System
  304. #===============================================================================

  305. class Game_System

  306.   #--------------------------------------------------------------------------
  307.   # new method: create_system_options
  308.   #--------------------------------------------------------------------------
  309.   def create_system_options
  310.     return if @created_system_options
  311.     @created_system_options = true
  312.     options = YEM::SYSTEM::OPTIONS
  313.     $game_variables[options[:bgm_variable]] = 100
  314.     $game_variables[options[:bgs_variable]] = 100
  315.     $game_variables[options[:sfx_variable]] = 100
  316.     $game_switches[options[:bgm_mute_sw]] = false
  317.     $game_switches[options[:bgs_mute_sw]] = false
  318.     $game_switches[options[:sfx_mute_sw]] = false
  319.     $game_switches[options[:animation_sw]] = true
  320.     $game_switches[options[:autocursor_sw]] = true
  321.     $game_switches[options[:next_actor_sw]] = true
  322.     $game_switches[options[:skill_help_sw]] = false
  323.     $game_switches[options[:auto_dash_sw]] = false
  324.     $game_switches[options[:inst_text_sw]] = false
  325.     $game_variables[YEM::SYSTEM::WINDOWSKIN_VARIABLE] =
  326.       YEM::SYSTEM::DEFAULT_SKIN_VALUE
  327.   end

  328. end # Game_System

  329. #===============================================================================
  330. # Game_Player
  331. #===============================================================================

  332. class Game_Player < Game_Character

  333.   #--------------------------------------------------------------------------
  334.   # alias method: dash?
  335.   #--------------------------------------------------------------------------
  336.   alias dash_sgo dash? unless $@
  337.   def dash?
  338.     if $game_switches[YEM::SYSTEM::OPTIONS[:auto_dash_sw]]
  339.       return false if @move_route_forcing
  340.       return false if $game_map.disable_dash?
  341.       return false if in_vehicle?
  342.       return false if Input.press?(Input::A)
  343.       return true
  344.     else
  345.       return dash_sgo
  346.     end
  347.   end

  348. end # Game_Player

  349. #===============================================================================
  350. # Window
  351. #===============================================================================

  352. class Window

  353.   #--------------------------------------------------------------------------
  354.   # update windowskin
  355.   #--------------------------------------------------------------------------
  356.   def update_windowskin
  357.     return if $game_variables == nil
  358.     variable = YEM::SYSTEM::WINDOWSKIN_VARIABLE
  359.     if $game_variables[variable] == 0
  360.       $game_variables[variable] = YEM::SYSTEM::DEFAULT_SKIN_VALUE
  361.     elsif !YEM::SYSTEM::WINDOW_HASH.include?($game_variables[variable])
  362.       $game_variables[variable] = YEM::SYSTEM::DEFAULT_SKIN_VALUE
  363.     end
  364.     skin = YEM::SYSTEM::WINDOW_HASH[$game_variables[variable]]
  365.     change_settings(skin)
  366.   end

  367.   #--------------------------------------------------------------------------
  368.   # change_settings
  369.   #--------------------------------------------------------------------------
  370.   def change_settings(skin)
  371.     self.windowskin = Cache.windows(skin[0])
  372.     self.back_opacity = skin[1]
  373.     self.contents.font.bold = Font.default_bold = skin[2]
  374.     self.contents.font.italic = Font.default_italic = skin[3]
  375.     self.contents.font.shadow = Font.default_shadow = skin[4]
  376.     self.contents.font.size = Font.default_size = skin[5]
  377.     self.contents.font.name = Font.default_name = skin[6]
  378.     self.contents.font.color = normal_color
  379.   end

  380. end # Window

  381. #===============================================================================
  382. # Window_Base
  383. #===============================================================================

  384. class Window_Base < Window

  385.   #--------------------------------------------------------------------------
  386.   # alias method: initialize
  387.   #--------------------------------------------------------------------------
  388.   alias initialize_window_sgo initialize unless $@
  389.   def initialize(x, y, width, height)
  390.     initialize_window_sgo(x, y, width, height)
  391.     self.update_windowskin
  392.   end

  393.   #--------------------------------------------------------------------------
  394.   # alias method: create_contents
  395.   #--------------------------------------------------------------------------
  396.   alias create_contents_base_sgo create_contents unless $@
  397.   def create_contents
  398.     create_contents_base_sgo
  399.     self.contents.font.color = normal_color
  400.   end

  401. end # Window_Base

  402. #===============================================================================
  403. # Window_Selectable
  404. #===============================================================================

  405. class Window_Selectable < Window_Base

  406.   #--------------------------------------------------------------------------
  407.   # alias method: create_contents
  408.   #--------------------------------------------------------------------------
  409.   alias create_contents_selectable_sgo create_contents unless $@
  410.   def create_contents
  411.     create_contents_selectable_sgo
  412.     self.contents.font.color = normal_color
  413.   end

  414. end # Window_Selectable

  415. #===============================================================================
  416. # Window_SaveFile
  417. #===============================================================================

  418. class Window_SaveFile < Window_Base

  419.   #--------------------------------------------------------------------------
  420.   # alias method: refresh
  421.   #--------------------------------------------------------------------------
  422.   alias refresh_savefile_mso refresh unless $@
  423.   def refresh
  424.     if @file_exist
  425.       n = @game_variables[YEM::SYSTEM::WINDOWSKIN_VARIABLE]
  426.       if n == 0 or !YEM::SYSTEM::WINDOW_HASH.include?(n)
  427.         n = YEM::SYSTEM::DEFAULT_SKIN_VALUE
  428.       end
  429.       skin = YEM::SYSTEM::WINDOW_HASH[n]
  430.       change_settings(skin)
  431.     end
  432.     refresh_savefile_mso
  433.   end

  434. end # Window_SaveFile

  435. #===============================================================================
  436. # Window_Message
  437. #===============================================================================

  438. class Window_Message < Window_Selectable

  439.   #--------------------------------------------------------------------------
  440.   # alias method: update_show_fast
  441.   #--------------------------------------------------------------------------
  442.   alias update_show_fast_sgo update_show_fast unless $@
  443.   def update_show_fast
  444.     if $game_switches[YEM::SYSTEM::OPTIONS[:inst_text_sw]]
  445.       if self.pause or self.openness < 255
  446.         @show_fast = false
  447.       else
  448.         @show_fast = true
  449.       end
  450.       if @show_fast and @wait_count > 0
  451.         @wait_count -= 1
  452.       end
  453.     else
  454.       update_show_fast_sgo
  455.     end
  456.   end

  457.   #--------------------------------------------------------------------------
  458.   # alias method: new_page
  459.   #--------------------------------------------------------------------------
  460.   alias new_page_sgo new_page unless $@
  461.   def new_page
  462.     self.update_windowskin
  463.     new_page_sgo
  464.   end

  465. end # Window_Message

  466. #===============================================================================
  467. # Window_SystemOptions
  468. #===============================================================================

  469. class Window_SystemOptions < Window_Selectable

  470.   #--------------------------------------------------------------------------
  471.   # initialize
  472.   #--------------------------------------------------------------------------
  473.   def initialize(help_window)
  474.     dy = help_window.height
  475.     dh = Graphics.height - dy
  476.     super(0, dy, Graphics.width, dh)
  477.     self.opacity = 0
  478.     self.index = 0
  479.     refresh
  480.     @help_window = help_window
  481.     update_help
  482.   end

  483.   #--------------------------------------------------------------------------
  484.   # item
  485.   #--------------------------------------------------------------------------
  486.   def item; return @data[self.index]; end

  487.   #--------------------------------------------------------------------------
  488.   # refresh
  489.   #--------------------------------------------------------------------------
  490.   def refresh
  491.     @data = []
  492.     for command in YEM::SYSTEM::COMMANDS
  493.       case command
  494.       when :windowskin, :animations, :bgm_volume, :sfx_volume, :bgs_volume,
  495.       :auto_dash, :instant_text, :blank, :return_title, :return_menu
  496.       when :skill_help, :atb_active, :atb_speeds, :autocursor, :next_actor
  497.         next unless $imported["BattleEngineMelody"]
  498.         if [:atb_active, :atb_speeds].include?(command)
  499.           type = $game_variables[YEM::BATTLE_ENGINE::BATTLE_TYPE_VARIABLE]
  500.           next unless type == 2
  501.         end
  502.       else; next
  503.       end
  504.       @data.push(command)
  505.     end
  506.     @item_max = @data.size
  507.     create_contents
  508.     for i in 0...@item_max; draw_item(i); end
  509.   end

  510.   #--------------------------------------------------------------------------
  511.   # draw_item
  512.   #--------------------------------------------------------------------------
  513.   def draw_item(index)
  514.     rect = item_rect(index)
  515.     self.contents.clear_rect(rect)
  516.     obj = @data[index]
  517.     return if obj == nil
  518.     case obj
  519.     when :windowskin
  520.       draw_window_item(obj, rect.clone)
  521.     when :bgm_volume, :sfx_volume, :bgs_volume
  522.       draw_volume_item(obj, rect.clone)
  523.     when :animations, :autocursor, :next_actor, :skill_help,
  524.     :auto_dash, :instant_text
  525.       draw_switch_item(obj, rect.clone)
  526.     when :atb_active, :atb_speeds
  527.       draw_atb_item(obj, rect.clone)
  528.     when :return_title, :return_menu
  529.       draw_solo_item(obj, rect.clone)
  530.     end
  531.   end

  532.   #--------------------------------------------------------------------------
  533.   # draw_window_item
  534.   #--------------------------------------------------------------------------
  535.   def draw_window_item(obj, rect)
  536.     title = YEM::SYSTEM::OPTIONS[:windowskin]
  537.     self.contents.font.color = normal_color
  538.     self.contents.draw_text(rect.x, rect.y, rect.width/2, WLH, title, 1)
  539.     dx = rect.x + rect.width/2
  540.     skin_id = $game_variables[YEM::SYSTEM::WINDOWSKIN_VARIABLE]
  541.     skin_name = YEM::SYSTEM::WINDOW_HASH[skin_id][0]
  542.     dx = rect.x + rect.width/2
  543.     self.contents.draw_text(dx, rect.y, rect.width/2, WLH, skin_name, 1)
  544.   end

  545.   #--------------------------------------------------------------------------
  546.   # draw_volume_item
  547.   #--------------------------------------------------------------------------
  548.   def draw_volume_item(obj, rect)
  549.     options = YEM::SYSTEM::OPTIONS
  550.     case obj
  551.     when :bgm_volume
  552.       title = options[:bgm_volume]
  553.       value = $game_variables[options[:bgm_variable]]
  554.       mute  = $game_switches[options[:bgm_mute_sw]]
  555.     when :bgs_volume
  556.       title = options[:bgs_volume]
  557.       value = $game_variables[options[:bgs_variable]]
  558.       mute  = $game_switches[options[:bgs_mute_sw]]
  559.     when :sfx_volume
  560.       title = options[:sfx_volume]
  561.       value = $game_variables[options[:sfx_variable]]
  562.       mute  = $game_switches[options[:sfx_mute_sw]]
  563.     else; return
  564.     end
  565.     value = sprintf(options[:audio], value)
  566.     self.contents.font.color = normal_color
  567.     self.contents.draw_text(rect.x, rect.y, rect.width/2, WLH, title, 1)
  568.     self.contents.font.color.alpha = mute ? 128 : 255
  569.     dx = rect.x + rect.width/2
  570.     self.contents.draw_text(dx, rect.y, rect.width/4, WLH, value, 1)
  571.     self.contents.font.color.alpha = mute ? 255 : 128
  572.     dx = rect.x + rect.width*3/4
  573.     self.contents.draw_text(dx, rect.y, rect.width/4, WLH, options[:mute], 1)
  574.   end

  575.   #--------------------------------------------------------------------------
  576.   # draw_switch_item
  577.   #--------------------------------------------------------------------------
  578.   def draw_switch_item(obj, rect)
  579.     options = YEM::SYSTEM::OPTIONS
  580.     title = options[obj]
  581.     case obj
  582.     when :animations
  583.       name1 = options[:ani_show]
  584.       name2 = options[:ani_hide]
  585.       toggle = $game_switches[options[:animation_sw]]
  586.     when :autocursor
  587.       name1 = options[:curmem_on]
  588.       name2 = options[:curmem_off]
  589.       toggle = $game_switches[options[:autocursor_sw]]
  590.     when :next_actor
  591.       name1 = options[:next_on]
  592.       name2 = options[:next_off]
  593.       toggle = $game_switches[options[:next_actor_sw]]
  594.     when :skill_help
  595.       name1 = options[:help_on]
  596.       name2 = options[:help_off]
  597.       toggle = $game_switches[options[:skill_help_sw]]
  598.     when :cinematics
  599.       name1 = options[:cinem_on]
  600.       name2 = options[:cinem_off]
  601.       toggle = $game_switches[options[:cinematics_sw]]
  602.     when :auto_dash
  603.       name1 = options[:dash_on]
  604.       name2 = options[:dash_off]
  605.       toggle = $game_switches[options[:auto_dash_sw]]
  606.     when :instant_text
  607.       name1 = options[:inst_on]
  608.       name2 = options[:inst_off]
  609.       toggle = $game_switches[options[:inst_text_sw]]
  610.     else; return
  611.     end
  612.     self.contents.font.color = normal_color
  613.     self.contents.draw_text(rect.x, rect.y, rect.width/2, WLH, title, 1)
  614.     self.contents.font.color.alpha = toggle ? 255 : 128
  615.     dx = rect.x + rect.width/2
  616.     self.contents.draw_text(dx, rect.y, rect.width/4, WLH, name1, 1)
  617.     self.contents.font.color.alpha = toggle ? 128 : 255
  618.     dx = rect.x + rect.width*3/4
  619.     self.contents.draw_text(dx, rect.y, rect.width/4, WLH, name2, 1)
  620.   end

  621.   #--------------------------------------------------------------------------
  622.   # draw_atb_item
  623.   #--------------------------------------------------------------------------
  624.   def draw_atb_item(obj, rect)
  625.     options = YEM::SYSTEM::OPTIONS
  626.     case obj
  627.     when :atb_active
  628.       title = options[:atb_aname]
  629.       value = $game_variables[options[:atb_avariable]]
  630.       #---
  631.       self.contents.font.color = normal_color
  632.       name1 = options[:wait_0]
  633.       dx = rect.x + rect.width/2
  634.       self.contents.font.color.alpha = (value == 0) ? 255 : 128
  635.       self.contents.draw_text(dx, rect.y, rect.width/8, WLH, name1, 1)
  636.       name2 = options[:wait_1]
  637.       dx = rect.x + rect.width*5/8
  638.       self.contents.font.color.alpha = (value == 1) ? 255 : 128
  639.       self.contents.draw_text(dx, rect.y, rect.width/8, WLH, name2, 1)
  640.       name3 = options[:wait_2]
  641.       dx = rect.x + rect.width*6/8
  642.       self.contents.font.color.alpha = (value == 2) ? 255 : 128
  643.       self.contents.draw_text(dx, rect.y, rect.width/8, WLH, name3, 1)
  644.       name4 = options[:wait_3]
  645.       dx = rect.x + rect.width*7/8
  646.       self.contents.font.color.alpha = (value == 3) ? 255 : 128
  647.       self.contents.draw_text(dx, rect.y, rect.width/8, WLH, name4, 1)
  648.       #---
  649.     when :atb_speeds
  650.       title = options[:atb_sname]
  651.       value = $game_variables[options[:atb_svariable]] - 1
  652.       #---
  653.       for i in 0...10
  654.         self.contents.font.color = normal_color
  655.         name = (i + 1).to_s
  656.         dx = rect.x + rect.width * (10 + i)/20
  657.         self.contents.font.color.alpha = (value == i) ? 255 : 128
  658.         self.contents.draw_text(dx, rect.y, rect.width/20, WLH, name, 1)
  659.       end
  660.       #---
  661.     else; return
  662.     end
  663.     self.contents.font.color = normal_color
  664.     self.contents.draw_text(rect.x, rect.y, rect.width/2, WLH, title, 1)
  665.   end

  666.   #--------------------------------------------------------------------------
  667.   # draw_solo_item
  668.   #--------------------------------------------------------------------------
  669.   def draw_solo_item(obj, rect)
  670.     options = YEM::SYSTEM::OPTIONS
  671.     case obj
  672.     when :return_title, :return_menu
  673.       text = options[obj]
  674.     else; return
  675.     end
  676.     self.contents.font.color = normal_color
  677.     self.contents.draw_text(rect.x, rect.y, rect.width, WLH, text, 1)
  678.   end

  679.   #--------------------------------------------------------------------------
  680.   # update
  681.   #--------------------------------------------------------------------------
  682.   def update
  683.     super
  684.     if Input.trigger?(Input::C)
  685.       input_case_c
  686.     elsif Input.repeat?(Input::LEFT)
  687.       input_case_left
  688.     elsif Input.repeat?(Input::RIGHT)
  689.       input_case_right
  690.     end
  691.   end

  692.   #--------------------------------------------------------------------------
  693.   # input_case_c
  694.   #--------------------------------------------------------------------------
  695.   def input_case_c
  696.     options = YEM::SYSTEM::OPTIONS
  697.     case item
  698.     when :windowskin
  699.       Sound.play_decision
  700.       $scene.open_skins_window
  701.       return
  702.     when :bgm_volume; switch = options[:bgm_mute_sw]
  703.     when :bgs_volume; switch = options[:bgs_mute_sw]
  704.     when :sfx_volume; switch = options[:sfx_mute_sw]
  705.     when :animations; switch = options[:animation_sw]
  706.     when :autocursor; switch = options[:autocursor_sw]
  707.     when :next_actor; switch = options[:next_actor_sw]
  708.     when :skill_help; switch = options[:skill_help_sw]
  709.     when :cinematics; switch = options[:cinematics_sw]
  710.     when :auto_dash;  switch = options[:auto_dash_sw]
  711.     when :instant_text; switch = options[:inst_text_sw]
  712.     when :return_title
  713.       $scene.command_to_title
  714.       return
  715.     when :return_menu
  716.       Sound.play_decision
  717.       $scene.return_scene
  718.       return
  719.     else; return
  720.     end
  721.     $game_switches[switch] = !$game_switches[switch]
  722.     Sound.play_decision
  723.     RPG::BGM::last.play if item == :bgm_volume
  724.     RPG::BGS::last.play if item == :bgs_volume
  725.     draw_item(self.index)
  726.   end

  727.   #--------------------------------------------------------------------------
  728.   # input_case_left
  729.   #--------------------------------------------------------------------------
  730.   def input_case_left
  731.     options = YEM::SYSTEM::OPTIONS
  732.     ignore = false
  733.     case item
  734.     when :bgm_volume, :bgs_volume, :sfx_volume
  735.       value = Input.press?(Input::SHIFT) ? 10 : 1
  736.       case item
  737.       when :bgm_volume; variable = options[:bgm_variable]
  738.       when :bgs_volume; variable = options[:bgs_variable]
  739.       when :sfx_volume; variable = options[:sfx_variable]
  740.       end
  741.       return if $game_variables[variable] == 0
  742.       $game_variables[variable] -= value
  743.       $game_variables[variable] = [$game_variables[variable], 0].max
  744.       ignore = true
  745.     when :atb_active
  746.       variable = options[:atb_avariable]
  747.       return if $game_variables[variable] == 0
  748.       $game_variables[variable] -= 1
  749.       $game_variables[variable] = [$game_variables[variable], 0].max
  750.       ignore = true
  751.     when :atb_speeds
  752.       variable = options[:atb_svariable]
  753.       return if $game_variables[variable] == 1
  754.       $game_variables[variable] -= 1
  755.       $game_variables[variable] = [$game_variables[variable], 1].max
  756.       ignore = true
  757.     when :animations; switch = options[:animation_sw]
  758.     when :autocursor; switch = options[:autocursor_sw]
  759.     when :next_actor; switch = options[:next_actor_sw]
  760.     when :skill_help; switch = options[:skill_help_sw]
  761.     when :cinematics; switch = options[:cinematics_sw]
  762.     when :auto_dash;  switch = options[:auto_dash_sw]
  763.     when :instant_text; switch = options[:inst_text_sw]
  764.     else; return
  765.     end
  766.     unless ignore
  767.       return if $game_switches[switch]
  768.       $game_switches[switch] = true
  769.     end
  770.     Sound.play_cursor
  771.     RPG::BGM::last.play if item == :bgm_volume
  772.     RPG::BGS::last.play if item == :bgs_volume
  773.     draw_item(self.index)
  774.   end

  775.   #--------------------------------------------------------------------------
  776.   # input_case_right
  777.   #--------------------------------------------------------------------------
  778.   def input_case_right
  779.     options = YEM::SYSTEM::OPTIONS
  780.     ignore = false
  781.     case item
  782.     when :bgm_volume, :bgs_volume, :sfx_volume
  783.       value = Input.press?(Input::SHIFT) ? 10 : 1
  784.       case item
  785.       when :bgm_volume; variable = options[:bgm_variable]
  786.       when :bgs_volume; variable = options[:bgs_variable]
  787.       when :sfx_volume; variable = options[:sfx_variable]
  788.       end
  789.       return if $game_variables[variable] == 100
  790.       $game_variables[variable] += value
  791.       $game_variables[variable] = [$game_variables[variable], 100].min
  792.       ignore = true
  793.     when :atb_active
  794.       variable = options[:atb_avariable]
  795.       return if $game_variables[variable] == 3
  796.       $game_variables[variable] += 1
  797.       $game_variables[variable] = [$game_variables[variable], 3].min
  798.       ignore = true
  799.     when :atb_speeds
  800.       variable = options[:atb_svariable]
  801.       return if $game_variables[variable] == 10
  802.       $game_variables[variable] += 1
  803.       $game_variables[variable] = [$game_variables[variable], 10].min
  804.       ignore = true
  805.     when :animations; switch = options[:animation_sw]
  806.     when :autocursor; switch = options[:autocursor_sw]
  807.     when :next_actor; switch = options[:next_actor_sw]
  808.     when :skill_help; switch = options[:skill_help_sw]
  809.     when :cinematics; switch = options[:cinematics_sw]
  810.     when :auto_dash;  switch = options[:auto_dash_sw]
  811.     when :instant_text; switch = options[:inst_text_sw]
  812.     else; return
  813.     end
  814.     unless ignore
  815.       return if !$game_switches[switch]
  816.       $game_switches[switch] = false
  817.     end
  818.     Sound.play_cursor
  819.     RPG::BGM::last.play if item == :bgm_volume
  820.     RPG::BGS::last.play if item == :bgs_volume
  821.     draw_item(self.index)
  822.   end

  823.   #--------------------------------------------------------------------------
  824.   # update_help
  825.   #--------------------------------------------------------------------------
  826.   def update_help
  827.     case item
  828.     when :bgm_volume; type = :bgm_des
  829.     when :bgs_volume; type = :bgs_des
  830.     when :sfx_volume; type = :sfx_des
  831.     when :animations; type = :ani_des
  832.     when :autocursor; type = :curmem_des
  833.     when :next_actor; type = :next_des
  834.     when :skill_help; type = :help_des
  835.     when :cinematics; type = :cinem_des
  836.     when :windowskin; type = :wind_des
  837.     when :auto_dash;  type = :dash_des
  838.     when :instant_text; type = :inst_des
  839.     when :return_title; type = :retitle_des
  840.     when :return_menu;  type = :remenu_des
  841.     when :atb_active
  842.       case $game_variables[YEM::SYSTEM::OPTIONS[:atb_avariable]]
  843.       when 0; type = :wait_0_des
  844.       when 1; type = :wait_1_des
  845.       when 2; type = :wait_2_des
  846.       when 3: type = :wait_3_des
  847.       end
  848.     when :atb_speeds; type = :atb_s_des
  849.     else; type = nil
  850.     end
  851.     text = YEM::SYSTEM::OPTIONS[type].to_s
  852.     @help_window.set_text(text, 1)
  853.   end

  854. end # Window_SystemOptions

  855. #===============================================================================
  856. # Window_Skins
  857. #===============================================================================

  858. class Window_Skins < Window_Selectable

  859.   #--------------------------------------------------------------------------
  860.   # initialize
  861.   #--------------------------------------------------------------------------
  862.   def initialize
  863.     dx = Graphics.width/4
  864.     dw = Graphics.width/2
  865.     dh = Graphics.height - 112
  866.     super(dx, 56, dw, dh)
  867.     @column_max = 1
  868.     self.index = 0
  869.     self.back_opacity = 255
  870.     self.openness = 0
  871.     self.active = false
  872.     refresh
  873.   end

  874.   #--------------------------------------------------------------------------
  875.   # refresh
  876.   #--------------------------------------------------------------------------
  877.   def refresh
  878.     @data = []
  879.     variable = $game_variables[YEM::SYSTEM::WINDOWSKIN_VARIABLE]
  880.     hash = YEM::SYSTEM::WINDOW_HASH.sort{ |a,b| a[0] <=> b[0] }
  881.     for key in hash
  882.       @data.push(key[0])
  883.       self.index = key[0] - 1 if key[0] == $game_variables[variable]
  884.     end
  885.     @item_max = @data.size
  886.     create_contents
  887.     for i in 0...@item_max
  888.       draw_item(i)
  889.     end
  890.   end

  891.   #--------------------------------------------------------------------------
  892.   # draw_item
  893.   #--------------------------------------------------------------------------
  894.   def draw_item(index)
  895.     rect = item_rect(index)
  896.     self.contents.clear_rect(rect)
  897.     rect.width -= 4
  898.     text = YEM::SYSTEM::WINDOW_HASH[@data[index]][0]
  899.     self.contents.draw_text(rect, text, 1)
  900.   end

  901. end # Window_Skins

  902. #===============================================================================
  903. # Scene_Title
  904. #===============================================================================

  905. class Scene_Title < Scene_Base

  906.   #--------------------------------------------------------------------------
  907.   # alias method: create_game_objects
  908.   #--------------------------------------------------------------------------
  909.   alias create_game_objects_sgo create_game_objects unless $@
  910.   def create_game_objects
  911.     create_game_objects_sgo
  912.     $game_system.create_system_options
  913.   end

  914. end # Scene_Title

  915. #===============================================================================
  916. # Scene_Map
  917. #===============================================================================

  918. class Scene_Map < Scene_Base

  919.   #--------------------------------------------------------------------------
  920.   # alias method: start
  921.   #--------------------------------------------------------------------------
  922.   alias start_sgo start unless $@
  923.   def start
  924.     $game_system.create_system_options
  925.     start_sgo
  926.   end

  927. end # Scene_Map

  928. #===============================================================================
  929. # Scene_Battle
  930. #===============================================================================

  931. class Scene_Battle < Scene_Base

  932.   #--------------------------------------------------------------------------
  933.   # alias method: display_normal_animation
  934.   #--------------------------------------------------------------------------
  935.   unless $imported["BattleEngineMelody"]
  936.   alias display_normal_animation_sgo display_normal_animation unless $@
  937.   def display_normal_animation(targets, animation_id, mirror = false)
  938.     return if $game_switches[YEM::SYSTEM::OPTIONS[:animation_sw]]
  939.     display_normal_animation_sgo(targets, animation_id, mirror)
  940.   end
  941.   end # $imported["BattleEngineMelody"]

  942. end # Scene_Battle

  943. #===============================================================================
  944. # Scene_End
  945. #===============================================================================

  946. class Scene_End < Scene_Base

  947.   #--------------------------------------------------------------------------
  948.   # public instance variables
  949.   #--------------------------------------------------------------------------
  950.   attr_accessor :window_var

  951.   #--------------------------------------------------------------------------
  952.   # overwrite method: start
  953.   #--------------------------------------------------------------------------
  954.   def start
  955.     super
  956.     create_menu_background
  957.     @sprite = Sprite.new
  958.     #导入在system里的图片
  959.     @sprite.bitmap = Cache.system("天使1")
  960.     @window_var = YEM::SYSTEM::WINDOWSKIN_VARIABLE
  961.     @help_window = Window_Help.new
  962.     @options_window = Window_SystemOptions.new(@help_window)
  963.     @skins_window = Window_Skins.new
  964.   end

  965.   #--------------------------------------------------------------------------
  966.   # overwrite method: post_start
  967.   #--------------------------------------------------------------------------
  968.   def post_start; super; end
  969.   #--------------------------------------------------------------------------
  970.   # overwrite method: pre_terminate
  971.   #--------------------------------------------------------------------------
  972.   def pre_terminate; super; end
  973.   #--------------------------------------------------------------------------
  974.   # overwrite method: close_command_window
  975.   #--------------------------------------------------------------------------
  976.   def close_command_window; end
  977.   #--------------------------------------------------------------------------
  978.   # overwrite method: terminate
  979.   #--------------------------------------------------------------------------
  980.   def terminate
  981.     super
  982.     @sprite.bitmap.dispose
  983.     @help_window.dispose
  984.     @options_window.dispose
  985.     @skins_window.dispose
  986.     dispose_menu_background
  987.   end
  988.   #--------------------------------------------------------------------------
  989.   # overwrite method: update
  990.   #--------------------------------------------------------------------------
  991.   def update
  992.     super
  993.     @help_window.update
  994.     @skins_window.update
  995.     update_menu_background
  996.     if @options_window.active
  997.       update_options_window
  998.     elsif @skins_window.active
  999.       update_skins_window
  1000.     end
  1001.   end

  1002.   #--------------------------------------------------------------------------
  1003.   # new method: update_options_window
  1004.   #--------------------------------------------------------------------------
  1005.   def update_options_window
  1006.     @options_window.update
  1007.     if Input.trigger?(Input::B)
  1008.       Sound.play_cancel
  1009.       return_scene
  1010.     end
  1011.   end

  1012.   #--------------------------------------------------------------------------
  1013.   # new method: open_skins_window
  1014.   #--------------------------------------------------------------------------
  1015.   def open_skins_window
  1016.     @skins_window.open
  1017.     @skins_window.index = $game_variables[YEM::SYSTEM::WINDOWSKIN_VARIABLE] - 1
  1018.     @skins_window.active = true
  1019.     @options_window.active = false
  1020.   end

  1021.   #--------------------------------------------------------------------------
  1022.   # new method: update_skins_window
  1023.   #--------------------------------------------------------------------------
  1024.   def update_skins_window
  1025.     if @last_index != @skins_window.index
  1026.       @last_index = @skins_window.index
  1027.       update_skins
  1028.     end
  1029.     if Input.trigger?(Input::B)
  1030.       Sound.play_cancel
  1031.       @skins_window.close
  1032.       @skins_window.active = false
  1033.       @options_window.active = true
  1034.     elsif Input.trigger?(Input::C)
  1035.       Sound.play_decision
  1036.       @skins_window.close
  1037.       @skins_window.active = false
  1038.       @options_window.active = true
  1039.     end
  1040.   end

  1041.   #--------------------------------------------------------------------------
  1042.   # new method: update_skins
  1043.   #--------------------------------------------------------------------------
  1044.   def update_skins
  1045.     $game_variables[@window_var] = @skins_window.index + 1
  1046.     @options_window.update_windowskin
  1047.     @options_window.refresh
  1048.     @help_window.update_windowskin
  1049.     @help_window.set_text("")
  1050.     @options_window.update_help
  1051.     @skins_window.update_windowskin
  1052.     @skins_window.back_opacity = 255
  1053.     @skins_window.refresh
  1054.     @options_window.draw_item(@options_window.index)
  1055.   end

  1056. end # Scene_End

  1057. #===============================================================================
  1058. #
  1059. # END OF FILE
  1060. #
  1061. #===============================================================================
复制代码
结界组收藏的老产物了,具体不知道该怎么使用。

评分

参与人数 1星屑 +100 收起 理由
丿梁丶小柒 + 100 我很赞同

查看全部评分

大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
109 小时
注册时间
2014-1-12
帖子
35
3
 楼主| 发表于 2014-10-6 20:44:05 手机端发表。 | 只看该作者
谢谢!
不过我已经找到了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-15 17:57

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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