Nérylis 2 Posted February 28, 2015 Here is a demo : http://www.mediafire.com/download/if4bi8rkc84h9k1/Project1%282%29.exe It's in French but don't worry, you can test physical attacks with every character. And the 4th character has a magical attack which targets all enemies. Share this post Link to post Share on other sites
DoubleX 208 Posted March 1, 2015 (edited) I changed those 2 events to the below and the KO states applied to all enemies in my tests: Control Switches: [000x:Enemy X Dies] = ON Control Variables: [0061] = "Slime" Conditional Branch: Switch [0001:Enemy 1 Dies] == ON Conditional Branch: Switch [0002:Enemy 2 Dies] == ON Change Enemy State: [1. Slime], - [Anti-Ko] Change Enemy State: [2. Slime], - [Anti-Ko] Change Enemy State: [1. Slime], + [Mort] Change Enemy State: [2. Slime], + [Mort] Wait : 60 frame(s) Branch End Branch End Also, I've set those 2 switches to OFF at the start of a battle. Edited March 1, 2015 by DoubleX Share this post Link to post Share on other sites
Nérylis 2 Posted March 1, 2015 But if I attack enemies with simple attacks, your system don't work. The first enemy stay to the screen while he died. Have you seen for that : When enemies attack, these actions are faster. The time between the attack of my actor 1 and the action of my actor 2 is reduced. My actors which have successive attacks (as my monk for example and his two punches), these actions are also faster (although in this case, it does not bother me). Share this post Link to post Share on other sites
Nérylis 2 Posted March 10, 2015 (edited) When enemies attack, these actions are faster. The time between the attack of my actor 1 and the action of my actor 2 is reduced. My actors which have successive attacks (as my monk for example and his two punches), these actions are also faster (although in this case, it does not bother me). Up Edited March 10, 2015 by Nérylis Share this post Link to post Share on other sites
Nérylis 2 Posted March 13, 2015 When enemies attack, these actions are faster. The time between the attack of my actor 1 and the action of my actor 2 is reduced. My actors which have successive attacks (as my monk for example and his two punches), these actions are also faster (although in this case, it does not bother me). Up Share this post Link to post Share on other sites
Nérylis 2 Posted March 19, 2015 When enemies attack, these actions are faster. The time between the attack of my actor 1 and the action of my actor 2 is reduced. My actors which have successive attacks (as my monk for example and his two punches), these actions are also faster (although in this case, it does not bother me). Uppppp Share this post Link to post Share on other sites
DoubleX 208 Posted March 20, 2015 (edited) But if I attack enemies with simple attacks, your system don't work. The first enemy stay to the screen while he died. So if a skill that's going to kill more than 1 enemies, the death state should be applied to them at the exactly same time; While if a skill that's just going to kill 1 enemy, the death states should just be applied to that enemy. Unless I misunderstand something, after an in-depth analysis, I suspect that that's just outright impossible without abandoning the default RMVXA action execution mechanics entirely. At least the problem is certainly far beyond my current scripting proficiency. It's because: In the default RMVXA action execution mechanics, the action executes its effects on only 1 of its targets at a time. When the ith target in the target list dies, applying the death state right away means it's certain that no remaining targets in the target list will die, while not doing so means it's certain that at least 1 remaining target in the target list will die. Combining both cases implies that a working solution either has to let the actions execute its effects on all of its targets at the same time, or has to always correctly predict if no remaining targets in the target list will die. I think that the latter is just outright impossible while the former is clearly far beyond my current scripting proficiency. When enemies attack, these actions are faster. The time between the attack of my actor 1 and the action of my actor 2 is reduced. My actors which have successive attacks (as my monk for example and his two punches), these actions are also faster (although in this case, it does not bother me). I still don't get it. May you please post a video to show that? Edited March 20, 2015 by DoubleX Share this post Link to post Share on other sites
Nérylis 2 Posted March 20, 2015 (edited) For the KO system, for the moment, I leave aside. For your script and the problem : Look at this demo : http://www.mediafire.com/download/6o73oa6wi05pmd6/Damage+all.exe You'll see, the bug is still here. Edited March 20, 2015 by Nérylis Share this post Link to post Share on other sites
DoubleX 208 Posted March 20, 2015 I'm still not sure if I get what you want, but let's try this snippet instead anyway : #==============================================================================| # ** You need not edit this part as it's about how this snippet works | #------------------------------------------------------------------------------| #------------------------------------------------------------------------------| # * Edit class: Window_BattleLog | #------------------------------------------------------------------------------| class Window_BattleLog < Window_Selectable #----------------------------------------------------------------------------| # New public instance variable | #----------------------------------------------------------------------------| attr_writer :last_line_number #----------------------------------------------------------------------------| # Alias method: wait | #----------------------------------------------------------------------------| alias wait_log_window_display wait def wait # Rewritten to wait only when asked by this snippet wait_log_window_display if @wait # end # wait #----------------------------------------------------------------------------| # Alias method: wait_for_effect | #----------------------------------------------------------------------------| alias wait_for_effect_log_window_display wait def wait_for_effect # Rewritten to wait for effect only when asked by this snippet wait_for_effect_log_window_display if @wait # end # wait_for_effect #----------------------------------------------------------------------------| # Rewrite method: display_counter | #----------------------------------------------------------------------------| def display_counter(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_evasion add_text(sprintf(Vocab::CounterAttack, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_counter #----------------------------------------------------------------------------| # Rewrite method: display_reflection | #----------------------------------------------------------------------------| def display_reflection(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_reflection add_text(sprintf(Vocab::MagicReflection, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_reflection #----------------------------------------------------------------------------| # Rewrite method: display_substitute | #----------------------------------------------------------------------------| def display_substitute(substitute, target) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number add_text(sprintf(Vocab::Substitute, substitute.name, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_substitute #----------------------------------------------------------------------------| # Rewrite method: display_action_results | #----------------------------------------------------------------------------| def display_action_results(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number @wait = !item.for_all? if target.result.used [:display_critical, :display_damage, :display_affected_status, :display_failure].each{ |method| send(method, target,item) process_max_line_number_breach(item) if line_number >= max_line_number } end @wait = true # end # display_action_results #----------------------------------------------------------------------------| # New method: process_max_line_number_breach | #----------------------------------------------------------------------------| def process_max_line_number_breach(item) @wait = true wait @wait = !item.for_all? back_to(@last_line_number) @last_line_number = line_number end # process_max_line_number_breach end # Window_BattleLog #------------------------------------------------------------------------------| # * Edit class: Scene_Battle | #------------------------------------------------------------------------------| class Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_log_window_display use_item def use_item # Added to clear the battle log window last line number data @log_window.last_line_number = nil # use_item_log_window_display @log_window.wait end # use_item #----------------------------------------------------------------------------| # Rewrite method: apply_item_effects | #----------------------------------------------------------------------------| def apply_item_effects(target, item) target.item_apply(@subject, item) # Rewritten to refresh the target only instead of the whole status window @status_window.draw_item(target.index) if target.actor? && target.index >= 0 # @log_window.display_action_results(target, item) end # apply_item_effects #----------------------------------------------------------------------------| # Rewrite method: invoke_counter_attack | #----------------------------------------------------------------------------| def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) # Rewritten to refresh the target only instead of the whole status window if @subject.actor? && @subject.index >= 0 @status_window.draw_item(@subject.index) end # @log_window.display_action_results(@subject, attack_skill) end # invoke_counter_attack end # Scene_Battle #==============================================================================| Now, at the end of executing an action, a short wait will take place. Share this post Link to post Share on other sites
Nérylis 2 Posted March 20, 2015 (edited) I tested, it's better. There are some things : - When an actor attacks with a weapon which have Extra Attack (as the monk and his claws for example), there is also a problem with the wait between the attacks. - When an actor launches a skill which targets All ennemies and kill them, the time between the display of damages and the application of KO Status is too fast. - The last problem is minor but I tell you anyway : when I fight 4, 5, 6, 7 or 8 ennemies and I launch a skill which targets All ennemies, the display of damage is done in some parts because there must be a limit of display. You can test this points in the demo in my previous post. Edited March 20, 2015 by Nérylis Share this post Link to post Share on other sites
DoubleX 208 Posted March 21, 2015 (edited) I failed to reproduce the 1st problem as in my tests, I didn't find any wait added between the attacks when the newest version of the snippet's used. Maybe it's because I didn't get what you mean, so you may want to use a video to illustrate the problem Solving the 2nd problem needs to redesign large chunks of the battle log. In the default RMVXA setting, when the ith target dies, the battle log will first asks that target to perform the collapse effect, then processes the effect display of the next target. If I don't redesign that part entirely, the battle log won't show the effects of all enemies at the same time, as a short wait must be added between displaying the effects and performing the collapse effect to solve the 2nd problem. Right now I used a rather straightforward way to deal with it, but it can be prone to bugs and compatibility issues. Letting you set the maximum number of lines displayed by the battle log might solve the 3rd problem. Anyway, you may want yo use this snippet instead of the previous one: #------------------------------------------------------------------------------| # * Edit class: Window_BattleLog | #------------------------------------------------------------------------------| class Window_BattleLog < Window_Selectable #==============================================================================| # ** You only need to edit this part as it's about what this snippet does | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New constant | #----------------------------------------------------------------------------| # Sets the maximum number of lines displayed by the battle log simultaneously MAX_LINE_NUMBER = 10 #==============================================================================| #==============================================================================| # ** You need not edit this part as it's about how this snippet works | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New public instance variables | #----------------------------------------------------------------------------| attr_writer :executing_action attr_writer :last_line_number #----------------------------------------------------------------------------| # Rewrite method: max_line_number | #----------------------------------------------------------------------------| def max_line_number # Rewritten to use the constant set by the users MAX_LINE_NUMBER # end # max_line_number #----------------------------------------------------------------------------| # Rewrite method: display_counter | #----------------------------------------------------------------------------| def display_counter(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_evasion add_text(sprintf(Vocab::CounterAttack, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_counter #----------------------------------------------------------------------------| # Rewrite method: display_reflection | #----------------------------------------------------------------------------| def display_reflection(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_reflection add_text(sprintf(Vocab::MagicReflection, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_reflection #----------------------------------------------------------------------------| # Rewrite method: display_substitute | #----------------------------------------------------------------------------| def display_substitute(substitute, target) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number add_text(sprintf(Vocab::Substitute, substitute.name, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_substitute #----------------------------------------------------------------------------| # Rewrite method: display_action_results | #----------------------------------------------------------------------------| def display_action_results(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number @wait = !item.for_all? if target.result.used [:display_critical, :display_damage, :display_affected_status, :display_failure].each{ |method| send(method, target,item) process_max_line_number_breach(item) if line_number >= max_line_number } end @wait = true # end # display_action_results #----------------------------------------------------------------------------| # Rewrite method: display_added_states | #----------------------------------------------------------------------------| def display_added_states(target) target.result.added_state_objects.each do |state| state_msg = target.actor? ? state.message1 : state.message2 # Rewritten to stop collapsing targets while executing an action unless @executing_action || state.id != target.death_state_id target.perform_collapse_effect end # next if state_msg.empty? replace_text(target.name + state_msg) wait wait_for_effect end end # display_added_states #----------------------------------------------------------------------------| # Alias method: wait | #----------------------------------------------------------------------------| alias wait_log_window_display wait def wait # Rewritten to wait only when asked by this snippet wait_log_window_display if @wait # end # wait #----------------------------------------------------------------------------| # Alias method: wait_for_effect | #----------------------------------------------------------------------------| alias wait_for_effect_log_window_display wait def wait_for_effect # Rewritten to wait for effect only when asked by this snippet wait_for_effect_log_window_display if @wait # end # wait_for_effect #----------------------------------------------------------------------------| # New method: process_max_line_number_breach | # - Clears the displayed lines when the maximum line number's reached | #----------------------------------------------------------------------------| def process_max_line_number_breach(item) # Has a short wait before clearing the currently displayed lines @wait = true wait @wait = !item.for_all? back_to(@last_line_number) @last_line_number = line_number # end # process_max_line_number_breach end # Window_BattleLog #------------------------------------------------------------------------------| # * Edit class: Scene_Battle | #------------------------------------------------------------------------------| class Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_log_window_display use_item def use_item # Added to store all alive battlers alive_battle_members = $game_party.alive_members + $game_troop.alive_members # # Added to tell the log window that an action begins to execute @log_window.executing_action = true @log_window.last_line_number = nil # use_item_log_window_display # Added to tell the log window that an action finishes its execution @log_window.executing_action = false @log_window.wait # # Added to collapse all previously alive battlers that are now dead alive_battle_members.each { |m| m.perform_collapse_effect if m.dead? } @log_window.wait # end # use_item #----------------------------------------------------------------------------| # Rewrite method: apply_item_effects | #----------------------------------------------------------------------------| def apply_item_effects(target, item) target.item_apply(@subject, item) # Rewritten to refresh the target only instead of the whole status window @status_window.draw_item(target.index) if target.actor? && target.index >= 0 # @log_window.display_action_results(target, item) end # apply_item_effects #----------------------------------------------------------------------------| # Rewrite method: invoke_counter_attack | #----------------------------------------------------------------------------| def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) # Rewritten to refresh the target only instead of the whole status window if @subject.actor? && @subject.index >= 0 @status_window.draw_item(@subject.index) end # @log_window.display_action_results(@subject, attack_skill) end # invoke_counter_attack end # Scene_Battle #==============================================================================| P.S.: It might also solves the K.O. status problem if what you really care is the collapsing effects but not the death state itself. Edited March 21, 2015 by DoubleX Share this post Link to post Share on other sites
Nérylis 2 Posted March 21, 2015 (edited) I did a video to illustrate the problem : http://www.youtube.com/watch?v=4r_ug-aS3-s&feature=youtu.be At start, I show you Extra attack in the weapon of the monk and Several hits for the skill of enemies. The first part is without your script, the second with your script. My monk and enemies hits two times each attack. Look the time between the first hit and the second hit. With your script, this time is reduced and I would like it back as before. With your last version of your script, I had an other problem of wait after each action. This wait is too long. Before, it was perfect. I think we should stay on that you had done because the max number line displayed doesn't change the problem but it does not matter. I noticed an other bug with the script. When an actor lose HP (probably MP and TP too), there is a display bug between the previous value and the new value. Edited March 21, 2015 by Nérylis Share this post Link to post Share on other sites
DoubleX 208 Posted March 21, 2015 Let's try this version instead: #------------------------------------------------------------------------------| # * Edit class: Window_BattleLog | #------------------------------------------------------------------------------| class Window_BattleLog < Window_Selectable #==============================================================================| # ** You only need to edit this part as it's about what this snippet does | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New constant | #----------------------------------------------------------------------------| # Sets the maximum number of lines displayed by the battle log simultaneously MAX_LINE_NUMBER = 6 #==============================================================================| #==============================================================================| # ** You need not edit this part as it's about how this snippet works | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New public instance variables | #----------------------------------------------------------------------------| attr_writer :executing_action attr_writer :last_line_number #----------------------------------------------------------------------------| # Rewrite method: max_line_number | #----------------------------------------------------------------------------| def max_line_number # Rewritten to use the constant set by the users MAX_LINE_NUMBER # end # max_line_number #----------------------------------------------------------------------------| # Rewrite method: display_counter | #----------------------------------------------------------------------------| def display_counter(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_evasion add_text(sprintf(Vocab::CounterAttack, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_counter #----------------------------------------------------------------------------| # Rewrite method: display_reflection | #----------------------------------------------------------------------------| def display_reflection(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_reflection add_text(sprintf(Vocab::MagicReflection, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_reflection #----------------------------------------------------------------------------| # Rewrite method: display_substitute | #----------------------------------------------------------------------------| def display_substitute(substitute, target) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number add_text(sprintf(Vocab::Substitute, substitute.name, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_substitute #----------------------------------------------------------------------------| # Rewrite method: display_action_results | #----------------------------------------------------------------------------| def display_action_results(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number @wait = !item.for_all? if target.result.used [:display_critical, :display_damage, :display_affected_status, :display_failure].each{ |method| send(method, target,item) process_max_line_number_breach(item) if line_number >= max_line_number } end @wait = true # end # display_action_results #----------------------------------------------------------------------------| # Rewrite method: display_added_states | #----------------------------------------------------------------------------| def display_added_states(target) target.result.added_state_objects.each do |state| state_msg = target.actor? ? state.message1 : state.message2 # Rewritten to stop collapsing targets while executing an action unless @executing_action || state.id != target.death_state_id target.perform_collapse_effect end # next if state_msg.empty? replace_text(target.name + state_msg) wait wait_for_effect end end # display_added_states #----------------------------------------------------------------------------| # Alias method: wait | #----------------------------------------------------------------------------| alias wait_log_window_display wait def wait # Rewritten to wait only when asked by this snippet wait_log_window_display if @wait # end # wait #----------------------------------------------------------------------------| # Alias method: wait_for_effect | #----------------------------------------------------------------------------| alias wait_for_effect_log_window_display wait def wait_for_effect # Rewritten to wait for effect only when asked by this snippet wait_for_effect_log_window_display if @wait # end # wait_for_effect #----------------------------------------------------------------------------| # New method: process_max_line_number_breach | # - Clears the displayed lines when the maximum line number's reached | #----------------------------------------------------------------------------| def process_max_line_number_breach(item) # Has a short wait before clearing the currently displayed lines @wait = true wait @wait = !item.for_all? back_to(@last_line_number) @last_line_number = line_number # end # process_max_line_number_breach end # Window_BattleLog #------------------------------------------------------------------------------| # * Edit class: Scene_Battle | #------------------------------------------------------------------------------| class Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Rewrite method: apply_item_effects | #----------------------------------------------------------------------------| def apply_item_effects(target, item) target.item_apply(@subject, item) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if target.actor? && target.index >= 0 # @log_window.display_action_results(target, item) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? # end # apply_item_effects #----------------------------------------------------------------------------| # Rewrite method: invoke_counter_attack | #----------------------------------------------------------------------------| def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if @subject.actor? && @subject.index >= 0 # @log_window.display_action_results(@subject, attack_skill) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? # end # invoke_counter_attack #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_log_window_display use_item def use_item # Added to store all alive battlers alive_battle_members = $game_party.alive_members + $game_troop.alive_members # # Added to tell the log window that an action begins to execute @log_window.executing_action = true @log_window.last_line_number = nil # use_item_log_window_display # Added to tell the log window that an action finishes its execution @log_window.executing_action = false # # Added to collapse all previously alive battlers that are now dead @log_window.wait if alive_battle_members.any? { |member| member.dead? } alive_battle_members.each { |m| m.perform_collapse_effect if m.dead? } # end # use_item end # Scene_Battle #==============================================================================| Share this post Link to post Share on other sites
Nérylis 2 Posted March 21, 2015 I tested, it's better. The wait for Extra attacks and Several hits is perfect. The display bug with HP is fixed, it's good. When I launch a skill which targets All enemies, the time between the damages and the KO status is good. But if I kill an enemy with simple attacks, this time is too long. One question for Max number line displayed : is it possible to display damages for each enemy, and then status for each enemy ? If it's possible, 8 lines would be sufficient. Share this post Link to post Share on other sites
DoubleX 208 Posted March 22, 2015 (edited) Let's try this snippet instead: #------------------------------------------------------------------------------| # * Edit class: Window_BattleLog | #------------------------------------------------------------------------------| class Window_BattleLog < Window_Selectable #==============================================================================| # ** You only need to edit this part as it's about what this snippet does | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New constant | #----------------------------------------------------------------------------| # Sets the maximum number of lines displayed by the battle log simultaneously MAX_LINE_NUMBER = 6 #==============================================================================| #==============================================================================| # ** You need not edit this part as it's about how this snippet works | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New public instance variables | #----------------------------------------------------------------------------| attr_writer :executing_action attr_writer :last_line_number #----------------------------------------------------------------------------| # Rewrite method: max_line_number | #----------------------------------------------------------------------------| def max_line_number # Rewritten to use the constant set by the users MAX_LINE_NUMBER # end # max_line_number #----------------------------------------------------------------------------| # Rewrite method: display_counter | #----------------------------------------------------------------------------| def display_counter(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_evasion add_text(sprintf(Vocab::CounterAttack, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_counter #----------------------------------------------------------------------------| # Rewrite method: display_reflection | #----------------------------------------------------------------------------| def display_reflection(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_reflection add_text(sprintf(Vocab::MagicReflection, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_reflection #----------------------------------------------------------------------------| # Rewrite method: display_substitute | #----------------------------------------------------------------------------| def display_substitute(substitute, target) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number add_text(sprintf(Vocab::Substitute, substitute.name, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_substitute #----------------------------------------------------------------------------| # Rewrite method: display_action_results | #----------------------------------------------------------------------------| def display_action_results(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number @wait = !item.for_all? if target.result.used [:display_critical, :display_damage, :display_affected_status, :display_failure].each{ |method| send(method, target,item) process_max_line_number_breach(item) if line_number >= max_line_number } end @wait = true # end # display_action_results #----------------------------------------------------------------------------| # Rewrite method: display_added_states | #----------------------------------------------------------------------------| def display_added_states(target) target.result.added_state_objects.each do |state| state_msg = target.actor? ? state.message1 : state.message2 # Rewritten to stop collapsing targets while executing an action unless @executing_action || state.id != target.death_state_id target.perform_collapse_effect end # next if state_msg.empty? replace_text(target.name + state_msg) wait wait_for_effect end end # display_added_states #----------------------------------------------------------------------------| # Alias method: wait | #----------------------------------------------------------------------------| alias wait_log_window_display wait def wait # Rewritten to wait only when asked by this snippet wait_log_window_display if @wait # end # wait #----------------------------------------------------------------------------| # Alias method: wait_for_effect | #----------------------------------------------------------------------------| alias wait_for_effect_log_window_display wait def wait_for_effect # Rewritten to wait for effect only when asked by this snippet wait_for_effect_log_window_display if @wait # end # wait_for_effect #----------------------------------------------------------------------------| # New method: process_max_line_number_breach | # - Clears the displayed lines when the maximum line number's reached | #----------------------------------------------------------------------------| def process_max_line_number_breach(item) # Has a short wait before clearing the currently displayed lines @wait = true wait @wait = !item.for_all? back_to(@last_line_number) @last_line_number = line_number # end # process_max_line_number_breach end # Window_BattleLog #------------------------------------------------------------------------------| # * Edit class: Scene_Battle | #------------------------------------------------------------------------------| class Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Rewrite method: apply_item_effects | #----------------------------------------------------------------------------| def apply_item_effects(target, item) target.item_apply(@subject, item) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if target.actor? && target.index >= 0 # @log_window.display_action_results(target, item) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? && target.alive? # end # apply_item_effects #----------------------------------------------------------------------------| # Rewrite method: invoke_counter_attack | #----------------------------------------------------------------------------| def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if @subject.actor? && @subject.index >= 0 # @log_window.display_action_results(@subject, attack_skill) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? && @subject.alive? # end # invoke_counter_attack #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_log_window_display use_item def use_item # Added to store all alive battlers alive_battle_members = $game_party.alive_members + $game_troop.alive_members # # Added to tell the log window that an action begins to execute @log_window.executing_action = true @log_window.last_line_number = nil # use_item_log_window_display # Added to tell the log window that an action finishes its execution @log_window.executing_action = false # # Added to collapse all previously alive battlers that are now dead return unless alive_battle_members.any? { |member| member.dead? } @log_window.wait unless @subject.current_action.item.for_one? alive_battle_members.each { |m| m.perform_collapse_effect if m.dead? } # end # use_item end # Scene_Battle #==============================================================================| It doesn't address the "is it possible to display damages for each enemy, and then status for each enemy ?" concern yet, as while it's possible, it'll probably lead to total chaos unless the stuffs are handled extremely carefully: 1. When there's critical, counterattack or magic reflection, 8 lines still won't be enough to display damages for 8 enemies. Theoretically, 16 lines are needed as it's possible that all damages involves one of those cases. 2. Say, a substitute state's added to the ith target right after being damaged(as an action's effect), and the (i+j)th target's hp's critical. The former will substitute for the latter when the latter's targeted. In the default RMVXA settings, players immediately knows why that substitute takes place as the battle log displayed a substitute state's added to the former before the latter's targeted; In your desired settings, players might be confused, as the cause of the substitute is displayed after that substitute action, and, from the player's perspective, they might think that that substitute state's added at the end of the action. The same applies to adding a def and/or mdf debuff to the ith target right after the 1st damage, causing the 2nd damage to suddenly rise significantly. Players might think that the damage variation is large when it's indeed small. Edited March 22, 2015 by DoubleX Share this post Link to post Share on other sites
Nérylis 2 Posted March 22, 2015 (edited) I tested, it's almost perfect. The message displayed to say that the enemy is KO stays a little too long. And when the enemy disappears, the next action comes too quickly. If you can fix this, I think it will be perfect. It doesn't address the "is it possible to display damages for each enemy, and then status for each enemy ?" concern yet, as while it's possible, it'll probably lead to total chaos unless the stuffs are handled extremely carefully: 1. When there's critical, counterattack or magic reflection, 8 lines still won't be enough to display damages for 8 enemies. Theoretically, 16 lines are needed as it's possible that all damages involves one of those cases. 2. Say, a substitute state's added to the ith target right after being damaged(as an action's effect), and the (i+j)th target's hp's critical. The former will substitute for the latter when the latter's targeted. In the default RMVXA settings, players immediately knows why that substitute takes place as the battle log displayed a substitute state's added to the former before the latter's targeted; In your desired settings, players might be confused, as the cause of the substitute is displayed after that substitute action, and, from the player's perspective, they might think that that substitute state's added at the end of the action. The same applies to adding a def and/or mdf debuff to the ith target right after the 1st damage, causing the 2nd damage to suddenly rise significantly. Players might think that the damage variation is large when it's indeed small. Ok, no problem. We stay as we are then. Edited March 22, 2015 by Nérylis Share this post Link to post Share on other sites
Nérylis 2 Posted March 24, 2015 The message displayed to say that the enemy is KO stays a little too long. And when the enemy disappears, the next action comes too quickly. If you can fix this, I think it will be perfect. Up Share this post Link to post Share on other sites
Nérylis 2 Posted March 27, 2015 The message displayed to say that the enemy is KO stays a little too long. And when the enemy disappears, the next action comes too quickly. If you can fix this, I think it will be perfect. Up Share this post Link to post Share on other sites
Nérylis 2 Posted March 30, 2015 The message displayed to say that the enemy is KO stays a little too long. And when the enemy disappears, the next action comes too quickly. If you can fix this, I think it will be perfect. Up Share this post Link to post Share on other sites
Nérylis 2 Posted April 2, 2015 The message displayed to say that the enemy is KO stays a little too long. And when the enemy disappears, the next action comes too quickly. If you can fix this, I think it will be perfect. Up Share this post Link to post Share on other sites
+ TBWCS 953 Posted April 2, 2015 Okay wait, my first time seeing this request. Could you bring down to me your request again and what are the things that have been done so far? Share this post Link to post Share on other sites
Nérylis 2 Posted April 2, 2015 (edited) Yes. The aim of this topic is to find a solution to fix a problem in RPG Maker VX Ace. By default in game, when we configurate a skill which hit all ennemies, damages are applicated in each ennemy one after the other. I would like a script to apply the damage and status on all enemies simultaneously. If you have an idea of script, you can do it. DoubleX has made a script almost perfect but it stays some small problems : - The message displayed to say that the enemy is KO stays a little too long. - When the enemy disappears, the next action comes too quickly. The script is here : #------------------------------------------------------------------------------| # * Edit class: Window_BattleLog | #------------------------------------------------------------------------------| class Window_BattleLog < Window_Selectable #==============================================================================| # ** You only need to edit this part as it's about what this snippet does | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New constant | #----------------------------------------------------------------------------| # Sets the maximum number of lines displayed by the battle log simultaneously MAX_LINE_NUMBER = 6 #==============================================================================| #==============================================================================| # ** You need not edit this part as it's about how this snippet works | #------------------------------------------------------------------------------| #----------------------------------------------------------------------------| # New public instance variables | #----------------------------------------------------------------------------| attr_writer :executing_action attr_writer :last_line_number #----------------------------------------------------------------------------| # Rewrite method: max_line_number | #----------------------------------------------------------------------------| def max_line_number # Rewritten to use the constant set by the users MAX_LINE_NUMBER # end # max_line_number #----------------------------------------------------------------------------| # Rewrite method: display_counter | #----------------------------------------------------------------------------| def display_counter(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_evasion add_text(sprintf(Vocab::CounterAttack, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_counter #----------------------------------------------------------------------------| # Rewrite method: display_reflection | #----------------------------------------------------------------------------| def display_reflection(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number Sound.play_reflection add_text(sprintf(Vocab::MagicReflection, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_reflection #----------------------------------------------------------------------------| # Rewrite method: display_substitute | #----------------------------------------------------------------------------| def display_substitute(substitute, target) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number add_text(sprintf(Vocab::Substitute, substitute.name, target.name)) process_max_line_number_breach(item) if line_number >= max_line_number # end # display_substitute #----------------------------------------------------------------------------| # Rewrite method: display_action_results | #----------------------------------------------------------------------------| def display_action_results(target, item) # Rewritten to show all logs until the max line number's reached @last_line_number ||= line_number @wait = !item.for_all? if target.result.used [:display_critical, :display_damage, :display_affected_status, :display_failure].each{ |method| send(method, target,item) process_max_line_number_breach(item) if line_number >= max_line_number } end @wait = true # end # display_action_results #----------------------------------------------------------------------------| # Rewrite method: display_added_states | #----------------------------------------------------------------------------| def display_added_states(target) target.result.added_state_objects.each do |state| state_msg = target.actor? ? state.message1 : state.message2 # Rewritten to stop collapsing targets while executing an action unless @executing_action || state.id != target.death_state_id target.perform_collapse_effect end # next if state_msg.empty? replace_text(target.name + state_msg) wait wait_for_effect end end # display_added_states #----------------------------------------------------------------------------| # Alias method: wait | #----------------------------------------------------------------------------| alias wait_log_window_display wait def wait # Rewritten to wait only when asked by this snippet wait_log_window_display if @wait # end # wait #----------------------------------------------------------------------------| # Alias method: wait_for_effect | #----------------------------------------------------------------------------| alias wait_for_effect_log_window_display wait def wait_for_effect # Rewritten to wait for effect only when asked by this snippet wait_for_effect_log_window_display if @wait # end # wait_for_effect #----------------------------------------------------------------------------| # New method: process_max_line_number_breach | # - Clears the displayed lines when the maximum line number's reached | #----------------------------------------------------------------------------| def process_max_line_number_breach(item) # Has a short wait before clearing the currently displayed lines @wait = true wait @wait = !item.for_all? back_to(@last_line_number) @last_line_number = line_number # end # process_max_line_number_breach end # Window_BattleLog #------------------------------------------------------------------------------| # * Edit class: Scene_Battle | #------------------------------------------------------------------------------| class Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Rewrite method: apply_item_effects | #----------------------------------------------------------------------------| def apply_item_effects(target, item) target.item_apply(@subject, item) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if target.actor? && target.index >= 0 # @log_window.display_action_results(target, item) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? && target.alive? # end # apply_item_effects #----------------------------------------------------------------------------| # Rewrite method: invoke_counter_attack | #----------------------------------------------------------------------------| def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) # Rewritten to refresh the status window only if the target's an actor @status_window.refresh if @subject.actor? && @subject.index >= 0 # @log_window.display_action_results(@subject, attack_skill) # Added to have short waits between applications for single target items @log_window.wait if item.for_one? && @subject.alive? # end # invoke_counter_attack #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_log_window_display use_item def use_item # Added to store all alive battlers alive_battle_members = $game_party.alive_members + $game_troop.alive_members # # Added to tell the log window that an action begins to execute @log_window.executing_action = true @log_window.last_line_number = nil # use_item_log_window_display # Added to tell the log window that an action finishes its execution @log_window.executing_action = false # # Added to collapse all previously alive battlers that are now dead return unless alive_battle_members.any? { |member| member.dead? } @log_window.wait unless @subject.current_action.item.for_one? alive_battle_members.each { |m| m.perform_collapse_effect if m.dead? } # end # use_item end # Scene_Battle #==============================================================================| Edited April 2, 2015 by Nérylis 1 Share this post Link to post Share on other sites
Murd 4 Posted April 2, 2015 Does Yanfly's Core Engine fix this? I saw the script's description about fixing animation to display only once when your skill hits all enemies in the screen. However; I have not yet tried it by myself. Share this post Link to post Share on other sites