プレイヤーがメインメニューを通してクラスを変更できるシステムを作成するプラグイン – YEP_ClassChangeCore.js

タイトル
This plugin creates a system where your playercan change classes through the main menu.
作者名
ヘルプ
============================================================================
Introduction
============================================================================

This plugin adds the ability for your player to freely change the classes of
actors outside of battle from a menu. When changing classes, this script
gives the option for the developer to choose whether or not classes have
their own levels (causing the actor’s level to reset back to the class’s
level) or to maintain the current level.

============================================================================
Notetags
============================================================================

The following are some notetags you can use with the Class Change Core
plugin.

Actor Notetags:
<Unlock Class: x>
<Unlock Class: x, x, x>
<Unlock Class: x to y>
This actor will have class(es) x unlocked at the start of the game in
addition to its current class and access to any of the global classes.

<Cannot Change Class>
This prevents this actor from being able to change primary classes. This
could be reversed from plugin commands, however.

<Class x Character: filename y>
When this actor's class is x, the actor's character sprite will become
'filename' and index y on the fieldmap.

<Hero Character: filename y>
<Warrior Character: filename y>
If you prefer to use class names instead of the class ID, use the above
format. When this actor is this class, the actor's character sprite will
become 'filename' and index y on the fieldmap.

<Class x Face: filename y>
When this actor's class is x, the actor's face graphic will become
'filename' and index y for menus.

<Hero Face: filename y>
<Warrior Face: filename y>
If you prefer to use class names instead of the class ID, use the above
format. When this actor is this class, the actor's face graphic will
become 'filename' and index y for menus.

<Class x Battler: filename>
When this actor's class is x, the actor's battler sprite will become
'filename' in battle.

<Hero Battler: filename>
<Warrior Battler: filename>
If you prefer to use class names instead of the class ID, use the above
format. When this actor is this class, the actor's battler sprite will
become 'filename' in battle.

Class Notetags:
<Icon: x>
Sets the icon for this class to x. This icon is used in the Class Change
menu listing.

<Use Nickname>
This will cause the class to use the nickname used by the actor instead
of the class name.

<Help Description>
Text
Text
</Help Description>
Sets the help description for the class to the specified text.

<Level Unlock Requirements>
Class x: Level y
Class x: Level y
</Level Unlock Requirements>
Sets the requirements for unlocking that particular class. The unlocking
of the class will require classes x to be at level y. Insert multiple of
the strings in between the two opening and closing notetags to require all
of the class levels to be met.

<Level Unlock Requirements>
Hero: Level y
Warrior: Level y
</Level Unlock Requirements>
If you prefer to use class names instead of the class ID, use the above
format. This will set the level requirement for the mentioned class to y.
If there are multiple classes with the same name, the class with the
highest ID value will be taken.

============================================================================
Plugin Commands
============================================================================

Included in this plugin are multiple Plugin Commands to help assist you with
class changing for your game.

Plugin Command
OpenClass
- This opens the class changing scene.

ShowClass
HideClass
- This shows/hides the Class option from the main menu.

EnableClass
DisableClass
- This makes the Class option enabled/disabled.

UnlockClass 5 6
- This allows Actor 5 to unlock Class 6.

RemoveClass 5 7
- This causes Actor 5 to no longer access Class 7.

UnlockClassAll 8
- This unlocks Class 8 for the global pool.

RemoveClassAll 9
- This removes Class 9 from the global pool.

EnablePrimaryClassChange 5
DisablePrimaryClassChange 5
- This enables/disables primary class changing for actor 5.

============================================================================
Main Menu Manager - Positioning the Class Command
============================================================================

For those using the Main Menu Manager and would like to position the Row
command in a place you'd like, use the following format:

Name: Yanfly.Param.CCCCmdName
Symbol: class
Show: $gameSystem.isShowClass()
Enabled: $gameSystem.isEnableClass()
Ext:
Main Bind: this.commandPersonal.bind(this)
Actor Bind: SceneManager.push(Scene_Class)

Insert the above setup within a Main Menu Manager slot. Provided you copy
the exact settings to where you need it, it will appear there while using
all of the naming, enabling, disabling, hiding, and showing effects done by
the plugin parameters.

Remember to turn off 'Auto Add Menu' from the plugin parameters.

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

Version 1.11:
- Added <Use Nickname> notetag for classes. This will cause the class to use
the actor's nickname instead when listed in the class list.

Version 1.10:
- Added <Cannot Change Class> notetag for actors and two plugin commands:
EnablePrimaryClassChange and DisablePrimaryClassChange for actors.
- Added 'Auto Add Menu' to plugin parameters. This way, users don't have to
make conflict with it if manually positioning the command with the Main Menu
Manager plugin.

Version 1.09a:
- Optimization update.
- When switching classes to a globally unlocked class, actors won't unlock
those classes anymore. This is to keep the RemoveClassAll working without
having to manually use RemoveClass for all classes individually.

Version 1.08:
- Updated for RPG Maker MV version 1.1.0.

Version 1.07:
- Fixed a bug that carried over a previously changed actor's stats into the
stat comparison window.

Version 1.06:
- Made an update to the 'Change Actor Images' to give changes to actor
images priority over class images. Setting the 'Change Actor Images' to
(None) will return it back to using class images.

Version 1.05:
- If using the Skill Learn System and Skill Menu Integration, the
"Learn Skill" command now carries over to the Skill menu itself to utilize
the integrated system.

Version 1.04:
- Fixed a bug that would revive dead party members by changing their class.

Version 1.03:
- Fixed a bug that would duplicate non-independent items.
- Fixed a bug that prevented visual appearances from updating until entering
a new map.

Version 1.02a:
- Added a failsafe for users to prevent them from attempting to learn skills
from classes that don't exist.

Version 1.01:
- Fixed an asynch issue with changing class images when moving to another
face graphic that isn't on the same image.

Version 1.00:
- Finished Plugin!
パラメータ
param ---General---
default
param Class Command
desc This is the text used for the menu command.
default Class

param Auto Add Menu
desc Automatically add the 'Class' command to the main menu?
NO - false YES - true
default true

param Show Command
desc Show the Class command in the main menu by default?
NO - false YES - true
default true

param Enable Command
desc Enable the Class command in the main menu by default?
NO - false YES - true
default true

param Auto Place Command
desc Allow this plugin to decide the menu placement position?
NO - false YES - true
default true

param Default Icon
desc This is the default icon index used for all classes.
default 78

param Maintain Levels
desc Maintain levels throughout all classes?
NO - false YES - true Default: false
default false

param Unlocked Classes
desc These are the classes that are unlocked by default. List
the ID's of the classes with spaces in between them.
default 1 2 3 4

param ---Command Window---
default
param Class Change Command
desc The command text used for changing the primary class.
default Class

param Show Class Change
desc Show the class change command by default?
NO - false YES - true
default true

param Enable Class Change
desc Enable the class change command by default?
NO - false YES - true
default true

param Show Skill Learn
desc If you have Skill Learn System, show 'Learn Skill'?
NO - false YES - true
default true

param Finish Command
desc The command text used for exiting the class scene.
default Finish

param Text Alignment
desc How to align the text for the command window.
left center right
default center

param ---Window Settings---
default
param Current Class Color
desc This is the text color used for the actor's current class.
default 17

param Class Level Format
desc This is the text format for the Class Level.
default LV%1

param Class Level Font Size
desc This is the font size used for the class level.
default 20

ライセンス表記

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