Synchronized Battlers

synchronized_battlers

This script allows you to “link” battlers together. Linked battlers can share some special properties that regular battlers do not have.

Links follow a parent-child relationship. When the parent dies, the child also dies. But if the child dies, nothing happens to the parent. You can set up a two-way link between a parent and a child such that when the child dies, so does the parent.

Suppose you have a hydra that consists of three heads and a body. When you kill a head, the rest of the heads and the body is unaffected, but when you kill the body, the heads will also die. The hydra’s body is the parent, and each head is a child.

Download

Script: download here (German Version)

Installation

In the script editor, place this script below Materials and above Main

Usage

Here is a summary of the script calls available. Read further for more details about what they do

  link_enemy(child_index, parent_index, two_way)
  unlink_enemy(child_index, parent_index)

  link_actor(child_index, parent_index, two_way)
  unlink_actor(child_index, parent_index)

  link_battler(child_battler, parent_battler)
  unlink_battler(child_battler, parent_battler)

Linking Enemies

To link two enemies together, make the script call

link_enemy(child_index, parent_index)
link_enemy(child_index, parent_index, two_way)

Where the index is based on the order that the enemy was inserted into the
troop. You can look up the index by selecting one of the “enemy battle” event
commands such as “Change Enemy HP”, showing the dropdown list, and looking at
the index before the enemy name.

two_way is either true or false, and is used to establish a two-way link
between child-parent and parent-child.

Unlinking Enemies

To unlink two enemies, make the script call

unlink_enemy(child_index, parent_index)
unlink_enemy(child_index, parent_index, two_way)

This will break a link between two enemies.

Linking Actors

To link two actors, make the script call

link_actor(child_index, parent_index)
link_actor(child_index, parent_index, two_way)

Where the index is a number that can represent two things: if the index is positive, then it is the actor ID. If the index is negative, then it is the party index. For example, an index of 3 would mean “actor 3”, but an index of -3 would mean “the actor in the 3rd party position”

Unlinking Actors

To unlink two actors, make the script call

unlink_actor(child_index, parent_index)

Linking battlers

You are not limited to linking actors to actors or enemies to enemies. You can link any battler to any other battler using the script call

link_battler(battler1, battler2)

Which will link battler1 to battler2, where battler1 is the child and battler2 is the parent. There are two methods available to make this easy for you:

get_actor(index) - returns an actor for the given index
get_enemy(index) - returns an enemy for the given index

The indexing rules are the same as before. When you have your actor and enemy,
you can now link them together like this

actor = get_actor(-2)
enemy = get_enemy(3)
link_battler(actor, enemy)

This will link the actor to tne enemy, where the actor is the child and
the enemy is the parent.

Unlinking battlers

To unlink battlers, use the script call

unlink_battler(battler1, battler2)

Example

To set up the hydra example, you would create a troop consisting of a hydra
body and three hydra heads. Assume the body is index 1, and the heads
are indices 2, 3, 4.

Then you would make the following script calls to run at the beginning of the
battle

link_enemy(2, 1) # link first head to body
link_enemy(3, 1) # link second head to body
link_enemy(4, 1) # link third head to body

Now, when the body is killed, all three heads will die as well.

You may also like...

9 Responses

  1. Kagiana Arato says:

    So, this only to boss event ?
    If, i won’t use to regular enemy, what i can do ?

  2. Seijiro Mafuné says:

    Can this be used with this script of yours? http://himeworks.com/2013/03/enemy-reinforcements/

    • Hime says:

      You should be able to link battlers that are added during the battle as well as long as the script calls are made. However…the other problem is how you will reference them.

  3. Ctelin Ajira says:

    I have a bug to report.

    https://dl.dropboxusercontent.com/u/104421735/Hime%2C%20I%20have%20a%20bug%20to%20report.avi

    What the heck caused those death sounds?

  4. adon237 says:

    Hello! I am wondering if there are any obvious incompatibility issues that you are aware of?

Leave a Reply

Your email address will not be published. Required fields are marked *