Lunatic Objects

Last Updated: 2012.12.27
Download Link
Github Link


Lunatic mode effects have always been a core part of Yanfly Engine scripts. They exist to provide more effects for those who want more power and control for their items, skills, status effects, etc., but the users must be able to add them in themselves.

This script provides the base setup for skill and item lunatic effects. These lunatic object effects will give leeway to occur at certain times during a skill or item’s usage, which include before the object is used, while (during) the object is used, and after the object is used.

Lunatic Object Effects allows skills and items allow users with scripting knowledge to add in their own unique effects without need to edit the base script. These effects occur at three different intervals and are marked by three different tags.

<before effect: string>
<prepare effect: string>
<during effect: string>
<after effect: string>

Before effects occur before the skill cost or item consumption occurs, but after the spell initiates. These are generally used for skill or item preparations.

Prepare effects occur as units are being targeted but before any HP damage is dealt. Note that if a skill targets a unit multiple times, the prepare effects will also run multiple times.

During effects occur as units are being targeted and after HP damage occurs but before moving onto the next target if done in a group. Note that if a skill targets a unit multiple times, the during effects will also run multiple times.

After effects occur after the targets have all been hit. In general, this will occur right before the skill or item’s common event runs (if one was scheduled to run). These are generally used for clean up purposes.

If multiple tags of the same type are used in the same skill/item’s notebox, then the effects will occur in that order. Replace “phrase” in the tags with the appropriate flag for the method below to search for. Note that unlike the previous versions, these are all upcase.

Should you choose to use multiple lunatic effects for a single skill or item, you may use these notetags in place of the ones shown above.

<before effect>
</before effect>

<prepare effect>
</prepare effect>

<during effect>
</during effect>

<after effect>
</after effect>

All of the string information in between those two notetags will be stored the same way as the notetags shown before those. There is no difference between using either.


  • Destruction Package
    • Suicide, MP Zero, TP Zero, Add States, Remove States, Add Debuffs, Add Buffs, Clear States, Clear Debuffs
  • Give & Take Package
    • Give State, Take State, Give Buff, Take Buff, Give Debuff, Take Debuff
  • Recoil Package
    • Recoil Set HP, Recoil Set MP, Recoil Set TP, Recoil Percent HP, Recoil Percent MP, Recoil Percent TP

Use your Lunatic Object Effects wisely.

And that’s all, folks!

15 comments on “Lunatic Objects

  1. v1.02 – Added “Prepare” step.
    – Moved Common Lunatic Object Effects to occur at the end of the effects list per type.

    Note, if you are using Ace Battle Engine, be sure to update it to v1.10+.

  2. Having trouble figuring something out… I’m also using Yami’s CATB script and I’m trying to make a skill that adds a state to the user during its charge time and removes it after using the skill, so I figured this script (plus Destruction add-on) would be my best bet. But it currently executes in this order:

    Charge time – Before effect – Skill – After effect

    When I want it to do:

    Before effect – Charge time – Skill – After effect

    Any ideas?

  3. Yeah, I guess you wouldn’t be willing to tell me how to work this, now, would you?
    I tried the generic
    “” on a skill, but that didn’t work. I figure there’s more to it. But I would like to learn how to do it. It’s pretty much staple for a sequel I’m gonna be making.

  4. Hello, I was wondering if it was possible to force an action as an after effect for a skill being used? For example, I want Enemy to use Skill 1 on Player, but after he uses it I want Enemy to be forced to use Skill 2 as an after effect. Is there any way to make this possible with this script?

  5. Is there a way to have a state that transforms into the Death state when it wears off using this script? If so, I would also like it to work if the state is removed manually.

  6. The before and after tags don’t work for me. Like if I put something in COMMON DURING, it works, but if I put the same thing in COMMON BEFORE it doesn’t…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s