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.

Battle Processing

I am making my own cbs but I don't know exactly how battles are made. Processes, management and all that is attached to the operation of a combat.

I'd like if someone could help me to figure out how it works.
 
The Default Battle system starts off with setting up a troop (either through event calling or random selection).

From there, the windows and spriteset are set up according to the $game_troop data that was set up, and the $game_party.actors, among other things.

From there, it's all one big loop of selecting choices and targets, and executing commands.

It's not a huge battle system, simple in fact, but knowing everything that happens in the DBS requires you to look in quite a bit of classes : Game_Battler / Enemy / Actor, Game_BattleAction, Game_Troop, Interpreter, Scene_Battle and Spriteset_Battle mostly.
 
It's not a huge battle system, simple in fact, but knowing everything that happens in the DBS requires you to look in quite a bit of classes : Game_Battler / Enemy / Actor, Game_BattleAction, Game_Troop, Interpreter, Scene_Battle and Spriteset_Battle mostly.

Wow that makes a lot of things.
If you want to know more about my CBS, take a look at this.

I actually have a little script used to setup battle troops using event id and monster id.
How it works:
I have a class, IABS, and this class is updated in $scene_map using $iabs.update
In an event, i start a battle using $iabs.setup_battle(enemy) where enemy is an array.
For exemple:
Code:
enemy = []
enemy[0] = [6,10]
$iabs.start_battle(enemy)

It means that the first enemy would be event 6 and monster 10 from the database.

$iabs.start_battle(enemy) will transfer [6,10] to $game_map.event[6] abd $data_enemies[10]
So event 6 will be enemy 10.[/CODE]

After setting up the troop, i display Window_BattleStatus on the screen.
It all works fine but now i have to make the meat of the battle system. Commands, actions, ATB ect.
 

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