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 »
  • Help please. Timed Skill like Cyan from FF6?
« previous next »
  • Print
Pages: [1]

Author Topic: Help please. Timed Skill like Cyan from FF6?  (Read 3569 times)

Offline Zorzenon

  • Initiate
  • *
  • Posts: 18
Help please. Timed Skill like Cyan from FF6?
« on: March 27, 2009, 12:12:44 PM »
Hey, I looked all over and couldnt find what I wanted and that was a way to make a battle command like Cyans Bushido in FF6, where theres a gauge that fills, and where you hit the button on this numbered guage is the attack youd do. any help would be very appreciated. BTW i'm using RM2k3
« Last Edit: March 27, 2009, 12:40:10 PM by Zorzenon »
Logged
Two of my favorite quotes of wisdom.
"I never let my schoolin' get in the way of my education." - Mark Twain

"GODZILLA!" - Many random Japanese people pointing up.
(okay the second ones more of an observation.)

Offline HobomasterXXX

  • Your eyes. Are an ocean. Your breasts. Are also an ocean.
  • Leader
  • *
  • Posts: 2,700
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #1 on: March 28, 2009, 12:12:44 AM »
There is pretty much no way to do this in Rm2k3 without coding a competely new battle system from scratch.
Logged

1:24 PM - [Razor]: I think
1:24 PM - [Razor]: I almost fell off my chair
1:24 PM - [Razor]: in anticipation for DICK

Offline Zorzenon

  • Initiate
  • *
  • Posts: 18
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #2 on: April 01, 2009, 12:16:42 AM »
Thank you for your reply. but, ehhhh, I find it hard to accept that, Im sure Id need a cms but thats just time consuming not impossible, to put it in the DBS. and from what I understand of the timer and input keys it doesnt seem impossible just very hard. for example, the way the gauge is shown in ff6 would be hard, but to have something else linked to the timer (like a battler animation) could be done theoritically easliy, sellect the battle command and just hit the button when or after  the sprite flashes(hit accept move 1), flashes twice (hit accept move 2)flashes 3 times etc. Ill wait a while longer for more responses cause this doesnt seem to be hard to me i just couldnt figure it out on my own. Thanks everyone 

edit reasons: grammar
 
« Last Edit: April 01, 2009, 01:56:30 AM by Zorzenon »
Logged
Two of my favorite quotes of wisdom.
"I never let my schoolin' get in the way of my education." - Mark Twain

"GODZILLA!" - Many random Japanese people pointing up.
(okay the second ones more of an observation.)

Offline SaiKar

  • KOFFING!
  • Staff
  • Royal
  • *
  • Posts: 4,082
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #3 on: April 01, 2009, 04:41:46 AM »
Well it sounds like you have a theory for how to do it so let's see what you come up with.
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #4 on: April 01, 2009, 03:36:23 PM »
Is this anything like the "blitz" command? 'cuz I got a tutorial about that.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline Zorzenon

  • Initiate
  • *
  • Posts: 18
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #5 on: April 01, 2009, 10:45:00 PM »
hmmm, I saw that one Prpl, I guess Its kinda the event codes id need but im still unsure how id go about it Ill fool around with it somemore.
Logged
Two of my favorite quotes of wisdom.
"I never let my schoolin' get in the way of my education." - Mark Twain

"GODZILLA!" - Many random Japanese people pointing up.
(okay the second ones more of an observation.)

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Help please. Timed Skill like Cyan from FF6?
« Reply #6 on: April 01, 2009, 11:05:30 PM »
This is the one I was talking about anyway.

Quote from: Azurefenrir
Unfortunately, turn-based RPGs frequently lack in the action department. Even with an active ATB system where the user

should be frantically trying to select his or her spell before the final boss beats them into oblivion, they frequently do

not have the action that games like fighting and action games have.

Final Fantasy 6 tried to remedy this by adding unique skills that work somewhat differently from the regular system. One of

these systems is the blitz command, which makes the user press a certain key combination - similar to fighting games' combos

- to execute his special moves. Although even this lacks the thrill of pressing the correct keys in rushed and active

situations that many fighting games exhibit, it is still an interesting feature to add to an RPG.

THINGS THAT

YOU NEED TO KNOW:

Experience With RM2K3 Commands
Some Experience With Battle Commands and Events
Understanding of Switches
Understanding of Variables
Key Input
Loops and Labels
The Trigger Happy System

In this tutorial, I will assume that you have already read the Trigger Happy Tutorial that I have read earlier, since this is

pretty much a continuation to that tutorial. Many of the concepts that are used in that tutorial are used here, so it might

be beneficial to read the other tutorial first if you do not understand the concepts discussed in this.

Before we start, though, make a chart of every blitz move that you want your character to be able to perform, and write down

their key combinations. Then, allocate a bunch of variables equal to the number of blitz commands that your character can

perform. For example, let's say that your character possesses the following moves:

Pummel: Up Right Left
Blitzace: Left Left Right Left
Hellfire: Left Right Action Cancel Down
Banning of a thousand: Left Right Up Action Down
Eat Eyes: Left Up Right Down

Since we have five moves here, we will use five different variables in this phase. Then, make a new battle action. Call

it...say...Blitz, and set it to "Attack." Assign it to the classes that should have access to this skill, and we'll start

writing the code for this command.

Now, we need a new common event that will run whenever we select Blitz. As we have seen in the Trigger Happy tutorial,

common events are necessary to execute some things that are impossible to execute using battle events alone, such as

detecting key input and looping. Since blitz requires constant key input processing, let us start off with a key loop,

similar to the one in the Trigger Happy tutorial (adding variables as necessary):

RPG Maker 2003

Code: Common Event Blitz (Code Fragment)

<>Timer 1 Operation: Set, 0M 03S
<>Variable Operations: [####:TempPrevKey] Set, 0
<>Timer 1 Operation: Start
<>Label: 1
<>Comment: Do Not Wait Until Key Press; Detect All Keys (5))
<>Key Input Processing: [####:TempKeyVar]
<>Branch if: V[####:TempKeyVar] does not equal V[####:TempPrevKey]
    <>Branch if: V[####:TempPrevKey] equals 0
        <>Comment: Our code will go here.
    : End
: End
<>Branch if Timer1 is less than 0M 01S
    <>Goto label: 2
: End
<>Variable Operations: [####:TempPrevKey] Set, V[####:TempKeyVar]
<>Goto Label: 1
<>Label: 2
<>Timer 1 Operation: Stop

This code pretty much continuously gets the keys that the user presses for about three seconds. The reason that the

TempPrevKey variable is there is to prevent us from counting a key twice if a user holds it down (since key input will read a

key even if it's held down), so we won't have to guess how long the user will hold the key, etc.

What do we need for the code portion? Well, we'll use our sample attack list as an example. Let's look at the first attack

in the list, pummel:

Pummel: Up Right Left

The code for this command will be:

RPG Maker 2003

Code: Common Event Blitz (Code Fragment)

<>Branch if: V[####:PummelVar] equals 0
    <>Branch if: V[####:TempKeyVar] equals 2
        <>Variable Operations: V[####:PummelVar] Set, 1
    <>: Else
        <>Variable Operations: V[####:PummelVar] Set, 0
    : End
: End
<>Branch if: V[####:PummelVar] equals 1
    <>Branch if: V[####:TempKeyVar] equals 3
        <>Variable Operations: V[####:PummelVar] Set, 2
    <>: Else
        <>Variable Operations: V[####:PummelVar] Set, 0
    : End
: End
<>Branch if: V[####:PummelVar] equals 2
    <>Branch if: V[####:TempKeyVar] equals 2
        <>Variable Operations: V[####:BlitzCommand] Set, 1
        <>Goto Label: 2
    <>: Else
        <>Variable Operations: V[####:PummelVar] Set, 0
    : End
: End

How did this work? Well, the variable PummelVar (which is one of the five variables that I named in the beginning) holds

how many keys the player has already matched in that command sequence. For example, if the variable contains 1 (1 key has

already been pressed), then the code will know that the next key that he/she needs to press is a 3, or right. If the user

then presses down, PummelVar will increase by one, and the code will now expects a two (left key input). If the user does

not press the right arrow key, then the variable is reset to zero, and the code will expect a 4 (up key) again.

What if all three keys are successfully pressed? Well, in this case, PummelVar will initially contain a two, and the

TempKeyVar will contain a two, signifying that the user has pressed the left key. Now, the code will set a new variable

called BlitzCommand (don't forget to add this) to one, and goes to label two, which stops the timer and leaves the loop, thus

ending the common event.

Now, repeat this for every blitz command that you want to add, and...

Hey, wait! Don't leave the common event behind yet! What if the user uses the blitz command, enters part of, say, two keys

for Pummel, fails, and uses blitz again? Well, in this case, PummelVar will contain what the last blitz command left off on,

and if the player presses left, then pummel will execute anyway...oops!

This, however, is easily remedied by addind a simple bit of code to reset all the counter variables to zero at the beginning

of our common event:

RPG Maker 2003

Code: Common Event Blitz (Code Fragment)

<>Variable Operations: V[####:PummelVar] Set, 0
<>Variable Operations: V[####:BlitzAceVar] Set, 0
<>Variable Operations: V[####:HellFireVar] Set, 0

Now, add a battle event to every monster group. Have it trigger whenever the character uses the Blitz command, and put the

following code in it (changing the actual code depending on your actual blitz commands):

RPG Maker 2003

Code: Battle Event "Hero [Blackbelt] uses the "Blitz" command"

<>Call Event: Blitz
<>Branch if V[####:BlitzCommand] Equals 1
    <>Branch if Monster1 is the current target
        <>Comment: Place code to calculate damage here
        <>Show Battle Animation: Pummel, Monster1
        <>Change HP: Monster1, Decrease V[####:BlitzDamage]
    : End
    <>Branch if Monster2 is the current target
        <>Comment: Place code to calculate damage here
        <>Show Battle Animation: Pummel, Monster2
        <>Change HP: Monster2, Decrease V[####:BlitzDamage]
    : End
    <>Comment: Repeat for additional monsters
<>: End
<>Branch if V[####:BlitzCommand] Equals 2
    <>Branch if Monster1 is the current target
        <>Comment: Place code to calculate damage here
        <>Show Battle Animation: BlitzAce, Monster1
        <>Change HP: Monster1, Decrease V[####:BlitzDamage]
    : End
    <>Branch if Monster2 is the current target
        <>Comment: Place code to calculate damage here
        <>Show Battle Animation: BlitzAce, Monster2
        <>Change HP: Monster2, Decrease V[####:BlitzDamage]
    : End
    <>Comment: Repeat for additional monsters
<>: End
<>Comment: Repeat for additional blitz commands
<>Change Condition: Blackbelt, Inflict Normal Condition

This battle command simply calls our battle command, Blitz, and checks what the "BlitzCommand" variable is equal to. Then,

it does the appropriate attack, calculating using different damage algorithms and battle animations. Since you may have

different algorithms for damage depending on your actual blitz commands, I can't really put a set damage algorithm to replace

the comments. Although, for the more needy readers, here's a sample algorithm that does damage equal to 2x the character's

Attack. You can modify this to make your own damage algorithms:

RPG Maker 2003

Code: Battle Event "Hero [Blackbelt] uses the "Blitz" command"

<>Variable Operations: V[####:BlitzDamage] Set, BlackBelt Attack
<>Variable Operations: V[####:BlitzDamage] *, 2

And that's it for the Blitz Tutorial! I am AzureFenrir, and this is a Gaming World 9 O'Clock Tutorial. Good night.


::::::::::::::::::::::::::::
Michael,TheEmeraldWind

Ok... Here I go.
Number 1: My recent problem is because simply enough because when the timer reaches zero, the battle ends. This is fixed by making the timer1 branch being less than or equal to 1 second not 0 seconds.

Then I ran into another very iritating problem...
Whenever I inputed a button combo the combo would keep on being reset to zero this is what was happening:

<>Bran ch if: V[####:PummelVar] equals 0
<>Branch if: V[####:TempKeyVar] equals 2
<>Variable Operations: V[####:PummelVar] Set, 1
<>: Else
<>Variable Operations: V[####:PummelVar] Set, 0
: End
: End

{{{{Now what would happen is now is simply this: Now pummelvar = 1, RPG MAker would instantly goto the second key...}}}}
<>Branch if: V[####:PummelVar] equals 1
{{{{RPGMaker thinks this is true, but still has the last key stored thus going to the next key, without allowing you to input the new key}}}}
<>Branch if: V[####:TempKeyVar] equals 3
<>Variable Operations: V[####:PummelVar] Set, 2
<>: Else
<>Variable Operations: V[####:PummelVar] Set, 0
: End
: End
<>Branch if: V[####:PummelVar] equals 2
<>Branch if: V[####:TempKeyVar] equals 2
<>Variable Operations: V[####:BlitzCommand] Set, 1
<>Goto Label: 2
<>: Else
<>Variable Operations: V[####:PummelVar] Set, 0
: End
: End



Thus ending in failure...

This is how you fix it:

under the branch condition for each CORRECT key press(the part that makes it increase the varible) put a goto label command. Then at the end the commands for pummel(your first blitz move) but before the second attack, you put in that lable. Do this with every blitz move, BUT use DIFFERENT numbered labels for each blitz move.

Now you're wondering, "Why not just skip to the end?" Well, this is because if two commands start with the same key, one would be skipped.

Now if you understand what I was talking about, it will work. I used this method, and now I have a fully functional Blitz system.

Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Help please. Timed Skill like Cyan from FF6?
 

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