[Ace] Victor's Actor Battler/Animated Battle Error

I have searched high and low for a solution to this error and for some reason have hit a dead end. This is where I hope someone would be kind enough to help me solve my problem.


I am running Victor Engine Base, Animated Battler and Actor Battler in my game (with tons of other scripts, but I have isolated those three in a blank game and the same error occurs so I am 99% sure it's not a compatibility issue.) Whenever I have an actor join the party in the middle of a battle using battle events, I get an error which I have attached a screenshot of.

Script 'Victor Engine - Actors Battlers' line 563: NoMethodError occurred.


undefined method 'default_direction' for #<Game_Actor:0xc9a0694>





 



I have tried messing with the code enough to the point where I'm afraid of breaking my game. (Don't worry, I've returned them to proper standing before moving on.) This is the section of code the error is referring to:

actor.default_direction if $imported[:ve_animated_battle]

is the line in question.


#--------------------------------------------------------------------------
# * New method: update_party
#--------------------------------------------------------------------------
def update_party
@actor_sprites.each_index do |i|
next if $game_party.battle_members.include?(@actor_sprites.battler)
@actor_sprites.dispose
@actor_sprites = nil
end
$game_party.battle_members.collect do |actor|
next if @actors_party.include?(actor)
@actor_sprites.push(Sprite_Battler.new(@viewport1, actor))
end
@actor_sprites.compact!
@actors_party = $game_party.battle_members.dup
$game_party.battle_members.each do |actor|
old_position = [actor.screen_x, actor.screen_y]
actor.default_direction if $imported[:ve_animated_battle]
if old_position != [actor.screen_x, actor.screen_y]
sprite(actor).start_effect🙂appear)
end
end
end
end


I saw one other post with the same error, but lucky for me, the op closed it without explaining their solution. I was wondering if anyone else could help me solve this problem? It would be appreciated from someone who doesn't know anything about Ruby! I've also attatched a demo using just the mentioned scripts to show exactly what I'm trying to do in my game.

victor error.PNG

View attachment Blank For Testing.zip
the problem is that in most cases with non-default battlesystems, you can't use the event commands to add actors during battle, because the new actors are then missing the data given to them by the scripted battle-setup. You'll need a summoning script compatible to the battlesystem used.


Please check Victor's scripts if he has such a script for his battlescripts.
I am just guessing here, but that line should look like this instead:


actor.poses.default_direction if $imported[:ve_animated_battle]


There is no default_direction method/variable for the Game_Actor class anywhere in Victor's script, but there is one for their battle poses, that's why I guessed it that way.


Try to replace that line with what I wrote, see if it works or not. 
I am just guessing here, but that line should look like this instead:



actor.poses.default_direction if $imported[:ve_animated_battle]


There is no default_direction method/variable for the Game_Actor class anywhere in Victor's script, but there is one for their battle poses, that's why I guessed it that way.


Try to replace that line with what I wrote, see if it works or not. 





 



This worked! I can't believe it was so simple! Thank you so much, and thanks for being so prompt!

the problem is that in most cases with non-default battlesystems, you can't use the event commands to add actors during battle, because the new actors are then missing the data given to them by the scripted battle-setup. You'll need a summoning script compatible to the battlesystem used.


Please check Victor's scripts if he has such a script for his battlescripts.





 



I had looked at Victor's other scripts for something like you describe but I didn't see any. Thank you for explaining that to me, though, it does make a lot of sense since you put it that way. Luckily it was just a scripting error, and now I can continue working on my game! Thanks to both of you for your help, I had this sitting in the wrong topic for almost two months and wondered why I hadn't gotten any replies. These were so helpful and quick! Problem is solved!

Original thread: https://forums.rpgmakerweb.com/threads/ace-victors-actor-battler-animated-battle-error.65853/