First Strike v1.0.0

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
636
Reaction score
343
First Language
English
Primarily Uses
RMMV
Github Link

First Strike is a counterattack that happens before the original subject's attack is performed. If the subject is still alive after taking First Strike damage, then their attack continues as normal. Regular counterattacks will still occur as normal - First Strike is its own responsive attack.

First Strikes will occur when a target has a firstStrike against a specified attackType. AttackTypes can be set on Actors, Enemies, Classes, States, Weapons, Armors, and Items by using the <attackTypes> tag. Comma-separate each type. For example:
Code:
<attackTypes: piercing, charging>
AttackTypes are combined across all categories, so if a Battler has a weapon with a piercing attackType, a state with a magical attackType, and armor with a bashing attackType, then the Battler has the attackTypes piercing, magical, and bashing.

FirstStrike can be indicated with a <firstStrike> tag, followed by a comma-separated list of every type that Battler, Class, Weapon, Armor, or State will have First Strike against, as well as the skill ID of the skill that should be used to strike back. Skill IDs should always be the last item in the list. For example:
Code:
<firstStrike: charging, 1>
That would indicate that if the target is attacked by a subject with an attackType of charging, they will have First Strike using skill 1 (Attack by default).

You can set an Actor, Class, Weapon, Armor, State, or Enemy to have First Strike against all attackers, regardless of attackTypes, with the option "all". For example:
Code:
<firstStrike: all, 1>
First Strike is not cumulative and instead takes a priority approach. Battlers will use the first First Strike category and skill ID according to the following list:

Enemies
1. States
2. Enemy Notetag

Actors
1. Weapons
2. Armors
3. States
4. Actor Notetag
5. Class Notetag

For example, if an Enemy has attackTypes piercing and charging, and an Actor is wearing a Weapon with <firstStrike: bashing, charging, 1> and an Armor with <firstStrike: piercing, 9>, then they will perform a First Strike with skill ID 1 because the Weapon is the highest priority that matches one of the Enemy's attackTypes.

If the Actor instead had a Weapon with <firstStrike: bashing, 1> and an Armor with <firstStrike: charging, 9>, then they will perform a First Strike with skill ID 9 because their Armor is the highest-priority item that matches one of the attacker's attackTypes.

First Strikes consume resources when using skills, so MP and TP is expended when using First Strike. If a Battler cannot afford to pay for the cost of their First Strike skill, they will default to using their basic attack.

This Plugin should be compatible with YEP_BattleEngineCore and YEP_X_ActSeqPack2. Any other Plugins have not been tested.

In this setup, Harold will use Fire as a First Strike against any enemies with an attackType of flying or bashing. The bat will use its basic Attack as a First Strike against any enemies with an attackType of Harold.

Harold has an attackType of Harold and the bat has an attackType of flying. The bat first casts Fire, but Harold performs his First Strike of casting Fire in response before subsequently taking the bat's Fire damage. Then Harold attacks, but the bat has First Strike against him and uses its basic attack first, killing Harold - preventing the bat from taking any damage.



Terms of Use
This Plugin is available for commercial and non-commercial use, as long as credit is given to the author listed in the @ author section of the Plugin. Credit must be listed in-game, as well as in any additional credits documentation provided with the game.
This Plugin may be modified in any way by any author, most notably for compatibility fixes with specific projects or other Plugins, as long as credit is provided to the original author and to whichever author made said modifications, according to the above-stated rules.
 
Last edited:

jaykeith

Villager
Member
Joined
Jun 22, 2016
Messages
27
Reaction score
11
First Language
English
Primarily Uses
Hey Zevia I apologize for the long wait to get back to you, life has just been very busy for me this past week with work and kids so I haven't done anything fun, including trying out this great plugin you wrote.

I have just been playing with it right now and everything seems to work just perfect! Exactly what I was hoping for (and more really).

I probably won't be able to test it extensively for a while because my game is still very much in its infancy, so I have been setting up systems and sort of trying to get the very beginning off the ground so I can expand outwards a little easier. I did try out the very system I was hoping for (putting first strike on a spear and then putting an attack type on an enemy) and it worked perfectly. I'm actually super happy and this has really helped my project thanks you so much! You still need to setup a donation page ;)

One thing I did want to say (and didn't say at all in my request so this is my own fault for not bringing it up), is this isn't compatible with Olivia's Weapon Swap plugin. I'm not sure I really care though because the plugin has been pretty buggy for me and I haven't been using it. A part of me is hoping the bugs get ironed out one day with a patch, or I will just end up paying somebody like you when my project gets further along and see if the bugs can't be ironed out somehow. In any case I'm not requesting that they be compatible since I'm not using it right now, but thought I'd give you a heads up.


This is really great though Zevia and I really appreciate you taking the time to fulfill this request it's a huge boon to my project. Also that other request you did for me is going strong with the embedded skills so thanks again for that.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
636
Reaction score
343
First Language
English
Primarily Uses
RMMV
One thing I did want to say (and didn't say at all in my request so this is my own fault for not bringing it up), is this isn't compatible with Olivia's Weapon Swap plugin.
Since that's a paid Plugin and the terms indicate that you can't redistribute it, it may be hard for others to write compatibility fixes for it, anyhow. I haven't paid for it, so I don't have access to the code to see why it isn't compatible, but you aren't allowed to send it to me to look at because that would be redistributing it. There are probably still some options, but just as a heads up as you continue to work on your project.

Glad it works for you! Let me know if you come across any problems.
 

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

Latest Threads

Latest Profile Posts

Who knew a adding menu commands would be so hard for something that should be a basic feature.
When you discover great tileset resources that you completely forgot that you had. :kaomad3::kaopride:
Just got a better look at the MZ RTP. I'm very happy with it, especially the sci-fi tiles and sprites. Glad I pre-ordered.
I've just checked the VisuStella Plugins for MZ and there are already 11 plugins. The Yanfly team(perhaps a big one?) really works so effectively and efficiently that some MZ users can likely use tons of Yanfly plugins right after MZ's released (still 13 days from now). I wonder if any other plugin developer(or team) will try to compete with Yanfly this time, no matter how slim the chance to win is :)
Hello! :kaopride:I am new to RPG Maker, though I have been lurking the forums for a while. :kaoswt: Hope to make some friends and learn some stuff here! :kaothx:

Forum statistics

Threads
100,597
Messages
977,605
Members
132,199
Latest member
Erasure2
Top