RPG battle system (ATB-style)

Started by Snarky, Sat 09/03/2013 15:36:50

Previous topic - Next topic

Snarky

Quote from: Snarky (edit)For context, I offered to implement an RPG battle system (based on the Final Fantasy 6 ATB system) for Icey Games, so he could focus more on his core interest of making it look nice. This thread has been split from the discussion that followed.
Sure, why not. Send me what you got.

I haven't played the game, but I looked into the FF6 combat system. From my initial impressions, it has a few key features:

-It lets you fight multiple enemies in the same battle. Is this a feature you want?
-It lets you fight as a party, with multiple controllable characters. It allows you to move them to the front and back of the attack formation. Is this a feature you want?
-Some attacks affect more than one character. Is this a feature you want?
-Combat strength is stats- and equipment-based. What stats/skills were you planning on using?
-Its ATB combat system is semi-real time, not turn-based, using recharging time bars to control when any fighter can perform an action. Is this a feature you want?
-It has a "phantom beast"/"esper" feature, which lets you equip a helper with special capabilities to assist in battle. Is this essentially the same thing as your "Assist" feature?
-It has magic spells and various character effects (sleep, slow, berserk, poisoned, etc.). I haven't really figured out how magic works in the game, but is this a feature you want?
-Some characters have special, custom powers. Is this a feature you want?

Also, some questions about combat strategy, based on my current understanding:

-Combat ensues from random encounters and at particular scripted points in the game (e.g. boss battles). It provides challenge as you explore, is necessary to progress the story, and lets your character(s) level up. Should it play any other role in the game?
-From winning battles, you earn experience points, possibly magic points, money and possibly items. On the other hand, if you lose you die, and even if you win you deplete hit points, and potentially any one-use items (e.g. potions). Anything else (e.g. any wear on equipment)?
-Battle tactics, I'm guessing, revolve around various attack options which are more or less effective but also take more or less time (and which sometimes only have limited number of uses). Are there other limitations on powerful attacks? (For example, do powerful attacks have a risk, or a higher risk, of failing?)
-With more characters in your party, I would guess you also need to use your different characters (with different stats, etc.) effectively, for example by shielding your less powerful characters, maybe using them to heal the frontline fighters; that sort of thing. Will this be an element of your game?

Icey

Hmmm that's really all the stuff that I want.

Quote-Combat ensues from random encounters and at particular scripted points in the game (e.g. boss battles). It provides challenge as you explore, is necessary to progress the story, and lets your character(s) level up. Should it play any other role in the game?

In Boss battles I would like to have the game call a specific chat function that would allow the battler(S) to talk with the Boss. Like at the start of the battle the Boss might taunt the Battlers saying something like "Look at you foolish creatures", "Your hearts must be filled with PAIN!!!". Then another 1 time saying when the Boss is weak( Like when the HP is really low and they do a one-time desperation attack ). Of course this won't happen all the time which is why it would check for the Chat function for that is linked to that specific boss and if it's not present in the game code then just pass on.


Quote-From winning battles, you earn experience points, possibly magic points, money and possibly items. On the other hand, if you lose you die, and even if you win you deplete hit points, and potentially any one-use items (e.g. potions). Anything else (e.g. any wear on equipment)?

I think when you win you should regain FULL HP and MP, you should should also get EXP and AP(Action points) which you will use to unlock new new abilities and magic.

Quote-Battle tactics, I'm guessing, revolve around various attack options which are more or less effective but also take more or less time (and which sometimes only have limited number of uses). Are there other limitations on powerful attacks? (For example, do powerful attacks have a risk, or a higher risk, of failing?)

So I was thinking the battlers Assault(special) gauge should build slowly on on impact from an attack. Like when they get hit the gauge goes up by 1. And when using Assault they usually come with a action trigger. Like player may have to click a icon a certain number of times or click something at a certain time.
Example(I hope this works}
You would have to keep clicking a icon to build up a bonus action score(BAS). Clicking the icon a lot before time runs out would gain you a point per click and then the battlers would do his special attack which the damage would consist of BAS + Battlers attack points.
A animated button on a GUI would have like type of Trigger frame and a near hit Frame. If you hit that Trigger frame you get a set BAS but if you hit the Near hit frame then you get half the BAS you would have gotten if you'd the Trigger.

Quote-With more characters in your party, I would guess you also need to use your different characters (with different stats, etc.) effectively, for example by shielding your less powerful characters, maybe using them to heal the frontline fighters; that sort of thing. Will this be an element of your game?

I'm kinda confused by what you mean but I have this feeling that I sorta get what you mean if that makes if that sense. So I get the example and by that I don't think that element would be necessary. So characters in the back row would take less damage but would also deal less attack damage unless they are using Magic.




Snarky

Quote from: icey games on Sat 09/03/2013 19:15:03
Hmmm that's really all the stuff that I want.

All of it? (I thought you said you only were going to have one-on-one battles?)
Mmmm okay, but it's gonna take a while. :-\

You didn't give me an answer about stats. The ones from FF6 OK?

Quote
Quote-Combat ensues from random encounters and at particular scripted points in the game (e.g. boss battles). It provides challenge as you explore, is necessary to progress the story, and lets your character(s) level up. Should it play any other role in the game?

In Boss battles I would like to have the game call a specific chat function that would allow the battler(S) to talk with the Boss. Like at the start of the battle the Boss might taunt the Battlers saying something like "Look at you foolish creatures", "Your hearts must be filled with PAIN!!!". Then another 1 time saying when the Boss is weak( Like when the HP is really low and they do a one-time desperation attack ). Of course this won't happen all the time which is why it would check for the Chat function for that is linked to that specific boss and if it's not present in the game code then just pass on.

Yeah OK, this doesn't sound like a core feature, since it doesn't affect how combat is actually fought. Let's get the actual combat system up and running before we start worrying about stuff like this, OK? On the other hand, it sounds pretty easy to do.

But on the other hand you mention a "desperation attack", which is the kind of thing we do need to have specified. Is there anything else like that you have in mind?

Quote
Quote-From winning battles, you earn experience points, possibly magic points, money and possibly items. On the other hand, if you lose you die, and even if you win you deplete hit points, and potentially any one-use items (e.g. potions). Anything else (e.g. any wear on equipment)?

I think when you win you should regain FULL HP and MP, you should should also get EXP and AP(Action points) which you will use to unlock new new abilities and magic.

Fine. Easy enough to do.

Quote
Quote-Battle tactics, I'm guessing, revolve around various attack options which are more or less effective but also take more or less time (and which sometimes only have limited number of uses). Are there other limitations on powerful attacks? (For example, do powerful attacks have a risk, or a higher risk, of failing?)

So I was thinking the battlers Assault(special) gauge should build slowly on on impact from an attack. Like when they get hit the gauge goes up by 1. And when using Assault they usually come with a action trigger. Like player may have to click a icon a certain number of times or click something at a certain time.
Example(I hope this works}

OK, I notice one big thing about that picture: It's not from FF6, and the battle system seems quite different (what with being one-on-one and all). How would this fit into the flow of an ATB? Does the battle pause while you click on the icon, or what?

Is this the same as the desperation attack you mention above, or why would getting hit benefit you by letting you Assault? What gauge are you talking about?

Can you make a list of the types of actions a character can choose from in a battle, what preconditions determine whether they're available, and what effects they have?

QuoteYou would have to keep clicking a icon to build up a bonus action score(BAS). Clicking the icon a lot before time runs out would gain you a point per click and then the battlers would do his special attack which the damage would consist of BAS + Battlers attack points.
A animated button on a GUI would have like type of Trigger frame and a near hit Frame. If you hit that Trigger frame you get a set BAS but if you hit the Near hit frame then you get half the BAS you would have gotten if you'd the Trigger.

So this is like a minigame within the battle. That's fine, but I'm probably not going to implement it for you. I'll just make a hook for it where you can call whatever method you like to determine damage.

Quote
Quote-With more characters in your party, I would guess you also need to use your different characters (with different stats, etc.) effectively, for example by shielding your less powerful characters, maybe using them to heal the frontline fighters; that sort of thing. Will this be an element of your game?

I'm kinda confused by what you mean but I have this feeling that I sorta get what you mean if that makes if that sense. So I get the example and by that I don't think that element would be necessary. So characters in the back row would take less damage but would also deal less attack damage unless they are using Magic.

If you're confused, think about what it's like for the rest of us trying to decipher what you mean.

Icey

Sorry all the stuff you had listed were sorta what I was looking for even though I said I had wanted a few features. I can pick just the main ones from that list if you want. As for the stats, if you were to go with the way I usually do it where it's only HP/MP/ATK/MGK(I hate DEF one cause it gave me more work to do but it was the right thing to add) that would would make less power ups(slow,haste,Boost, etc would all disappear) but if you go with the ones from FF6 then I would make more work to code but it would make the system solid . I think the only way for the system to work is to use the FF6 stats.

[quote 2]

My bad, I was thinking it would make it easier if I list stuff in order but I'm sure you know how the go about things ;)
As for the desperation attack. Only Boss have these 1-time attacks. I was thinking that it would be the strongest Attack in the Boss deck. Using it would be risky for them cause what it does is put's a defense down buff on them.

[quote 3]

So maybe if you want you could play this: http://www.adventuregamestudio.co.uk/site/games/game/1520/ or watch this: http://www.youtube.com/watch?feature=player_detailpage&v=3S9U9gcGc0A#t=138s

It's short but what happens when the characters use their special the Battle pause and a new action menu pops up. You preform what ever available task you must do like click action icon before time runs out(In the picture with Cloud you would have to keep pressing circle to build up a gauge which would cause him to his full special which would cause him to get the BAS which each attack he landed in the full special but if you failed to build the gauge or the invisible time to build it ran out then he would won't gain any BAS and he would only do the finisher attack in the special.

So the Assault Bar[Gauge] builds up usually by time but I think it would be better for it to build when the character is hit cause then everyone whose alive could Assault in one turn which wouldn't really be fair. So the Assaults are indeed like desperation attacks but there not one time. You can get them when still a lot of life and once you use them the Battlers Assault Gauge depletes.

And I left out a bit cause I wasn't trying to make to much work for you but if you are able to make a hook or slot for this that's be cool. I can work with that ;)

[quote 4] huh, good point. Sometimes I can't find the right words to use in a sentence which then I result to a work around sentence that makes sense to me but I guess not for other. My bad.

Snarky

OK, so I think what we've concluded you want is essentially something that mimics FF6 pretty closely, minus the magitek, and with "assists" instead of phantom beasts, but with a couple of extra features (borrowed from the later games?). Stats are as in FF6. The available actions should be:

Regular Attack (with the equipped weapon; damage based on Attack = Strength + Weapon stats)
Cast spell (from list of known spells, I guess? Damage based on Magic + spell stats, or special effect) - drains MP
Use an item in your inventory (like a potion or something; can restore HP, MP, cure spell effects, or give other effect) - uses up that item (always?)
Special Assault (possibly only available after a character has been hit; strong damage) - requires player to complete a minigame
Something to do with assist? (I'm not clear on this one; not available to enemies, I guess?)
Desperation attack (only available to bosses when critically low on MP; very strong damage) - defense penalty to user (permanently?)

Actions that won't be included:

Defend
Change formation
Flee (?)

OK, this is doable, but it's going to take some time. And even if the combat system is implemented for you, you're going to have to do some work to integrate it with the rest of the game (e.g. screens for equipping weapons and armor, organizing your party, and so on). And to get the animations and the UI for the battles the way you want.

Icey

Sorry it took me so long to reply, I had to take care of something, anywho...

So I kinda confused you the Assist system is with 1 person and the other party members can be called during battle but the simple FF6 battle system is the one that just plays out a bit like the one from FF6. The only things you can take a way from the list is the Assist lines(4,5). Cause there can finally be more than one enemy on the field at a time during battle. I usually use one enemy cause I don't know how to have a battle focus on more than one enemy at a time.

The command menu will only use:

Attack
Cast
Abilities
Item
[Assault]Will only be visible when Assault gauge is full.

Defend/Flee will only be available as ability

Change formation will only be available outside of battles via the Party Menu.

QuoteOK, this is doable, but it's going to take some time. And even if the combat system is implemented for you, you're going to have to do some work to integrate it with the rest of the game (e.g. screens for equipping weapons and armor, organizing your party, and so on). And to get the animations and the UI for the battles the way you want.

That's cool with me, I was hoping that I'll still be able to do that part myself. ;)
And thanks dude, this will most likely become my main system to use for a long time until I finally get the hang of making one.

Snarky

OK, so... Abilities?

What are they (aside from flee and defend), and what should they do?

Ghost

This is beautiful, you know, and I say that without sarcasm. This is a system taking shape. (Sorry for the interruption but really, this is what a battle-focussed JRPG should be all about, no?)

Ryan Timothy B

#8
I'll be impressed if this system works exactly as Icey wants it. It's very hard to make a battle system for someone without every single detail. Like what does a certain player have a weakness to? Ice elements and Wind? And he has a strong defense against Fire. Etc. The system would need to be designed for this (or modulated enough to allow for a later addition). Also where the enemy/player is strong or weak against a certain weapon, not just magic.

Good luck, Snarky. This is something I've wanted to do for him for ages, I just never got around to it (and I probably never would've haha).

Icey

#9
Ok so Abilities sorta work like Magic. They will consume some MP on use just like Magic. And a short animation and maybe a different type of attack will take place depending one which ability is used.
But not all characters unlock the same abilities.

Here's a list:

Brute: Boost Battler's strengths and defense
Blitz: Rush in on enemy with a wild spin attack
Steal: Steal Gold from target(Won't work if enemy has no money e.g. TargetGold would be the variable and it would check to see if the enemy has more than one 0 gold)
Rob: Steal Gold and items(works the same as steal just with the var TargetItem
Boost: Boost Battler's Str, Spd, Def
Advanced: Boost Battlers strengths; Greatly
Peep: Scan target to reveal Target HP bar
Faith: Restore some HP to the whole party
Strike: Preform a stronger attack on target
Quickscope: Quickly Shoots the target in it's weak point for greater damage( chance of inflicting defense down buff)
Absorb: Steal some HP from target but only if there's more than 1hp left
Survivor: Places a Phoenix pin buff on Battle to ensure that they will survive what might be a finishing blow( buff wears off after 1 uses)
Light Tome: Battler will cast a legendary white magic
Darkness Tome: Battler will cast a legendary dark magic
Tri-Blast: Battler will fire 3 non-elemental pulse orb at target that will cause damage upon impact
Oblivion: Will instantly kill a enemy( sometimes fails and is non-effective against boss)
Zantetsuken: Quickly cut threw an enemy for an instant kill( sometimes fails and is non-effective against boss)
Aura: Completely depletes MP gauge and fully fills Assault gauge for that battler
Freeze Shot: Shoot target with side elemental bullet
Spark Shot: Shoot target with side elemental bullet
Flame Shot: Shoot target with side elemental bullet
Freeze Strike: Hit target with side elemental Attack
Spark Strike: Hit target with side elemental Attack
Flame Strike: Hit target with side elemental Attack


QuoteI'll be impressed if this system works exactly as Icey wants it. It's very hard to make a battle system for someone without every single detail. Like what does a certain player have a weakness to? Ice elements and Wind? And he has a strong defense against Fire. Etc. The system would need to be designed for this (or modulated enough to allow for a later addition). Also where the enemy/player is strong or weak against a certain weapon, not just magic.

Good luck, Snarky. This is something I've wanted to do for him for ages, I just never got around to it (and I probably never would've haha).

Good point, I'm sure it would helpful snarky if you asked me anything around that type of stuff while you do your the thing and I'll try my best to answer it and draw up concept art to better help you.


Anian

Quote from: Ryan Timothy on Sun 10/03/2013 00:38:07
I'll be impressed if this system works exactly as Icey wants it. It's very hard to make a battle system for someone without every single detail. Like what does a certain player have a weakness to? Ice elements and Wind? And he has a strong defense against Fire. Etc. The system would need to be designed for this (or modulated enough to allow for a later addition). Also where the enemy/player is strong or weak against a certain weapon, not just magic.

Good luck, Snarky. This is something I've wanted to do for him for ages, I just never got around to it (and I probably never would've haha).
After what Icey just wrote, this is definitely not enough of a plan.
Personally, and yes I know nobody asked me but it's a suggestion, maybe prototype the hell out of this with a premade battle engine (while you're writing your own), like in RPG Maker or something, and put all the enemies there and all the powers etc., because when you make custom stuff with so many options and variables, you need to playtest the hell out if to keep the balance right, it's not just adding powers...
I don't want the world, I just want your half

Snarky

Is it going to be exactly what Icey wants right out of the box? No. For one thing, I'm not convinced Icey knows exactly how he wants it to work; how it should be balanced and all of that.

What I'm trying to build is a generic ATB-type combat system, for managing battles between single or multiple player-controlled characters and single or multiple enemies. It will support the type of actions discussed, which will be defined in an object-oriented, stats-based way. I'll define a few sample characters, enemies, weapons, spells, etc., but it will be up to Icey to decide on the set he wants to use in his game (which should usually be a matter of copying some sample code, adjusting a few values, and adding the associated graphics/sound effects; at least that's the idea, though certain spells and abilities will take some case-by-case coding). I'll leave the balancing and playtesting to others who are more into RPGs than I.

So it is going take some additional work to customize it for any particular case, but at least the basic mechanics will be there.

As for what Ryan mentions, I wasn't planning on building in modifiers like that in the basic system, since Icey said he wanted to keep it simple. But if RPGers feel it's an essential part of combat, I could add it in.

Slasher

I've never actually written or implemented a proper battle system.

If I were then I would pan out ever single scenario down to the full stop.

Put it away for a week or two. Come back to it and refine it adding any additional ideas.

Continue until all the battle elements are done theoretically.

If I found someone that could help me implement it I would go down on my knees and thank them.

Making notes of notes is a great idea.

Start small and work up.

Most of us has played these sort of games professionally made by the big companies.

I wish you luck Icey, you may need it. But feint heart...........





Snarky

Just a little update on the battle system.

I started working on data structures, API and some high-level routines to get a general sense of how to implement this. I quickly ran into trouble with the limited AGS support for object-oriented development (no pointers to custom structs being the big one, along with the crappy support for arrays of structs), and had to work around the limitations. The result is messy, but will hopefully work. I have initial versions of data structures to keep track of character stats and status, weapons and equipment, types of actions/attacks, and spells. These will almost certainly change, but give me something to work with for now.

I've implemented the basic ATB system to keep track of when units are ready to act, and to queue and execute those actions. The next step is to actually perform them. I started working on the basic attack, and realized I needed more information to come up with a reasonable formula to determine damage. So I looked up the FF6 algorithms. Very informative, but in order to follow it I'll need to redo some of the data structures, since I currently don't have things like hit rate in there (or a way for a weapon to perform a spell, or anything like that).

Anyway, I'll just do a simple version of the calculations for now, and put together a test GUI so battles can actually be played/tested. However, I have too much real work to do during the week; I'll try to get a first working version done next weekend.

Some problems/open issues:
-In FF6, time progresses (time bars replenish) while attacks play out. That means they must have a defined duration measured in battle cycles. How to sync this with animations?
-If a target is dead before a queued attack on it can start, the attack is canceled as it is about to be launched, without depleting the time bar, so that a new command can be issued. But what about attacks with multiple targets? Are they canceled if any target is dead? Or only if they all are? (This might depend to some extent whether multi-target attacks tend to be "attack all enemies" or "attack 2 or 3 enemies.")

Ghost

If I remember correctly, attacks will always try to hit. If an attack is against multiple targets, then it will select one available member of the target group, so as long as at least one of them is alive, the attack will be calculated. Likewise single-target attacks; if the target is dead at the time of attack, another target will be selected from the remaining enemies. No idea if this selection is random, though, or "next of same type", or something else.
I also only played a couple of GameBoy FFs. None of the console biggies.

Snarky

Oh, interesting. I guess I must have got it wrong when I studied battles from FF6. Thanks! I'll refactor out this decision as a separate function so that the behavior can be customized more easily.

I think I would like to release the basic battle system as a module, since we do get people who're interested in doing RPGs in AGS from time to time. (Any custom features, special settings, or secret values for Icey wouldn't be included, to preserve the uniqueness of his games.) So I'll split out all the discussion of the combat design into its own thread.

Icey

I haven't read everything but snarky I could send you over a ff6 rom with ff6 rom editor if that'll help you out. There's a lot of stuff the editor can do. I was able to put dave in the game as a playable character but the point is it may be useful.

Also FF4 has the atb system, never really liked it that much to get threw it but I think it has a simpler version of the FF6 atb system being the fight game in the series to actually implant it.

Khris

On the topic of ATB, I personally much prefer the 'wait' variant.
Basically, as soon as all bars are filling up (enemies' included), the game immediately skips forward until a point at which any battle character has their bar full. This requires the battle to be paused while the player selects an attack, which takes away a bit of pressure (good or bad, depending on taste); on the other hand you never have to wait for the game.

Naturally, the speed of the bar will still vary depending on the character's stats so that agile characters are able to attack more often in a given period of time than slow but powerful characters.

With Chrono Cross, Square put an even better system in place (imo); the characters have a stamina value that fills up while other characters do stuff; but they don't have to wait until its full to perform attacks. For instance, having just 3 stamina points of the available 7 only allows for three weak attacks or a weak and a medium one.

Here's another cool approach which replaces having a bar for each character with a single one:
http://www.youtube.com/watch?feature=player_detailpage&v=6Yxo5yMb8lY#t=317s

Snarky

I'm implementing the Wait mode, that's easy enough. The other variants shouldn't be too much work once the basic system is in place, but I'll leave that to others.

Snarky

Just a quick update to let Icey and others know I'm still working on this. (This month is extremely busy for me, so I work on it when I can on the weekends.) Although I had most of the battle logic done in the last update, once I tried to actually display a battle, I found I needed to make a number of changes in order to link animations to actions, etc.

Those changes, plus coding the display flow, debugging, and stuff like automatic battle setup (positioning multiple units) took most of the time I had available this weekend. Anyway, I have a simple demo that shows it running (Oceanspirit Dennis and his brother Klaus fighting three electric razorbots): https://dl.dropbox.com/u/16449408/RpgTest.rar

Note!
-I haven't yet built a GUI to actually issue commands to your units, so currently all units just attack automatically once their time bar is full. Sit back and watch!
-I haven't implemented randomness in the damage calculations (currently damage is just strength+attackPower), so the whole battle is entirely deterministic
-When the battle is over, the game just stops; quit by Ctrl-Q + Enter.
-Yes, I know the time-bar and hitpoint GUIs are ugly, overlap, go outside the screen, etc. I haven't spent time on prettying it up

Lots of stuff left todo, of course, but with a working engine in place, each single improvement/extension shouldn't be a ton of work.

SMF spam blocked by CleanTalk