[RMMV] Battler receiving damage (like reflect) prior to target damage dealt

jaykeith

Villager
Member
Joined
Jun 22, 2016
Messages
27
Reaction score
11
First Language
English
Primarily Uses
I'm wondering if this even possible right now? I'm trying to figure out a way, when an actor has a certain item/weapon/armor equipped that an attacker will be dealt damage on their attack in progress before calculating damage for the target.

I'll try to paint a scenario using my intended use. It's possible in my game to have multiple weapons. One such weapon-type is a polearm for anti-cavalry, its primary purpose to dig into the ground and use against charging monsters of a certain size or otherwise. Depending on the size and agility of the charging monster (big onerous lumbering monsters having 0% change to evade) they will take damage from the equipped polearm (presumably being impaled by it through the weilding actor) before any damage is calculated to the target (in this case actor). What this would accomplish is the battler could potentially die before the attack is finished, negating any and all damage done to the actor. The polearm's primary purpose.

I did some searching around and couldn't figure this one out. If this is super simple I apologize I just am missing it!

Thanks in advance.


EDIT: So it seems my inquiry about this mechanic is that it isn't possible right now. So to outline in specific detail the request:

It would be nice if it were possible to have an item/weapon/armor force a damage calculation against an attacker in battle prior to calculating target damage. For instance, actor 1 has polearm weapon equipped with the notetag "<anti-cavalry>" which would signify its intended purpose (as opposed to a polearm like a Dory-spear used by Hoplites in traditional close combat), an enemy and/or skill with the notetag "<charge>" or "<big>" could be used to indicate that all or in the case of a skill notetag one of their physical attacks will come in one variety (that is, the beast must charge the attacker to close distance). This would trigger the actors equipped weapon "<anti-cavalry>" and the beast/battler would have a damage calculation.

It would be nice if this damage calculation functioned independently of the weapons primary damage formula when used directly in battle, so that charging could be a seperate affair. For instance I might want to take the beast's agility into account in the calculation against a static number inherent with the polearm equipped, or I might want to cause the polearm to fail completely if the monster is basically a leviathan, too big to care about polearms.

As far as animations go, in a perfect world it would be nice to have the actor show a spear while the battler attacks into it (successful or not). But if you're at all interested in making this plugin I don't need this part to be satisfied. The actual damage is more important to me, but that leads me to my next potential issue...

I'm using Yanfly's Action Sequence Pack for all of my skills as of now, and let's say this plugin is made to specification but is totally incompatible, I would not be able to use it personally which sort of defeats the purpose of this request on an individual level. So, hopefully if you have an interest, making it compatible would be a godsend.

In terms of compatibility maybe injecting a new sequence command into the <setup action> area of Yanfly's plugin would suffice like "check anti-cavalry" and then simply run the requested plugin. I feel like that would be plenty good enough.

All in all I think after the heavy lifting is done through code, the implementation through notetags should be simple enough. Essentially assigning a flag to items/weapons/armors and then also assigning tags to enemies/actors/skills.

If I'm forgetting any details I'll try to make myself available as best I can. Thanks in advance to whomever is interested.
 
Last edited:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
I don't think this would be possible without a Plugin. You'll have to modify how the engine processes Game_Action execution in battle (maybe the executeHpDamage method?) to check what the target has equipped and, presumably, some attributes about the subject. For the weapon, you can probably just check its type ID, but the subject may need a notetag of some sort to indicate that they are a "charging" unit - or maybe a notetag on a skill if you want this to happen whenever a "charge" skill is used.

If you want the target to also perform damage animations, that will make it a little more complex, too.
 

jaykeith

Villager
Member
Joined
Jun 22, 2016
Messages
27
Reaction score
11
First Language
English
Primarily Uses
Thanks for the reply Zevia. I suppose I should redirect my efforts into the plugin request part of the forums and make a more detailed outline of how this could work. Your input is always appreciated.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
@jaykeith At your request I;m moving this to JS Plugin Requests. I suggest that you edit your opening post to include any further details/clarification, so that people can see straight away what you are looking for, and don't have to scroll down to find out.
Thanks.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
@jaykeith I've created a First Strike Plugin over at this thread that should do what you need. It will support adding attackTypes to Items, Weapons, Armors, Enemies, Actors, States, and Classes, and declaring firstStrike against those types so that a Battler will use a response skill first before taking damage.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top