Creating a “Jump” skill ala Kain from Final Fantasy IV for Claimh’s side-battle system using events
This is my first attempt at writing a tutorial, and I will be explaining something I did for my last project. It is rather specific and cumbersome to create with events, but it works, and I spent a long time searching for a tutorial on how to make it work with no luck, so hopefully this will help someone. I only set this skill up for one character – if you give it to more than one you will have to do more work. It’s better to start setting this up at the beginning of your project than waiting because it requires you to create common events for all of your troop formations and parallel processes for all maps. If anyone finds a simpler way to do this, please let me know.
I made an example to download, which is an excerpt from my last project, so you can look how I set things up in the database. I have not included the RTP: http://www.mediafire.com/?1majdzb47kvptm8
I took out some of irrelevant information in the database but it still contains a lot from my whole project. Ignore the event in the upper-left corner of my map. To help you out, the things I will be referencing in this tutorial are: Animations 109 and 110, Common Events 93 and 94, Skills 116, 117, 135 and 136, Troops 144-160, and event 1 on my map.
Note: I love Claimh’s turn-based side-battle system (http://www.rmxpunlimited.net/forums/topic/5956-side-view-battle-system/). A lot of people do not because it uses the in-game character sprites for battle, but I actually dislike having different sprites for each – the artistic inconsistency just seems weird to me. Anyway, I’ve only used that one, so you might have to tinker around to get it to work with others.
So, the end result will be that you have a skill that makes your character jump off-screen on one turn, making them invulnerable to attacks, and then land on an enemy dealing massive damage on the next turn. See this video for my inspiration: http://www.youtube.com/watch?v=SOtKCCKTAXs
How to do it:
1. Make “jump” and “land” battle animations:
The first and most tedious part will be creating an animation for the skill. Fortunately, I had a handy sprite for my character in mid-jump. You might need to play with your sprites to make them really look like they are jumping when they do.
To make a custom battle animation, what I did was go into the Resource Manager and export one of the battle animations from the RTP. Then I erased the images, placed the sprites of my character jumping frame-by-frame into the slides for the old animation, saved it as a new file and imported that into the resource manager.
Then, I went into the database and created two new animations: “jump” and “land”. For “jump”, select your newly created graphic and create your frames so that it looks like your character is moving up. I made ten frames, and in each one I put three of the same sprite slightly over-laying each other, placing them very slightly higher in each frame. For “land” I did the exact opposite, with my character heading down.
2. Set-up a “jumping” class:
Under Classes in the database, make a new one called “jumping” and set efficiency of every single element to “E” and all of the states to “F”, and make sure ALL of your skills (including curative ones) have an element set to them (if you don’t want the elements to have any effect on anything else, you can create a nul element and not bother with that element in any of your other parameters). This is to ensure that your character does not take damage while supposedly in the air.
3. Create two new character states: “jumping” and “about to be jumped on”
For “jumping”, set the restriction to “cannot move”, priority to 5, release to after 1 turn and check at the end of battle, change agility to 200% and select to guard against every single element. This is to make double-sure that your character does not take damage while supposedly in the air.
For “about to get jumped on”, select no restriction, set priority to 5, release after 0 turns, enter the message for fell in state “(Target name) braces itself!” and, if you want, you can raise the target’s defense to 115% to give a slight advantage to the enemy if it detects that you’re about to jump on it. This all is to ensure you don’t get a weird message in the automatically generated battle text.
4. Create four skills: “Jump”, “actually jump”, “Land” and “actually land”:
Before starting, go into Common Events and make two new ones, “jump” and “land” (you’ll set those up in a minute). The go to skills and make a new one called “Jump”, give it a description, make the scope the user, add state “jumping”, make battle message “(user name) jumps!”, make sure “only in battle is selected”, set animation to none, make sure it causes 0 damage with 0 variance, and call common event “jump”. Don’t make it a physical attack unless you want it to be able to miss.
For the “actually jump”, set everything up the same, except add your “jump” battle animation and set no common event.
For the “Land” skill, set the scope to one enemy, add “about to get jumped on” state, set animation to none, damage to 0 and message to “(user name) is about to land!”, and call common event “land”.
For the “actually land” skill, set scope to one enemy and animation to the “land” one you created. Now, for damage: this is up to you. I tried to make mine cause about 150-200% more than a normal attack (in my game, you don’t get the skill until the end of the game so physical attack damage kind of levels off at that point), although that doesn’t always work out because I didn’t set up the skill up as a physical attack. This skill makes you miss a turn but gives you the possibility of dodging an attack, so you decide what that cost/benefit should result in – of course, it should always deal more than a normal attack, because why would the player use it if it didn’t?
5. Make two new common events: “Jump” and “Land”.
For the “jump” common event, change the actor graphic of the jumping character to none, force action “actually jump” on that actor, create a switch called “jump” and turn it on, add “jumping” state to that character, and, finally, change actor class to “jumping”.
For the “land” common event, force action “actually land” on a random enemy, change actor graphic back to normal, turn off “jump” switch, take off “jumping” state and change the actor’s class back to normal.
6. Set up common events under troop formations:
Now the annoying part. In EVERY ONE of your troop formations in which the character with this skill will encounter, you need to set up some common events.
For the first, set the condition to “turn no. 2 + *X”. Create a conditional branch and set up “if switch jump = on, then force action actor [Land] random”.
Then, for EACH enemy in EVERY formation, make a common event and set condition to “if enemy <50% HP” add “incapacitated” state” to that enemy. This is to make sure that if the jump skill kills the enemy, the actor reappears before the enemy dies, in which case your actor sprite will not come back. Unfortunately, this means having to make every enemy’s HP double what you actually want it to be in the database. But hey, you’re serious about your project, right? You can do it.
7. On every map that character will appear on, setup the following parallel process:
Change character graphic back to original, change character class to original, turn jump switch off, take off “jumping state”. That resets the skill so it doesn’t screw up in the next battle.
I’m sure someone is reading this and thinking, “Oh my god, that could have been done so much more easily. What a poor guy with obviously no life!”
So again, this is complicated, but it works and doesn’t slow the game down – too much. If you experience any lag, I can recommend Fragment of Chaos’s anti-lag script (scroll to the bottom of this link: http://www.neoseeker.com/forums/37485/t117...ti-lag-script/)
. Please give me any feedback on how this tutorial helps with other battle systems and/if you can simplify it. Would it be possible to make a script to take care of all that jazz without having to do all that work? I’m a total noob to programming, but I am trying to learn!