Hello everyone.
I have a problem with the script of Saint Victor (Victor Engine) Active Time Bar.
The problem relates to the combined use with a common event or event battle.
For this situation, the victor made available to your script a special configuration, but unfortunately led to major problems (or not solved).
The first and third *** configuration :) and Actions: Time) following the same problem.
situation:
1) Actor X uses skill (with common event)
2) Immediately after the activation of the common event (regardless of duration), the window of "battle command" (Attacking, defending, skill, items ..) is already active for the next actor (if actor ouver some 100% the atb).
This error causes problems with most scripts battle.
*** The second configuration :) Battlers), works perfectly, but generates an abrupt drop in FPS.
situation:
1) Start the battle.
2) When the SEE battle commands (attack, defend, skill ...) look at the FPS.
3) enter the menu "items" of battle command and compare the difference in fps.
To facilitate understanding, I created two demos.
ATB Test (Battle Event event-Common Problem) rar
ATB Test (lag) rar
Is there something that can be done?
Sorry for bad englsh
Grateful.
Test ATB (Battle Event-Common event Problem).rar
Test ATB (lag).rar
(HELP!) Problems with Victor Engine ATB Script.
● ARCHIVED · READ-ONLY
-
-
I think your 1st issue is actually the intended design of his ATB script as some other atb scripts work like that too.
Your 2nd issue is indeed a problem though. I know how to solve it but I've no clue why Victor wrote the related code that way. Anyway, the root cause is the below whole setup(all these methods are under module BattleManager) :
To remedy your issue, just add the below snippet:Spoilerdef all_dead_members $game_party.dead_members + $game_troop.dead_membersendCode:def setup_atb_turn_speed case VE_ATB_TURN_COUNT when :battlers then all_dead_members.size when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT endendCode:def turn_end @phase = :turn_end $game_troop.increase_turn @atb_turn_count = 0 @abt_turn_speed = setup_atb_turn_speed all_battle_members.each do |battler| battler.on_turn_end next if scene_changing? SceneManager.scene.refresh_status SceneManager.scene.log_window.display_auto_affected_status(battler) SceneManager.scene.log_window.wait_and_clear endendCode:alias :init_members_ve_active_time_battle :init_membersdef init_members init_members_ve_active_time_battle @abt_turn_speed = setup_atb_turn_speed @escape_time = 0 @atb_turn_count = 0 @key_escape_count = 0 @input_battlers = [] @active_members = [] @action_battlers = []endCode:In most cases including yours, battles begin with no battlers being dead, causing both $game_party.dead_members and $game_troop.dead_members to be 0.def update_turn return if wating? increase_atb_turn_count(:time) SceneManager.scene.turn_ending if @atb_turn_count >= @abt_turn_speedend
This causes all_dead_members to return 0 and set @abt_turn_speed to be 0 if VE_ATB_TURN_COUNT is set as :battlers.
As normally @atb_turn_count is always non-negative, @atb_turn_count >= @abt_turn_speed will always be true and so SceneManager.scene.turn_ending will always be called when update_turn is called.
As update turn is called every frame unless the scene is changing or events are running or the party window is active or the party is escaping and they're usually all false at the beginning of most battles, SceneManager.scene.turn_ending will be called every frame right after those battles are started, causing your lag. The reason is within that method itself(it's under class Scene_Battle):
def turn_ending BattleManager.turn_end process_event BattleManager.turn_phaseendCode:Under this whole setup, the method refresh_status under class Scene_Battle is the main direct reason of your lag as now it'll update the status_window x times(x being the number of all battlers in the current battle) per frame which is unnecessarily and unbelievably resource-consuming.def turn_end @phase = :turn_end $game_troop.increase_turn @atb_turn_count = 0 @abt_turn_speed = setup_atb_turn_speed all_battle_members.each do |battler| battler.on_turn_end next if scene_changing? SceneManager.scene.refresh_status SceneManager.scene.log_window.display_auto_affected_status(battler) SceneManager.scene.log_window.wait_and_clear endend
It's written this way as according to his script, :battlers controls the turn count by the number of alive battlers but his implementation imply that :battlers uses the number of dead battlers instead. My snippet just change that implementation back to what it's supposed to do.Spoilermodule BattleManager #----------------------------------------------------------------------------| # Rewrite method: self.setup_atb_turn_speed | #----------------------------------------------------------------------------| def self.setup_atb_turn_speed case VE_ATB_TURN_COUNT # This part is rewritten by this snippet to fix :battlers issue when :battlers then all_alive_members.size # when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT end end # self.setup_atb_turn_speed #----------------------------------------------------------------------------| # New method: self.all_alive_members | #----------------------------------------------------------------------------| def self.all_alive_members $game_party.alive_members + $game_troop.alive_members end # self.all_alive_membersend # BattleManager
P.S.: Again, I'm really interested in why Victor implemented :battlers this way. He's no doubt an exceptionally proficient scripter so yeah, I just failed to understand why :) -
Your analysis is really interesting (you're doing any university in the area of computing science?), The script that you created, operated and removed the lag, but returned to the first problem.
See that with the script (or the config ": time" on line 250), there is a problem (I mentioned earlier).
1 Battle Start
2 do not have lag.
3 With the "Actor X" Activate the ability "test 1".
4 Note that, even with the "common event" being active (enabled by the ability "Test 1") the "battle command" of the "Actor Y or Z" will appear.
This can cause problems in other scripts (eventually got error in cursor, searching for "index" when trying to attack, for there are no more enemies on the screen) so that they become unviable (but still the best so far).
Whenever a common event (or event of battle) is activated, this problem occurs. =/
******* EDIT==============
Doublex, I do not know if it will help (since apparently you got confused in some parts), but this is the script that uses the victor side to battle.. (annex)
Edit ====
Using the Script of "Battle Animation" (Victor Engine), and ":Battlers" in line 250, showed the same problem of FPS...
Victor Engine - Animated Battle.txt -
As his animated battle is extraordinarily complicated and large(7000+ lines of code), I want to make sure the one you attached here has the exactly same user settings as those in your project.
(As a side note: Side-view battle systems are generally advanced scripts that are hard to comprehend quickly)
Otherwise it'll probably take me forever to even understand what's going on as such complexity and size are just far beyond my current scripting proficiency :)
P.S.: It'd be even better for me if you just send your demo :D -
Well, I can send you a demo of my project, but it is a bit disorganized.
I reduced the whole problem with these two scripts. (which is already in the demo)
Solving the problem of Lag (or problem with events in battle), solves almost everything lol.
Victor Engine - Active Time Bar
Victor Engine - Basic Module
But I will not lie.
First, you said you're having trouble with the script of the victor.
Second, I saw the number of addons. and I scared myself (http://www.rpgmakervxace.net/topic/865-ysa-battle-system-classical-atb/page-4).
I'm thinking about quitting the Victor ATB and instead use the Classic ATB (Yami) + YEA Ace Battle Engine 500 + add-ons.
Not only did the test yet because the link, the Classic ATB (Yami), is in trouble.
But I have preference for ATB's victor, for already has a large list of scripts that have no conflict (or at least I could not see) and the number of features it has (but seeing the number of addons you have ever done, I think resources that was not the problem)
De -
Your demo would probably help(even if it's disorganized) as now I still can't reproduce any crash or lag after using my snippet. You attached Victor's animated battle script earlier so I think that script will be in your demo too :)
-
but with your script, really, there is no lag.
Look at the new demo.
I made a common event for displaying an image.
1 Start the demo.
2 first step, immediately activate the skill, see the "Battle Command" is active (it should not).
Ps test the "Esc" button. It makes the exchange of hero (those with ATB at most). This feature is fantastic = D
PS2- ("PS2", I do not mean the playstation 2, lol) - situation:
3 attack performed as in steps (1 and 2)
4 Do not lock anything.
5-Wait for the "Actor X" stand with ATB in 100% and press "ESC" once.
6 Note that the "Cursor" returned to "Actor X", perform the skill again.
7 See, in this situation, will not have bug.
Situation 3:
8 - the attack as performed in steps (1 and 2)
9 - Do not lock anything
10 - Wait for the "Actor X" keep 100% in ATB.
11 - Press "ESC" several times.
12 - use the skill "Actor X" again.
13 - The bug continues.
Get it? (took me to identify the situation accurately. Sorry)

Teste 2.rar -
A quick fix - Upgrade(replace) my snippet to this:
This should get rid of the battle command window while any common event is running, but it might create some other problems as well. I'm not so sure about the latter as I haven't really comprehended his atb script yet :)Spoilermodule BattleManager #----------------------------------------------------------------------------| # Rewrite method: self.setup_atb_turn_speed | #----------------------------------------------------------------------------| def self.setup_atb_turn_speed case VE_ATB_TURN_COUNT # This part is rewritten by this snippet to fix :battlers issue when :battlers then all_alive_members.size # when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT end end # self.setup_atb_turn_speed #----------------------------------------------------------------------------| # New method: self.all_alive_members | #----------------------------------------------------------------------------| def self.all_alive_members $game_party.alive_members + $game_troop.alive_members end # self.all_alive_membersend # BattleManagerclass Scene_Battle #----------------------------------------------------------------------------| # Alias method: start_actor_command_selection | #----------------------------------------------------------------------------| alias start_actor_command_selection_common_event start_actor_command_selection def start_actor_command_selection # This part is added by this snippet to stop actor command selection if any common event's running return if $game_temp.common_event_reserved? # start_actor_command_selection_common_event end # start_actor_command_selectionend # Scene_Battle -
It worked perfectly.
1 - Start = OK battle
2 - Uses Skill "Test 1" = Ok
3 - the battle command window does not open during event = OK Perfect !!!
Was missing one simple bug, but this bug does not sacrifice the script or the project.
Bug is the "SOUND" of battle command.
The window of the "Battle Command" does not appear at the event (Perfect), but the "sound" (just the sound of the opening, Just openness, battle command) appears.
But like I said, he does not sacrifice design. For those who know it is a little strange, but not sacrifice. -
Yeah, I totally forgot about that atb sound. My updated snippet should get rid of it while any common event's running:
But as I modified a different place than before and I'm still not proficient enough, I can't guarantee if it'll create some other problems even though I haven't found any yet :)Spoilermodule BattleManager #----------------------------------------------------------------------------| # Rewrite method: self.setup_atb_turn_speed | #----------------------------------------------------------------------------| def self.setup_atb_turn_speed case VE_ATB_TURN_COUNT # This part is rewritten by this snippet to fix :battlers issue when :battlers then all_alive_members.size # when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT end end # self.setup_atb_turn_speed #----------------------------------------------------------------------------| # New method: self.all_alive_members | #----------------------------------------------------------------------------| def self.all_alive_members $game_party.alive_members + $game_troop.alive_members end # self.all_alive_members #----------------------------------------------------------------------------| # Alias method: self.setup_selection | #----------------------------------------------------------------------------| class << self; alias setup_selection_common_event setup_selection; end def self.setup_selection(battler) # This part is rewritten by this snippet to stop atb sound play and actor command selection if any common event's running if $game_temp.common_event_reserved? @actor_index = battler.index battler.make_actions else setup_selection_common_event(battler) end # end # self.setup_selectionend # BattleManager -
Best, impossible!
I was desperate with this problem of ATB (LoL)
DoubleX, I am very, very grateful for helping me (Again).
But I'd probably still go ask a bailout in the future :D -
Can I take advantage and ask another fix?
There is another compatibility issue between the ATB and the Battle Symphony.
When you start the battle, only in first round, if you try to change an actor before becoming 100% all the ATB, occurs a mistake.
"Script 'game_Actor' line 710: NoMethodError ocurred
Undefined method '<=' for nil: NilClass "
In previous demos, this error was not visible because I configured so that all actors initiate with 100% of the ATB (that was my strategy to "circumvent" the problem).
http://www.4shared.com/rar/hIXUeSG2ce/Test__VE_ATB__Battle_Symphony_.html
SpoilerPlease note, the area below is just curiosity, not a request.
Victor in the site, he says he found some bugs in the script
.
1 - Script ‘SCENE_BATTLE’ line 454: NoMethodError Occurred. Undefined method ‘set_item” for nil:nilclass.”
2 - The escape return an error (with R+L key)
3 - When using keys, player can escape battle at any time, even while selecting commands in FULL_WAIT and SEMI_WAIT settings.
4 - HP Gauge and HP Values are not updated during select_ally_selection using :active and :semi_wait
.
1 - Never happened to me, I do not know what it is
2 - Someone posted on a forum a workaround (editing one line - I'm already using)
3 - Should be only when the battle command were visible (without going into the menus of item, skill ... - important)
4 - No idea what it is.
.
ps - these four points are not a request (of course, if you want to try to fix, I'll never complain - LoL :D ) are just curious (seriously)Spoiler
There are still some problems with some scripts YanFly
"YanFly Follow-Up Skill" x "Bubble: Auto-Life Effect" = When the enemy dies, the next action of "Follow-Up" remain active.
Example: "Skill 1" Call "Skill 2" Call "Skill 3" call "Skill 4" call "skill5".
Enemy dies with "Skill 1". He disappears. "Skill 2" is activated. End.
"YanFly Imput-Combo-Skill" = If 5 skills is placed, even if there are no more enemies, but the five movements will be performed. Eventually the "battle command" also appears.
"YanFly - Active skill chain" = Same problem ATB (showing the Battle command).
Follows the demo so you can understand better.
Ps Of course, if you are busy, these three scripts can wait a little longer.
*** Ps- Due to the bug mentioned in the beginning of the post, let this demo with ATB in 100%
http://www.4shared.com/rar/7T9JtSD6ba/Test__Yanfly_.html
DoubleX, sorry keep asking you but you are the only one who can solve the most critical problems. (LoL) -
For the compatibility issue between Victor ATB and Yami Battle Symphony, I've again upgraded my fix:
SpoilerCode:class << BattleManager #----------------------------------------------------------------------------| # Rewrite method: setup_atb_turn_speed | #----------------------------------------------------------------------------| def setup_atb_turn_speed case VE_ATB_TURN_COUNT # This part is rewritten by this snippet to fix :battlers issue when :battlers then all_alive_members.size # when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT end end # setup_atb_turn_speed #----------------------------------------------------------------------------| # Alias method: setup_selection | #----------------------------------------------------------------------------| alias setup_selection_common_event setup_selection def setup_selection(battler) # This part is rewritten by this snippet to stop atb sound play and actor command selection if any common event's running if $game_temp.common_event_reserved? @actor_index = battler.index battler.make_actions else setup_selection_common_event(battler) end # end # setup_selection #----------------------------------------------------------------------------| # New method: all_alive_members | #----------------------------------------------------------------------------| def all_alive_members $game_party.alive_members + $game_troop.alive_members end # all_alive_membersend # BattleManagerclass Game_Actor < Game_Battler #----------------------------------------------------------------------------| # Alias method: prior_command | #----------------------------------------------------------------------------| alias prior_command_battle_symphony prior_command def prior_command # This part is added by this snippet to fix nil @action_input_index issue @action_input_index ||= 0 # prior_command_battle_symphony end # prior_commandend # Game_Actor -
For the compatibility issue between Victor ATB and Yami Battle Symphony, I've again upgraded my fix:
Spoilerclass << BattleManager#----------------------------------------------------------------------------|
# Rewrite method: setup_atb_turn_speed |
#----------------------------------------------------------------------------|
def setup_atb_turn_speed
case VE_ATB_TURN_COUNT
# This part is rewritten by this snippet to fix :battlers issue
when :battlers then all_alive_members.size
#
when :actions then VE_ATB_ACTION_COUNT
when :time then VE_ATB_TIME_COUNT
end
end # setup_atb_turn_speed
#----------------------------------------------------------------------------|
# Alias method: setup_selection |
#----------------------------------------------------------------------------|
alias setup_selection_common_event setup_selection
def setup_selection(battler)
# This part is rewritten by this snippet to stop atb sound play and actor command selection if any common event's running
if $game_temp.common_event_reserved?
@actor_index = battler.index
battler.make_actions
else
setup_selection_common_event(battler)
end
#
end # setup_selection
#----------------------------------------------------------------------------|
# New method: all_alive_members |
#----------------------------------------------------------------------------|
def all_alive_members
$game_party.alive_members + $game_troop.alive_members
end # all_alive_members
end # BattleManager
class Game_Actor < Game_Battler
#----------------------------------------------------------------------------|
# Alias method: prior_command |
#----------------------------------------------------------------------------|
alias prior_command_battle_symphony prior_command
def prior_command
# This part is added by this snippet to fix nil @action_input_index issue
@action_input_index ||= 0
#
prior_command_battle_symphony
end # prior_command
end # Game_Actor
PERFECT! It's working perfectly! (without the Unison ...)
"Script 'DoubleX - Unison skill-item' line: 240 NoMethodErro Ocurred.
Undefined method '+' for nil: NilClass "
In another case:
To identify this, I waited the three actors stay with atb 100%.
Made the attack with 3, then X Actor (for being at lvl 99) loaded faster (placed intentionally) changed pressed "esc" and ...
"Unison .. Line650: NoMethodErro Ocurred.
undefined Method 'clear' for nil: NilClass"
ps - For testing purposes, I removed only the unison, and presented no more critical errors.
Test (VE ATB + Battle Symphony + Unison).rar -
I've upgraded my unison compatibility fix to handle this issue:
http://forums.rpgmakerweb.com/index.php?/topic/22432-doublex-rmvxa-unison-skillsitems-compatibility-fix/?p=213834
P.S.: My unison compatibility fix should be placed below Victor ATB :)
Edit: For the compatibility issue between Mr. Bubble's Autolife and Yanfly's Follow Up Skills, try this snippet:
SpoilerCode:class Scene_Battle < Scene_Base alias use_item_auto_life_follow_up_skill use_item def use_item # This part is rewritten by this snippet to stop using item when at least 1 side is all dead use_item_auto_life_follow_up_skill if !$game_party.all_dead? && !$game_troop.all_dead? # end # use_itemend # Scene_Battle -
It worked perfectly (the unison).
already corrected the position scripts also (sorry for the lack of attention).
Regarding the fix for Bubble + Follow-UP, it worked, now identifies the kill, but the problem always appears .. "Appear to battle command" (if the enemy dies, the battle command appears if the enemy does not die, and you have 500 links, the battle command already appears in the second skill).
It's the same problem that occurs with the other two scripts yanfly (battle command appearing at the wrong time)
Test (Yanfly + Bubble).rar -
It's strange that this time I can't reproduce your error even when I'm using your demo to test.
Honestly speaking , I begin to feel exhausted, but later I may try to analyze things on code level directly :) -
tiagoms, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you. -
DoubleX, follows another demo (I changed the sound for clarity).
Following four links of videos showing the bugs.
1 - https://drive.google.com/file/d/0B3d2YApCS0RxLXBFeUFucUtwNWM/edit?usp=sharing
2 - https://drive.google.com/file/d/0B3d2YApCS0RxREkwVTBHb2JyM3M/edit?usp=sharing
3 - https://drive.google.com/file/d/0B3d2YApCS0RxdnJ1RmFZWkZYa0E/edit?usp=sharing
4 - https://drive.google.com/file/d/0B3d2YApCS0RxeDJYTmQycmJJa2M/edit?usp=sharing
Test.rar -
I've just briefly tested my snippet below and it seems to me that at least it can fix your issues:
It combines all the previous fixes as well as the new fix into 1 single snippet so you may want to delete all the old snippets and place this one below all script it addresses.Spoilerclass << BattleManager #----------------------------------------------------------------------------| # Rewrite method: setup_atb_turn_speed | #----------------------------------------------------------------------------| def setup_atb_turn_speed case VE_ATB_TURN_COUNT # This part is rewritten by this snippet to fix :battlers issue when :battlers then all_alive_members.size # when :actions then VE_ATB_ACTION_COUNT when :time then VE_ATB_TIME_COUNT end end # setup_atb_turn_speed #----------------------------------------------------------------------------| # Alias method: setup_selection | #----------------------------------------------------------------------------| alias setup_selection_common_event setup_selection def setup_selection(battler) # This part is rewritten by this snippet to stop atb sound play and actor command selection when they shouldn't if SceneManager.scene.executing_action? || $game_temp.common_event_reserved? @actor_index = battler.index battler.make_actions else setup_selection_common_event(battler) end # end # setup_selection #----------------------------------------------------------------------------| # New method: all_alive_members | #----------------------------------------------------------------------------| def all_alive_members $game_party.alive_members + $game_troop.alive_members end # all_alive_membersend # BattleManagerclass Game_Actor < Game_Battler #----------------------------------------------------------------------------| # Alias method: prior_command | #----------------------------------------------------------------------------| alias prior_command_battle_symphony prior_command def prior_command # This part is added by this snippet to fix nil @action_input_index issue @action_input_index ||= 0 # prior_command_battle_symphony end # prior_commandend # Game_Actorclass Scene_Battle < Scene_Base #----------------------------------------------------------------------------| # Alias method: use_item | #----------------------------------------------------------------------------| alias use_item_auto_life_follow_up_skill use_item def use_item # This part is rewritten by this snippet to stop using item when at least 1 side is all dead use_item_auto_life_follow_up_skill if !$game_party.all_dead? && !$game_troop.all_dead? # end # use_item #----------------------------------------------------------------------------| # New method: set_current_action | #----------------------------------------------------------------------------| def executing_action? battler = nil $game_party.alive_members.each { |member| if BattleManager.active_battler?(member) battler = member break end } return false if !battler action = battler.current_action return false if !action item = action.item return false if !item active_chain_skill = $imported["YEA-ActiveChainSkills"] && !item.chain_skill.empty? && !battler.chain_skill_restriction?(item) return true if active_chain_skill follow_up_skill = $imported["YEA-FollowUpSkill"] && battler.meet_follow_up_requirements?(item) return true if follow_up_skill input_combo_skill = $imported["YEA-InputComboSkills"] && @current_combo_skill && !battler.combo_skill_restriction?(item) end # set_current_actionend # Scene_Battle
Again, I can't 100% guarantee it won't create some other issues :)