Ultimacj

Cookie Knight
Veteran
Joined
Oct 15, 2013
Messages
411
Reaction score
61
First Language
Englist
Primarily Uses
N/A
Since RPG maker doesn't really give much detail just the chance rate of it happening, how does it calculate counter attacks and magic reflection attacks from the enemy?  Regardless of the spell ability upon play testing; I've seen a counter attack and/or magic reflection completely one shot my character.

Example:  Average damage the player swings against the enemy might be say around 140 damage.  If a counter attack is applied it ranges to below that to like one shoting the character (dealing way over 500 points of damage).  No critical are indicated, if there IS a critical there it's hitting harder than the crit would land (maybe an average of 250 damage?)

I'm just curious how this is calculated since the actual feature isn't detailed about it.

Magic reflection is similar dealing almost 3x the normal damage the player can cast.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
Here is the part of the code that handles counterattacks/magic reflection.

class Scene_Battle < Scene_Base def invoke_item(target, item) if rand < target.item_cnt(@subject, item) invoke_counter_attack(target, item) elsif rand < target.item_mrf(@subject, item) invoke_magic_reflection(target, item) else apply_item_effects(apply_substitute(target, item), item) end @subject.last_target_index = target.index end def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] @subject.item_apply(target, attack_skill) refresh_status @log_window.display_action_results(@subject, attack_skill) end def invoke_magic_reflection(target, item) @subject.magic_reflection = true @log_window.display_reflection(target, item) apply_item_effects(@subject, item) @subject.magic_reflection = false endend1: invoke_item determines if a counter/magic reflection happens.2: invoke_counter_attack indicates that no matter who is involved, counter attacks use the attack skill, which unless changed via scripts, is skill_id 1.

3: invoke_magic_reflection obviously uses the skill used on the target to strike back.

In testing using static numbers/no variation, counter attacks uses the target's stats against the attacker, so it's no different than them getting in a free hit.

Magic reflection on the other hand uses the caster's stats against themselves. Critical damage takes the normal damage done and multiplies it by 3.

Counters and reflections can become critical hits, by default "painful blow" is a critical against you, an "excellent hit" is a critical against your enemies.

Hope that answers your question.
 
Last edited by a moderator:

Ultimacj

Cookie Knight
Veteran
Joined
Oct 15, 2013
Messages
411
Reaction score
61
First Language
Englist
Primarily Uses
N/A
Kinda but is there a way to modify it to were the damage isn't nearly as devastating?
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
Counters are determined by the stats of the battler that is performing the counter. If it's doing too much damage even without criticals, then either modify the battler's stats or the attack skill's damage formula.

Magic Reflection is like hitting yourself, so if you are hitting yourself too hard, then either raise the appropriate defense or modify the damage formula for your magic skills.

Critical damage in general(I'm assuming this is being applied to get those big numbers), this one is simple. It is controlled by the following code:

Code:
class Game_Battler < Game_BattlerBase  def apply_critical(damage)    damage * 3  endend
By default damage criticals dish out is 3X damage, simply add this to your project, and change the lone number to something you believe would be more respectable for your game(I go with 1.5-2 personally)
 

Ultimacj

Cookie Knight
Veteran
Joined
Oct 15, 2013
Messages
411
Reaction score
61
First Language
Englist
Primarily Uses
N/A
True but if I lower the ability itself, the damage done against the target is also lowered for the intended level.  I could lower defenses of the target(s) themselves but the same problem would occur and the player would have to grind more than they needed to.

Even when the players defense/HP out does the target the counter lands too hard even on a non-critical.  I appericate the point out on critical s I might adjust that but not sure if that'll solve the over damage upon critical s or magic attacks.
 

Latest Threads

Latest Posts

Latest Profile Posts

By the power of timezones! This picture shall still be posted on december 1st!!!
7xI2Gc2.jpg

This is not something I'd ever even considered but wow! What a way to use music in a game.
I am a complete fool. I went through the trouble of making a clone sprite and setting up a system to have the characters flash, when it turns out - I never noticed that the "._mainSprite" was the actual bitmap being used. I'm happy since that makes compatibility easier, but I also want to scream.
Synchronizing bust and sprite expressions! Plus using a phone behaviour :kaopride:
BVadZby.gif

Long gif tho, let it load first :kaoswt2:
Wondering how to force a Save State in VNMaker with a name and how to call it with a scene event in order to double check if this Save State exists or not. Phew... Leaving breadcrumbs for chapter DLCs to pickup would be more than half the fight in order to finish this visual novel :LZSsad:

Forum statistics

Threads
117,116
Messages
1,104,716
Members
153,156
Latest member
ridge_tim
Top