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

Project1

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

[已经解决] 【VX】如何让不同的角色气绝的时候播放不同的SE?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
93 小时
注册时间
2011-11-3
帖子
152
跳转到指定楼层
1
发表于 2011-12-28 22:30:00 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
由于游戏需要 请问怎么让不同的角色在气绝的时候播放不同的SE
例如说 A角色气绝 的时候  播放A角色气绝的SE  B角色气绝的时候播放B角色的SE  
而不是全部都是一种SE. 在横战系统设定中我也未发现这样可以设置的地方  求助各位前辈!

点评

他明天会看见的  发表于 2012-1-2 00:59
我不清楚横版,但是应该都是一样的  发表于 2012-1-2 00:56

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

2
发表于 2011-12-29 09:31:23 | 只看该作者
修改Game_Actor的def perform_collapse,再加这句
Audio.se_play("Audio/SE/collapse_" + @actor_id, 100, 100),就行了
把声效命名为"collapse_角色ID"即可

点评

版主大人 他为什么报错了呢 我发个截图 抱歉自己回个帖  发表于 2011-12-31 16:14
不动  发表于 2011-12-31 07:47
版主大人 有一点没弄明白 请问 你说的是 改一下 等于就是把你给我的那句话 加到def perform_collapse里面就行了吧? 原有的Sound.play_actor_collapse 还动么  发表于 2011-12-30 21:04
版主大人 谢谢你啊 我先试验下 - - 本人是脚本新手 哦吼吼~  发表于 2011-12-30 01:54
@actor_id最好to_s一下。不然不知道会出什么问题= =  发表于 2011-12-29 12:38
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
93 小时
注册时间
2011-11-3
帖子
152
3
 楼主| 发表于 2011-12-31 16:16:40 | 只看该作者
版主大人请看   

点评

放在横版脚本下面,main上面就行了  发表于 2012-1-3 14:41
不可能会播放同一个SE吧?,再测试看看,不过别叫我大人啊,音君就行了  发表于 2011-12-31 18:06
以在哪里设置吧 请问在哪里呢 我看一下当做参考~  发表于 2011-12-31 17:46
没有 刚刚我非常之仔细的看了一下 这样播出的SE 就算播出来 也很有可能就是所有人都是这一个SE 不过版主大人 想那个被击时 在元脚本里面应该可  发表于 2011-12-31 17:45
问题解决了吗?  发表于 2011-12-31 17:41
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

4
发表于 2011-12-31 16:24:09 | 只看该作者
woaizhazha521 发表于 2011-12-31 16:16
版主大人请看


Audio.se_play("Audio/SE/collapse_" + @actor_id, 100, 100)
换成
Audio.se_play("Audio/SE/collapse_#{@actor_id}", 100, 100)
看看?

点评

有人点你的名,详见楼下点评  发表于 2012-1-2 00:58
SE的名字 我改的是这样 您看对么 collapse_005.wav  发表于 2011-12-31 16:33
版主大人 - - 不报错了。。。。 但是没有SE。。。  发表于 2011-12-31 16:32
嗯 我试试看  发表于 2011-12-31 16:28
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复

使用道具 举报

Lv4.逐梦者

醉啸 长风万里

梦石
0
星屑
6222
在线时间
6596 小时
注册时间
2007-12-16
帖子
4501

贵宾

5
发表于 2011-12-31 21:42:56 | 只看该作者
月夜神音 发表于 2011-12-31 16:24

Audio.se_play("Audio/SE/collapse_" + @actor_id, 100, 100)
换成

Audio.se_play("Audio/SE/"+"collapse_" + @actor_id.to_s, 100, 100)
to_s这个经常被忽略

点评

月夜版主大人 请问 有没有方法能像设定 类似于设定被击动画 这样的方法在横战脚本里面设定之啊?  发表于 2012-1-2 00:57
前辈 横战是不是要从Sideview 1里面改?  发表于 2012-1-2 00:54
我这个事横版的 没错吧。。这样。。。  发表于 2012-1-2 00:52
这位前辈 还是不行。。。  发表于 2012-1-2 00:52
撞墙……每次都忘了…………  发表于 2012-1-1 07:16

还在龟速填坑中
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

6
发表于 2012-1-2 14:43:44 | 只看该作者
本帖最后由 月夜神音 于 2012-1-2 17:24 编辑

是横版的话早说嘛~
那就简单多了~
<battler se (种类) (文件名字) v(音量) p(节拍)>
种类分为
1. Take -受到HP或者MP上的损伤
2. Recover - 回复HP或者MP时
3. Evade - 回避攻击时
4. Plus State - 角色获得正面状态时
5. Minus State - 角色获得负面状态时
6. Attack - 角色攻击或者使用技能或者可造成损伤的道具时
7. Target Foe - 使用技能或者道具给对手时
8. Target Ally - 使用技能或者道具给我方时,对自己无效
9. Self - 使用道具或者技能对象为自己时
10. Critical Hit - 角色打出爆击时
11. Miss - 角色攻击失误时
12. Death - 角色濒死时
13. Low Health - 角色HP少过一定数目时
音量,节拍不必我说了吧~和播放SE一样

记得把设定写在143行哦,使用时一定要设定ACTOR_SE_SETUP[角色ID]
样本:
  1. ACTOR_SE_SETUP[1] = #设定了ID为1的角色
  2. "   #记得开关引号
  3. <battler se Miss Laugh v85 p100>     #角色攻击失误(MISS)时时读取Laugh文件以85音量100节拍并播放
  4. <battler se Attack BattleCry v100 p100>     #角色攻击时读取BattleCry文件以100音量100节拍并播放
  5. "   #关闭也要用这个哦


  6. ACTOR_SE_SETUP[3] = #设定了ID为3的角色
  7. "   #记得开关引号
  8. <battler se Evade Smile v50 p80>     #角色回避时读取Smile文件以50音量80节拍并播放
  9. "   #关闭也要用这个哦
复制代码
就类似上面的设定即可

脚本:
  1. #/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\|/
  2. #~ Battler SE (Sideview Battle System Version)
  3. #~ By: Rockleedude
  4. #~ Version: 3.0
  5. #~ Latest Update: 10/26/2009
  6. #~
  7. #~ This script allows you to add 13 different sound effects to play for
  8. #~ actors and enemies in battle.
  9. #~
  10. #===============================================================================
  11. #~                               Instructions
  12. #===============================================================================
  13. #~ To setup the sound effects played for a battler, use the following tag:
  14. #~ <battler se (type) (name) v(volume) p(pitch)>
  15. #~ (type): One of the 13 types. They are specified in the "For type" section.
  16. #~ (name): The name of the song file for the sound effect. Put playnothing to
  17. #~         mute the sound effects for that type.
  18. #~ (volume): The sound effect's volume.
  19. #~ (pitch): The sound effect's pitch.
  20. #~
  21. #~ The tags for enemies go into the notes box in the database.
  22. #~ The tags for actors go in the customization section below in this script.
  23. #~
  24. #~ For type:
  25. #~   Put the type corresponding to whichever type of sound effect this sound is.
  26. #~   i.e. If this is the sound effect for when the battler takes damage, put take.
  27. #~   The 13 types are the following:
  28. #~      1. Take - Played when the battler loses hp or mp as a result of the
  29. #~                action of another battler.
  30. #~      2. Recover - Played when the battler regains hp or mp, loses a negative
  31. #~                   state, or is revived from death.
  32. #~      3. Evade - Played when the battler dodges an attack.
  33. #~      4. Plus State - Played when the battler receives a positive, good state.
  34. #~                      Does not play if both a plus and minus state are received.
  35. #~      5. Minus State - Played when the battler receives a negative, bad state.
  36. #~                      Does not play if both a plus and minus state are received.
  37. #~      6. Attack - Played when the battler does a regular attack or uses a
  38. #~                  skill or item that has physical attack checked.
  39. #~      7. Target Foe - Played when the battler uses a skill or item that
  40. #~                      targets one or more foes.
  41. #~      8. Target Ally - Played when the battler uses a skill or item that
  42. #~                       targets one or more allies. Does not play if the only
  43. #~                       target is the battler itself.
  44. #~      9. Self - Played when the battler uses a skill or item that targets
  45. #~                iteself.
  46. #~      10. Critical Hit - Played when the battler delivers a critical hit.
  47. #~      11. Miss - Played when the battler misses with an attack.
  48. #~      12. Death - Played when the battler dies.
  49. #~      13. Low Health - Played when the battler's hp falls below a specified
  50. #~                       amount.
  51. #~ For name:
  52. #~   This should be the exact name of the file. So if the file name is "Scream"
  53. #~   you should put "Scream" and not "scream" (Notice the difference in first
  54. #~   letters). You can have quotation marks around the name of file if you
  55. #~   choose to. The file type of the sound effect is also optional.
  56. #~   Files for the sound effects should be located in the SE folder that
  57. #~   is inside the Audio folder of your project. You also have the choice of
  58. #~   creating a folder inside the SE folder to store the battler sound effects in.
  59. #~   The purpose of this is to avoid having a name conflict between a regular
  60. #~   sound effect and a sound effect for an battler. This could also help with
  61. #~   organization. This is all up to you. In the customization section below,
  62. #~   type in the exact name of the folder. If you are not using the custom
  63. #~   folder, then put nil instead. Note, if the custom folder exists, it
  64. #~   will be searched first before looking in the SE folder.
  65. #~   To completely mute the sound effects (even the default sound effects) for
  66. #~   particularly type for a battler, put playnothing into the name spot. This
  67. #~   will make it so no sound effect will play for that type for that battler.
  68. #~   Note that playnothing with quotation marks ("playnothing") will not mute
  69. #~   the se. Instead it would search for the sound effect named "playnothing".
  70. #~ For volume:
  71. #~   This is the volume for the sound effect. Be sure to include the "v" before
  72. #~   the volume. Use the sound test to help decide what you want this value to
  73. #~   be. The volume can be left out. If it is left out, then the default
  74. #~   volume will be used instead. You can set the default volume in the
  75. #~   customization section. Must be between 0 and 100.
  76. #~ For pitch:
  77. #~   This is the pitch for the sound effect. Be sure to include the "p" before
  78. #~   the pitch. Use the sound test to help decide what you want this value to
  79. #~   be. The pitch can also be left out. If it is left out, then the default
  80. #~   pitch will be used instead. You can set the default pitch in the
  81. #~   customization section. Must be between 50 and 150.
  82. #~ You can insert more than one sound effect for each type for a battler. Each
  83. #~ sound effect for each type must be in a separate tag. When there is more than
  84. #~ one sound effect for a particular type of a battler, a sound effect will
  85. #~ randomly be chosen to be played. Note, if playnothing is one of the choices,
  86. #~ it can be randomly chosen. Just because playnothing is one of the choices
  87. #~ does not mean it will automatically play nothing for that type. It has to be
  88. #~ chosen randomly.
  89. #~
  90. #~
  91. #~
  92. #~ Examples:
  93. #~
  94. #~ <battler se death Scream v85 p100>
  95. #~ - Will play the sound file "Scream" with the volume as 85 and pitch as 100
  96. #~   for the death sound effect.
  97. #~
  98. #~ <battler se target foe "Roar" p90>
  99. #~ - Will play the sound file "Roar" with the volume as the default and pitch as
  100. #~   90 for the target foe sound effect. Remember, the quotation marks are not
  101. #~   required.
  102. #~
  103. #~ <battler se minus state Groan>
  104. #~ - Will play the sound file "Groan" with the volume and pitch as the defaults
  105. #~   for the minus state damage sound effect.
  106. #~
  107. #~ <battler se evade playnothing>
  108. #~ - Will play no sound effect, not even the default sound effect chosen in the
  109. #~   database, when the battler evades.
  110. #~   
  111. #~
  112. #/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\/|\|/|\|/

  113. $imported = {} if $imported == nil
  114. $imported["Battler_SE"] = true

  115. module Rockleedude
  116.   module Battler_SE
  117. #===============================================================================
  118. #                               CUSTOMIZATION
  119. #===============================================================================
  120.                               # Setup for Actors #
  121.     # With the addition of the actor part of the script, comes an addition to
  122.     # the customization section. Since actors have no notes box like enemies
  123.     # do, another method had to be used for setup for actors. Basically, I
  124.     # created a notes box for actors in this script (note this "notes box" will
  125.     # only work for this script). The syntax for the tag is exactly the same
  126.     # as the syntax for enemies. Put ACTOR_SE_SETUP[x] = "  y  " where x is the
  127.     # id of the actor and y is the tags. You can have any number of lines of
  128.     # tag between the quotation marks. See the example below if confused.
  129.     #
  130.     # The following is an example:
  131.     #   ACTOR_SE_SETUP[1] =
  132.     #  "<battler se take Ouch>
  133.     #   <battler se take playnothing>
  134.     #   <battler se attack Yell>
  135.     #   <battler se death Scream p125>"
  136.     #
  137.     ACTOR_SE_SETUP = [] # Do not alter or remove!
  138.     #
  139.     #
  140.     #               --> Insert Tags for Actors Below Here <--


  141.    
  142.    
  143.     #               --> Insert Tags for Actors Above Here <--
  144.    
  145.    
  146.     BATTLER_SE_FOLDER_NAME = nil
  147.     # The name of the folder inside of the SE folder where the battler sound
  148.     # effects are stored. Include quotation marks around the name.
  149.     # For example: "Battler_SE"
  150.     # If the custom folder is not being used, put nil with no quotations.
  151.    
  152.     DEFAULT_VOLUME = 100
  153.     # The volume used whenever the volume is left out of the tag.
  154.     # Can be 0-100
  155.     DEFAULT_PITCH = 100
  156.     # The pitch used whenever the pitch is left out of the tag.
  157.     # Can be 50-150
  158.    
  159.     PLUS_STATES = [9, 10, 11, 12]
  160.     # The states that are considered positive, good states. When a battler
  161.     # receives one of these states, the specified plus state sound effect will
  162.     # play. Insert the id of the state in the above array.
  163.     MINUS_STATES = [1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 15, 16]
  164.     # The states that are considered negative, bad states. When a battler
  165.     # receives one of these states, the specified minus state sound effect will
  166.     # play. Insert the id of the state in the above array.
  167.     #
  168.     # States can be left out if they don't fall into either category of plus
  169.     # or negative.
  170.    
  171.     DEATH_STATE_ID = 1
  172.     # The id of the state that represents death, knock-out, incapacitated, etc.
  173.     # The default is id 1. There is really no reason to change the id of the
  174.     # death state but I had to include this just incase.
  175.    
  176.     LOW_HEALTH_PERCENTAGE = 25
  177.     # The percentage that determines when the low health sound effect is played.
  178.     # This number should be between 0 and 100 since it's a percentage. The color
  179.     # of the hp shown in the status changes to yellow when the hp is below 25%
  180.     # incase you want to make it as much as the game considers low health.
  181. #===============================================================================
  182. #                             END CUSTOMIZATION
  183. #===============================================================================

  184.     BATTLER_SE = /<BATTLER[\s_]?SE[\s_]?(TAKE|RECOVER|EVADE|PLUSSTATE|PLUS[\s]STATE|PLUS_STATE|MINUSSTATE|MINUS[\s]STATE|MINUS_STATE|ATTACK|TARGETFOE|TARGET[\s]FOE|TARGET_FOE|TARGETALLY|TARGET[\s]ALLY|TARGET_ALLY|CRITICALHIT|CRITICAL[\s]HIT|CRITICAL_HIT|MISS|DEATH|LOWHEALTH|LOW[\s]HEALTH|LOW_HEALTH|SELF)[\s_]?(.*?)[\s_]?(v\d*?)?[\s_]?(p\d*?)?>/i
  185.     BATTLER_SE_PLAYNOTHING = /<BATTLER[\s_]?SE[\s_]?(TAKE|RECOVER|EVADE|PLUSSTATE|PLUS[\s]STATE|PLUS_STATE|MINUSSTATE|MINUS[\s]STATE|MINUS_STATE|ATTACK|TARGETFOE|TARGET[\s]FOE|TARGET_FOE|TARGETALLY|TARGET[\s]ALLY|TARGET_ALLY|CRITICALHIT|CRITICAL[\s]HIT|CRITICAL_HIT|MISS|DEATH|LOWHEALTH|LOW[\s]HEALTH|LOW_HEALTH|SELF)[\s_]?PLAYNOTHING>/i
  186.   end
  187. end

  188. #
  189. # SE CLASS
  190. #
  191. class RPG::SE
  192.   
  193.     def battler_se_play
  194.       folder = Rockleedude::Battler_SE::BATTLER_SE_FOLDER_NAME
  195.       unless @name.empty?
  196.         unless folder == nil
  197.           begin
  198.             Audio.se_play("Audio/SE/" + folder + "/" + @name, @volume, @pitch)
  199.             # print @name + ": name" if $TEST
  200.           rescue
  201.             begin
  202.               play
  203.             rescue
  204.               print "The sound effect, " + @name + ", is not found in either folder." if $TEST
  205.               return false
  206.             end
  207.           end
  208.         else
  209.           begin
  210.             play
  211.           rescue
  212.             print "The sound effect, " + name + ", is not found in the SE folder.
  213.             If you created a Battler_SE folder be sure you put the name correctly
  214.             in the module as BATTLER_SE_FOLDER_NAME" if $TEST
  215.             return false
  216.           end
  217.         end
  218.       else
  219.         return false
  220.       end
  221.     end

  222.     def play
  223.       unless @name.empty?
  224.         Audio.se_play("Audio/SE/" + @name, @volume, @pitch)
  225.       end
  226.     end
  227. end # class end

  228. #
  229. # SOUND MODULE
  230. #
  231. module Sound

  232.   def self.play_enemy_attack
  233.   end

  234.   def self.play_enemy_damage
  235.   end

  236.   def self.play_enemy_collapse
  237.   end

  238.   def self.play_actor_damage
  239.   end

  240.   def self.play_actor_collapse
  241.   end

  242.   def self.play_recovery
  243.   end

  244.   def self.play_miss
  245.   end

  246.   def self.play_evasion
  247.   end

  248.   def self.play_battler_se(battler_id, type, a_or_e, default)
  249.    # Type:   0: Take, 1: Recover, 2: Evade, 3: Plus State, 4: Minus State,
  250.    # Type:   5: Attack, 6: Target Foe, 7: Target Ally, 8: Critical Hit, 9: Miss,
  251.    # Type:   10: Death, 11: Low Health, 12: Self
  252.    # a_or_e: 1: Actor  2: Enemy
  253.                   
  254.     se = $data_actor_se[battler_id] if a_or_e == 1
  255.     se = $data_enemy_se[battler_id] if a_or_e == 2
  256.     unless se[type].empty?
  257.       chosen_se = se[type][rand(se[type].size)]
  258.     else
  259.       Sound.play_default_se(type, a_or_e)
  260.       return
  261.     end
  262.     #print chosen_se.inspect + ":chosen_se" if $TEST
  263.     return if chosen_se == "PLAYNOTHING"
  264.     t_or_f = chosen_se.battler_se_play
  265.     return if default == false
  266.     Sound.play_default_se(type, a_or_e) if t_or_f == false
  267.   end
  268.    
  269.   def self.play_default_se(type, a_or_e)
  270.     if a_or_e == 1
  271.       $data_system.sounds[13].play if type == 10
  272.     else
  273.       $data_system.sounds[11].play if type == 10
  274.     end
  275.     $data_system.sounds[16].play if type == 9
  276.     $data_system.sounds[16].play if type == 2
  277.   end
  278.   
  279. end

  280. #
  281. # SPRITE_DAMAGE CLASS
  282. #
  283. class Sprite_Damage < Sprite_Base
  284.   
  285.   # Take(0) and Recover(1)
  286.   alias damage_pop_orig_rld_battler_se damage_pop
  287.   def damage_pop(num = nil)
  288.     damage_pop_orig_rld_battler_se(num = nil)
  289.     if battler.hp_damage != nil
  290.       if (battler.hp_damage > 0)
  291.         if @battler.actor?
  292.           Sound.play_battler_se(@battler.actor_id, 0, 1, false)
  293.         else
  294.           Sound.play_battler_se(@battler.enemy_id, 0, 2, false)
  295.         end
  296.       elsif (battler.hp_damage < 0)
  297.         if @battler.actor?
  298.           Sound.play_battler_se(@battler.actor_id, 1, 1, false)
  299.         else
  300.           Sound.play_battler_se(@battler.enemy_id, 1, 2, false)
  301.         end
  302.       end
  303.       if battler.hp_damage == 0
  304.         if battler.mp_damage != nil
  305.           if (battler.mp_damage > 0)
  306.             if @battler.actor?
  307.               Sound.play_battler_se(@battler.actor_id, 0, 1, false)
  308.             else
  309.               Sound.play_battler_se(@battler.enemy_id, 0, 2, false)
  310.             end
  311.           elsif (battler.mp_damage < 0)
  312.             if @battler.actor?
  313.               Sound.play_battler_se(@battler.actor_id, 1, 1, false)
  314.             else
  315.               Sound.play_battler_se(@battler.enemy_id, 1, 2, false)
  316.             end
  317.           end
  318.         end
  319.       end
  320.     end
  321.   end

  322. end # class end

  323. #
  324. # SPRITE_BATTLER CLASS
  325. #
  326. class Sprite_Battler < Sprite_Base
  327.   
  328.   # Evade(2)
  329.   alias damage_action_orig_rld_battler_se damage_action
  330.   def damage_action(action)
  331.     damage_action_orig_rld_battler_se(action)
  332.     if @battler.evaded
  333.       if @battler.actor?
  334.         Sound.play_battler_se(@battler.actor_id, 2, 1, true)
  335.       else
  336.         Sound.play_battler_se(@battler.enemy_id, 2, 2, true)
  337.       end
  338.     end
  339.   end
  340.   
  341. end # class end

  342. #
  343. # SCENE_BATTLE CLASS
  344. #
  345. class Scene_Battle < Scene_Base
  346.   
  347.   # (3-9 and 12)
  348.   alias damage_action_sb_orig_rld_battler_se damage_action
  349.   def damage_action(action)
  350.     damage_action_sb_orig_rld_battler_se(action)
  351.     for target in @targets
  352.       play_if_minus_state_removed(target, action) # Recover(1)
  353.       play_if_plus_or_minus(target, action) # Plus State(3) and Minus State(4)
  354.       if target.critical # Critical Hit(8)
  355.         if @active_battler.actor?
  356.           Sound.play_battler_se(@active_battler.actor_id, 8, 1, false)
  357.         else
  358.           Sound.play_battler_se(@active_battler.enemy_id, 8, 2, false)
  359.         end
  360.       end
  361.       if target.missed # Miss(9)
  362.         if @active_battler.actor?
  363.           Sound.play_battler_se(@active_battler.actor_id, 9, 1, true)
  364.         else
  365.           Sound.play_battler_se(@active_battler.enemy_id, 9, 2, true)
  366.         end
  367.       end
  368.     end
  369.     play_for_action_scopes # Attack(5), Target Foe(6), Target Ally(7), Self(12)
  370.   end
  371.   
  372.   # Recover(1) for Removed Minus States
  373.   def play_if_minus_state_removed(target, action)
  374.     return unless (target.hp_damage == 0) and (target.mp_damage == 0)
  375.     plus_a = []
  376.     minus_a = []
  377.     plus_list = Rockleedude::Battler_SE::PLUS_STATES
  378.     minus_list = Rockleedude::Battler_SE::MINUS_STATES
  379.     for state in target.removed_states
  380.       plus_a.insert(0, state) if plus_list.include?(state.id)
  381.       minus_a.insert(0, state) if minus_list.include?(state.id)
  382.       if state.id == Rockleedude::Battler_SE::DEATH_STATE_ID
  383.         if target.actor?
  384.           Sound.play_battler_se(target.actor_id, 1, 1, false)
  385.         else
  386.           Sound.play_battler_se(target.enemy_id, 1, 2, false)
  387.         end
  388.         return
  389.       end
  390.     end
  391.     return if (plus_a.size != 0) and (minus_a.size != 0)
  392.     return if plus_a.empty? and minus_a.empty?
  393.     if plus_a.empty?
  394.       if target.actor?
  395.         Sound.play_battler_se(target.actor_id, 1, 1, false)
  396.       else
  397.         Sound.play_battler_se(target.enemy_id, 1, 2, false)
  398.       end
  399.     end
  400.   end
  401.   
  402.   # Plus State(3) and Minus State(4)
  403.   def play_if_plus_or_minus(target, action)
  404.     if @active_battler.action.skill?
  405.       obj = @active_battler.action.skill
  406.     elsif @active_battler.action.item?
  407.       obj = @active_battler.action.item
  408.     else
  409.       obj = nil
  410.     end
  411.     plus_a = []
  412.     minus_a = []
  413.     plus_list = Rockleedude::Battler_SE::PLUS_STATES
  414.     minus_list = Rockleedude::Battler_SE::MINUS_STATES
  415.     for state in target.added_states
  416.       plus_a.insert(0, state) if plus_list.include?(state.id)
  417.       minus_a.insert(0, state) if minus_list.include?(state.id)
  418.       return if state.id == Rockleedude::Battler_SE::DEATH_STATE_ID
  419.     end
  420.     return if (plus_a.size != 0) and (minus_a.size != 0)
  421.     return if plus_a.empty? and minus_a.empty?
  422.     if obj == nil
  423.       return unless (target.hp_damage == 0) and (target.mp_damage == 0)
  424.     else
  425.       return unless obj.base_damage == 0
  426.     end
  427.     if minus_a.empty?
  428.       if target.actor?
  429.         Sound.play_battler_se(target.actor_id, 3, 1, false)
  430.       else
  431.         Sound.play_battler_se(target.enemy_id, 3, 2, false)
  432.       end
  433.     elsif plus_a.empty?
  434.       if target.actor?
  435.         Sound.play_battler_se(target.actor_id, 4, 1, false)
  436.       else
  437.         Sound.play_battler_se(target.enemy_id, 4, 2, false)
  438.       end
  439.     end
  440.   end
  441.   
  442.   # Attack(5), Target Foe(6), Target Ally(7), Self(12)
  443.   def play_for_action_scopes
  444.     if @active_battler.action.attack?
  445.       if @active_battler.actor?
  446.         Sound.play_battler_se(@active_battler.actor_id, 5, 1, false)
  447.       else
  448.         Sound.play_battler_se(@active_battler.enemy_id, 5, 2, false)
  449.       end
  450.       return
  451.     end
  452.     if @active_battler.action.skill?
  453.       if @active_battler.action.skill.physical_attack
  454.         if @active_battler.actor?
  455.           Sound.play_battler_se(@active_battler.actor_id, 5, 1, false)
  456.         else
  457.           Sound.play_battler_se(@active_battler.enemy_id, 5, 2, false)
  458.         end
  459.         return
  460.       end
  461.     end
  462.     if @active_battler.action.item?
  463.       if @active_battler.action.item.physical_attack
  464.         if @active_battler.actor?
  465.           Sound.play_battler_se(@active_battler.actor_id, 5, 1, false)
  466.         else
  467.           Sound.play_battler_se(@active_battler.enemy_id, 5, 2, false)
  468.         end
  469.         return
  470.       end
  471.     end
  472.     if @targets.compact.size == 1
  473.       if @targets.compact[0] == @active_battler
  474.         if @active_battler.actor?
  475.           Sound.play_battler_se(@active_battler.actor_id, 12, 1, false)
  476.         else
  477.           Sound.play_battler_se(@active_battler.enemy_id, 12, 2, false)
  478.         end
  479.         return
  480.       end
  481.     end
  482.     return if @targets.nitems == 0
  483.     unless @targets.compact[0].actor?
  484.       if @active_battler.actor?
  485.         Sound.play_battler_se(@active_battler.actor_id, 6, 1, false)
  486.       else
  487.         Sound.play_battler_se(@active_battler.enemy_id, 7, 2, false)
  488.       end
  489.     else
  490.       if @active_battler.actor?
  491.         Sound.play_battler_se(@active_battler.actor_id, 7, 1, false)
  492.       else
  493.         Sound.play_battler_se(@active_battler.enemy_id, 6, 2, false)
  494.       end
  495.     end
  496.   end

  497. end # class end

  498. #
  499. # SPRITE_BATTLER CLASS
  500. #
  501. class Sprite_Battler < Sprite_Base
  502.   # Enemy: Death(10)

  503.   alias collapse_action_orig_rld_battler_se collapse_action
  504.   def collapse_action
  505.     collapse_action_orig_rld_battler_se
  506.     if @collapse_type == 1
  507.       unless @battler.actor?
  508.         Sound.play_battler_se(@battler.enemy_id, 2, 2, true)
  509.       else
  510.         Sound.play_battler_se(@battler.actor_id, 2, 1, true)
  511.       end
  512.     end
  513.   end
  514.   
  515.   def normal_collapse
  516.     if @effect_duration == 47
  517.       self.blend_type = 1
  518.       self.color.set(255, 128, 128, 128)
  519.     end
  520.     if @effect_duration == 32
  521.       unless @battler.actor?
  522.         Sound.play_battler_se(@battler.enemy_id, 2, 2, true)
  523.       else
  524.         Sound.play_battler_se(@battler.actor_id, 2, 1, true)
  525.       end
  526.     end
  527.     self.opacity = 256 - (48 - @effect_duration) * 6 if @effect_duration <= 47
  528.   end  
  529.   
  530.   alias boss_collapse1_orig_rld_battler_se boss_collapse1
  531.   def boss_collapse1
  532.     if @effect_duration == 380
  533.       unless @battler.actor?
  534.         Sound.play_battler_se(@battler.enemy_id, 2, 2, true)
  535.       else
  536.         Sound.play_battler_se(@battler.actor_id, 2, 1, true)
  537.       end
  538.     end
  539.     if @effect_duration == 255
  540.       unless @battler.actor?
  541.         Sound.play_battler_se(@battler.enemy_id, 2, 2, true)
  542.       else
  543.         Sound.play_battler_se(@battler.actor_id, 2, 1, true)
  544.       end
  545.     end
  546.     boss_collapse1_orig_rld_battler_se
  547.   end
  548. end

  549. #
  550. # GAME_BATTLER CLASS
  551. #
  552. class Game_Battler
  553.   
  554.   # Low Health(11)
  555.   alias execute_damage_orig_rld_battler_se execute_damage
  556.   def execute_damage(user)
  557.     max_hp_b = maxhp
  558.     hp_b = self.hp
  559.     execute_damage_orig_rld_battler_se(user)
  560.     max_hp_a = maxhp
  561.     hp_a = self.hp
  562.     ratio_b = hp_b.to_f / max_hp_b.to_f
  563.     ratio_a = hp_a.to_f / max_hp_a.to_f
  564.     #print ratio_b.inspect + ":ratio_b    " + ratio_a.inspect + ":ratio_a"
  565.     lowh_percent = Rockleedude::Battler_SE::LOW_HEALTH_PERCENTAGE
  566.     unless hp_a <= 0
  567.       if lowh_percent.between?(0.0, 100.0)
  568.         lowh_percent = lowh_percent.to_f / 100.0
  569.         if ratio_b > lowh_percent
  570.           if ratio_a < lowh_percent
  571.             if self.actor?
  572.               Sound.play_battler_se(self.actor_id, 11, 1, false)
  573.             else
  574.               Sound.play_battler_se(self.enemy_id, 11, 2, false)
  575.             end
  576.           end
  577.         end
  578.       end
  579.     end
  580.   end
  581.   
  582. end # class end

  583. #
  584. # GAME_ACTOR CLASS
  585. #

  586. class Game_Actor < Game_Battler
  587.   attr_accessor :battler_se_note

  588.   alias perform_collapse_orig_rld_battler_se perform_collapse
  589.   def perform_collapse
  590.     Sound.play_battler_se(@actor_id, 10, 1, true) if $game_temp.in_battle and dead?
  591.     perform_collapse_orig_rld_battler_se
  592.   end

  593.   def actor_id
  594.     return @actor_id
  595.   end
  596.   
  597.   alias setup_orig_battler_se setup
  598.   def setup(actor_id)
  599.     setup_orig_battler_se(actor_id)
  600.     @battler_se_note = Rockleedude::Battler_SE::ACTOR_SE_SETUP
  601.   end
  602.   
  603. end # class end

  604. #
  605. # GAME_ENEMY CLASS
  606. #
  607. class Game_Enemy < Game_Battler
  608.   alias perform_collapse_orig_rld_battler_se perform_collapse
  609.   def perform_collapse
  610.     Sound.play_battler_se(@enemy_id, 10, 2, true) if $game_temp.in_battle and dead?
  611.     perform_collapse_orig_rld_battler_se
  612.   end
  613.   
  614. end # class end

  615. #
  616. # ACTOR CLASS
  617. #
  618. class RPG::Actor
  619.   attr_accessor :battler_se_note
  620.   
  621.   # Battler Receiving
  622.   attr_accessor :take_damage_se
  623.   attr_accessor :recover_damage_se
  624.   attr_accessor :evade_se
  625.   attr_accessor :plus_state_se
  626.   attr_accessor :minus_state_se
  627.   
  628.   # Battler Delivering
  629.   attr_accessor :attack_se
  630.   attr_accessor :target_foe_se
  631.   attr_accessor :target_ally_se
  632.   attr_accessor :critical_hit_se
  633.   attr_accessor :miss_se
  634.   
  635.   # Random Conditions
  636.   attr_accessor :death_se
  637.   attr_accessor :low_health_se
  638.   attr_accessor :self_se
  639.   
  640.   def gsub_without_md(string)
  641.     string.gsub!(/ /i, "")
  642.     string.gsub!(/_/i, "")
  643.     return string
  644.   end
  645.   
  646.   def prepare_se_cache
  647.     # Battler Receiving
  648.     @take_damage_se = []
  649.     @recover_damage_se = []
  650.     @evade_se = []
  651.     @plus_state_se = []
  652.     @minus_state_se = []
  653.    
  654.     # Battler Delivering
  655.     @attack_se = []
  656.     @target_foe_se = []
  657.     @target_ally_se = []
  658.     @critical_hit_se = []
  659.     @miss_se = []
  660.    
  661.     # Random Conditions
  662.     @death_se = []
  663.     @low_health_se = []
  664.     @self_se = []

  665.     a = Rockleedude::Battler_SE::ACTOR_SE_SETUP[@id]
  666.     @battler_se_note = ""
  667.     @battler_se_note = a if a != nil
  668.   end
  669.   
  670.   def create_se_cache
  671.     prepare_se_cache
  672.     dv = Rockleedude::Battler_SE::DEFAULT_VOLUME
  673.     dp = Rockleedude::Battler_SE::DEFAULT_PITCH
  674.     self.battler_se_note.split(/[\r\n]+/).each { |line|
  675.     case line
  676.     when Rockleedude::Battler_SE::BATTLER_SE
  677.       type = $1
  678.       type.upcase! unless $1 == nil
  679.       type = gsub_without_md(type) unless $1 == nil
  680.       case type
  681.       when "TAKE"
  682.         se = RPG::SE.new($2, dv, dp)
  683.         se.volume = $3 if $3 != nil
  684.         se.volume = se.volume[1,3].to_i if $3.class == String
  685.         se.pitch = $4 if $4 != nil
  686.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  687.         @take_damage_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  688.       when "RECOVER"
  689.         se = RPG::SE.new($2, dv, dp)
  690.         se.volume = $3 if $3 != nil
  691.         se.volume = se.volume[1,3].to_i if $3.class == String
  692.         se.pitch = $4 if $4 != nil
  693.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  694.         @recover_damage_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"  
  695.       when "EVADE"
  696.         se = RPG::SE.new($2, dv, dp)
  697.         se.volume = $3 if $3 != nil
  698.         se.volume = se.volume[1,3].to_i if $3.class == String
  699.         se.pitch = $4 if $4 != nil
  700.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  701.         @evade_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  702.       when "PLUSSTATE"
  703.         se = RPG::SE.new($2, dv, dp)
  704.         se.volume = $3 if $3 != nil
  705.         se.volume = se.volume[1,3].to_i if $3.class == String
  706.         se.pitch = $4 if $4 != nil
  707.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  708.         @plus_state_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  709.       when "MINUSSTATE"
  710.         se = RPG::SE.new($2, dv, dp)
  711.         se.volume = $3 if $3 != nil
  712.         se.volume = se.volume[1,3].to_i if $3.class == String
  713.         se.pitch = $4 if $4 != nil
  714.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  715.         @minus_state_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  716.       when "ATTACK"
  717.         se = RPG::SE.new($2, dv, dp)
  718.         se.volume = $3 if $3 != nil
  719.         se.volume = se.volume[1,3].to_i if $3.class == String
  720.         se.pitch = $4 if $4 != nil
  721.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  722.         @attack_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  723.       when "TARGETFOE"
  724.         se = RPG::SE.new($2, dv, dp)
  725.         se.volume = $3 if $3 != nil
  726.         se.volume = se.volume[1,3].to_i if $3.class == String
  727.         se.pitch = $4 if $4 != nil
  728.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  729.         @target_foe_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  730.       when "TARGETALLY"
  731.         se = RPG::SE.new($2, dv, dp)
  732.         se.volume = $3 if $3 != nil
  733.         se.volume = se.volume[1,3].to_i if $3.class == String
  734.         se.pitch = $4 if $4 != nil
  735.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  736.         @target_ally_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  737.       when "CRITICALHIT"
  738.         se = RPG::SE.new($2, dv, dp)
  739.         se.volume = $3 if $3 != nil
  740.         se.volume = se.volume[1,3].to_i if $3.class == String
  741.         se.pitch = $4 if $4 != nil
  742.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  743.         @critical_hit_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  744.       when "MISS"
  745.         se = RPG::SE.new($2, dv, dp)
  746.         se.volume = $3 if $3 != nil
  747.         se.volume = se.volume[1,3].to_i if $3.class == String
  748.         se.pitch = $4 if $4 != nil
  749.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  750.         @miss_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  751.       when "DEATH"
  752.         se = RPG::SE.new($2, dv, dp)
  753.         se.volume = $3 if $3 != nil
  754.         se.volume = se.volume[1,3].to_i if $3.class == String
  755.         se.pitch = $4 if $4 != nil
  756.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  757.         @death_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  758.       when "LOWHEALTH"
  759.         se = RPG::SE.new($2, dv, dp)
  760.         se.volume = $3 if $3 != nil
  761.         se.volume = se.volume[1,3].to_i if $3.class == String
  762.         se.pitch = $4 if $4 != nil
  763.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  764.         @low_health_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  765.       when "SELF"
  766.         se = RPG::SE.new($2, dv, dp)
  767.         se.volume = $3 if $3 != nil
  768.         se.volume = se.volume[1,3].to_i if $3.class == String
  769.         se.pitch = $4 if $4 != nil
  770.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  771.         @self_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  772.       end
  773.     end
  774.     case line
  775.     when Rockleedude::Battler_SE::BATTLER_SE_PLAYNOTHING
  776.       type = $1
  777.       type.upcase! unless $1 == nil
  778.       type.gsub!(/ /i, "") unless $1 == nil
  779.       case type
  780.       when "TAKE"
  781.         @take_damage_se.insert(0, "PLAYNOTHING")
  782.       when "RECOVER"
  783.         @recover_damage_se.insert(0, "PLAYNOTHING")  
  784.       when "EVADE"
  785.         @evade_se.insert(0, "PLAYNOTHING")
  786.       when "PLUSSTATE"
  787.         @plus_state_se.insert(0, "PLAYNOTHING")
  788.       when "MINUSSTATE"
  789.         @minus_state_se.insert(0, "PLAYNOTHING")
  790.       when "ATTACK"
  791.         @attack_se.insert(0, "PLAYNOTHING")
  792.       when "TARGETFOE"
  793.         @target_foe_se.insert(0, "PLAYNOTHING")
  794.       when "TARGETALLY"
  795.         @target_ally_se.insert(0, "PLAYNOTHING")
  796.       when "CRITICALHIT"
  797.         @critical_hit_se.insert(0, "PLAYNOTHING")
  798.       when "MISS"
  799.         @miss_se.insert(0, "PLAYNOTHING")
  800.       when "DEATH"
  801.         @death_se.insert(0, "PLAYNOTHING")
  802.       when "LOWHEALTH"
  803.         @low_health_se.insert(0, "PLAYNOTHING")
  804.       when "SELF"
  805.         @self_se.insert(0, "PLAYNOTHING")

  806.       end
  807.     end
  808.     }
  809.   end
  810.   
  811. end # class end

  812. #
  813. # ENEMY CLASS
  814. #
  815. class RPG::Enemy
  816.   # Battler Receiving
  817.   attr_accessor :take_damage_se
  818.   attr_accessor :recover_damage_se
  819.   attr_accessor :evade_se
  820.   attr_accessor :plus_state_se
  821.   attr_accessor :minus_state_se
  822.   
  823.   # Battler Delivering
  824.   attr_accessor :attack_se
  825.   attr_accessor :target_foe_se
  826.   attr_accessor :target_ally_se
  827.   attr_accessor :critical_hit_se
  828.   attr_accessor :miss_se
  829.   
  830.   # Random Conditions
  831.   attr_accessor :death_se
  832.   attr_accessor :low_health_se
  833.   attr_accessor :self_se
  834.   
  835.   def gsub_without_md(string)
  836.     string.gsub!(/ /i, "")
  837.     string.gsub!(/_/i, "")
  838.     return string
  839.   end
  840.   
  841.   def prepare_se_cache
  842.     # Battler Receiving
  843.     @take_damage_se = []
  844.     @recover_damage_se = []
  845.     @evade_se = []
  846.     @plus_state_se = []
  847.     @minus_state_se = []
  848.    
  849.     # Battler Delivering
  850.     @attack_se = []
  851.     @target_foe_se = []
  852.     @target_ally_se = []
  853.     @critical_hit_se = []
  854.     @miss_se = []
  855.    
  856.     # Random Conditions
  857.     @death_se = []
  858.     @low_health_se = []
  859.     @self_se = []
  860.   end
  861.   
  862.   def create_se_cache
  863.     prepare_se_cache
  864.     dv = Rockleedude::Battler_SE::DEFAULT_VOLUME
  865.     dp = Rockleedude::Battler_SE::DEFAULT_PITCH
  866.     self.note.split(/[\r\n]+/).each { |line|
  867.     case line
  868.     when Rockleedude::Battler_SE::BATTLER_SE
  869.       type = $1
  870.       type.upcase! unless $1 == nil
  871.       type = gsub_without_md(type) unless $1 == nil
  872.       case type
  873.       when "TAKE"
  874.         se = RPG::SE.new($2, dv, dp)
  875.         se.volume = $3 if $3 != nil
  876.         se.volume = se.volume[1,3].to_i if $3.class == String
  877.         se.pitch = $4 if $4 != nil
  878.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  879.         @take_damage_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  880.       when "RECOVER"
  881.         se = RPG::SE.new($2, dv, dp)
  882.         se.volume = $3 if $3 != nil
  883.         se.volume = se.volume[1,3].to_i if $3.class == String
  884.         se.pitch = $4 if $4 != nil
  885.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  886.         @recover_damage_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"  
  887.       when "EVADE"
  888.         se = RPG::SE.new($2, dv, dp)
  889.         se.volume = $3 if $3 != nil
  890.         se.volume = se.volume[1,3].to_i if $3.class == String
  891.         se.pitch = $4 if $4 != nil
  892.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  893.         @evade_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  894.       when "PLUSSTATE"
  895.         se = RPG::SE.new($2, dv, dp)
  896.         se.volume = $3 if $3 != nil
  897.         se.volume = se.volume[1,3].to_i if $3.class == String
  898.         se.pitch = $4 if $4 != nil
  899.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  900.         @plus_state_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  901.       when "MINUSSTATE"
  902.         se = RPG::SE.new($2, dv, dp)
  903.         se.volume = $3 if $3 != nil
  904.         se.volume = se.volume[1,3].to_i if $3.class == String
  905.         se.pitch = $4 if $4 != nil
  906.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  907.         @minus_state_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  908.       when "ATTACK"
  909.         se = RPG::SE.new($2, dv, dp)
  910.         se.volume = $3 if $3 != nil
  911.         se.volume = se.volume[1,3].to_i if $3.class == String
  912.         se.pitch = $4 if $4 != nil
  913.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  914.         @attack_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  915.       when "TARGETFOE"
  916.         se = RPG::SE.new($2, dv, dp)
  917.         se.volume = $3 if $3 != nil
  918.         se.volume = se.volume[1,3].to_i if $3.class == String
  919.         se.pitch = $4 if $4 != nil
  920.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  921.         @target_foe_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  922.       when "TARGETALLY"
  923.         se = RPG::SE.new($2, dv, dp)
  924.         se.volume = $3 if $3 != nil
  925.         se.volume = se.volume[1,3].to_i if $3.class == String
  926.         se.pitch = $4 if $4 != nil
  927.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  928.         @target_ally_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  929.       when "CRITICALHIT"
  930.         se = RPG::SE.new($2, dv, dp)
  931.         se.volume = $3 if $3 != nil
  932.         se.volume = se.volume[1,3].to_i if $3.class == String
  933.         se.pitch = $4 if $4 != nil
  934.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  935.         @critical_hit_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  936.       when "MISS"
  937.         se = RPG::SE.new($2, dv, dp)
  938.         se.volume = $3 if $3 != nil
  939.         se.volume = se.volume[1,3].to_i if $3.class == String
  940.         se.pitch = $4 if $4 != nil
  941.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  942.         @miss_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  943.       when "DEATH"
  944.         se = RPG::SE.new($2, dv, dp)
  945.         se.volume = $3 if $3 != nil
  946.         se.volume = se.volume[1,3].to_i if $3.class == String
  947.         se.pitch = $4 if $4 != nil
  948.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  949.         @death_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  950.       when "LOWHEALTH"
  951.         se = RPG::SE.new($2, dv, dp)
  952.         se.volume = $3 if $3 != nil
  953.         se.volume = se.volume[1,3].to_i if $3.class == String
  954.         se.pitch = $4 if $4 != nil
  955.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  956.         @low_health_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  957.       when "SELF"
  958.         se = RPG::SE.new($2, dv, dp)
  959.         se.volume = $3 if $3 != nil
  960.         se.volume = se.volume[1,3].to_i if $3.class == String
  961.         se.pitch = $4 if $4 != nil
  962.         se.pitch = se.pitch[1,3].to_i if $4.class == String
  963.         @self_se.insert(0, se) if se.name.upcase != "PLAYNOTHING"
  964.       end
  965.     end
  966.     case line
  967.     when Rockleedude::Battler_SE::BATTLER_SE_PLAYNOTHING
  968.       type = $1
  969.       type.upcase! unless $1 == nil
  970.       type.gsub!(/ /i, "") unless $1 == nil
  971.       case type
  972.       when "TAKE"
  973.         @take_damage_se.insert(0, "PLAYNOTHING")
  974.       when "RECOVER"
  975.         @recover_damage_se.insert(0, "PLAYNOTHING")  
  976.       when "EVADE"
  977.         @evade_se.insert(0, "PLAYNOTHING")
  978.       when "PLUSSTATE"
  979.         @plus_state_se.insert(0, "PLAYNOTHING")
  980.       when "MINUSSTATE"
  981.         @minus_state_se.insert(0, "PLAYNOTHING")
  982.       when "ATTACK"
  983.         @attack_se.insert(0, "PLAYNOTHING")
  984.       when "TARGETFOE"
  985.         @target_foe_se.insert(0, "PLAYNOTHING")
  986.       when "TARGETALLY"
  987.         @target_ally_se.insert(0, "PLAYNOTHING")
  988.       when "CRITICALHIT"
  989.         @critical_hit_se.insert(0, "PLAYNOTHING")
  990.       when "MISS"
  991.         @miss_se.insert(0, "PLAYNOTHING")
  992.       when "DEATH"
  993.         @death_se.insert(0, "PLAYNOTHING")
  994.       when "LOWHEALTH"
  995.         @low_health_se.insert(0, "PLAYNOTHING")
  996.       when "SELF"
  997.         @self_se.insert(0, "PLAYNOTHING")

  998.       end
  999.     end
  1000.     }
  1001.   end
  1002.   
  1003. end # class end

  1004. #
  1005. # SCENE_TITLE CLASS
  1006. #
  1007. class Scene_Title < Scene_Base

  1008.   alias load_database_orig_rld_battler_se load_database
  1009.   def load_database
  1010.     load_database_orig_rld_battler_se
  1011.     load_battler_se
  1012.   end
  1013.   
  1014.   alias load_bt_database_orig_rld_battler_se load_bt_database
  1015.   def load_bt_database
  1016.     load_bt_database_orig_rld_battler_se
  1017.     load_battler_se
  1018.   end
  1019.   
  1020.   def load_battler_se
  1021.     n = 0
  1022.     $data_actor_se = []
  1023.     $data_enemy_se = []
  1024.    
  1025. # Actor SE's  
  1026.     for actor in $data_actors
  1027.       next if actor == nil
  1028.       actor.create_se_cache
  1029.       take = actor.take_damage_se
  1030.       recover = actor.recover_damage_se
  1031.       evade = actor.evade_se
  1032.       plusstate = actor.plus_state_se
  1033.       minusstate = actor.minus_state_se
  1034.       attack = actor.attack_se
  1035.       targetfoe = actor.target_foe_se
  1036.       targetally = actor.target_ally_se
  1037.       criticalhit = actor.critical_hit_se
  1038.       miss = actor.miss_se
  1039.       death = actor.death_se
  1040.       lowhealth = actor.low_health_se
  1041.       selfse = actor.self_se
  1042.       $data_actor_se[actor.id] = [take, recover, evade, plusstate, minusstate, attack, targetfoe, targetally, criticalhit, miss, death, lowhealth, selfse] #deal,
  1043.     end
  1044.    
  1045.   # Enemy SE's
  1046.     for enemy in $data_enemies
  1047.       next if enemy == nil
  1048.       enemy.create_se_cache
  1049.       take = enemy.take_damage_se
  1050.       recover = enemy.recover_damage_se
  1051.       evade = enemy.evade_se
  1052.       plusstate = enemy.plus_state_se
  1053.       minusstate = enemy.minus_state_se
  1054.       attack = enemy.attack_se
  1055.       targetfoe = enemy.target_foe_se
  1056.       targetally = enemy.target_ally_se
  1057.       criticalhit = enemy.critical_hit_se
  1058.       miss = enemy.miss_se
  1059.       death = enemy.death_se
  1060.       lowhealth = enemy.low_health_se
  1061.       selfse = enemy.self_se
  1062.       $data_enemy_se[enemy.id] = [take, recover, evade, plusstate, minusstate, attack, targetfoe, targetally, criticalhit, miss, death, lowhealth, selfse] #deal,
  1063.     end
  1064.   end
  1065.   
  1066. end # class end
复制代码

点评

啊啊啊啊啊啊 还是不行啊 崩溃了我!!~~~ 我发个截图 我自认为我写的没错啊~ 版主大人!~  发表于 2012-1-3 17:33
然后脚本直接 MAIN 上边就哦了吧? 之后我再稍微写一些设定就好了是吧  发表于 2012-1-3 00:34
月夜版主大人 上边的设定是插在Sideview 1里没错吧?  发表于 2012-1-3 00:33
版主大人,,对于我这脚本新手来说 - - 看着深表压力啊。。  发表于 2012-1-3 00:20
额 - - 月夜前辈好猛 - - 收走试试  发表于 2012-1-3 00:13
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
301
在线时间
1079 小时
注册时间
2011-9-18
帖子
3286
7
发表于 2012-1-2 16:16:10 | 只看该作者
想到了个山寨的方法……

如图,设置即时执行的战斗事件,然后设置条件分歧,在每个角色陷入气绝时,各自播放SE……
再把系统默认SE调为无,完了……
简陋了点,不过还是能用的……

点评

用事件的方法我早就试过了 不可行啊  发表于 2012-1-3 00:14
bbh
……我错了。应该用回合?  发表于 2012-1-2 17:28
然后就一直重复播放叫声,因为放着即时的关系(= =)  发表于 2012-1-2 17:27
广告:空位,招租,有意者私信。

长名公主与妖精之剑二代公测进行中 欢迎加入测试群372588926  先睹为快
百度 长名公主与妖精之剑吧招募吧主 快乐星球核爆启示录拍摄组
了解更多新RM游戏,游戏制作请加入66RPG支援群:113622890


内裤什么的最好吃了>v<!
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
93 小时
注册时间
2011-11-3
帖子
152
8
 楼主| 发表于 2012-1-3 17:34:31 | 只看该作者


我写的应该没错啊!~  是不是SE格式出毛病了!~ 必须是OGG?
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-19 15:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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