Changing Battle so that each battler has a separate turn instead of by party

Started by BlackLodgeGames, May 02, 2014, 05:50:49 pm

Previous topic - Next topic

BlackLodgeGames

Ehh, excuse the title.  I'm using XP/RGSS, and as you know, the (simplified) way battles work by default is

1) you enter in all commands for all member.
2) once all member's actions have been selected, then it loops through each of your character's action
3) now all enemies make their actions
4) repeat until the battle ends in some way.

What I'd like to do instead is:

1) you enter in a command for one of your party memebrs
2) after entering the command, the party member then executes their action immediately
3) now the next battler(friend or enemy) has their turn
4) repeat until all party members and all enemies have had their turn
5) repeat until the battle ends in some way.

So I'm wondering, looking through Scene_Battle1, 2, 3 and 4 if there's not a few minor edits (I'm not looking to alias, as my codebase is 6 months into heavy editing so there's already no looking back) that could accomplish these goals.  Now I've tackled a lot of scripting challenges on my own without asking for help, but in this case I'm wondering if someone might already have experience or be aware of an existing resource, or even just provide a hint or two about the best methods to target to implement this.

One avenue that I've considered is to go from phase3_next_actor to start_phase4, and then edit start_phase4 so that it doesn't call make_action_orders, but instead a custom method which makes the orders for the current actor.  I'll try this line of thought out in practice, but I assume I'm missing a few pieces, and this does not yet take into account enemies' turns.

Any leads on a script or any insight would definitely be appreciated.  Regardless, I'll make sure to update this thread when/if I make progress.  Thanks for reading.

Heretic86

Sounds like an effort to make an Active Battle.

I already made something kind of similar, which is based on the XRXS Battle System.  Initially, it was a translation with a bunch of code cleaned up, but was super duper broken.  The theory of phase_3 changes are sound and are what is used to monkey with a new Battler property called @cp

CP gets its own class and is an object for each Battler.  When their CP is full, actors are allowed to perform an action.  If its not full, it increases based on each Battlers agility.

This stuff is all available in my Collection (sig below post).  I know its a large download, but the old versions of most of my projects are gone due to a server crash.  You may be interested in just the CP class as well as the core for functionality, not the addons or graphics.  Note this is not a true ATB as progress stops when Menus pop up for actors.  Its one of those things on my 'to do' list, but shouldnt be too difficult.  I just lost interest for the time being.  Other things that would have to be done to make it Active is to constantly check in the Actors Menu and Submenus if the actor is dead? and can_move? for Paralyzed Characters and what not.  Not too difficult, just never got to it.  Documentation is very heavy to explain what changes were made and why.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

BlackLodgeGames

Thanks Heretic86.  I went a different route with my combat system, but I did check out your download and I'm glad that I did.  I'm just about 6 months into full time coding of this game, and your advice about naming characters, towns, etc. inside your demo was a lifesaver.

Heretic86

Thats why I wrote it.

As far as your battle system, only one line of code I think would really open up a lot of doors is "@cp_thread = Thread.new (loop while conditions)".
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)