Jump to content
Victor Sant

VE - Map Turn Battle

Recommended Posts

Victor Engine - Map Turn Battle

 

 

 

This script is an add-on for the ‘Victor Engine – Animated Battle’, it allows to make battles to occur the current map, instead of using a transition to another scene, like int the game Chrono Trigger. It doesn’t make any change on the turn mechanic of the battle and anything else.

 

Download:

Victor Engine - Map Turn Battle

 

Credits:

Author: Victor Sant

 

Terms of Use

Edited by Victor Sant

Share this post


Link to post
Share on other sites

It's kinda Chrono Trigger but you know, in the Chrono Trigger they never just stand still. They're always hopping still and looping that same short move route while standing still.

Share this post


Link to post
Share on other sites

fantastic! :lol:

2 things i noticed while trying out the script:

1st - it would be nice to have an option to disable battle transitions.

and 2nd - on my map where i tested it i use a picture layer for sunshafts that disappears in battle. if possible that would be a nice fix too.

edit: another thing - in my case my 2 actors face down, speak with someone, then the processing of your script begins, they walk to their destined positions, but the last thing they do before entering battle mode is - facing down again - instead of stay facing in the direction they moved (up). (using charset).

Edited by kurai

Share this post


Link to post
Share on other sites
1st - it would be nice to have an option to disable battle transitions.
Wich battle transitions? There's no transition.

 

2nd - on my map where i tested it i use a picture layer for sunshafts that disappears in battle.
That might be needed since ace use different set of pictures for map and battle.

 

in my case my 2 actors face down, speak with someone, then the processing of your script begins, they walk to their destined positions, but the last thing they do before entering battle mode is - facing down again - instead of stay facing in the direction they moved (up). (using charset).
The direction they face is based on the position of all battlers. They face the postion you set to be the start point Edited by Victor Sant

Share this post


Link to post
Share on other sites
Wich battle transitions? There's no transition.

ah sorry, tested some scripts at the same time and totally forgot i still got the random transitions script activated too.. so my mistake..

 

That might be needed since ace use different set of pictures for map and battle.

thx for the answer though..

 

The direction they face is based on the average position of all battlers.

yeah thats very good to be. my problem sadly occurs before that. i may show some screenshots:

 

 

first i talk to the guy down there, the 2 guys above are the enemy position events.

battlepr1.png

 

then the script starts, actors are moving into position.

battlepr2.png

 

shortly before the battle begins the actors are facing down.

battlepr3.png

 

then the battle begins and everything works fine, including facing direction.

battlepr4.png

 

 

hope you can help and i didnt forget something else again ;)

Edited by kurai

Share this post


Link to post
Share on other sites

I was just wondering, is there a way to do events in between turns such as text ect, like you could for the original battle engine?

 

 

EDIT: perhaps we can also use the events in between turns to loop movement animations for the enemies/ characters and that would be pretty cool =p

Edited by Quarts21

Share this post


Link to post
Share on other sites

@Quarts21

It's possible, there is a instruction that i forgot to add.

you can add "troop: X" on the battle call. where X is the ID of the troop, so the battle will call the events from that troop.

 

#  <call map battle>
#  start: [x, y]; end: [x, y]; escape: [x, y]; defeat: [x, y];
#  actors: [x, y], [x, y], [x, y];
#  enemies: [event, enemy, switch],  [event, enemy];
#  can escape; can lose; skip return; troop: x;
#  </call map battle>

 

so something like

<call map battle>
start: [12, 15]; end: [12, 15]; escape: [12, 21];
actors: [7, 14], [14, 17], [17, 14], [10, 17];
enemies: [1, 1, A],  [2, 1, A],  [3, 1, A];
can escape; troop 5;
</call map battle>

Will make the battle process the events from the troop ID 5.

Edited by Victor Sant

Share this post


Link to post
Share on other sites

@Quarts21

It's possible, there is a instruction that i forgot to add.

you can add "troop: X" on the battle call. where X is the ID of the troop, so the battle will call the events from that troop.

 

#  <call map battle>
#  start: [x, y]; end: [x, y]; escape: [x, y]; defeat: [x, y];
#  actors: [x, y], [x, y], [x, y];
#  enemies: [event, enemy, switch],  [event, enemy];
#  can escape; can lose; skip return; troop: x;
#  </call map battle>

 

so something like

<call map battle>
start: [12, 15]; end: [12, 15]; escape: [12, 21];
actors: [7, 14], [14, 17], [17, 14], [10, 17];
enemies: [1, 1, A],  [2, 1, A],  [3, 1, A];
can escape; troop 5;
</call map battle>

Will make the battle process the events from the troop ID 5.

wow that would be awesome =o and exactly what im looking for =)

I just searched through your script and see it was there all along =P

#--------------------------------------------------------------------------
 # * New method: call_map_battle_comments
 #--------------------------------------------------------------------------
 def call_map_battle_comments
   regexp = get_all_values("CALL MAP BATTLE")
   if note =~ regexp
  info  = $1.dup
  value = {}
  value[:can_run]  = info =~ /CAN ESCAPE/i   ? true : false
  value[:can_lose] = info =~ /CAN LOSE/i	 ? true : false
  value[:skip]	 = info =~ /SKIP RETURN/i  ? true : false
  value[:troop_id] = info =~ /TROOP: (\d+)/i ? $1.to_i : 1  #this line correct?
  value[:start]    = get_position('START' , info)
  value[:end]	  = get_position('END'   , info)
  value[:escape]   = get_position('ESCAPE', info)
  value[:defeat]   = get_position('DEFEAT', info)
  value[:enemies]  = setup_enemies(info)
  return if no_available_enemies(value)
  setup_actors(info)
  $game_party.map_battle = value
  SceneManager.call(Scene_Battle)
   end
 end

Thanks for the quick responses as always victor =)

Share this post


Link to post
Share on other sites

Well, that certainly takes a load off of trying to find modern battle backgrounds. And it will work with animated battlers? Great! Once I finish all of mine, thats two major hurdles forward so I could delve right into the creation. (Of course now I have to make battler sprites for all four directions, but I do need the practice I suppose.)

 

 

EDIT: Alright, so, I keep getting this error. I've managed to find out that its not due to any incompatibility with any scripts (As this pic was taken in a fresh new project) and all the required scripts I need to run this script are up do date, so its probably something really stupid that I'm forgetting to do here. But this is the error I keep getting every time I try to call the script for a map battle.

 

ErrorMessage.png

 

And the command exactly how I am entering it:

 

 

<call map battle>
start: [9, 6]; end: [9, 6]; escape:
[12, 21];
actors: [6, 11], [12, 11], [6, 1],
[12, 1];
enemies: [4, 1, A],  [5, 1, A],  [6, 1,
A];
can escape; troop 1;
</call map battle>

 

Edit again: Yup, I was right. I was using the script command rather than the comment. Problem solved. Works like a dream, and all is right in the world. Thanks so much for this.

 

3rd Edit: Mother of god. I just now discovered Yanfly's Area of Effect and tested it on a map battle. AND ITS GLORIOUS!!!! No seriously, if you haven't tried it out already, do it now.

Edited by Chocopyro

Share this post


Link to post
Share on other sites

Hey Victor, do ever plan on making an active time battle (ATB) system that is compatible with your scripts? I apologize if this is the wrong place to ask you i wasn't quite sure where to ask.

Quartz

Edited by Quarts21

Share this post


Link to post
Share on other sites

Beautiful work Victor! The fact that this can be called instead of some permanent in place map battle system that replaces a normal one makes this an absolute must have for anyone wanting to create special moments in their game. Another VE classic.

 

Edit: I am having an issue: When I call a map battle, everything plays out fine. When I enter a random encounter after that map battle... the actors are standing in their last positions on the battlebackground that I set in the last map battle encounter. I'd love to get them to default back to the Side View im using in your battle system.

 

I imagine this is something silly I am overlooking, but im not quite certain how the tiles relate to the x,y coordinates... I have been looking through the scripts trying to make sense of it and see if i could solve this myself, but so far im stumped. Any help would be appreciated!

 

Edit2: I fixed my above problem by adding a script call of $game_custom_formation = :side ... after the map battle was finished. This sets the default formation back to sideview for the next random battle.

 

Bug Report: Victor, I have not tested in a clean project yet, but I am having an issue where... If I save a game right before a map battle. Exit the game. Load that save... then proceed into the map battle...

After selecting commands for party, it asks for the commands again... and does so infinitely... without ever following up with actions. If I load the save, participate in a random battle, and then enter the map battle, everything works fine...

Edited by Nate The Great

Share this post


Link to post
Share on other sites

awesome ! :D

but may i ask if it is possible for the grp to have one actor and then they spread from him to some positions...?

i'm a newbie so... pls don't be mad :)

Share this post


Link to post
Share on other sites

What you are asking for is completely possible.

It sounds like you only want your main character to show on the map.... but when you enter a random battle... your followers split from your main character and take their position on the map... correct?

If so, your going to set followers to invisible before hand ... in an Event... go to Character - Change player followers. Set Off.

When your going to call the battle using the script command to start the battle, before that command, set the change player followers to On.

With the script command to start the battle, you dictate your followers starting positions.

In effect, you will hit the event marker, your followers will appaer, and they will move to their starting positions for the fight.

After teh fight is over, you can use a trigger or self switch on one of the monsters to set the player followers back to off... *or use follower gather first.. if you want them to return to you...then dissapear"

Hope that helps you.

Share this post


Link to post
Share on other sites

Wendell, it sounds like something wasn't configured correctly. Have you already configured Victor's Actor Battle/Animated Battle, and basic engine? If you already have those three working in tandem... we can move on to figure out what was configured wrong for the map battle. But if something isn't working for you there... we need to start with that.

I suggest taking a screenshot of your Event that calls the map battle... and letting us take a look at what you got there. I'll try and help you out.

Share this post


Link to post
Share on other sites

Well, that certainly takes a load off of trying to find modern battle backgrounds. And it will work with animated battlers? Great! Once I finish all of mine, thats two major hurdles forward so I could delve right into the creation. (Of course now I have to make battler sprites for all four directions, but I do need the practice I suppose.)

 

 

EDIT: Alright, so, I keep getting this error. I've managed to find out that its not due to any incompatibility with any scripts (As this pic was taken in a fresh new project) and all the required scripts I need to run this script are up do date, so its probably something really stupid that I'm forgetting to do here. But this is the error I keep getting every time I try to call the script for a map battle.

 

ErrorMessage.png

 

And the command exactly how I am entering it:

 

 

<call map battle>
start: [9, 6]; end: [9, 6]; escape:
[12, 21];
actors: [6, 11], [12, 11], [6, 1],
[12, 1];
enemies: [4, 1, A],  [5, 1, A],  [6, 1,
A];
can escape; troop 1;
</call map battle>

 

Edit again: Yup, I was right. I was using the script command rather than the comment. Problem solved. Works like a dream, and all is right in the world. Thanks so much for this.

 

3rd Edit: Mother of god. I just now discovered Yanfly's Area of Effect and tested it on a map battle. AND ITS GLORIOUS!!!! No seriously, if you haven't tried it out already, do it now.

 

From the same error too ... how the heck did you solve it?!?

Share this post


Link to post
Share on other sites

Lionheart, if you are getting the same error that Chocopyro was getting, then it appears you are using an event ... but using script instead of comment to call the map battle.

In the Event... make sure you choose Comment... NOT script... then in the comment box... use the call to start the map battle.

Try it again and let me know if you get it working. If your still getting an error after making that change, take a screenshot of both your Event... and the error... and I will try and help you fix it :)

 

Edit: It should look something like this...

 

@>Comment: <call map battle>

start: [19, 12]; end: [19, 10]; escape: [12, 21];

actors: [19, 10],[18, 9],[20, 9];

enemies: [1, 039, A],[3, 039, A],[4, 039, A],[5, 039, A];

troop: 39;

</call map battle>

 

If you see @>Script: ... that is your problem ;)

Edited by Nate The Great

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×