Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

script enabling the player to control battlers?

i want to write a script allowing the player to control all movements of their troops during a battle. how can i go about doing this?

i'm not asking anybody to go ahead and write the script for me, cuz i want to do that myself. i would just like to know where to start. which existing scripts must i edit in order to make this work, and what commands can i use?
 
Interesting question. I need to do this for a battle system I'm working on, but I only need to move one (the main) character, so I plan to make it dynamic. (he can move any time during battle.)

Your question opens a bunch of other questions: How / when can the battlers move? How will you choose which battler you want to move? Will this happen during the action selection phase? Are you using the default battle system?  RMXP or RMVX?
Are there limits on how far the battlers can move? What is the advantage of moving?

To start, you'll need a good understanding of "Scene_Battle", and the different phases of 'turn-based' battle system. Then, you'll need to answer all of those questions for yourself to decide how to implement it.
If you are going to move during phase 3 (Actor Command), then you'll probably want to look at the actor_command_window in Scene_Battle. You'll certainly want to look at Spriteset_Battle & Sprite_Battler. You will be changing the 'x' & 'y' properties of Sprite_Battler when you move the battler. You'll also want to look at the 'Input' module, and the update method in Game_Player for an example of how the 4 directional movement is handled.

That should be enough to either start to clear things up, or thoroughly confuse you... :scruff:

Be Well
 
Brewmeister":qe15z6ky said:
Interesting question. I need to do this for a battle system I'm working on, but I only need to move one (the main) character, so I plan to make it dynamic. (he can move any time during battle.)

Your question opens a bunch of other questions: How / when can the battlers move? How will you choose which battler you want to move? Will this happen during the action selection phase? Are you using the default battle system?  RMXP or RMVX?
Are there limits on how far the battlers can move? What is the advantage of moving?

To start, you'll need a good understanding of "Scene_Battle", and the different phases of 'turn-based' battle system. Then, you'll need to answer all of those questions for yourself to decide how to implement it.
If you are going to move during phase 3 (Actor Command), then you'll probably want to look at the actor_command_window in Scene_Battle. You'll certainly want to look at Spriteset_Battle & Sprite_Battler. You will be changing the 'x' & 'y' properties of Sprite_Battler when you move the battler. You'll also want to look at the 'Input' module, and the update method in Game_Player for an example of how the 4 directional movement is handled.

That should be enough to either start to clear things up, or thoroughly confuse you... :scruff:

Be Well

ya that helps a lot. now i know which scripting sections i would be looking at. (and yes i was using RMXP, i forgot to mention that...)

my idea was slightly different though. i was actually going to have it so that there is only one battler out at a  time. and then you can switch battlers if you choose a different one from the party. i was also going to try to eliminate the turn based system completely.

similar to pokemon actually, but real time.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top