Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Timed Hit for Battle Systems: Add-On

Timed Hit Add-On
Version: 1.30

Introduction

This is a rewrite of a script I created a few months ago. It is much simpler, an much more likely to successfully integrate with other battle systems (I have tested it on a few). It has actually come a long way since I posted it. I've gotten some good suggestions, and would definately love some more.

Screenshots
Using the static option
http://img132.imageshack.us/img132/4765/staticyo2.th.jpg[/IMG]
Using the dynamic option
http://img515.imageshack.us/img515/733/dynamicrd5.th.jpg[/IMG]

Demo
http://www.savefile.com/files/1160697 v 1.3

Instructions

The different settings are at the top of Timed_Hit found in the section titled Timed_Hit. I decided that it would make the most sense to construct character and skill data by using arrays.

Descriptions of the settings:
@damage_mods

This is an array of the percentages that are added together to determine the final damage. If the hit is made on a marker, the corresponding percentage is added to the final damage calculation. Also note that the closer the hit is to the center of a marker the greater the damage dealt, and by being very close to the center bonus damage is dealt.

@markers

This is an array of the length of each bar in the set of markers. The total should add up to the length of the main bar, which in this case is 600.

@keys

This is an array of the keys that are to be pressed to make a hit when a marker is active.

@actor_attack_data[id] = [...]
@actor_data[actor_id] = [...]
@skill_data[skill_id] = [...]

Replace actor_id or skill_id with the id of the actor or skill that the data should apply to.
For @actor_data[actor_id] = [...], replace the ... with the id's used in @actor_attack_data seperated by commas.

These lines define the data for each actor or skill. The elements are as follows:
[Max Wait, Wait Increment, Damage Mod, Keys, Targets, Markers]

Max Wait - A number like 1000 (recommended)
Wait Increment - Another number like 20 (20 or lower recommended)

1000 / 20 = 50 Frames. So it takes 50 frames for the bar to fill. This is pretty quick, and does not allow much time to react.

Damage Mod - @damage_mods[index]. Where the index is the element of the array to be used as the hit timing data.
EX @damage_mods[1] = [33,33,33]
The average of each marker is worth 33% in this case. A hit in the very center of a marker would result in an aditional 33% damage.

Keys - @keys[index]. Where the index is the element of the array to be used as the target keys.
EX @keys[1] = [a,b,c]
The key combination for this setup is the A, B and C buttons (or Z, X, and C)

Targets - @targets[index]. Where the index is the element of the array to be used as the target images.
EX @targets[1] = [target_z,target_x,target_c]
The images shown for the key combination are "target_z", "target_x", and "target_c"

Markers - @markers[index]. Where the index is the element of the array to be used as the marker images.
EX @markers[1] = [200,200,200]

Using Custom Images
There are four images in the pictures folder. Feel free to edit them to your liking (I tried to make them simple to understand). The system makes calculations based on the width of each image, so different things can be changed by changing the with of the images. For example: in the demo project, the "marker_on" and "marker_off" images are short, giving the player just a little time to hit them. If you made both of the images bigger, then the player would have more time to hit the markers. The same applies to changing the size of the target.

Compatibility

I have tested this with a few other systems, which all worked. The exception is Trickster's RTAB, but that is because other things happen in the background while a character is making an action. This add-on should work as long as the battle system pauses when it is a characters turn to preform an action.

More technical information:
Aliased methods:
Game_Battler:: attack_effect
Game_Battler:: skill_effect
Scene_Battle:: start_phase4
Scene_Battle:: update_phase4_step3

Author's Notes

This is an update to the first script that I posted. I would love to make it as compatible with as many systems as possible. My next focus is to work on commenting the script and adding any new suggested features.

Updates:
Version 1.30:
  • Rearranged the script (again), to make it a little easier to read/modify
  • Included the option for a DDR style bar (from Rayn's suggestion), which can bee seen by playing the demo

Version 1.20:
  • Changed the inner workings, so that changes made durring runtime are saved when the game is saved
  • You can now change the attacks for each actor through a one line event script (Ex in the demo)
  • Cleaned up the script a bit more

Version 1.10:
  • The bar system calculates the placement of the marker bars so you don't have to
  • Actors can be set up to select a "random" pattern for the bar, when using an attack
  • Changed the images used for the bars.
  • Cleaned up the script a bit

Version 1.01:
  • Changed the usage for specifying bar usage. Skills and characters do not require the use of a bar.
  • Removed dependency on Scene_Battle:: update_phase4_step6.
  • Added status effect to weapons, depending on accuracy
 
Glad you think so.

I was thinking about adding some ort of randomization to it, but I'm not exactly sure how. Is there any sort of randomness you'd like to see?
 
Adding maybe, a... Random hidden chance to have a throw off or a fixed hit. Like if you score bad, it might be critical because of (AGI+DEX/something).
Also, maybe adding an effect for a very successful hit with certain weapons, like bleeding for swords, or dazed for clubs.

Basically random and hidden chances to score extra effects.
 

regi

Sponsor

Tassadar's idea is nice, I haven't tried the demo yet but just wondering can it be assigned to only certain skills instead of every single attack?
 
I went ahead and made the setup part a little simpler, and also changed it so that a bar does not have to be used for a character or skill.

Thanks for the suggestion by Anaxim. You can now set a weapon to potintially apply a specified status effect to an enemy if the percentage accuracy is over a certain amount.
 
I have made a lot of updates to the script and would like to know what you think about effectiveness and usability, or if you have any more suggestions.
 
I think this script is great overall. It would be cool if there is a button-combo style timed hit for the skill/attack (think a timed version of Sabin's Blitz moves on FF3/FF6 Advanced). This is a good script, and I'd love to see it continue to improve! :D

P.S. Is there a demo or script available for the non-SDK version? Or is there only a SDK version? Thanks.
 

regi

Sponsor

Zephren;307284 said:
Compatibility

I have tested this with a few other systems (non-SDK), which all worked. The exception is Trickster's RTAB, but that is because other things happen in the background while a character is making an action. This add-on should work as long as the battle system pauses when it is a characters turn to preform an action. This add-on should work with non-SDK systems as well. Simply remove the SDK checks, and follow the instructions for aliasing methods.

Rayn Drayk;308341 said:
P.S. Is there a demo or script available for the non-SDK version? Or is there only a SDK version? Thanks.

Answer your question? :D
 
Ok, so I've decided to remove the SDK requirement, since it wasn't really needed to begin with. If it becomes an issue (which it shouldn't) I'll put it back.

Rayn, I'm not fimiliar with the moves your talking about. Could you elaborate some more?
 
Basically, in FF3/6, one of the characters could Blitz. He activates his ability and you input a series of direction keys to launch a cerain attack. As such, his idea is instead of having to remember which keys to press but being given all the time in the world to do so, he wants the keys to display on screen on a timed bar. Accordingly, you need to press each key on the bar to execute the skill/attack at the right time. Fairly simple idea, really. A good relation would be DDR or Dark Cloud for the PS2.
 
So he's suggesting that all the keys be shown with something indecating accuracy like this:
A--B--B----A
=====^====

Instead of one key that scrolls across and changes (the way it is set up now)?

I've also uploaded a new version. You can now use simple event script to add attacks to a character. An example is in the demo.
 
Zephren;308544 said:
So he's suggesting that all the keys be shown with something indecating accuracy like this:
A--B--B----A
=====^====

Instead of one key that scrolls across and changes (the way it is set up now)?
I wasn't talking about a replacement so much as I was suggesting an option XD. Still, I think it would be a cool way to make an attack more/less powerful based on the accuracy of the press.

For instance, this:
--A-Left--B+Down---B
--*- * -- ! ---*

Would be more powerful than this:
--A-Left--B+Down---B
--X- * -- ! ---*

In other words, the more "perfect" the press, the better the attack. If a press is "good" it has a moderate "value", if it's "Perfect", perhaps a high "value", and if it's a "bad" press, maybe a low (or negative? :-/) "value".

I hope I'm making better sense here^_^...
 
I figured you meant it as an option.

As for your diagram, I assume the X is a miss, or poor hit?

Anyway, I like the idea and will try and make something out of it.

Thanks

New version for those of you following along.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top