Add jobquest

This commit is contained in:
2024-02-23 17:04:33 -05:00
commit a68515a4ef
264 changed files with 82692 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
//=============================================================================
// AltMenuScreen.js
//=============================================================================
/*:
* @plugindesc Alternative menu screen layout.
* @author Yoji Ojima
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc メニュー画面のレイアウトを変更します。
* @author Yoji Ojima
*
* @help このプラグインには、プラグインコマンドはありません。
*/
(function() {
var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
_Scene_Menu_create.call(this);
this._statusWindow.x = 0;
this._statusWindow.y = this._commandWindow.height;
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
};
Window_MenuCommand.prototype.windowWidth = function() {
return Graphics.boxWidth;
};
Window_MenuCommand.prototype.maxCols = function() {
return 4;
};
Window_MenuCommand.prototype.numVisibleRows = function() {
return 2;
};
Window_MenuStatus.prototype.windowWidth = function() {
return Graphics.boxWidth;
};
Window_MenuStatus.prototype.windowHeight = function() {
var h1 = this.fittingHeight(1);
var h2 = this.fittingHeight(2);
return Graphics.boxHeight - h1 - h2;
};
Window_MenuStatus.prototype.maxCols = function() {
return 4;
};
Window_MenuStatus.prototype.numVisibleRows = function() {
return 1;
};
Window_MenuStatus.prototype.drawItemImage = function(index) {
var actor = $gameParty.members()[index];
var rect = this.itemRectForText(index);
var w = Math.min(rect.width, 144);
var h = Math.min(rect.height, 144);
var lineHeight = this.lineHeight();
this.changePaintOpacity(actor.isBattleMember());
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);
this.changePaintOpacity(true);
};
Window_MenuStatus.prototype.drawItemStatus = function(index) {
var actor = $gameParty.members()[index];
var rect = this.itemRectForText(index);
var x = rect.x;
var y = rect.y;
var width = rect.width;
var bottom = y + rect.height;
var lineHeight = this.lineHeight();
this.drawActorName(actor, x, y + lineHeight * 0, width);
this.drawActorLevel(actor, x, y + lineHeight * 1, width);
this.drawActorClass(actor, x, bottom - lineHeight * 4, width);
this.drawActorHp(actor, x, bottom - lineHeight * 3, width);
this.drawActorMp(actor, x, bottom - lineHeight * 2, width);
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
};
var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
Window_MenuActor.prototype.initialize = function() {
_Window_MenuActor_initialize.call(this);
this.y = this.fittingHeight(2);
};
})();

134
js/plugins/AltSaveScreen.js Normal file
View File

@@ -0,0 +1,134 @@
//=============================================================================
// AltSaveScreen.js
//=============================================================================
/*:
* @plugindesc Alternative save/load screen layout.
* @author Yoji Ojima
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc セーブ/ロード画面のレイアウトを変更します。
* @author Yoji Ojima
*
* @help このプラグインには、プラグインコマンドはありません。
*/
(function() {
var _Scene_File_create = Scene_File.prototype.create;
Scene_File.prototype.create = function() {
_Scene_File_create.call(this);
this._listWindow.height = this._listWindow.fittingHeight(8);
var x = 0;
var y = this._listWindow.y + this._listWindow.height;
var width = Graphics.boxWidth;
var height = Graphics.boxHeight - y;
this._statusWindow = new Window_SavefileStatus(x, y, width, height);
this._statusWindow.setMode(this.mode());
this._listWindow.statusWindow = this._statusWindow;
this._listWindow.callUpdateHelp();
this.addWindow(this._statusWindow);
};
var _Scene_File_start = Scene_File.prototype.start;
Scene_File.prototype.start = function() {
_Scene_File_start.call(this);
this._listWindow.ensureCursorVisible();
this._listWindow.callUpdateHelp();
};
Window_SavefileList.prototype.windowWidth = function() {
return Graphics.boxWidth;
};
Window_SavefileList.prototype.maxCols = function() {
return 4;
};
Window_SavefileList.prototype.numVisibleRows = function() {
return 5;
};
Window_SavefileList.prototype.spacing = function() {
return 8;
};
Window_SavefileList.prototype.itemHeight = function() {
return this.lineHeight() * 2;
};
var _Window_SavefileList_callUpdateHelp =
Window_SavefileList.prototype.callUpdateHelp;
Window_SavefileList.prototype.callUpdateHelp = function() {
_Window_SavefileList_callUpdateHelp.call(this);
if (this.active && this.statusWindow) {
this.statusWindow.setId(this.index() + 1);
}
};
function Window_SavefileStatus() {
this.initialize.apply(this, arguments);
}
Window_SavefileStatus.prototype = Object.create(Window_Base.prototype);
Window_SavefileStatus.prototype.constructor = Window_SavefileStatus;
Window_SavefileStatus.prototype.initialize = function(x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._id = 1;
};
Window_SavefileStatus.prototype.setMode = function(mode) {
this._mode = mode;
};
Window_SavefileStatus.prototype.setId = function(id) {
this._id = id;
this.refresh();
};
Window_SavefileStatus.prototype.refresh = function() {
this.contents.clear();
var id = this._id;
var valid = DataManager.isThisGameFile(id);
var info = DataManager.loadSavefileInfo(id);
var rect = this.contents.rect;
this.resetTextColor();
if (this._mode === 'load') {
this.changePaintOpacity(valid);
}
this.drawFileId(id, rect.x, rect.y);
if (info) {
this.changePaintOpacity(valid);
this.drawContents(info, rect, valid);
this.changePaintOpacity(true);
}
};
Window_SavefileStatus.prototype.drawFileId = function(id, x, y) {
this.drawText(TextManager.file + ' ' + id, x, y, 180);
};
Window_SavefileStatus.prototype.drawContents = function(info, rect, valid) {
var bottom = rect.y + rect.height;
var playtimeY = bottom - this.lineHeight();
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
if (valid) {
this.drawPartyfaces(info, rect.x, bottom - 144);
}
this.drawText(info.playtime, rect.x, playtimeY, rect.width, 'right');
};
Window_SavefileStatus.prototype.drawPartyfaces = function(info, x, y) {
if (info && info.faces) {
for (var i = 0; i < info.faces.length; i++) {
var data = info.faces[i];
this.drawFace(data[0], data[1], x + i * 150, y);
}
}
};
})();

View File

@@ -0,0 +1,137 @@
/*:
* @plugindesc Plugin used to set basic parameters.
* @author RM CoreScript team
*
* @help This plugin does not provide plugin commands.
*
* @param cacheLimit
* @desc For setting the upper limit of image memory cache. (MPix)
* @default 10
*
* @param screenWidth
* @desc For setting the screen width.
* @default 816
*
* @param screenHeight
* @desc For setting the screen height.
* @default 624
*
* @param changeWindowWidthTo
* @desc If set, change window width to this value
*
* @param changeWindowHeightTo
* @desc If set, change window height to this value
*
* @param renderingMode
* @desc Rendering mode (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc To set initial value as to whether the player always dashes. (on/off)
* @default off
*/
/*:ja
* @plugindesc 基本的なパラメーターを設定するプラグインです。
* @author RM CoreScript team
*
* @help このプラグインにはプラグインコマンドはありません。
*
* @param cacheLimit
* @desc 画像のメモリへのキャッシュの上限値 (MPix)
* @default 10
*
* @param screenWidth
* @desc 画面サイズの幅
* @default 816
*
* @param screenHeight
* @desc 画面サイズの高さ
* @default 624
*
* @param changeWindowWidthTo
* @desc 値が設定された場合、ウインドウの幅を指定した値に変更
*
* @param changeWindowHeightTo
* @desc 値が設定された場合、ウインドウの高さを指定した値に変更
*
* @param renderingMode
* @desc レンダリングモード (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc プレイヤーが常時ダッシュするかどうかの初期値 (on/off)
* @default off
*/
(function() {
function toNumber(str, def) {
return isNaN(str) ? def : +(str || def);
}
var parameters = PluginManager.parameters('Community_Basic');
var cacheLimit = toNumber(parameters['cacheLimit'], 10);
var screenWidth = toNumber(parameters['screenWidth'], 816);
var screenHeight = toNumber(parameters['screenHeight'], 624);
var renderingMode = parameters['renderingMode'].toLowerCase();
var alwaysDash = parameters['alwaysDash'].toLowerCase() === 'on';
var windowWidthTo = toNumber(parameters['changeWindowWidthTo'], 0);
var windowHeightTo = toNumber(parameters['changeWindowHeightTo'], 0);
var windowWidth;
var windowHeight;
if(windowWidthTo){
windowWidth = windowWidthTo;
}else if(screenWidth !== SceneManager._screenWidth){
windowWidth = screenWidth;
}
if(windowHeightTo){
windowHeight = windowHeightTo;
}else if(screenHeight !== SceneManager._screenHeight){
windowHeight = screenHeight;
}
ImageCache.limit = cacheLimit * 1000 * 1000;
SceneManager._screenWidth = screenWidth;
SceneManager._screenHeight = screenHeight;
SceneManager._boxWidth = screenWidth;
SceneManager._boxHeight = screenHeight;
SceneManager.preferableRendererType = function() {
if (Utils.isOptionValid('canvas')) {
return 'canvas';
} else if (Utils.isOptionValid('webgl')) {
return 'webgl';
} else if (renderingMode === 'canvas') {
return 'canvas';
} else if (renderingMode === 'webgl') {
return 'webgl';
} else {
return 'auto';
}
};
var _ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
_ConfigManager_applyData.apply(this, arguments);
if (config['alwaysDash'] === undefined) {
this.alwaysDash = alwaysDash;
}
};
var _SceneManager_initNwjs = SceneManager.initNwjs;
SceneManager.initNwjs = function() {
_SceneManager_initNwjs.apply(this, arguments);
if (Utils.isNwjs() && windowWidth && windowHeight) {
var dw = windowWidth - window.innerWidth;
var dh = windowHeight - window.innerHeight;
window.moveBy(-dw / 2, -dh / 2);
window.resizeBy(dw, dh);
}
};
})();

802
js/plugins/CustomLogo.js Normal file
View File

@@ -0,0 +1,802 @@
//=============================================================================
// RPG Maker MZ - CustomLogo
//=============================================================================
/*:
* @target MV MZ
* @plugindesc Shows RPG Maker and user logos at the start of the game.
* @author nz_prism
*
* @help CustomLogo.js
* ver. 1.0.0
*
* [History]
* 05/12/2023 1.0.0 Released
*
* This plugin shows RPG Maker logo and other images at the start of the game,
* such as user logos or notes. It can show up to 3 logos in turns. Logo
* settings including image file and showing times can be configured through
* plugin parameters.
* Setting the plugin parameter "Logo n Skippable" to true enables players to
* skip the logo by pressing OK or cancel button. Plus, setting the plugin
* parameter "Allow Total Skip" to true enables players to skip all the logos
* just by single button pressing. If there are any logos which aren't
* skippable, it will proceed to the timing before the logo appears.
*
* Note the default image for Logo 1 is an RPG Maker logo. Although you can
* replace it with any image, you are recommended to use it to display your
* game is made with RPG Maker.
*
* @param logo1
* @text Logo 1 Settings
* @desc The settings for the first logo.
*
* @param logo1ImageName
* @text Logo 1 Image Name
* @desc The image file name for the first logo. If no image is specified, the next logo will be shown.
* @parent logo1
* @type file
* @dir img/system
*
* @param logo1Skippable
* @text Logo 1 Skippable
* @desc If true, players can skip the first logo.
* @parent logo1
* @type boolean
* @default true
*
* @param logo1Coordinate
* @text Logo 1 Coordinate
* @desc The coordinate settings for the first logo.
* @parent logo1
*
* @param logo1X
* @text Logo 1 X
* @desc The x for the first logo.
* @parent logo1Coordinate
* @type number
* @default 408
*
* @param logo1Y
* @text Logo 1 Y
* @desc The y for the first logo.
* @parent logo1Coordinate
* @type number
* @default 312
*
* @param logo1Origin
* @text Logo 1 Origin
* @desc THe origin for the first logo.
* @parent logo1Coordinate
* @default 0.5
* @type select
* @option Upper Left
* @value 0
* @option Center
* @value 0.5
*
* @param logo1Time
* @text Logo 1 Times
* @desc The time settings for the first logo.
* @parent logo1
*
* @param logo1FadeinFrames
* @text Logo 1 Fade-in Time
* @desc The frames for the first logo to fade in.
* @parent logo1Time
* @type number
* @default 12
* @min 1
*
* @param logo1FadeoutFrames
* @text Logo 1 Fade-out Time
* @desc The frames for the first logo to fade out.
* @parent logo1Time
* @type number
* @default 12
* @min 1
*
* @param logo1DurationFrames
* @text Logo 1 Shown Time
* @desc The frames for the first logo to be shown.
* @parent logo1Time
* @type number
* @default 120
* @min 1
*
* @param logo2
* @text Logo 2 Settings
* @desc The settings for the second logo.
*
* @param logo2ImageName
* @text Logo 2 Image Name
* @desc The image file name for the second logo. If no image is specified, the next logo will be shown.
* @parent logo2
* @type file
* @dir img/system
*
* @param logo2Skippable
* @text Logo 2 Skippable
* @desc If true, players can skip the second logo.
* @parent logo2
* @type boolean
* @default true
*
* @param logo2Coordinate
* @text Logo 2 Coordinate
* @desc The coordinate settings for the second logo.
* @parent logo2
*
* @param logo2X
* @text Logo 2 X
* @desc The x for the second logo.
* @parent logo2Coordinate
* @type number
* @default 408
*
* @param logo2Y
* @text Logo 2 Y
* @desc The y for the second logo.
* @parent logo2Coordinate
* @type number
* @default 312
*
* @param logo2Origin
* @text Logo 2 Origin
* @desc THe origin for the second logo.
* @parent logo2Coordinate
* @default 0.5
* @type select
* @option Upper Left
* @value 0
* @option Center
* @value 0.5
*
* @param logo2Time
* @text Logo 2 Times
* @desc The time settings for the second logo.
* @parent logo2
*
* @param logo2FadeinFrames
* @text Logo 2 Fade-in Time
* @desc The frames for the second logo to fade in.
* @parent logo2Time
* @type number
* @default 12
* @min 1
*
* @param logo2FadeoutFrames
* @text Logo 2 Fade-out Time
* @desc The frames for the second logo to fade out.
* @parent logo2Time
* @type number
* @default 12
* @min 1
*
* @param logo2DurationFrames
* @text Logo 2 Shown Time
* @desc The frames for the second logo to be shown.
* @parent logo2Time
* @type number
* @default 120
* @min 1
*
* @param logo3
* @text Logo 3 Settings
* @desc The settings for the third logo.
*
* @param logo3ImageName
* @text Logo 3 Image Name
* @desc The image file name for the third logo. If no image is specified, it will proceed to the title scene.
* @parent logo3
* @type file
* @dir img/system
*
* @param logo3Skippable
* @text Logo 3 Skippable
* @desc If true, players can skip the third logo.
* @parent logo3
* @type boolean
* @default true
*
* @param logo3Coordinate
* @text Logo 3 Coordinate
* @desc The coordinate settings for the third logo.
* @parent logo3
*
* @param logo3X
* @text Logo 3 X
* @desc The x for the third logo.
* @parent logo3Coordinate
* @type number
* @default 408
*
* @param logo3Y
* @text Logo 3 Y
* @desc The y for the third logo.
* @parent logo3Coordinate
* @type number
* @default 312
*
* @param logo3Origin
* @text Logo 3 Origin
* @desc THe origin for the third logo.
* @parent logo3Coordinate
* @default 0.5
* @type select
* @option Upper Left
* @value 0
* @option Center
* @value 0.5
*
* @param logo3Time
* @text Logo 3 Times
* @desc The time settings for the third logo.
* @parent logo3
*
* @param logo3FadeinFrames
* @text Logo 3 Fade-in Time
* @desc The frames for the third logo to fade in.
* @parent logo3Time
* @type number
* @default 12
* @min 1
*
* @param logo3FadeoutFrames
* @text Logo 3 Fade-out Time
* @desc The frames for the third logo to fade out.
* @parent logo3Time
* @type number
* @default 12
* @min 1
*
* @param logo3DurationFrames
* @text Logo 3 Shown Time
* @desc The frames for the third logo to be shown.
* @parent logo3Time
* @type number
* @default 120
* @min 1
*
* @param allowTotalSkip
* @text Allow Total Skip
* @desc If true, players can skip all the logos just by single button pressing.
* @type boolean
* @default true
*
*/
/*:ja
* @target MV MZ
* @plugindesc ゲーム起動時にRPG Makerおよびユーザーロゴを表示します。
* @author nz_prism
*
* @help CustomLogo.js
* ver. 1.0.0
*
* [バージョン履歴]
* 2023/05/12 1.0.0 リリース
*
* RPG Makerロゴおよび各種ユーザーロゴや注意書きなどをゲーム起動時に表示するプ
* ラグインです。最大3つまでのロゴを順番に表示できます。表示画像や表示時間はプ
* ラグインパラメータにより細かく設定することが可能です。
* プラグインパラメータ「ロゴnスキップ可能」をオンに設定すると、決定ボタンや
* キャンセルボタンの押下によるそのロゴのスキップが可能になります。また、プラグ
* インパラメータ「全スキップを許可」をオンにすると、一回のボタン押下により全て
* のロゴがスキップされるようになります。スキップ不可のロゴが存在する場合、その
* ロゴの前までのロゴがスキップされます。
*
* なおロゴ1の画像としてデフォルトで設定されている画像はRPG Makerのロゴです。
* 本ロゴについては、RPGMaker製ゲームであることを明示するために表示を推奨して
* おります。
*
* @param logo1
* @text ロゴ1設定
* @desc 最初に表示するロゴの設定です。
*
* @param logo1ImageName
* @text ロゴ1画像名
* @desc 最初に表示するロゴの画像ファイル名です。未設定の場合、次のロゴが表示されます。
* @parent logo1
* @type file
* @dir img/system
*
* @param logo1Skippable
* @text ロゴ1スキップ可能
* @desc オンにすると最初に表示するロゴをボタン押下によりスキップ可能になります。
* @parent logo1
* @type boolean
* @default true
*
* @param logo1Coordinate
* @text ロゴ1座標
* @desc 最初に表示するロゴの座標設定です。
* @parent logo1
*
* @param logo1X
* @text ロゴ1X座標
* @desc 最初に表示するロゴのX座標です。
* @parent logo1Coordinate
* @type number
* @default 408
*
* @param logo1Y
* @text ロゴ1Y座標
* @desc 最初に表示するロゴのY座標です。
* @parent logo1Coordinate
* @type number
* @default 312
*
* @param logo1Origin
* @text ロゴ1原点
* @desc 最初に表示するロゴの座標原点です。
* @parent logo1Coordinate
* @default 0.5
* @type select
* @option 左上
* @value 0
* @option 中央
* @value 0.5
*
* @param logo1Time
* @text ロゴ1表示時間
* @desc 最初に表示するロゴの表示時間設定です。
* @parent logo1
*
* @param logo1FadeinFrames
* @text ロゴ1フェードイン時間
* @desc 最初に表示するロゴのフェードインフレーム数です。
* @parent logo1Time
* @type number
* @default 12
* @min 1
*
* @param logo1FadeoutFrames
* @text ロゴ1フェードアウト時間
* @desc 最初に表示するロゴのフェードアウトフレーム数です。
* @parent logo1Time
* @type number
* @default 12
* @min 1
*
* @param logo1DurationFrames
* @text ロゴ1表示時間
* @desc 最初に表示するロゴの表示フレーム数です。
* @parent logo1Time
* @type number
* @default 120
* @min 1
*
* @param logo2
* @text ロゴ2設定
* @desc 2番目に表示するロゴの設定です。
*
* @param logo2ImageName
* @text ロゴ2画像名
* @desc 2番目に表示するロゴの画像ファイル名です。未設定の場合、次のロゴが表示されます。
* @parent logo2
* @type file
* @dir img/system
*
* @param logo2Skippable
* @text ロゴ2スキップ可能
* @desc オンにすると2番目に表示するロゴをボタン押下によりスキップ可能になります。
* @parent logo2
* @type boolean
* @default true
*
* @param logo2Coordinate
* @text ロゴ2座標
* @desc 2番目に表示するロゴの座標設定です。
* @parent logo2
*
* @param logo2X
* @text ロゴ2X座標
* @desc 2番目に表示するロゴのX座標です。
* @parent logo2Coordinate
* @type number
* @default 408
*
* @param logo2Y
* @text ロゴ2Y座標
* @desc 2番目に表示するロゴのY座標です。
* @parent logo2Coordinate
* @type number
* @default 312
*
* @param logo2Origin
* @text ロゴ2原点
* @desc 2番目に表示するロゴの座標原点です。
* @parent logo2Coordinate
* @default 0.5
* @type select
* @option 左上
* @value 0
* @option 中央
* @value 0.5
*
* @param logo2Time
* @text ロゴ2表示時間
* @desc 2番目に表示するロゴの表示時間設定です。
* @parent logo2
*
* @param logo2FadeinFrames
* @text ロゴ2フェードイン時間
* @desc 2番目に表示するロゴのフェードインフレーム数です。
* @parent logo2Time
* @type number
* @default 12
* @min 1
*
* @param logo2FadeoutFrames
* @text ロゴ2フェードアウト時間
* @desc 2番目に表示するロゴのフェードアウトフレーム数です。
* @parent logo2Time
* @type number
* @default 12
* @min 1
*
* @param logo2DurationFrames
* @text ロゴ2表示時間
* @desc 2番目に表示するロゴの表示フレーム数です。
* @parent logo2Time
* @type number
* @default 120
* @min 1
*
* @param logo3
* @text ロゴ3設定
* @desc 3番目に表示するロゴの設定です。
*
* @param logo3ImageName
* @text ロゴ3画像名
* @desc 3番目に表示するロゴの画像ファイル名です。未設定の場合、タイトル画面に移行します。
* @parent logo3
* @type file
* @dir img/system
*
* @param logo3Skippable
* @text ロゴ3スキップ可能
* @desc オンにすると3番目に表示するロゴをボタン押下によりスキップ可能になります。
* @parent logo3
* @type boolean
* @default true
*
* @param logo3Coordinate
* @text ロゴ3座標
* @desc 3番目に表示するロゴの座標設定です。
* @parent logo3
*
* @param logo3X
* @text ロゴ3X座標
* @desc 3番目に表示するロゴのX座標です。
* @parent logo3Coordinate
* @type number
* @default 408
*
* @param logo3Y
* @text ロゴ3Y座標
* @desc 3番目に表示するロゴのY座標です。
* @parent logo3Coordinate
* @type number
* @default 312
*
* @param logo3Origin
* @text ロゴ3原点
* @desc 3番目に表示するロゴの座標原点です。
* @parent logo3Coordinate
* @default 0.5
* @type select
* @option 左上
* @value 0
* @option 中央
* @value 0.5
*
* @param logo3Time
* @text ロゴ3表示時間
* @desc 3番目に表示するロゴの表示時間設定です。
* @parent logo3
*
* @param logo3FadeinFrames
* @text ロゴ3フェードイン時間
* @desc 3番目に表示するロゴのフェードインフレーム数です。
* @parent logo3Time
* @type number
* @default 12
* @min 1
*
* @param logo3FadeoutFrames
* @text ロゴ3フェードアウト時間
* @desc 3番目に表示するロゴのフェードアウトフレーム数です。
* @parent logo3Time
* @type number
* @default 12
* @min 1
*
* @param logo3DurationFrames
* @text ロゴ3表示時間
* @desc 3番目に表示するロゴの表示フレーム数です。
* @parent logo3Time
* @type number
* @default 120
* @min 1
*
* @param allowTotalSkip
* @text 全スキップを許可
* @desc オンにすると一回のボタン押下によりすべてのロゴがスキップされます(スキップ可能なもののみ)。
* @type boolean
* @default true
*
*/
(() => {
'use strict';
var PLUGIN_NAME = "CustomLogo";
var pluginParams = PluginManager.parameters(PLUGIN_NAME);
var LOGO1_IMAGE_NAME = pluginParams.logo1ImageName;
var LOGO1_SKIPPABLE = pluginParams.logo1Skippable == "true";
var LOGO1_X = Number(pluginParams.logo1X);
var LOGO1_Y = Number(pluginParams.logo1Y);
var LOGO1_ORIGN = Number(pluginParams.logo1Origin);
var LOGO1_FADEIN_FRAMES = Number(pluginParams.logo1FadeinFrames);
var LOGO1_FADEOUT_FRAMES = Number(pluginParams.logo1FadeoutFrames);
var LOGO1_DURATION_FRAMES = Number(pluginParams.logo1DurationFrames);
var LOGO2_IMAGE_NAME = pluginParams.logo2ImageName;
var LOGO2_SKIPPABLE = pluginParams.logo2Skippable == "true";
var LOGO2_X = Number(pluginParams.logo2X);
var LOGO2_Y = Number(pluginParams.logo2Y);
var LOGO2_ORIGN = Number(pluginParams.logo2Origin);
var LOGO2_FADEIN_FRAMES = Number(pluginParams.logo2FadeinFrames);
var LOGO2_FADEOUT_FRAMES = Number(pluginParams.logo2FadeoutFrames);
var LOGO2_DURATION_FRAMES = Number(pluginParams.logo2DurationFrames);
var LOGO3_IMAGE_NAME = pluginParams.logo3ImageName;
var LOGO3_SKIPPABLE = pluginParams.logo3Skippable == "true";
var LOGO3_X = Number(pluginParams.logo3X);
var LOGO3_Y = Number(pluginParams.logo3Y);
var LOGO3_ORIGN = Number(pluginParams.logo3Origin);
var LOGO3_FADEIN_FRAMES = Number(pluginParams.logo3FadeinFrames);
var LOGO3_FADEOUT_FRAMES = Number(pluginParams.logo3FadeoutFrames);
var LOGO3_DURATION_FRAMES = Number(pluginParams.logo3DurationFrames);
var ALLOW_TOTAL_SKIP = pluginParams.allowTotalSkip == "true";
ImageManager.loadLogoImages = function() {
this.loadSystem(LOGO1_IMAGE_NAME);
this.loadSystem(LOGO2_IMAGE_NAME);
this.loadSystem(LOGO3_IMAGE_NAME);
};
var _Scene_Boot_prototype_loadSystemImages = Scene_Boot.prototype.loadSystemImages;
Scene_Boot.prototype.loadSystemImages = function() {
_Scene_Boot_prototype_loadSystemImages.call(this);
ImageManager.loadLogoImages();
};
if (Utils.RPGMAKER_NAME == "MZ") {
Scene_Boot.prototype.startNormalGame = function() {
this.checkPlayerLocation();
DataManager.setupNewGame();
SceneManager.goto(Scene_Logo);
Window_TitleCommand.initCommandPosition();
};
} else {
Scene_Boot.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SoundManager.preloadImportantSounds();
if (DataManager.isBattleTest()) {
DataManager.setupBattleTest();
SceneManager.goto(Scene_Battle);
} else if (DataManager.isEventTest()) {
DataManager.setupEventTest();
SceneManager.goto(Scene_Map);
} else {
this.checkPlayerLocation();
DataManager.setupNewGame();
SceneManager.goto(Scene_Logo);
Window_TitleCommand.initCommandPosition();
}
this.updateDocumentTitle();
};
}
function Scene_Logo() {
this.initialize(...arguments);
}
Scene_Logo.prototype = Object.create(Scene_Base.prototype);
Scene_Logo.prototype.constructor = Scene_Logo;
Scene_Logo.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
this._logoIndex = 0;
this._phase = 0;
this._duration = 0;
};
Scene_Logo.prototype.create = function() {
Scene_Base.prototype.create.call(this);
this.createSprites();
};
Scene_Logo.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SceneManager.clearStack();
};
Scene_Logo.prototype.update = function() {
Scene_Base.prototype.update.call(this);
this.updateInput();
this.updatePhase();
};
Scene_Logo.prototype.updateInput = function() {
if (
Input.isTriggered("ok") ||
Input.isTriggered("cancel") ||
TouchInput.isTriggered() ||
TouchInput.isCancelled()
) {
var oldLogoIndex = this._logoIndex;
switch (this._logoIndex) {
case 0:
if (LOGO1_SKIPPABLE) {
this._logoIndex++;
this._logo1Sprite.opacity = 0;
if (ALLOW_TOTAL_SKIP) {
if (LOGO2_SKIPPABLE) {
this._logoIndex++;
if (LOGO3_SKIPPABLE) {
this._logoIndex++;
}
}
}
}
break;
case 1:
if (LOGO2_SKIPPABLE) {
this._logoIndex++;
this._logo2Sprite.opacity = 0;
if (ALLOW_TOTAL_SKIP && LOGO3_SKIPPABLE) {
this._logoIndex++;
}
}
break;
case 2:
if (LOGO3_SKIPPABLE) this._logoIndex++;
break;
}
if (this._logoIndex != oldLogoIndex) {
this._phase = 0;
this._duration = 0;
}
}
};
Scene_Logo.prototype.increasingOpacityPerFrame = function() {
switch (this._logoIndex) {
case 0: return Math.ceil(255 / LOGO1_FADEIN_FRAMES);
case 1: return Math.ceil(255 / LOGO2_FADEIN_FRAMES);
case 2: return Math.ceil(255 / LOGO3_FADEIN_FRAMES);
default: return 22;
}
};
Scene_Logo.prototype.decreasingOpacityPerFrame = function() {
switch (this._logoIndex) {
case 0: return Math.ceil(255 / LOGO1_FADEOUT_FRAMES);
case 1: return Math.ceil(255 / LOGO2_FADEOUT_FRAMES);
case 2: return Math.ceil(255 / LOGO3_FADEOUT_FRAMES);
default: return 22;
}
};
Scene_Logo.prototype.updatePhase = function() {
var sprite;
var maxDuration;
switch (this._logoIndex) {
case 0:
if (LOGO1_IMAGE_NAME) {
sprite = this._logo1Sprite;
switch (this._phase) {
case 0: maxDuration = LOGO1_FADEIN_FRAMES; break;
case 2: maxDuration = LOGO1_FADEOUT_FRAMES; break;
default: maxDuration = LOGO1_DURATION_FRAMES; break;
}
} else {
this._logoIndex++;
return;
}
break;
case 1:
if (LOGO2_IMAGE_NAME) {
sprite = this._logo2Sprite;
switch (this._phase) {
case 0: maxDuration = LOGO2_FADEIN_FRAMES; break;
case 2: maxDuration = LOGO2_FADEOUT_FRAMES; break;
default: maxDuration = LOGO2_DURATION_FRAMES; break;
}
} else {
this._logoIndex++;
return;
}
break;
case 2:
if (LOGO3_IMAGE_NAME) {
sprite = this._logo3Sprite;
switch (this._phase) {
case 0: maxDuration = LOGO3_FADEIN_FRAMES; break;
case 2: maxDuration = LOGO3_FADEOUT_FRAMES; break;
default: maxDuration = LOGO3_DURATION_FRAMES; break;
}
} else {
this._logoIndex++;
return;
}
break;
default:
SceneManager.goto(Scene_Title);
return;
}
if (this._duration < maxDuration) {
this._duration++;
switch (this._phase) {
case 0:
sprite.opacity = Math.min(sprite.opacity + this.increasingOpacityPerFrame(), 255);
break;
case 2:
sprite.opacity = Math.max(sprite.opacity - this.decreasingOpacityPerFrame(), 0);
break;
}
} else {
this._duration = 0;
this._phase++;
if (this._phase == 3) {
this._phase = 0;
this._logoIndex++;
}
}
};
Scene_Logo.prototype.isBusy = function() {
return false;
};
Scene_Logo.prototype.createSprites = function() {
var logo1 = new Sprite();
var logo2 = new Sprite();
var logo3 = new Sprite();
logo1.bitmap = ImageManager.loadSystem(LOGO1_IMAGE_NAME);
logo2.bitmap = ImageManager.loadSystem(LOGO2_IMAGE_NAME);
logo3.bitmap = ImageManager.loadSystem(LOGO3_IMAGE_NAME);
logo1.anchor.x = LOGO1_ORIGN;
logo1.anchor.y = LOGO1_ORIGN;
logo2.anchor.x = LOGO2_ORIGN;
logo2.anchor.y = LOGO2_ORIGN;
logo3.anchor.x = LOGO3_ORIGN;
logo3.anchor.y = LOGO3_ORIGN;
logo1.x = LOGO1_X;
logo1.y = LOGO1_Y;
logo2.x = LOGO2_X;
logo2.y = LOGO2_Y;
logo3.x = LOGO3_X;
logo3.y = LOGO3_Y;
this._logo1Sprite = logo1;
this._logo2Sprite = logo2;
this._logo3Sprite = logo3;
logo1.opacity = 0;
logo2.opacity = 0;
logo3.opacity = 0;
this.addChild(logo1);
this.addChild(logo2);
this.addChild(logo3);
};
})();

347
js/plugins/EnemyBook.js Normal file
View File

@@ -0,0 +1,347 @@
//=============================================================================
// EnemyBook.js
//=============================================================================
/*:
* @plugindesc Displays detailed statuses of enemies.
* @author Yoji Ojima
*
* @param Unknown Data
* @desc The index name for an unknown enemy.
* @default ??????
*
* @help
*
* Plugin Command:
* EnemyBook open # Open the enemy book screen
* EnemyBook add 3 # Add enemy #3 to the enemy book
* EnemyBook remove 4 # Remove enemy #4 from the enemy book
* EnemyBook complete # Complete the enemy book
* EnemyBook clear # Clear the enemy book
*
* Enemy Note:
* <desc1:foobar> # Description text in the enemy book, line 1
* <desc2:blahblah> # Description text in the enemy book, line 2
* <book:no> # This enemy does not appear in the enemy book
*/
/*:ja
* @plugindesc モンスター図鑑です。敵キャラの詳細なステータスを表示します。
* @author Yoji Ojima
*
* @param Unknown Data
* @desc 未確認の敵キャラの索引名です。
* @default
*
* @help
*
* プラグインコマンド:
* EnemyBook open # 図鑑画面を開く
* EnemyBook add 3 # 敵キャラ3番を図鑑に追加
* EnemyBook remove 4 # 敵キャラ4番を図鑑から削除
* EnemyBook complete # 図鑑を完成させる
* EnemyBook clear # 図鑑をクリアする
*
* 敵キャラのメモ:
* <desc1:なんとか> # 説明1行目
* <desc2:かんとか> # 説明2行目
* <book:no> # 図鑑に載せない場合
*/
(function() {
var parameters = PluginManager.parameters('EnemyBook');
var unknownData = String(parameters['Unknown Data'] || '??????');
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === 'EnemyBook') {
switch (args[0]) {
case 'open':
SceneManager.push(Scene_EnemyBook);
break;
case 'add':
$gameSystem.addToEnemyBook(Number(args[1]));
break;
case 'remove':
$gameSystem.removeFromEnemyBook(Number(args[1]));
break;
case 'complete':
$gameSystem.completeEnemyBook();
break;
case 'clear':
$gameSystem.clearEnemyBook();
break;
}
}
};
Game_System.prototype.addToEnemyBook = function(enemyId) {
if (!this._enemyBookFlags) {
this.clearEnemyBook();
}
this._enemyBookFlags[enemyId] = true;
};
Game_System.prototype.removeFromEnemyBook = function(enemyId) {
if (this._enemyBookFlags) {
this._enemyBookFlags[enemyId] = false;
}
};
Game_System.prototype.completeEnemyBook = function() {
this.clearEnemyBook();
for (var i = 1; i < $dataEnemies.length; i++) {
this._enemyBookFlags[i] = true;
}
};
Game_System.prototype.clearEnemyBook = function() {
this._enemyBookFlags = [];
};
Game_System.prototype.isInEnemyBook = function(enemy) {
if (this._enemyBookFlags && enemy) {
return !!this._enemyBookFlags[enemy.id];
} else {
return false;
}
};
var _Game_Troop_setup = Game_Troop.prototype.setup;
Game_Troop.prototype.setup = function(troopId) {
_Game_Troop_setup.call(this, troopId);
this.members().forEach(function(enemy) {
if (enemy.isAppeared()) {
$gameSystem.addToEnemyBook(enemy.enemyId());
}
}, this);
};
var _Game_Enemy_appear = Game_Enemy.prototype.appear;
Game_Enemy.prototype.appear = function() {
_Game_Enemy_appear.call(this);
$gameSystem.addToEnemyBook(this._enemyId);
};
var _Game_Enemy_transform = Game_Enemy.prototype.transform;
Game_Enemy.prototype.transform = function(enemyId) {
_Game_Enemy_transform.call(this, enemyId);
$gameSystem.addToEnemyBook(enemyId);
};
function Scene_EnemyBook() {
this.initialize.apply(this, arguments);
}
Scene_EnemyBook.prototype = Object.create(Scene_MenuBase.prototype);
Scene_EnemyBook.prototype.constructor = Scene_EnemyBook;
Scene_EnemyBook.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_EnemyBook.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this._indexWindow = new Window_EnemyBookIndex(0, 0);
this._indexWindow.setHandler('cancel', this.popScene.bind(this));
var wy = this._indexWindow.height;
var ww = Graphics.boxWidth;
var wh = Graphics.boxHeight - wy;
this._statusWindow = new Window_EnemyBookStatus(0, wy, ww, wh);
this.addWindow(this._indexWindow);
this.addWindow(this._statusWindow);
this._indexWindow.setStatusWindow(this._statusWindow);
};
function Window_EnemyBookIndex() {
this.initialize.apply(this, arguments);
}
Window_EnemyBookIndex.prototype = Object.create(Window_Selectable.prototype);
Window_EnemyBookIndex.prototype.constructor = Window_EnemyBookIndex;
Window_EnemyBookIndex.lastTopRow = 0;
Window_EnemyBookIndex.lastIndex = 0;
Window_EnemyBookIndex.prototype.initialize = function(x, y) {
var width = Graphics.boxWidth;
var height = this.fittingHeight(6);
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.refresh();
this.setTopRow(Window_EnemyBookIndex.lastTopRow);
this.select(Window_EnemyBookIndex.lastIndex);
this.activate();
};
Window_EnemyBookIndex.prototype.maxCols = function() {
return 3;
};
Window_EnemyBookIndex.prototype.maxItems = function() {
return this._list ? this._list.length : 0;
};
Window_EnemyBookIndex.prototype.setStatusWindow = function(statusWindow) {
this._statusWindow = statusWindow;
this.updateStatus();
};
Window_EnemyBookIndex.prototype.update = function() {
Window_Selectable.prototype.update.call(this);
this.updateStatus();
};
Window_EnemyBookIndex.prototype.updateStatus = function() {
if (this._statusWindow) {
var enemy = this._list[this.index()];
this._statusWindow.setEnemy(enemy);
}
};
Window_EnemyBookIndex.prototype.refresh = function() {
this._list = [];
for (var i = 1; i < $dataEnemies.length; i++) {
var enemy = $dataEnemies[i];
if (enemy.name && enemy.meta.book !== 'no') {
this._list.push(enemy);
}
}
this.createContents();
this.drawAllItems();
};
Window_EnemyBookIndex.prototype.drawItem = function(index) {
var enemy = this._list[index];
var rect = this.itemRectForText(index);
var name;
if ($gameSystem.isInEnemyBook(enemy)) {
name = enemy.name;
} else {
name = unknownData;
}
this.drawText(name, rect.x, rect.y, rect.width);
};
Window_EnemyBookIndex.prototype.processCancel = function() {
Window_Selectable.prototype.processCancel.call(this);
Window_EnemyBookIndex.lastTopRow = this.topRow();
Window_EnemyBookIndex.lastIndex = this.index();
};
function Window_EnemyBookStatus() {
this.initialize.apply(this, arguments);
}
Window_EnemyBookStatus.prototype = Object.create(Window_Base.prototype);
Window_EnemyBookStatus.prototype.constructor = Window_EnemyBookStatus;
Window_EnemyBookStatus.prototype.initialize = function(x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._enemy = null;
this._enemySprite = new Sprite();
this._enemySprite.anchor.x = 0.5;
this._enemySprite.anchor.y = 0.5;
this._enemySprite.x = width / 2 - 20;
this._enemySprite.y = height / 2;
this.addChildToBack(this._enemySprite);
this.refresh();
};
Window_EnemyBookStatus.prototype.setEnemy = function(enemy) {
if (this._enemy !== enemy) {
this._enemy = enemy;
this.refresh();
}
};
Window_EnemyBookStatus.prototype.update = function() {
Window_Base.prototype.update.call(this);
if (this._enemySprite.bitmap) {
var bitmapHeight = this._enemySprite.bitmap.height;
var contentsHeight = this.contents.height;
var scale = 1;
if (bitmapHeight > contentsHeight) {
scale = contentsHeight / bitmapHeight;
}
this._enemySprite.scale.x = scale;
this._enemySprite.scale.y = scale;
}
};
Window_EnemyBookStatus.prototype.refresh = function() {
var enemy = this._enemy;
var x = 0;
var y = 0;
var lineHeight = this.lineHeight();
this.contents.clear();
if (!enemy || !$gameSystem.isInEnemyBook(enemy)) {
this._enemySprite.bitmap = null;
return;
}
var name = enemy.battlerName;
var hue = enemy.battlerHue;
var bitmap;
if ($gameSystem.isSideView()) {
bitmap = ImageManager.loadSvEnemy(name, hue);
} else {
bitmap = ImageManager.loadEnemy(name, hue);
}
this._enemySprite.bitmap = bitmap;
this.resetTextColor();
this.drawText(enemy.name, x, y);
x = this.textPadding();
y = lineHeight + this.textPadding();
for (var i = 0; i < 8; i++) {
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(i), x, y, 160);
this.resetTextColor();
this.drawText(enemy.params[i], x + 160, y, 60, 'right');
y += lineHeight;
}
var rewardsWidth = 280;
x = this.contents.width - rewardsWidth;
y = lineHeight + this.textPadding();
this.resetTextColor();
this.drawText(enemy.exp, x, y);
x += this.textWidth(enemy.exp) + 6;
this.changeTextColor(this.systemColor());
this.drawText(TextManager.expA, x, y);
x += this.textWidth(TextManager.expA + ' ');
this.resetTextColor();
this.drawText(enemy.gold, x, y);
x += this.textWidth(enemy.gold) + 6;
this.changeTextColor(this.systemColor());
this.drawText(TextManager.currencyUnit, x, y);
x = this.contents.width - rewardsWidth;
y += lineHeight;
for (var j = 0; j < enemy.dropItems.length; j++) {
var di = enemy.dropItems[j];
if (di.kind > 0) {
var item = Game_Enemy.prototype.itemObject(di.kind, di.dataId);
this.drawItemName(item, x, y, rewardsWidth);
y += lineHeight;
}
}
var descWidth = 480;
x = this.contents.width - descWidth;
y = this.textPadding() + lineHeight * 7;
this.drawTextEx(enemy.meta.desc1, x, y + lineHeight * 0, descWidth);
this.drawTextEx(enemy.meta.desc2, x, y + lineHeight * 1, descWidth);
};
})();

383
js/plugins/ItemBook.js Normal file
View File

@@ -0,0 +1,383 @@
//=============================================================================
// ItemBook.js
//=============================================================================
/*:
* @plugindesc Displays detailed statuses of items.
* @author Yoji Ojima
*
* @param Unknown Data
* @desc The index name for an unknown item.
* @default ??????
*
* @param Price Text
* @desc The text for "Price".
* @default Price
*
* @param Equip Text
* @desc The text for "Equip".
* @default Equip
*
* @param Type Text
* @desc The text for "Type".
* @default Type
*
* @help
*
* Plugin Command:
* ItemBook open # Open the item book screen
* ItemBook add weapon 3 # Add weapon #3 to the item book
* ItemBook add armor 4 # Add armor #4 to the item book
* ItemBook remove armor 5 # Remove armor #5 from the item book
* ItemBook remove item 6 # Remove item #6 from the item book
* ItemBook complete # Complete the item book
* ItemBook clear # Clear the item book
*
* Item (Weapon, Armor) Note:
* <book:no> # This item does not appear in the item book
*/
/*:ja
* @plugindesc アイテム図鑑です。アイテムの詳細なステータスを表示します。
* @author Yoji Ojima
*
* @param Unknown Data
* @desc 未確認のアイテムの索引名です。
* @default
*
* @param Price Text
* @desc 「価格」の文字列です。
* @default 価格
*
* @param Equip Text
* @desc 「装備」の文字列です。
* @default 装備
*
* @param Type Text
* @desc 「タイプ」の文字列です。
* @default タイプ
*
* @help
*
* プラグインコマンド:
* ItemBook open # 図鑑画面を開く
* ItemBook add weapon 3 # 武器3番を図鑑に追加
* ItemBook add armor 4 # 防具4番を図鑑に追加
* ItemBook remove armor 5 # 防具5番を図鑑から削除
* ItemBook remove item 6 # アイテム6番を図鑑から削除
* ItemBook complete # 図鑑を完成させる
* ItemBook clear # 図鑑をクリアする
*
* アイテム(武器、防具)のメモ:
* <book:no> # 図鑑に載せない場合
*/
(function() {
var parameters = PluginManager.parameters('ItemBook');
var unknownData = String(parameters['Unknown Data'] || '??????');
var priceText = String(parameters['Price Text'] || 'Price');
var equipText = String(parameters['Equip Text'] || 'Equip');
var typeText = String(parameters['Type Text'] || 'Type');
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === 'ItemBook') {
switch (args[0]) {
case 'open':
SceneManager.push(Scene_ItemBook);
break;
case 'add':
$gameSystem.addToItemBook(args[1], Number(args[2]));
break;
case 'remove':
$gameSystem.removeFromItemBook(args[1], Number(args[2]));
break;
case 'complete':
$gameSystem.completeItemBook();
break;
case 'clear':
$gameSystem.clearItemBook();
break;
}
}
};
Game_System.prototype.addToItemBook = function(type, dataId) {
if (!this._ItemBookFlags) {
this.clearItemBook();
}
var typeIndex = this.itemBookTypeToIndex(type);
if (typeIndex >= 0) {
this._ItemBookFlags[typeIndex][dataId] = true;
}
};
Game_System.prototype.removeFromItemBook = function(type, dataId) {
if (this._ItemBookFlags) {
var typeIndex = this.itemBookTypeToIndex(type);
if (typeIndex >= 0) {
this._ItemBookFlags[typeIndex][dataId] = false;
}
}
};
Game_System.prototype.itemBookTypeToIndex = function(type) {
switch (type) {
case 'item':
return 0;
case 'weapon':
return 1;
case 'armor':
return 2;
default:
return -1;
}
};
Game_System.prototype.completeItemBook = function() {
var i;
this.clearItemBook();
for (i = 1; i < $dataItems.length; i++) {
this._ItemBookFlags[0][i] = true;
}
for (i = 1; i < $dataWeapons.length; i++) {
this._ItemBookFlags[1][i] = true;
}
for (i = 1; i < $dataArmors.length; i++) {
this._ItemBookFlags[2][i] = true;
}
};
Game_System.prototype.clearItemBook = function() {
this._ItemBookFlags = [[], [], []];
};
Game_System.prototype.isInItemBook = function(item) {
if (this._ItemBookFlags && item) {
var typeIndex = -1;
if (DataManager.isItem(item)) {
typeIndex = 0;
} else if (DataManager.isWeapon(item)) {
typeIndex = 1;
} else if (DataManager.isArmor(item)) {
typeIndex = 2;
}
if (typeIndex >= 0) {
return !!this._ItemBookFlags[typeIndex][item.id];
} else {
return false;
}
} else {
return false;
}
};
var _Game_Party_gainItem = Game_Party.prototype.gainItem;
Game_Party.prototype.gainItem = function(item, amount, includeEquip) {
_Game_Party_gainItem.call(this, item, amount, includeEquip);
if (item && amount > 0) {
var type;
if (DataManager.isItem(item)) {
type = 'item';
} else if (DataManager.isWeapon(item)) {
type = 'weapon';
} else if (DataManager.isArmor(item)) {
type = 'armor';
}
$gameSystem.addToItemBook(type, item.id);
}
};
function Scene_ItemBook() {
this.initialize.apply(this, arguments);
}
Scene_ItemBook.prototype = Object.create(Scene_MenuBase.prototype);
Scene_ItemBook.prototype.constructor = Scene_ItemBook;
Scene_ItemBook.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_ItemBook.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this._indexWindow = new Window_ItemBookIndex(0, 0);
this._indexWindow.setHandler('cancel', this.popScene.bind(this));
var wy = this._indexWindow.height;
var ww = Graphics.boxWidth;
var wh = Graphics.boxHeight - wy;
this._statusWindow = new Window_ItemBookStatus(0, wy, ww, wh);
this.addWindow(this._indexWindow);
this.addWindow(this._statusWindow);
this._indexWindow.setStatusWindow(this._statusWindow);
};
function Window_ItemBookIndex() {
this.initialize.apply(this, arguments);
}
Window_ItemBookIndex.prototype = Object.create(Window_Selectable.prototype);
Window_ItemBookIndex.prototype.constructor = Window_ItemBookIndex;
Window_ItemBookIndex.lastTopRow = 0;
Window_ItemBookIndex.lastIndex = 0;
Window_ItemBookIndex.prototype.initialize = function(x, y) {
var width = Graphics.boxWidth;
var height = this.fittingHeight(6);
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.refresh();
this.setTopRow(Window_ItemBookIndex.lastTopRow);
this.select(Window_ItemBookIndex.lastIndex);
this.activate();
};
Window_ItemBookIndex.prototype.maxCols = function() {
return 3;
};
Window_ItemBookIndex.prototype.maxItems = function() {
return this._list ? this._list.length : 0;
};
Window_ItemBookIndex.prototype.setStatusWindow = function(statusWindow) {
this._statusWindow = statusWindow;
this.updateStatus();
};
Window_ItemBookIndex.prototype.update = function() {
Window_Selectable.prototype.update.call(this);
this.updateStatus();
};
Window_ItemBookIndex.prototype.updateStatus = function() {
if (this._statusWindow) {
var item = this._list[this.index()];
this._statusWindow.setItem(item);
}
};
Window_ItemBookIndex.prototype.refresh = function() {
var i, item;
this._list = [];
for (i = 1; i < $dataItems.length; i++) {
item = $dataItems[i];
if (item.name && item.itypeId === 1 && item.meta.book !== 'no') {
this._list.push(item);
}
}
for (i = 1; i < $dataWeapons.length; i++) {
item = $dataWeapons[i];
if (item.name && item.meta.book !== 'no') {
this._list.push(item);
}
}
for (i = 1; i < $dataArmors.length; i++) {
item = $dataArmors[i];
if (item.name && item.meta.book !== 'no') {
this._list.push(item);
}
}
this.createContents();
this.drawAllItems();
};
Window_ItemBookIndex.prototype.drawItem = function(index) {
var item = this._list[index];
var rect = this.itemRect(index);
var width = rect.width - this.textPadding();
if ($gameSystem.isInItemBook(item)) {
this.drawItemName(item, rect.x, rect.y, width);
} else {
var iw = Window_Base._iconWidth + 4;
this.drawText(unknownData, rect.x + iw, rect.y, width - iw);
}
};
Window_ItemBookIndex.prototype.processCancel = function() {
Window_Selectable.prototype.processCancel.call(this);
Window_ItemBookIndex.lastTopRow = this.topRow();
Window_ItemBookIndex.lastIndex = this.index();
};
function Window_ItemBookStatus() {
this.initialize.apply(this, arguments);
}
Window_ItemBookStatus.prototype = Object.create(Window_Base.prototype);
Window_ItemBookStatus.prototype.constructor = Window_ItemBookStatus;
Window_ItemBookStatus.prototype.initialize = function(x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
};
Window_ItemBookStatus.prototype.setItem = function(item) {
if (this._item !== item) {
this._item = item;
this.refresh();
}
};
Window_ItemBookStatus.prototype.refresh = function() {
var item = this._item;
var x = 0;
var y = 0;
var lineHeight = this.lineHeight();
this.contents.clear();
if (!item || !$gameSystem.isInItemBook(item)) {
return;
}
this.drawItemName(item, x, y);
x = this.textPadding();
y = lineHeight + this.textPadding();
var price = item.price > 0 ? item.price : '-';
this.changeTextColor(this.systemColor());
this.drawText(priceText, x, y, 120);
this.resetTextColor();
this.drawText(price, x + 120, y, 120, 'right');
y += lineHeight;
if (DataManager.isWeapon(item) || DataManager.isArmor(item)) {
var etype = $dataSystem.equipTypes[item.etypeId];
this.changeTextColor(this.systemColor());
this.drawText(equipText, x, y, 120);
this.resetTextColor();
this.drawText(etype, x + 120, y, 120, 'right');
y += lineHeight;
var type;
if (DataManager.isWeapon(item)) {
type = $dataSystem.weaponTypes[item.wtypeId];
} else {
type = $dataSystem.armorTypes[item.atypeId];
}
this.changeTextColor(this.systemColor());
this.drawText(typeText, x, y, 120);
this.resetTextColor();
this.drawText(type, x + 120, y, 120, 'right');
x = this.textPadding() + 300;
y = lineHeight + this.textPadding();
for (var i = 2; i < 8; i++) {
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(i), x, y, 160);
this.resetTextColor();
this.drawText(item.params[i], x + 160, y, 60, 'right');
y += lineHeight;
}
}
x = 0;
y = this.textPadding() * 2 + lineHeight * 7;
this.drawTextEx(item.description, x, y);
};
})();

304
js/plugins/MadeWithMv.js Normal file
View File

@@ -0,0 +1,304 @@
/*:
* NOTE: Images are stored in the img/system folder.
*
* @plugindesc Show a Splash Screen "Made with MV" and/or a Custom Splash Screen before going to main screen.
* @author Dan "Liquidize" Deptula
*
* @help This plugin does not provide plugin commands.
*
* @param Show Made With MV
* @desc Enabled/Disables showing the "Made with MV" splash screen.
* OFF - false ON - true
* Default: ON
* @default true
*
* @param Made with MV Image
* @desc The image to use when showing "Made with MV"
* Default: MadeWithMv
* @default MadeWithMv
* @require 1
* @dir img/system/
* @type file
*
* @param Show Custom Splash
* @desc Enabled/Disables showing the "Made with MV" splash screen.
* OFF - false ON - true
* Default: OFF
* @default false
*
* @param Custom Image
* @desc The image to use when showing "Made with MV"
* Default:
* @default
* @require 1
* @dir img/system/
* @type file
*
* @param Fade Out Time
* @desc The time it takes to fade out, in frames.
* Default: 120
* @default 120
*
* @param Fade In Time
* @desc The time it takes to fade in, in frames.
* Default: 120
* @default 120
*
* @param Wait Time
* @desc The time between fading in and out, in frames.
* Default: 160
* @default 160
*
*/
/*:ja
* メモ: イメージはimgsystemフォルダ内に保存されます。
*
* @plugindesc メイン画面へ進む前に、"Made with MV"のスプラッシュ画面もしくはカスタマイズされたスプラッシュ画面を表示します。
* @author Dan "Liquidize" Deptula
*
* @help このプラグインにはプラグインコマンドはありません。
*
* @param Show Made With MV
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
* OFF - false ON - true
* デフォルト: ON
* @default true
*
* @param Made with MV Image
* @desc "Made with MV"を表示する際に使用する画像
* デフォルト: MadeWithMv
* @default MadeWithMv
* @require 1
* @dir img/system/
* @type file
*
* @param Show Custom Splash
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
* OFF - false ON - true
* デフォルト: OFF
* @default false
*
* @param Custom Image
* @desc "Made with MV"を表示する際に使用する画像
* デフォルト:
* @default
* @require 1
* @dir img/system/
* @type file
*
* @param Fade Out Time
* @desc フェードアウトに要する時間(フレーム数)
* デフォルト: 120
* @default 120
*
* @param Fade In Time
* @desc フェードインに要する時間(フレーム数)
* デフォルト: 120
* @default 120
*
* @param Wait Time
* @desc フェードインからフェードアウトまでに要する時間(フレーム数)
* デフォルト: 160
* @default 160
*
*/
var Liquidize = Liquidize || {};
Liquidize.MadeWithMV = {};
Liquidize.MadeWithMV.Parameters = PluginManager.parameters('MadeWithMv');
Liquidize.MadeWithMV.ShowMV = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Made With MV"]);
Liquidize.MadeWithMV.MVImage = String(Liquidize.MadeWithMV.Parameters["Made with MV Image"]);
Liquidize.MadeWithMV.ShowCustom = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Custom Splash"]);
Liquidize.MadeWithMV.CustomImage = String(Liquidize.MadeWithMV.Parameters["Custom Image"]);
Liquidize.MadeWithMV.FadeOutTime = Number(Liquidize.MadeWithMV.Parameters["Fade Out Time"]) || 120;
Liquidize.MadeWithMV.FadeInTime = Number(Liquidize.MadeWithMV.Parameters["Fade In Time"]) || 120;
Liquidize.MadeWithMV.WaitTime = Number(Liquidize.MadeWithMV.Parameters["Wait Time"]) || 160;
//-----------------------------------------------------------------------------
// Scene_Splash
//
// This is a constructor, implementation is done in the inner scope.
function Scene_Splash() {
this.initialize.apply(this, arguments);
}
(function() {
//-----------------------------------------------------------------------------
// Scene_Boot
//
// The scene class for dealing with the game boot.
var _Scene_Boot_loadSystemImages = Scene_Boot.prototype.loadSystemImages;
Scene_Boot.prototype.loadSystemImages = function() {
_Scene_Boot_loadSystemImages.call(this);
if (Liquidize.MadeWithMV.ShowMV) {
ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage);
}
if (Liquidize.MadeWithMV.ShowCustom) {
ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage);
}
};
var _Scene_Boot_start = Scene_Boot.prototype.start;
Scene_Boot.prototype.start = function() {
if ((Liquidize.MadeWithMV.ShowMV || Liquidize.MadeWithMV.ShowCustom) && !DataManager.isBattleTest() && !DataManager.isEventTest()) {
SceneManager.goto(Scene_Splash);
} else {
_Scene_Boot_start.call(this);
}
};
//-----------------------------------------------------------------------------
// Scene_Splash
//
// The scene class for dealing with the splash screens.
Scene_Splash.prototype = Object.create(Scene_Base.prototype);
Scene_Splash.prototype.constructor = Scene_Splash;
Scene_Splash.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
this._mvSplash = null;
this._customSplash = null;
this._mvWaitTime = Liquidize.MadeWithMV.WaitTime;
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
this._mvFadeOut = false;
this._mvFadeIn = false;
this._customFadeOut = false;
this._customFadeIn = false;
};
Scene_Splash.prototype.create = function() {
Scene_Base.prototype.create.call(this);
this.createSplashes();
};
Scene_Splash.prototype.start = function() {
Scene_Base.prototype.start.call(this);
SceneManager.clearStack();
if (this._mvSplash != null) {
this.centerSprite(this._mvSplash);
}
if (this._customSplash != null) {
this.centerSprite(this._customSplash);
}
};
Scene_Splash.prototype.update = function() {
if (Liquidize.MadeWithMV.ShowMV) {
if (!this._mvFadeIn) {
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
this._mvFadeIn = true;
} else {
if (this._mvWaitTime > 0 && this._mvFadeOut == false) {
this._mvWaitTime--;
} else {
if (this._mvFadeOut == false) {
this._mvFadeOut = true;
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
}
}
}
}
if (Liquidize.MadeWithMV.ShowCustom) {
if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true) {
if (!this._customFadeIn && this._fadeDuration == 0) {
this._customSplash.opacity = 255;
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
this._customFadeIn = true;
} else {
if (this._customWaitTime > 0 && this._customFadeOut == false) {
this._customWaitTime--;
} else {
if (this._customFadeOut == false) {
this._customFadeOut = true;
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
}
}
}
} else if (!Liquidize.MadeWithMV.ShowMV) {
if (!this._customFadeIn) {
this._customSplash.opacity = 255;
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
this._customFadeIn = true;
} else {
if (this._customWaitTime > 0 && this._customFadeOut == false) {
this._customWaitTime--;
} else {
if (this._customFadeOut == false) {
this._customFadeOut = true;
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
}
}
}
}
}
if (Liquidize.MadeWithMV.ShowCustom) {
if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true && this._customFadeOut == true) {
this.gotoTitleOrTest();
} else if (!Liquidize.MadeWithMV.ShowMV && this._customFadeOut == true) {
this.gotoTitleOrTest();
}
} else {
if (this._mvFadeOut == true) {
this.gotoTitleOrTest();
}
}
Scene_Base.prototype.update.call(this);
};
Scene_Splash.prototype.createSplashes = function() {
if (Liquidize.MadeWithMV.ShowMV) {
this._mvSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage));
this.addChild(this._mvSplash);
}
if (Liquidize.MadeWithMV.ShowCustom) {
this._customSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage));
this._customSplash.opacity = 0;
this.addChild(this._customSplash);
}
};
Scene_Splash.prototype.centerSprite = function(sprite) {
sprite.x = Graphics.width / 2;
sprite.y = Graphics.height / 2;
sprite.anchor.x = 0.5;
sprite.anchor.y = 0.5;
};
Scene_Splash.prototype.gotoTitleOrTest = function() {
Scene_Base.prototype.start.call(this);
SoundManager.preloadImportantSounds();
if (DataManager.isBattleTest()) {
DataManager.setupBattleTest();
SceneManager.goto(Scene_Battle);
} else if (DataManager.isEventTest()) {
DataManager.setupEventTest();
SceneManager.goto(Scene_Map);
} else {
this.checkPlayerLocation();
DataManager.setupNewGame();
SceneManager.goto(Scene_Title);
Window_TitleCommand.initCommandPosition();
}
this.updateDocumentTitle();
};
Scene_Splash.prototype.updateDocumentTitle = function() {
document.title = $dataSystem.gameTitle;
};
Scene_Splash.prototype.checkPlayerLocation = function() {
if ($dataSystem.startMapId === 0) {
throw new Error('Player\'s starting position is not set');
}
};
})();

View File

@@ -0,0 +1,91 @@
//=============================================================================
// SimpleMsgSideView.js
//=============================================================================
/*:
* @plugindesc at sideview battle, only display item/skill names.
* @author Sasuke KANNAZUKI
*
* @param displayAttack
* @desc Whether to display normal attack. 1:yes 0:no
* @default 0
*
* @param position
* @desc Skill name display position. 0:left, 1:center
* @default 1
*
* @help This plugin does not provide plugin commands.
*
* By not displaying the log and only displaying the skill name,
* the speed of battle will increase slightly.
*/
/*:ja
* @plugindesc サイドビューバトルで技/アイテムの名前のみ表示します。
* @author 神無月サスケ
*
* @param displayAttack
* @desc 通常攻撃も表示するか (1:する 0:しない)
* @default 0
*
* @param position
* @desc 技名を表示する位置 (0:左寄せ, 1:中央)
* @default 1
*
* @help このプラグインには、プラグインコマンドはありません。
*
* ログを表示せず、技名のみを表示することで、戦闘のテンポが若干高速になります。
*/
(function() {
var parameters = PluginManager.parameters('SimpleMsgSideView');
var displayAttack = Number(parameters['displayAttack']) != 0;
var position = Number(parameters['position'] || 1);
var _Window_BattleLog_addText = Window_BattleLog.prototype.addText;
Window_BattleLog.prototype.addText = function(text) {
if($gameSystem.isSideView()){
this.refresh();
this.wait();
return; // not display battle log
}
_Window_BattleLog_addText.call(this, text);
};
// for sideview battle only
Window_BattleLog.prototype.addItemNameText = function(itemName) {
this._lines.push(itemName);
this.refresh();
this.wait();
};
var _Window_BattleLog_displayAction =
Window_BattleLog.prototype.displayAction;
Window_BattleLog.prototype.displayAction = function(subject, item) {
if($gameSystem.isSideView()){
if(displayAttack ||
!(DataManager.isSkill(item) && item.id == subject.attackSkillId())) {
   this.push('addItemNameText', item.name); // display item/skill name
} else {
this.push('wait');
}
return;
}
_Window_BattleLog_displayAction.call(this, subject, item);
};
// to put skill/item name at center
var _Window_BattleLog_drawLineText = Window_BattleLog.prototype.drawLineText;
Window_BattleLog.prototype.drawLineText = function(index) {
if($gameSystem.isSideView() && position == 1){
var rect = this.itemRectForText(index);
this.contents.clearRect(rect.x, rect.y, rect.width, rect.height);
this.drawText(this._lines[index], rect.x, rect.y,
rect.width, 'center');
return;
}
_Window_BattleLog_drawLineText.call(this, index);
};
})();

View File

@@ -0,0 +1,72 @@
//=============================================================================
// TitleCommandPosition.js
//=============================================================================
/*:
* @plugindesc Changes the position of the title command window.
* @author Yoji Ojima
*
* @param Offset X
* @desc The offset value for the x coordinate.
* @default 0
*
* @param Offset Y
* @desc The offset value for the y coordinate.
* @default 0
*
* @param Width
* @desc The width of the command window.
* @default 240
*
* @param Background
* @desc The background type. 0: Normal, 1: Dim, 2: Transparent
* @default 0
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc タイトルコマンドウィンドウの位置を変更します。
* @author Yoji Ojima
*
* @param Offset X
* @desc X座標のオフセット値です。
* @default 0
*
* @param Offset Y
* @desc Y座標のオフセット値です。
* @default 0
*
* @param Width
* @desc コマンドウィンドウの幅です。
* @default 240
*
* @param Background
* @desc 背景タイプです。0: 通常、1: 暗くする、2: 透明
* @default 0
*
* @help このプラグインには、プラグインコマンドはありません。
*/
(function() {
var parameters = PluginManager.parameters('TitleCommandPosition');
var offsetX = Number(parameters['Offset X'] || 0);
var offsetY = Number(parameters['Offset Y'] || 0);
var width = Number(parameters['Width'] || 240);
var background = Number(parameters['Background'] || 0);
var _Window_TitleCommand_updatePlacement =
Window_TitleCommand.prototype.updatePlacement;
Window_TitleCommand.prototype.updatePlacement = function() {
_Window_TitleCommand_updatePlacement.call(this);
this.x += offsetX;
this.y += offsetY;
this.setBackgroundType(background);
};
Window_TitleCommand.prototype.windowWidth = function() {
return width;
};
})();

83
js/plugins/WeaponSkill.js Normal file
View File

@@ -0,0 +1,83 @@
//=============================================================================
// WeaponSkill.js
//=============================================================================
/*:
* @plugindesc Change skill id of attack for each weapon.
* @author Sasuke KANNAZUKI
*
* @help This plugin does not provide plugin commands.
*
* When <skill_id:3> is written in a weapon's note field,
* skill id # 3 is used for the weapon's attack.
* If nothing is written, default id(=1) is used.
*
* Check Points:
* - When multiple weapons are equipped, the skill id of the weapon
* held in the dominant hand (previously defined) is used.
* - It is most favorable for "skill type" to be "none"(=0),
* otherwise you cannot attack when your skill is blocked.
*
* Usage examples of this plugin:
* - to create all-range weapons
* - to create dual-attack or triple-attack weapons
* - If healing skill is set when actor attacks, you can choose a friend to heal.
* - It is possible to make a weapon that functions similar to a guard command.
*/
/*:ja
* @plugindesc 武器ごとに通常攻撃のスキルIDを変更します。
* @author 神無月サスケ
*
* @help このプラグインにはプラグインコマンドはありません。
*
* 武器の「メモ」欄に、<skill_id:3> と書いた場合、
* 通常攻撃の際、3番のスキルが発動します。
* ※特に記述がなければ、通常通り1番のスキルが採用されます。
*
* チェックポイント:
* - 二刀流の場合、利き腕(先に定義された方)に持っているスキルIDが採用されます。
* - スキルタイプは「なし」にするのが望ましいです。
* さもなくば、技などを封じられたとき、攻撃が出来なくなります。
*
* 想定される用途:
* - 全体攻撃可能な武器
* - 2回攻撃、3回攻撃する武器
* - 回復魔法をスキルに指定した場合、
* 「攻撃」を選んだ際、味方の選択が出来、その仲間を回復します
* - 防御コマンドなどと同等になる武器も実現可能です。
*/
(function() {
//
// set skill id for attack.
//
Game_Actor.prototype.attackSkillId = function() {
var normalId = Game_BattlerBase.prototype.attackSkillId.call(this);
if(this.hasNoWeapons()){
return normalId;
}
var weapon = this.weapons()[0]; // at plural weapon, one's first skill.
var id = weapon.meta.skill_id;
return id ? Number(id) : normalId;
};
//
// for command at battle
//
var _Scene_Battle_commandAttack = Scene_Battle.prototype.commandAttack;
Scene_Battle.prototype.commandAttack = function() {
BattleManager.inputtingAction().setAttack();
// normal attack weapon (or other single attack weapon)
var action = BattleManager.inputtingAction();
if(action.needsSelection() && action.isForOpponent()){
_Scene_Battle_commandAttack.call(this);
return;
}
// special skill weapon
this.onSelectAction();
};
})();