(要 YEP_BattleEngineCore&YEP_TargetCore.js)アクションの対象として選択できるターゲットとできないターゲットを制御するプラグイン – YEP_X_SelectionControl.js

タイトル
(Requires YEP_BattleEngineCore & YEP_TargetCore.js)Control what targets can and can't be selected for actions.
作者名
ヘルプ
============================================================================
Introduction
============================================================================

This plugin requires YEP_BattleEngineCore and YEP_TargetCore. Make sure this
plugin is located under both of those plugins in the plugin list.

When selecting targets, RPG Maker MV has it set by default that the list of
valid targets is always either alive enemies, alive allies, or only dead
allies. Actions would not be able to target either actors or enemies or
change from single target to multiple targets. This extension plugin for the
Target Core will allow you to break free of that restriction for better
selection control of targets as well as insert customized conditions.

If you are using the YEP_X_BattleSysCTB plugin, place this plugin under that
plugin in the plugin list for the best compatibility.

============================================================================
Notetags - General
============================================================================

To make skills and items select only certain types of battlers, you can use
the following notetag setup to do so:

Skill and Item Notetags:

<Single or Multiple Select>
This will allow the skill or item to be able to select either single
targets or all targets at once. This will automatically make a skill
default to single target selecting. You MUST change your scope in the
database to work with this effect.
Note: Having this option will cancel out AoE Circles and AoE Rectangles
to avoid conflicting issues.
Note: If there is an enemy with taunt, the option to switch between a
group target and a single target will not be available.
Note: Enemy AI will NOT make use of the ability to toggle between single
target and multi-target scopes.

<Disperse Damage>
Used in conjunction with the above notetag, this will cause damage to be
split evenly amongst the number of targets the skill is dispersed into.
The damage dispersion effect will only occur if multiple targets are being
selected after toggling.

<Enemy or Actor Select>
<Actor or Enemy Select>
This will allow the player to toggle between selecting an enemy or actor
for the action's target scope. When using <Enemy or Actor Select>, it will
first target enemies by default. Using <Actor or Enemy Select> will target
actors by default. Using either notetag will change the action's target
scope to single target.
Note: Enemy AI will NOT make use of the ability to toggle between actors
or enemies for skill selection.

<Weapon Range>
<Weapon Ranged>
Requires YEP_RowFormation.js. This will make the selection of targets vary
based on the battler's weapon range. If the weapon is 'melee', then it
will target the front row only. If the weapon is 'ranged', then it can
target any row the battler wants.

Note: If you use any <Select Condition> effects, all selection options
provided by default with the plugin parameters will be reset under the
assumption that it will no longer be an action of default nature. If this is
the case, you will need to use the above notetags to specify how you wish to
make your skill's selection methods.

Actor, Class, Enemy, Weapon, Armor, State Notetags:

<Cannot Select: All>
All actions cannot select this battler unless it's an action whose scope
is a user scope.

<Cannot Select: Physical Hit>
<Cannot Select: Magical Hit>
<Cannot Select: Certain Hit>
This will prevent physical, magical, or certain hit actions from being
able to select the battler. They will be excluded out of multi-hit skills,
as well unless it's an action whose scope targets the user itself.
targets the user itself.

<Cannot Select: Skills>
<Cannot Select: Items>
This will prevent skills/items from being able to target the battler
unless it's an action whose scope targets the user itself.

<Cannot Select: Item x>
<Cannot Select: Item name>
This will prevent item 'x' (or the named item) from being able to target
the battler unless the item's scope targets the user itself. If you have
multiple items in your database with the same name, priority will be given
to the item with the highest ID.

<Cannot Select: Skill x>
<Cannot Select: Skill name>
This will prevent skill 'x' (or the named skill) from being able to target
the battler unless the skill's scope targets the user itself. If you have
multiple skills in your database with the same name, priority will be
given to the skill with the highest ID.

<Cannot Select: SType x>
<Cannot Select: SType name>
This will prevent skills of skill type 'x' (or named) from being able to
target the battler unless the skill's scope targets the user itself. If
you have multiple skill types in your database with the same name, then
priority will be given to the skill type with the highest ID.

<Cannot Select: Element x>
<Cannot Select: Element name>
This will prevent actions with an elemental ID of 'x' (or named) from
being able to target the battler unless the action's scope targets the
user itself. If you have multiple elements in your database with the same
name, then priority will be given to the element with the highest ID.

Weapon and Enemy Notetags:

<Melee>
This will designate the weapon/enemy as being melee and will affect any
skill or item selection range that uses the 'Weapon Range' condition.
Weapons/Enemies of this nature will target only the front row for those
selection conditions.

<Range>
<Ranged>
This will designate the weapon/enemy as being ranged and will affect any
skill or item selection range that uses the 'Weapon Range' condition.
Weapons/Enemies of this nature will be able to target any row for those
selection conditions.

============================================================================
Notetags - Select Conditions
============================================================================

To impose specific conditions on which targets are valid targets, use the
following notetag setup:

---

Skill and Item Notetags:

<Select Conditions>
condition
condition
</Select Conditions>
Replace 'condition' with the desired condition setup. Insert multiple
conditions to make an action require more conditions for viable targets.
Using this will overwrite the default settings imposed by the plugin
parameters so if you wish to use those settings, you'll have to use the
associated condition with it.

---

Conditions:

---

Any Row
- Requires YEP_RowFormation.js. The battler can be targeted from any row it
is in as a valid target. This will conflict with the other 'Row Only' select
conditions.

---

Back Row Only
- Requires YEP_RowFormation.js. This will make only the back row battlers
be selectable for target. The back row will refer to whatever row is in the
back that has living members. If row 3's enemies are all dead, but row 2
has living members, then row 2 will be considered the back row. This will
conflict with the other 'Row Only' select conditions.

---

Front Row Only
- Requires YEP_RowFormation.js. This will make only the front row battlers
be selectable for target. The front row will refer to whatever row is in
front that has living members. If row 1's enemies are all dead, but row 2
has living members, then row 2 will be considered the front row. This will
conflict with the other 'Row Only' select conditions.

---

Weapon Range
- Requires YEP_RowFormation.js. This will make the selection of targets vary
based on the battler's weapon range. If the weapon is 'melee', then it will
target the front row only. If the weapon is 'ranged', then it can target any
row the battler wants.

---

Row x Only
- Requires YEP_RowFormation.js. This will make only battlers in row x be
selectable for target. Any battlers not in row x will be excluded from
target selection. This will conflict with the other 'Row Only' select
conditions.

---

Row x Max
- Requires YEP_RowFormation.js. This will make all battlers who are located
in a lower number row up to row x be selectable for target. Any battlers in
a row number larger than x will be excluded from target selection.

---

Row x Min
- Requires YEP_RowFormation.js. This will make all battlers who are located
in a row from row x onward selectable for target. Any battlers in a row
number smaller than x will be excluded from target selection.

---

Param stat eval
ie: Param MaxHP >= 500
ie: Param HP% <= 0.30
ie: Param Level === 25
- This makes the selection have a check on the target's parameter values
before deciding if the target is a valid target for selection. You can
replace 'stat' with 'MaxHP', 'MaxMP', 'MaxTP', 'HP', 'MP', 'TP', 'HP%',
'MP%', 'TP%', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', 'LUK', or 'LEVEL'. This
run an eval check against that parameter owned by the target.

---

State: x
State: name
- The target must have state 'x' in order to be selected as a valid target.
If you're using the named version of the condition and you have multiple
states with the same name in your database, priority will be given to the
state with the highest ID. If the target doesn't have state 'x', then the
target is not a valid target for selection.

---

Not State: x
Not State: name
- The target must not have state 'x' in order to be selected as a valid
target. If you're using the named version of the condition and you have
multiple states with the same name in your database, priority will be given
to the state with the highest ID. If the target does have state 'x', then
the target is not a valid target for selection.

---

Not User
- This will remove the user from the possible selection pool making the user
unable to be selected as a valid target.

============================================================================
Lunatic Mode - Custom Select Condition
============================================================================

For those with JavaScript experience, you can use the following notetags to
make custom selection conditions for skills and items.

Skill and Item Notetags:

<Custom Select Condition>
if (target.name() === 'Harold') {
condition = true;
} else {
condition = false;
}
</Custom Select Condition>
The 'condition' variable determines if the condition will pass or not. If
the variable returns 'true', the condition will pass. If the variable is
'false', the condition will fail and the target will not be a valid target
for the action. Even if the <Custom Select Condition> notetag passes, all
other selection conditions must pass, too.

============================================================================
Changelog
============================================================================

Version 1.09:
- Fixed an exploit with skills that gain TP across Disperse Damage.

Version 1.08:
- New Feature: Clicking upon the Party Status Window to select actors works.
This requires Battle Engine Core v1.38 or else it will not work.
- New Feature: Visual Enemy and Visual Ally select for touch input.
This requires Battle Engine Core v1.38 or else it will not work.

Verison 1.07a:
- Fixed a bug that caused the all dead check to not check the actors that
were unselectable.
- Compatibility update with Battle System CTB to prevent taunt effects and
unselectable from making the CTB Turn Order bug out.

Version 1.06a:
- Added 'Physical Weapon Range' and 'Default Weapon Range' parameters. These
parameters are used for the new Select Condition: 'Weapon Range', which will
determine the range of a skill based on the weapon's range (melee or ranged)
and allow which enemies the battler can select.
- Added <Weapon Ranged> for Skills and Items. This will make the skill/item
be range dependent on the weapon equipped (or if the enemy is ranged).
- <Melee> and <Ranged> notetags added for weapons and enemies. This will
give weapons and enemies melee or ranged attributes.
- Changed sorting algorithm to better fit actors based on their visual
position on the screen.

Version 1.05:
- Compatibility update with Damage Core to fix Damage Dispersion if damage
caps are being used.

Version 1.04:
- Fixed a bug with the <Cannot Select> notetags that made them only work
with states.

Version 1.03:
- Fixed a bug that made <Bypass Taunt> and <Ignore Taunt> notetags not work
for the YEP_Taunt.js plugin.

Version 1.02a:
- Fixed a bug that caused a crash when multiple targets are present.
- Fixed an error with getting the wrong eval variable.

Version 1.01:
- Fixed a bug with the 'Not User' select condition not working properly.

Version 1.00:
- Finished Plugin!
パラメータ
param ---Default---
default
param Single Multiple
desc Single target magical skills to be able to select all units
of a battler group. NO - false YES - true
default true

param Disperse Damage
desc Automatically disperse damage if multiple targets are
selected instead of single targets? NO - false YES - true
default true

param Actor or Enemy
desc Single target skills can target either actors or enemies
by default? NO - false YES - true
default true

param Physical Front Row
desc Req. YEP_RowFormation, set physical single-target skills
to target only the front row? NO - false YES - true
default false

param Physical Weapon Range
desc Req. YEP_RowFormation & if the above is false, set physical
single-target skills to be weapon ranged? true/false
default true

param Default Weapon Range
desc Req. YEP_RowFormation, the default range for weapons.
MELEE - false RANGED - true
default false

param ---Text Display---
default
param All Enemies
desc Selection text for all enemies.
default All Enemies

param All Allies
desc Selection text for all allies.
default All Allies

param ---Visual All Window Select---
default
param Enable Visual All
desc Enables a window the player can click to toggle between
select all for allies/enemies. YES - true NO - false
default true

param Visual Enemy X
desc X coordinate of the All Enemies window.
This is a formula.
default 0

param Visual Enemy Y
desc Y coordinate of the All Enemies window.
This is a formula.
default this.fittingHeight(2)

param Visual Enemy Width
desc Width of the All Enemies window.
This is a formula.
default 240

param Visual Enemy Height
desc Width of the All Enemies window.
This is a formula.
default this.fittingHeight(1)

param Visual Ally X
desc X coordinate of the All Allies window.
This is a formula.
default Graphics.boxWidth - 240

param Visual Ally Y
desc Y coordinate of the All Allies window.
This is a formula.
default this.fittingHeight(2)

param Visual Ally Width
desc Width of the All Allies window.
This is a formula.
default 240

param Visual Ally Height
desc Width of the All Allies window.
This is a formula.
default this.fittingHeight(1)

ライセンス表記

紹介ページ https://github.com/suppayami/yami-engine-delta/blob/master/demo/js/plugins/YEP_X_SelectionControl.js