coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
120
Reaction score
165
First Language
German
Primarily Uses
RMMV
I'm in the middle of creating my enemies, each with a little twist in their battle strategies. For this one I want it to transform once per battle, when it manages to defeat an actor.

So basically, I would use a force action command, that makes it use a Transformation skill, when a party member's HP Hit zero.

If I didn't forget something this should work.

However, there are two problems:

If there are other enemies in the troup, I need a way to be sure that the forced action only occurs, when this specific enemy delivers the final blow.

Also, I don't want this actor to be resurrectable, either while the enemy is on the field (this would be great) or for the entire battle (I can also live with that).

I'm using Yanfly's Action Sequences and States & Buffs Core and also most of his other Battle related Plugins.

I think those should make this possible, but since it probably requires lunatic mode, I need some help.

Any other ideas to pull this of would also be appreciated, of course : )
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
216
Reaction score
113
First Language
English
Primarily Uses
You could make the abilities the enemies have have an action sequence that checks target health on every one of their abilities, and have that check trigger a common event. You can check the target actor through action sequences.

For the knockout permanency, you can use selection control on a state applied to an actor:
<Cannot Select: Skills> notetag
for skills and items that remove the knockout state. Only problem is that you'll need this state to apply even after the actor is knocked out, but I think that there's ways to do that.

Finally, to have the actor revivable when the enemy is defeated, you can have the enemy's defeat remove the state manually through the troop event menu.

The obvious bootleg way to prevent actor revival is to temporarily remove them from the party for the rest of the battle, and then add them back in at the end or when the enemy is defeated.
 

Cythera

Veteran
Veteran
Joined
Jul 31, 2019
Messages
237
Reaction score
520
First Language
English
Primarily Uses
RMMV
I made this effect using some states; no events or skill modifications needed. You need the following plugins (all YEP) : Battle Engine, Buffs+States Core, Target Core, Selection Core, Passive States, States Categories.
The setup on this is crucial.
Enemy A. Your starting enemy
Enemy B. The enemy you want to transform into - I'm using ID 6 for this enemy in my code.
Passive State - this goes on Enemy A. Put the notetag <Passive State: x> in Enemy A's notebox. Replace x with the state ID.
Transformed State
What I'm calling the 'anti-target state' haha. This will stop the dead actor from being able to revive. (Actually, it will stop them from being able to be targeted...ssh...)
Now, in the PASSIVE state notebox, put this
JavaScript:
<Custom Confirm Effect>
target.addState(18);
</Custom Confirm Effect>
<Custom Establish Effect>
if(target.hp <= 0) {
 user.startAnimation(5);
 user.addState(17);
} else {
target.removeState(18);
}
</Custom Establish Effect>
Replace '18' with the state ID for your 'anti-target state'. Replace '17' with the state ID for your transformed state. I have the transformation play a lil animation on the enemy, but that's completely optional.

In the TRANSFORM state notebox, put this
JavaScript:
<Custom Apply Effect>
  user._prevEnemyId = user._enemyId;
  var transformEnemyId = 6;
  user.transform(transformEnemyId);
</Custom Apply Effect>
Replace '6' with the enemy ID of the transformed enemy - so what you want your first enemy to transform INTO. I'm storing the enemy's previous ID, just in case you ever need to transform it back for some reason...if not, you can safely delete the user._prev line.

In the anti-target state, put
JavaScript:
<Cannot Select: All>
<Category: Bypass Death Removal>
<Custom Turn End Effect>
if(origin.isDead()) {
user.removeState(18);
}
</Custom Turn End Effect>
Replace '18' with that same state's ID

The only thing with this setup, is it checks if the enemy is dead at the END of the turn... If you want it to run constantly, so the second the enemy dies, remove the state, then you're getting into using parallel common events in combat(another plugin). Possible, but a much bigger pain to set up, because now you can't reference 'origin' which is sooo useful for checking if the enemy is dead. In a common event, you'd have to store the actor's killer in a variable, and constantly check if that enemy index is dead. Like said, possible. Though annoying.
Let me know how this works out for you!
 

coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
120
Reaction score
165
First Language
German
Primarily Uses
RMMV
I ended up trying @Cythera s method first, since I am still really bad at js and you provided all the code aaaaaaaaaaaaaaaaand: It works perfectly! Thank you so much!
 

Latest Threads

Latest Profile Posts

Make a Game in RMMZ Streams are going to remain in hiatus this week. Too much to do! 4 things will be announced on Monday though! Look forward to that.
Typed a long-ish reply to a post... forgot to actually HIT the post button, and moved to a different page.... finally noticed, don't remember what all I had typed and don't feel like trying to re-type it all.... smh....
Their tactics are evolving. They've learned to call for help when cornered. Never trust a mammal!
Good morning all. I still have a post up on video editing for cinematic trailers. Please make sure to check that out and give me a message as its still active in offers.
Hey everyone! I'm back :D

Snow White? More like Snowhere to be seen amiright? Hahaha I'm so sorry!! :kaocry:

Forum statistics

Threads
112,366
Messages
1,067,815
Members
146,016
Latest member
LioTheLion
Top