特定のアクターをパーティーリーダーとして割り当てできるプラグイン – HIME_CustomPartyLeader.js

タイトル
Allows you to assign a specific actor as party leader
作者名
ヘルプ
-------------------------------------------------------------------------------
== Description ==

Video: https://www.youtube.com/watch?v=uxYdoPP3Wd0

In RPG Maker, you have something called "actors" which are the characters that
the player controls.

All actors are grouped into a "unit" called a "party". Actors can be added or
removed from parties at anytime during the game. You can potentially have
multiple parties in your game, depending on how your project is set up.

Each party has a leader. The leader is the actor that will be displayed while
you're traveling on the map. By default, the leader is the actor that is in
the first position of the party. So for example if you switched the positions
of the first and second members of the party, the leader will change.

Similar to actors, enemies are also grouped into their own unit called a
"troop". Enemy troops by default do not have a leader.

Now, what happens if you wanted the party leader to be someone other than
the first person in the party? Maybe you want the leader to be a specific
actor, but that actor doesn't participate in battle.

Or perhaps you wanted enemy troops to have a leader, and make it so that
when the leader dies, the enemies will scatter and run away?

With this plugin, you can set up who will be the leaders of parties
and troops, and build additional plugins on top of it that allow you to
use these leaders to implement new game mechanics.

== Terms of Use ==

- Free for use in non-commercial projects with credits
- Contact me for commercial use

== Change Log ==

Nov 27, 2015 - fix crash error during battle test
Nov 26, 2015 - initial release

== Usage ==

-- Default Leaders --

When your party is first set up, it assumes the leader is the actor in the
first position of the party.

Similarly, when the enemy troop is set up, the first enemy will be selected
as the leader.

It is intended that you will change the leaders through events during the
game.

-- Checking Who is the Leader --

You can ask who is the leader in script calls like this:

$gameParty.leader()
$gameTroop.leader()

It is possible that a unit does not have a leader. It will return `null`
in that case.

-- Changing Party Leaders --

You can change leaders during the game. To change the party leader, use the
following plugin command

change_party_leader to actor ID

Where ID is the Id of the actor you wish to set as the leader. For example,
if you wanted to choose actor 4 to be the leader, you can write

change_party_leader to actor 4

The actor does not need to be in the party.

-- Changing Enemy Troop leaders

Similarly, you can change enemy troop leaders as well. Use the following
plugin command

change_troop_leader to enemy MEMBER_ID

Where the MEMBER_ID is the position of a particular enemy in the current
troop. This is based on the order that they were added into the troop.

For example, to set the third enemy as the leader, you would write

change_troop_leader to enemy 3

-- Working with Custom Units --

If you have other units aside from parties and troops, you would need to
use script calls to set the leaders.

UNIT_OBJECT.setLeader(battlerObject)

All units must inherit from Game_Unit, and the leader must inherit from
Game_BattlerBase.

-------------------------------------------------------------------------------
パラメータ
title Custom Party Leader
date Nov 27, 2015
filename HIME_CustomPartyLeader.js
url http://himeworks.com/2015/11/custom-party-leader

If you enjoy my work, consider supporting me on Patreon!

https://www.patreon.com/himeworks

If you have any questions or concerns, you can contact me at any of
the following sites:

Main Website: http://himeworks.com
Facebook: https://www.facebook.com/himeworkscom/
Twitter: https://twitter.com/HimeWorks
Youtube: https://www.youtube.com/c/HimeWorks
Tumblr: http://himeworks.tumblr.com/

-------------------------------------------------------------------------------
ライセンス表記
- Free for use in non-commercial projects with credits
- Contact me for commercial use

紹介ページ http://himeworks.com/2015/11/custom-party-leader/