Help with Victor's Map Turn Battle script (VX Ace)

Hello,

I'm testing out Victor's Map Turn Battle script. The battle system works like Chrono Trigger where the battles take place on the map. I noticed the battles start fine when I touch the enemy from the side or the front. However when I touch the enemy from behind, the characters get stuck and the game freezes. Does anyone know how to fix this problem?

I included a link to project below.

Thanks 🙂

https://www.dropbox.com/scl/fo/lgun7cqmbofbpc3ph9msc/h?rlkey=5iieetl6f76vi1nqr027x4giz&dl=0
It's not the script (kinda sort of is)
The issue is that the player is not able to get into position because the event is blocking Eric from moving. when you touch the event from behind, if you hold the CTRL key down Eric will move into position.

There should be a way to make the player through setting to on, but haven't found it yet.

Other option is to change the events themselves.
Spoiler: images
1699667808170.png

1699667817495.png

Found it.
This will work
Ruby:
class Game_CharacterBase
  alias r2_move_map_battle_position_through   move_to_position
  #--------------------------------------------------------------------------
  # * New method: move_to_position
  #--------------------------------------------------------------------------
  def move_to_position
    @through = true
    r2_move_map_battle_position_through
    @through = false
  end
end
Found it.
This will work
Ruby:
class Game_CharacterBase
  alias r2_move_map_battle_position_through   move_to_position
  #--------------------------------------------------------------------------
  # * New method: move_to_position
  #--------------------------------------------------------------------------
  def move_to_position
    @through = true
    r2_move_map_battle_position_through
    @through = false
  end
end

@Roninator2

Thank you! It fixed the problem. 🙂

Could I ask you another question, if it's alright?

Victor's Cast Animation has a minor issue when if the character uses magic or special, the casting animation is too slow and the character will charge toward the enemy and cast the spell before the animation is finished. Could you adjust the script so that the character doesn't move until the casting animation is done?
Victor's Cast Animation has a minor issue when if the character uses magic or special, the casting animation is too slow and the character will charge toward the enemy and cast the spell before the animation is finished. Could you adjust the script so that the character doesn't move until the casting animation is done?
If you want the animations to play before the actor moves then we need to make some changes.

The issue with the cast animations script is that the call to play the animation is after the attack move.
It executes the action then calls use_item for the battler.
The cast animation script is using use_item for the battlers. so it's already too late for the animation to process before the action. That's why it happens during the action.

I got this so far, it will play the animation before the action and not play it again if the battler is an actor. let me know if this works for you
Ruby:
class Scene_Battle
  alias r2_execute_action_cast_animation    execute_action
  def execute_action
    if @subject.cast_animation != 0 || nil
      show_animation([@subject], @subject.cast_animation)
      wait_for_animation
    end
    r2_execute_action_cast_animation
  end
end

class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * New method: set_cast_animation
  #--------------------------------------------------------------------------
  def set_cast_animation(item)
    @anim_id = cast_animation_id(item)
    @animation_id = @anim_id if !self.is_a?(Game_Actor)
    @animation_id = @anim_id if item.is_a?(RPG::Skill) && item.id > 1
    SceneManager.scene.wait_for_animation
  end
end
@Roninator2

Thanks! The cast animation is working properly. I'm not sure if I'm doing something wrong, but I noticed the <cast animation> tag only works when I put in the Actor note box. When I put in the Skill , Weapons, etc noteboxes, it doesn't work and just plays the default cast animation?
When I put in the Skill , Weapons, etc noteboxes, it doesn't work and just plays the default cast animation?
Did some more testing. I seem to have removed that feature with the script I gave you.
Let me know if something is still not working.
Post above updated
Okay, I tested it again. Here's what I noticed:

The casting animation plays on the Actors and Enemies twice if they have the <cast animation> tag in their notebox. If I put the tag in Skills and Weapons noteboxes, the character still moves before the casting animation is finished. When I tested it for Items, nothing happened.

The enemies casting animations plays for their normal attack. I would like for them to not to use the casting animation for their normal attacks and only for their special and magic attacks.

I would like for the Actors and Enemies not to move when they use Items or Spells.

Thanks again for helping me. 🙂
The casting animation plays on the Actors and Enemies twice if they have the <cast animation> tag in their notebox. If I put the tag in Skills and Weapons noteboxes, the character still moves before the casting animation is finished. When I tested it for Items, nothing happened.
Do you have the exact copy I posted? I've been changing it a little bit as I tested.

The enemies casting animations plays for their normal attack. I would like for them to not to use the casting animation for their normal attacks and only for their special and magic attacks.
Then why would the skills have an animation in the default place and the notetag?
I see this useful for actors and enemies to do a casting for their attacks, but not if they use a skill with an animation already configured in it. I'm not entirely sure how you want things to go.

I would like for the Actors and Enemies not to move when they use Items or Spells.
That would be the third request in this thread. Please make new thread for each request as other people may be able to help with those if I can't. Otherwise people may not bother because they think I'm solving everything for you.
That would be the third request in this thread. Please make new thread for each request as other people may be able to help with those if I can't. Otherwise people may not bother because they think I'm solving everything for you.

Good point. I should start a new thread since this is for a different script. Thank you for fixing the bug in the Map Turn Battle script. I appreciate you helping me. 🙂
I would like for the Actors and Enemies not to move when they use Items or Spells.
although, does that not defeat the purpose of the animated battlers script.
I would like for the Actors and Enemies not to move when they use Items or Spells.
although, does that not defeat the purpose of the animated battlers script.

Oh, it's because the default item use animation has the character throw the item towards the party member or on themselves and the spell animation has them run up towards the enemy when they cast the spell. I thought they wouldn't need to move because they are throwing an item and spellcasters are long range fighters. I hope I'm making sense lol.
I thought they wouldn't need to move because they are throwing an item and spellcasters are long range fighters. I hope I'm making sense lol.
But that's all controlled in the animated battlers script.
You set the move/attack pose and it does what you configure it to do.
I'll try reading it again. I admit I'm more comfortable with frontview battles so sideview is a bit out of my comfort zone lol.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-victors-map-turn-battle-script-vx-ace.162818/