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.

HBGames

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

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