The Daily Click ::. Forums ::. Klik Coding Help ::. tips on coding a turn-based RPG battle system?
 

Post Reply  Post Oekaki 
 

Posted By Message

NMasutaa



Registered
  26/12/2004
Points
  301
14th April, 2007 at 17:12:48 -

It's not something I've ever really tried before, so I thought it'd be helpful to get some pointers on the subject first.

First though, for the game I'm making, I'm not exactly intending to make a standard turn-based RPG battle system. Instead, I'm trying to make one like in Super Mario RPG, w/ the 4-button menu and "timed hits", "action commands," etc. Particularly, I'm also thinking about making more complicated action commands than the ones seen in most Mario RPGs.

Still, of course, if anyone has any tips on making any kind of RPG battle system in general, that'd probably help too.

 
n/a

tetsuya_shino



Registered
  12/08/2004
Points
  491
14th April, 2007 at 18:22:58 -

It might be helpful to try to get the basics down before you try something more complex. I tired to make a xenogears style battle system before. And while I was happy with it, I realized after that it would of been so much easier to make a basic final fantasy style battle system, and edit it later, then to dive right into something really complex.

Good luck with your game, super mario rpg was a fun game.

- tetsuya_shino

 
n/a

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
14th April, 2007 at 19:52:58 -

If you're making a turn based RPG engine, start simple.

Use global values/temp ini file to save the x and y position, and the frame number that you came from. Then when you finish the battle (if you win) go back to that position (or if it's a boss battle activate another global value so you can carry on with the script)

In the battle system, you want to have a system which generates a random number for the enemies action 0-9 = attack, 10-19 = defend, 20-25 = special 1 26-29=special 2 etc (the lower range for specials because they should be used less frequently)
plus if they have MP system or something similar, don't forget to subtract from it and make sure they have enough to use it in the first place.

For having a timed hits system you want to compare the players attack command, and create a mask object at the appropriate position (i.e the enemy you are attacking), then when the character mask gets to that position, and you press a button, activate the super strength hit. Of course if you're having multiple hits, like marios super jump just use an alterable value and set it to the max number of hits, then subtract for each succesive hit until 0, and if you miss, set it to 0 and end the attack.

Just remember, don't try anything too ambitious until you have the basic workings of a battle engine figured out. mmkaythxbai

 
My signature is never too big!!!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
15th April, 2007 at 03:02:17 -

Timed hits could also be achieved in a different way, which is by having a hidden counter. It's always added to while the player is doing his move, and when it's inbetween a certain range and you press a certain button... BAM. That's when the action happens. Then you can reset the counter to 0 and continue the move or something, if you want to allow subsequent hits.

Make sure this method needs a lot of testing to see if things are happening at the right moment. As a help you could set MMF2 to only 10 to 20 FPS, or have some kind of recorder for you to record these combos (more difficult).

 
Old member (~2004-2007).

Reno



Registered
  11/01/2005
Points
  906
15th April, 2007 at 08:26:43 -

use random events and have attributes on EVERYTHING. makes things more realistic.. use percentages for those random events. like 30% accuracy would mean that 70% of the time it would be inacurate which then you would run another random event to see how much it would be inacurate. even oerhaps misses. Thats what I would do.

 
Reborn Again

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
15th April, 2007 at 15:15:54 -

like 30% accuracy would mean that 70% of the time it would be inacurate which then you would run another random event to see how much it would be inacurate.

If you do this, you should also have the enemy's dodge skill factor into the equation like I do. In fact, for really easy or slow enemies I use a negative dodge factor, which in effect helps the player hit the enemy. Trust me on this one- even with a 70% base hit rate you're going to miss way too much at the start and it'll be annoying. Say versus a slime that has a dodge skill of -25, you'll have a 95% hit rate, which is much more managable in the beginning. Then later you can have some quick-moving enemies with a decent plus-side of dodge skill to give you fits.

Also, to factor in some randomness, have a random number 1-100 roll before the attack. The player's attack will be successful if the following bodes true:

If Player Accuracy <= ((Random 1-100) + Enemy Dodge Skill)

With this equation, a player fighting an enemy with a dodge skill of zero will have his accuracy as the actual percentage of hiting the foe. If he has a sword that gives him 25%, this is only a 1 in 4 chance of hitting the enemy- which would suck. That's why easy or slow starting enemies SHOULD have a big negative dodge skill to help the player kill them easily, and also avoid having to give the level 1 hero a huge hit percentage right off the bat.

Hooray!!



 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
16th April, 2007 at 01:38:33 -

Also, you need to animate the enemies, so instead of the dying/appearing animation. You can easy your job, by usind active objects fade in/out.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
16th April, 2007 at 06:37:09 -

Also, you need to animate the enemies

Not necessarily, there are plenty of awesome games that don't- SNES's Final Fantasy 3 (FF6 Japan), Most Dragon Warriors, the early Phantasy Stars, the Lufia series takes static sprites and just makes them "hover" a bit without animation. Of course, it'd most likely look better to animate the enemies, just be prepared for a LOT of extra work if you do it.

In either case, make sure your engine is stable and ready to go before (possibly) wasting your time making tons of animations first.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
16th April, 2007 at 08:59:26 -

Yea, but I mean there can be done simple attacking/getting hit/appearing/disaphearing animations can be done very easily by changing place of hot spot and the fade in and out.

But yes do the engine first, and if ya have problems with changing the frame when engaging to battle there is an easier way by doin 2 applications and making the to same place by sup-apps, if you know how to use them, and understand my english Xp.

 
I have proven new mathematic formula to be true...

2D > 3D

Image

   

Post Reply



 



Advertisement

Worth A Click