Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Action Battle System Tutorial
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: Action Battle System Tutorial  (Read 11253 times)

Offline AsakuraHao2004


  • RAM-TORTOISE!!
  • Exemplar
  • *
  • Posts: 1,623
  • AIM: dakutenshisdemon YIM: desimodontidae
Action Battle System Tutorial
« on: May 23, 2005, 09:12:38 PM »
--------------------------------------------------------
ACTIVE BATTLE SYSTEM TUTORIAL
--------------------------------------------------------
-------------
Contents
-------------

1) Introduction
2) Requirements
3) Scripting
   a) Part 1: Melee
   b) Part 2: Special
4) Making things work
5) Outroduction

---------------------
1) Introduction
---------------------

Welcome to my third tutorial for RPG Maker! Ok, time to get down to business. What exactly is an ABS? Well, it stands for Active Battle System. It's a pretty good alternative to the DBS (or Default Battle System, the RPG Maker standard). In an ABS, your character walk around and fights enemies as they come. Some good examples are the Zelda games, Kingdom Hearts, and Legacy of Goku.

------------------------
2) Requirements
------------------------

Before begining the scripting, you will need to have a few things set. First off, you'll need at least 3 character sets, one for the hero, one for the enemy, and one for the special graphic. Also, probably the most important thing, you'll need to have at least a basic understanding of how variables and switches work. Not so much on switches, but you must know about variables. If you don't, please check out my tutorial on understanding variables.

-----------------
3) Scripting
-----------------

Note: Things in ?question marks? are suggested names, or optional. If you wanna name something something else or do something different in that situation, feel free.

---------------
3a) Melee
---------------

I'm gonna get right into it. First, make a new event, name it ?enemy?, and set it's graphic to you enemies graphic. Set the trigger condition to "Colision with Hero" and make it on the same level as the hero. Make it's movement type "toward hero". In the event's commands, make a fork condition, and make it "If event was started using action key", and check "Else Case". In that fork, "?play sound: hit?", "Flash event, this event, .5 sec", "Move event, this event, start jump, random, end jump", Make a new variable called "?Enemy's HP?", then "Variable, subtract 1 from Enemy's HP".

Now, make a new page. Set the graphic to blank, make it below hero. Under "Preconditions", check "variable, if enemy's hp is 0". Now go back to the first page.

Under the "Else Case", "?play sound: hit?", "Flash event, Hero, .5 sec", "Move event, Hero, start jump, random, end jump", make a new variable called "?Hero's HP?", then "Variable, subtract 1 from Hero's HP".

Now, after "End", make a fork condition, "If Hero's HP is 0, no Else Case" and inside the fork, put "Game Over". This will end the game if the hero takes too much damage.

-----------------
3b) Special
-----------------

This is a little harder. First, I must tell you to put the following events in a place the hero and enemy CAN NOT get to. If they touch them, it causes all sorts of problems, so put them up in a tree, in some water, or wherever, as long as the characters will never be able to touch them.

Before proceeding, make some new variables: Enemy X, Enemy Y, Hero X, Hero Y, Special X, and Special Y.

Make a new event, name it whatever you like, no graphic, parallel process. In the Event Commands,   "Variable Operands, single variable: Enemy X, set equal to, check 'sprite' and select "enemy" and "x coordinate". Now, do it again, except make the variable "Enemy Y" and the 2nd option of sprite set to "y coordinate". Do this again, except using the "Hero X" and "Hero Y" variables, and make the sprte "Hero". Click OK.

Make another event close to it, name it ?beam?, no graphic, parallel process. In the event commands, chose "Key input process", make a new variable called "?use special?" and store the key code in it. Make it, "Wait until key pressed", and ONLY check "Cancel Key (6)". Under that, make a fork condition, "If variable 'Use Special' is equal to 6". Under that, put "Change Event Location, this event, check 'location stored in variables', and for "X coordinate stored in" chose "Hero X", and for "Y coordinate stored in" chose "Hero Y". Under that, "Wait, .1 sec", under that, make a new switch "?using special?" and turn it on. It should look like this:
Image hosted by Photobucket.com

Now make a new page.

Make it Parallel Process, set the graphic to the special's graphic, and set the Precondition to "If Using special is on". In the event commands, Fork condition "If hero is facing up, no else case", move event, this event, phasing mode on, up, up, up, up, up, switch "using special" off, check "Ignore impossible moves". Under that, Fork condition "If hero is facing down, no else case", move event, this event, phasing mode on, down, down, down, down, down, switch "using special" off, check "ignore impossible moves". Make two more forks for left and right. You should be able to know how to finish them by now.

Under those put a wait. 1 second should be enough, but it all depends on how fast the graphic is going. For normal speed, use 1 second.

Under that, "Change event location, this event, specific location, MOVE IT TO AN EVENT-FREE COORDINATE THAT THE ENEMY CANNOT ACESS" If you don't, it'll most likely cause errors. Click OK. Your event should look a little like this:

Image hosted by Photobucket.com

Go back to the event we first made at the start of Part 3b. Under the first 4 event commands, make another one "Variable Operands, single variable: Special X, set equal to, check 'sprite' and select "beam" and "x coordinate". Now, do it again, except make the variable "Special X" and the 2nd option of sprite set to "y coordinate". Also, you might wanna put in "Disable menu" here, if you dont already have it in effect. It shoulc look like this when finished:
Image hosted by Photobucket.com

Now, one final event. Name it whatever you want, no graphic, parallel process. In the event commands, "Fork condition, if variable "Enemy X" is equal to, variable referance "beam X", no else case. INSIDE that fork, "Fork condition, if variable "Enemy Y" is equal to, variable referance "beam Y", no else case. And INSIDE that one, "switch 'using special' off, wait .1 sec, "change event location, "beam" MOVE IT TO AN EVENT-FREE COORDINATE THAT THE ENEMY CANNOT ACESS" ?play sound: beam hit?, "Flash event, enemy, .5 sec", "variable, subract 5 from Enemy HP." Here it is:
Image hosted by Photobucket.com

There you have it. Test it out. You should be able to punch you enemy with Z and shoot at him with X.

----------------------------------
4) Making Things Work
----------------------------------

First off, for best results with this kind of CBS, you should only make where you fight the enemies, and where you talk to people different. If you want to have more than 1 enemy per map, you'll need 3 variables for each monster. That monster's HP, that monster's X and that monster's Y coordinate. The scripting can get tedius, so I reccomend that instead of having one large map with a lot of monsters, you can have several small maps with a few monsters, that way, you can assign the same variables to different monsters.

Also, at the begining of the game, or at least sometime before the hero starts fighting, set all the monster's HP to what you want it, as well as the hero's. In this tutorial, I based the hero's and monster's HP on a 10 point basis. You can make them higher if you want, but also make sure to make the attacks more damamging.

Along with that, everytime you teleport to a new battle map, set each monster's HP back up to full. Once you get to harder levels, you can set their HP higher for a cheap leveling system. Just put "Set Variable enemy1 HP" to whatever, then enemy 2, and so on, for all of them before the teleport event.

-------------------------
5) Outroduction
-------------------------

I hope this helps some of you. This is a somewhat advanced tutorial. I tried to make the instructions on what to do as easy to undestand as possible. If theres something you dont understand, you should know enough about RPG Maker to figure out what I mean. If not, you should probably mess around in RPG Maker a little more before trying an ABS. Also, once you have this down, try tweaking it some. Make a Special meter, or make more than 1 specials selectable. Or even don't set a graphic for the special. Make it invisible and play a battle animation over it. I'd like to see some more ABS games with cool effects. If this tutorial helped you any, please creadit me. If you'd like to use it on your site, ask me first. You can e-mail me at asakurahao8@yahoo.com. Thank you.

-RE

Note: I typed fast, no proofread. Sorry for spelling errors.
Logged
AKA Desimodontidae. If you're seeing this profile, Im probably at school.

If i were a clown, would you hold me when I'm down?/I wish I had someone to make me drown/So many people don't know that it's so damn hard to be a clown/I am the clown with the giant frown/My heart is in a state of being upside down...

Offline darkrune

  • The Man
  • Acolyte
  • *
  • Posts: 329
  • Ummmmm just kinda of regular guy.
(No subject)
« Reply #1 on: May 23, 2005, 09:20:06 PM »
/bow
/hail AsakuraHao2004
Lol thanks man.
Also AsakuraHao2004 in rm2k3 i forck condtion
conditional branch?
Logged

Offline AsakuraHao2004


  • RAM-TORTOISE!!
  • Exemplar
  • *
  • Posts: 1,623
  • AIM: dakutenshisdemon YIM: desimodontidae
(No subject)
« Reply #2 on: May 23, 2005, 09:29:03 PM »
You're welcome. Yeah, Fork Condition is conditional branch. I sort of went back and fourth between the two.
Logged
AKA Desimodontidae. If you're seeing this profile, Im probably at school.

If i were a clown, would you hold me when I'm down?/I wish I had someone to make me drown/So many people don't know that it's so damn hard to be a clown/I am the clown with the giant frown/My heart is in a state of being upside down...

Offline darkrune

  • The Man
  • Acolyte
  • *
  • Posts: 329
  • Ummmmm just kinda of regular guy.
(No subject)
« Reply #3 on: May 23, 2005, 09:42:33 PM »
For the 3b part we don't have to do that part until we want our heroes to use specials right?
Logged

Offline AsakuraHao2004


  • RAM-TORTOISE!!
  • Exemplar
  • *
  • Posts: 1,623
  • AIM: dakutenshisdemon YIM: desimodontidae
(No subject)
« Reply #4 on: May 23, 2005, 09:50:59 PM »
You can use it whenever you want. If he's in a place when you dont him to use specials, don't make nything in 3b. If he can use specials, go ahead and make them. You don't even have to use specials at all if you don't want to.
Logged
AKA Desimodontidae. If you're seeing this profile, Im probably at school.

If i were a clown, would you hold me when I'm down?/I wish I had someone to make me drown/So many people don't know that it's so damn hard to be a clown/I am the clown with the giant frown/My heart is in a state of being upside down...

Offline darkrune

  • The Man
  • Acolyte
  • *
  • Posts: 329
  • Ummmmm just kinda of regular guy.
(No subject)
« Reply #5 on: May 23, 2005, 10:49:29 PM »
AsakuraHao2004 I am going to use Kingdom Hearts as an example because they use abs. Sora doesnt fight alone however. So is there a way to get other people fighting with you such as "Donald" or "Goofy"?
Logged

Offline AsakuraHao2004


  • RAM-TORTOISE!!
  • Exemplar
  • *
  • Posts: 1,623
  • AIM: dakutenshisdemon YIM: desimodontidae
(No subject)
« Reply #6 on: May 23, 2005, 11:50:41 PM »
It might be possible, but It's beyond my skills.
Logged
AKA Desimodontidae. If you're seeing this profile, Im probably at school.

If i were a clown, would you hold me when I'm down?/I wish I had someone to make me drown/So many people don't know that it's so damn hard to be a clown/I am the clown with the giant frown/My heart is in a state of being upside down...

Offline darkrune

  • The Man
  • Acolyte
  • *
  • Posts: 329
  • Ummmmm just kinda of regular guy.
(No subject)
« Reply #7 on: May 24, 2005, 01:18:45 AM »
Yeah from your tutorial I am seein that it would be near impossible to make another one do it. I guess you could have them fixed but that would be kinda lame like have them be like cut scenes fighting other cutscenes lol.

Also suggestion maybe take a screenie of one of the events and show it, more easier since it bothere you it might be to diffucult. Just a suggestion though.
Logged

Offline AsakuraHao2004


  • RAM-TORTOISE!!
  • Exemplar
  • *
  • Posts: 1,623
  • AIM: dakutenshisdemon YIM: desimodontidae
(No subject)
« Reply #8 on: May 24, 2005, 01:59:49 AM »
Ok, I edited it to have pictures. They might be a little different from what yours would look like because that's from my game, and I have a system that keeps track of your energy.
Logged
AKA Desimodontidae. If you're seeing this profile, Im probably at school.

If i were a clown, would you hold me when I'm down?/I wish I had someone to make me drown/So many people don't know that it's so damn hard to be a clown/I am the clown with the giant frown/My heart is in a state of being upside down...

Offline Snake Eater

  • keeps on trying until I run out of cake
  • Exemplar
  • *
  • Posts: 1,318
(No subject)
« Reply #9 on: May 24, 2005, 02:18:35 AM »
Great Job!
Logged

Offline darkrune

  • The Man
  • Acolyte
  • *
  • Posts: 329
  • Ummmmm just kinda of regular guy.
(No subject)
« Reply #10 on: May 24, 2005, 02:56:10 AM »
Hmmmm easier with pics.
Logged

Offline Desimodontidae

  • Registered July 13, 2004, 10:41:19 AM (+1692 post counts)
  • Agent
  • *
  • Posts: 892
  • ghost host
    • perpetual massacre
(No subject)
« Reply #11 on: April 23, 2006, 03:08:47 AM »
I would just like to thank whoever kicked my thread. It's slightly dated, but this is still the basics of making an ABS. A little add-on of advice, once you learn this, repeat it and apply it over and over in the same system, like frickin crazy!!! Get inventive. Like double shots, multiple bullets at a time, explosive mortars that fly in all directions on impact, all kinds of stuff. Even if you dont use it for your game it's good practice getting this stuff down. Also, learn variables like crazy. And pictures, and using them in conjunction. These are the basis' of an awesome system.
Logged
My MGS3 main character sprites

Offline reflux

  • Member
  • Initiate
  • *
  • Posts: 3
(No subject)
« Reply #12 on: May 13, 2006, 12:37:27 PM »
thanks man, this really helped me a lot,I really hate these pokemon fights
it's a great tutorial and my game can get so much bloodier with this :)
Logged
Maria Duval
http://users.fulladsl.be/spb13805/mariaduvaleeuwigrottendrecl.jpg

Offline Zerlina

  • The Cloud that Rains on Your Parade
  • Exemplar
  • *
  • Posts: 1,871
(No subject)
« Reply #13 on: May 13, 2006, 01:42:00 PM »
Will this work if you only want an ABS for a certain section of the game? There's a scene on a battlefield in my game, and I thought it would be more effective as ABS rather than DBS system for that part...but I'm using DBS for the rest.
Logged
Quote from: lucas_irineu
You look like my grandmother.
edit: when she was young. You don't look like you're 80.

Quote from: Dragonium
Last night I had a dream that Zerlina and I were pirates. It was... beautiful.

Offline Meiscool-2

  • Sage
  • *
  • Posts: 7,030
  • If you support n00bs, you support communism.
(No subject)
« Reply #14 on: May 13, 2006, 02:29:02 PM »
Yes, it will work for anything.
Logged
Most Recent:

________________________
Old Stuff:

  • Print
Pages: [1] 2 3
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Action Battle System Tutorial
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum