generated from nhcarrigan/template
chore: smaller commits
This commit is contained in:
114
js/libs/effekseer.min.js
vendored
Normal file
114
js/libs/effekseer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
js/libs/effekseer.wasm
Normal file
BIN
js/libs/effekseer.wasm
Normal file
Binary file not shown.
7
js/libs/localforage.min.js
vendored
Normal file
7
js/libs/localforage.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
js/libs/pako.min.js
vendored
Normal file
1
js/libs/pako.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
45223
js/libs/pixi.js
Normal file
45223
js/libs/pixi.js
Normal file
File diff suppressed because it is too large
Load Diff
6
js/libs/vorbisdecoder.js
Normal file
6
js/libs/vorbisdecoder.js
Normal file
File diff suppressed because one or more lines are too long
161
js/main.js
Normal file
161
js/main.js
Normal file
@ -0,0 +1,161 @@
|
||||
//=============================================================================
|
||||
// main.js v1.4.4
|
||||
//=============================================================================
|
||||
|
||||
const scriptUrls = [
|
||||
"js/libs/pixi.js",
|
||||
"js/libs/pako.min.js",
|
||||
"js/libs/localforage.min.js",
|
||||
"js/libs/effekseer.min.js",
|
||||
"js/libs/vorbisdecoder.js",
|
||||
"js/rmmz_core.js",
|
||||
"js/rmmz_managers.js",
|
||||
"js/rmmz_objects.js",
|
||||
"js/rmmz_scenes.js",
|
||||
"js/rmmz_sprites.js",
|
||||
"js/rmmz_windows.js",
|
||||
"js/plugins.js"
|
||||
];
|
||||
const effekseerWasmUrl = "js/libs/effekseer.wasm";
|
||||
|
||||
class Main {
|
||||
constructor() {
|
||||
this.xhrSucceeded = false;
|
||||
this.loadCount = 0;
|
||||
this.error = null;
|
||||
}
|
||||
|
||||
run() {
|
||||
this.showLoadingSpinner();
|
||||
this.testXhr();
|
||||
this.hookNwjsClose();
|
||||
this.loadMainScripts();
|
||||
}
|
||||
|
||||
showLoadingSpinner() {
|
||||
const loadingSpinner = document.createElement("div");
|
||||
const loadingSpinnerImage = document.createElement("div");
|
||||
loadingSpinner.id = "loadingSpinner";
|
||||
loadingSpinnerImage.id = "loadingSpinnerImage";
|
||||
loadingSpinner.appendChild(loadingSpinnerImage);
|
||||
document.body.appendChild(loadingSpinner);
|
||||
}
|
||||
|
||||
eraseLoadingSpinner() {
|
||||
const loadingSpinner = document.getElementById("loadingSpinner");
|
||||
if (loadingSpinner) {
|
||||
document.body.removeChild(loadingSpinner);
|
||||
}
|
||||
}
|
||||
|
||||
testXhr() {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", document.currentScript.src);
|
||||
xhr.onload = () => (this.xhrSucceeded = true);
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
hookNwjsClose() {
|
||||
// [Note] When closing the window, the NW.js process sometimes does
|
||||
// not terminate properly. This code is a workaround for that.
|
||||
if (typeof nw === "object") {
|
||||
nw.Window.get().on("close", () => nw.App.quit());
|
||||
}
|
||||
}
|
||||
|
||||
loadMainScripts() {
|
||||
for (const url of scriptUrls) {
|
||||
const script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = url;
|
||||
script.async = false;
|
||||
script.defer = true;
|
||||
script.onload = this.onScriptLoad.bind(this);
|
||||
script.onerror = this.onScriptError.bind(this);
|
||||
script._url = url;
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
this.numScripts = scriptUrls.length;
|
||||
window.addEventListener("load", this.onWindowLoad.bind(this));
|
||||
window.addEventListener("error", this.onWindowError.bind(this));
|
||||
}
|
||||
|
||||
onScriptLoad() {
|
||||
if (++this.loadCount === this.numScripts) {
|
||||
PluginManager.setup($plugins);
|
||||
}
|
||||
}
|
||||
|
||||
onScriptError(e) {
|
||||
this.printError("Failed to load", e.target._url);
|
||||
}
|
||||
|
||||
printError(name, message) {
|
||||
this.eraseLoadingSpinner();
|
||||
if (!document.getElementById("errorPrinter")) {
|
||||
const errorPrinter = document.createElement("div");
|
||||
errorPrinter.id = "errorPrinter";
|
||||
errorPrinter.innerHTML = this.makeErrorHtml(name, message);
|
||||
document.body.appendChild(errorPrinter);
|
||||
}
|
||||
}
|
||||
|
||||
makeErrorHtml(name, message) {
|
||||
const nameDiv = document.createElement("div");
|
||||
const messageDiv = document.createElement("div");
|
||||
nameDiv.id = "errorName";
|
||||
messageDiv.id = "errorMessage";
|
||||
nameDiv.innerHTML = name;
|
||||
messageDiv.innerHTML = message;
|
||||
return nameDiv.outerHTML + messageDiv.outerHTML;
|
||||
}
|
||||
|
||||
onWindowLoad() {
|
||||
if (!this.xhrSucceeded) {
|
||||
const message = "Your browser does not allow to read local files.";
|
||||
this.printError("Error", message);
|
||||
} else if (this.isPathRandomized()) {
|
||||
const message = "Please move the Game.app to a different folder.";
|
||||
this.printError("Error", message);
|
||||
} else if (this.error) {
|
||||
this.printError(this.error.name, this.error.message);
|
||||
} else {
|
||||
this.initEffekseerRuntime();
|
||||
}
|
||||
}
|
||||
|
||||
onWindowError(event) {
|
||||
if (!this.error) {
|
||||
this.error = event.error;
|
||||
}
|
||||
}
|
||||
|
||||
isPathRandomized() {
|
||||
// [Note] We cannot save the game properly when Gatekeeper Path
|
||||
// Randomization is in effect.
|
||||
return (
|
||||
typeof process === "object" &&
|
||||
process.mainModule.filename.startsWith("/private/var")
|
||||
);
|
||||
}
|
||||
|
||||
initEffekseerRuntime() {
|
||||
const onLoad = this.onEffekseerLoad.bind(this);
|
||||
const onError = this.onEffekseerError.bind(this);
|
||||
effekseer.initRuntime(effekseerWasmUrl, onLoad, onError);
|
||||
}
|
||||
|
||||
onEffekseerLoad() {
|
||||
this.eraseLoadingSpinner();
|
||||
SceneManager.run(Scene_Boot);
|
||||
}
|
||||
|
||||
onEffekseerError() {
|
||||
this.printError("Failed to load", effekseerWasmUrl);
|
||||
}
|
||||
}
|
||||
|
||||
const main = new Main();
|
||||
main.run();
|
||||
|
||||
//-----------------------------------------------------------------------------
|
10
js/plugins.js
Normal file
10
js/plugins.js
Normal file
File diff suppressed because one or more lines are too long
105
js/plugins/AltMenuScreen.js
Normal file
105
js/plugins/AltMenuScreen.js
Normal file
@ -0,0 +1,105 @@
|
||||
//=============================================================================
|
||||
// RPG Maker MZ - Alternative Menu Screen
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @target MZ
|
||||
* @plugindesc Alternative menu screen layout.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help AltMenuScreen.js
|
||||
*
|
||||
* This plugin changes the layout of the menu screen.
|
||||
* It puts the commands on the top and the status on the bottom.
|
||||
*
|
||||
* It does not provide plugin commands.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @target MZ
|
||||
* @plugindesc メニュー画面のレイアウトを変更します。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help AltMenuScreen.js
|
||||
*
|
||||
* このプラグインは、メニュー画面のレイアウトを変更します。
|
||||
* コマンドを上側に、ステータスを下側に配置します。
|
||||
*
|
||||
* プラグインコマンドはありません。
|
||||
*/
|
||||
|
||||
(() => {
|
||||
Scene_MenuBase.prototype.commandWindowHeight = function() {
|
||||
return this.calcWindowHeight(2, true);
|
||||
};
|
||||
|
||||
Scene_MenuBase.prototype.goldWindowHeight = function() {
|
||||
return this.calcWindowHeight(1, true);
|
||||
};
|
||||
|
||||
Scene_Menu.prototype.commandWindowRect = function() {
|
||||
const ww = Graphics.boxWidth;
|
||||
const wh = this.commandWindowHeight();
|
||||
const wx = 0;
|
||||
const wy = this.mainAreaTop();
|
||||
return new Rectangle(wx, wy, ww, wh);
|
||||
};
|
||||
|
||||
Scene_Menu.prototype.statusWindowRect = function() {
|
||||
const h1 = this.commandWindowHeight();
|
||||
const h2 = this.goldWindowHeight();
|
||||
const ww = Graphics.boxWidth;
|
||||
const wh = this.mainAreaHeight() - h1 - h2;
|
||||
const wx = 0;
|
||||
const wy = this.mainAreaTop() + this.commandWindowHeight();
|
||||
return new Rectangle(wx, wy, ww, wh);
|
||||
};
|
||||
|
||||
Scene_ItemBase.prototype.actorWindowRect = function() {
|
||||
const rect = Scene_Menu.prototype.statusWindowRect();
|
||||
rect.y = this.mainAreaBottom() - rect.height;
|
||||
return rect;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.maxCols = function() {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.numVisibleRows = function() {
|
||||
return 2;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.maxCols = function() {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.numVisibleRows = function() {
|
||||
return 1;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemImage = function(index) {
|
||||
const actor = this.actor(index);
|
||||
const rect = this.itemRectWithPadding(index);
|
||||
const w = Math.min(rect.width, 144);
|
||||
const h = Math.min(rect.height, 144);
|
||||
const lineHeight = this.lineHeight();
|
||||
this.changePaintOpacity(actor.isBattleMember());
|
||||
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2, w, h);
|
||||
this.changePaintOpacity(true);
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemStatus = function(index) {
|
||||
const actor = this.actor(index);
|
||||
const rect = this.itemRectWithPadding(index);
|
||||
const x = rect.x;
|
||||
const y = rect.y;
|
||||
const width = rect.width;
|
||||
const bottom = y + rect.height;
|
||||
const 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.placeBasicGauges(actor, x, bottom - lineHeight * 3, width);
|
||||
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
|
||||
};
|
||||
})();
|
126
js/plugins/AltSaveScreen.js
Normal file
126
js/plugins/AltSaveScreen.js
Normal file
@ -0,0 +1,126 @@
|
||||
//=============================================================================
|
||||
// RPG Maker MZ - Alternative Save Screen
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @target MZ
|
||||
* @plugindesc Alternative save/load screen layout.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help AltSaveScreen.js
|
||||
*
|
||||
* This plugin changes the layout of the save/load screen.
|
||||
* It puts the file list on the top and the details on the bottom.
|
||||
*
|
||||
* It does not provide plugin commands.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @target MZ
|
||||
* @plugindesc セーブ/ロード画面のレイアウトを変更します。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help AltSaveScreen.js
|
||||
*
|
||||
* このプラグインは、セーブ/ロード画面のレイアウトを変更します。
|
||||
* ファイル一覧を上側に、詳細を下側に配置します。
|
||||
*
|
||||
* プラグインコマンドはありません。
|
||||
*/
|
||||
|
||||
(() => {
|
||||
const _Scene_File_create = Scene_File.prototype.create;
|
||||
Scene_File.prototype.create = function() {
|
||||
_Scene_File_create.apply(this, arguments);
|
||||
this._listWindow.height = this._listWindow.fittingHeight(3);
|
||||
const x = 0;
|
||||
const y = this._listWindow.y + this._listWindow.height;
|
||||
const width = Graphics.boxWidth;
|
||||
const height = Graphics.boxHeight - y;
|
||||
const rect = new Rectangle(x, y, width, height);
|
||||
const statusWindow = new Window_SavefileStatus(rect);
|
||||
this._listWindow.mzkp_statusWindow = statusWindow;
|
||||
this.addWindow(statusWindow);
|
||||
};
|
||||
|
||||
const _Scene_File_start = Scene_File.prototype.start;
|
||||
Scene_File.prototype.start = function() {
|
||||
_Scene_File_start.apply(this, arguments);
|
||||
this._listWindow.ensureCursorVisible();
|
||||
this._listWindow.callUpdateHelp();
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.windowWidth = function() {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.maxCols = function() {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.itemHeight = function() {
|
||||
return this.lineHeight() * 2 + 16;
|
||||
};
|
||||
|
||||
const _Window_SavefileList_callUpdateHelp =
|
||||
Window_SavefileList.prototype.callUpdateHelp;
|
||||
Window_SavefileList.prototype.callUpdateHelp = function() {
|
||||
_Window_SavefileList_callUpdateHelp.apply(this, arguments);
|
||||
if (this.active && this.mzkp_statusWindow) {
|
||||
this.mzkp_statusWindow.setSavefileId(this.savefileId());
|
||||
}
|
||||
};
|
||||
|
||||
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(rect) {
|
||||
Window_Base.prototype.initialize.call(this, rect);
|
||||
this._savefileId = 1;
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.setSavefileId = function(id) {
|
||||
this._savefileId = id;
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.refresh = function() {
|
||||
const info = DataManager.savefileInfo(this._savefileId);
|
||||
const rect = this.contents.rect;
|
||||
this.contents.clear();
|
||||
this.resetTextColor();
|
||||
this.drawTitle(this._savefileId, rect.x, rect.y);
|
||||
if (info) {
|
||||
this.drawContents(info, rect);
|
||||
}
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawTitle = function(savefileId, x, y) {
|
||||
if (savefileId === 0) {
|
||||
this.drawText(TextManager.autosave, x, y, 180);
|
||||
} else {
|
||||
this.drawText(TextManager.file + " " + savefileId, x, y, 180);
|
||||
}
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawContents = function(info, rect) {
|
||||
const bottom = rect.y + rect.height;
|
||||
const playtimeY = bottom - this.lineHeight();
|
||||
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
|
||||
this.drawPartyfaces(info.faces, rect.x, bottom - 144);
|
||||
this.drawText(info.playtime, rect.x, playtimeY, rect.width, "right");
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawPartyfaces = function(faces, x, y) {
|
||||
if (faces) {
|
||||
for (let i = 0; i < faces.length; i++) {
|
||||
const data = faces[i];
|
||||
this.drawFace(data[0], data[1], x + i * 150, y);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
209
js/plugins/BBS_VersionDisplay.js
Normal file
209
js/plugins/BBS_VersionDisplay.js
Normal file
@ -0,0 +1,209 @@
|
||||
//=============================================================================
|
||||
// Bluebooth Plugins - Version Display
|
||||
// BBS_VersionDisplay.js
|
||||
//=============================================================================
|
||||
|
||||
//=============================================================================
|
||||
/*:
|
||||
* @title Version Display
|
||||
* @author Michael Morris (https://www.*******.com/bluebooth)
|
||||
* @date May 29, 2017
|
||||
* @filename BBS_VersionDisplay.js
|
||||
* If you enjoy my work, consider supporting me on *******!
|
||||
*
|
||||
* https://www.*******.com/bluebooth
|
||||
*
|
||||
* @plugindesc v1.02 Adds display of the game version to the title screen.
|
||||
* Special Thanks to Tsukihime for all the help.
|
||||
* Special Thanks to 'Ramza' Michael Sweeney for all the support.
|
||||
*
|
||||
* ============================================================================
|
||||
* Parameters
|
||||
* ============================================================================
|
||||
*
|
||||
* @param Game Version Number
|
||||
* @desc Game Version. Recommend using format [MILESTONE].[MAJOR].[MINOR]
|
||||
* Default: 1.0.0
|
||||
* @default 1.0.0
|
||||
*
|
||||
* @param Game Version Font
|
||||
* @desc Font face for the version number. Leave blank to use standard. See help.
|
||||
* @default
|
||||
*
|
||||
* @param Version Font Size
|
||||
* @desc Font size for the version number in the details window.
|
||||
* Default: 20
|
||||
* @default 20
|
||||
*
|
||||
* @param Show Version Number?
|
||||
* @desc true to show version number, false to hide. Useful if you want to store version
|
||||
* number without showing it.
|
||||
* Default: true
|
||||
* @default true
|
||||
*
|
||||
* @param Version Text Color
|
||||
* @desc Version font color. Use system color name.
|
||||
* Leave blank to use standard color.
|
||||
* @default white
|
||||
*
|
||||
* @param Version Outline Color
|
||||
* @desc Version text outline color. Use system color name.
|
||||
* Leave blank to use standard.
|
||||
* @default black
|
||||
*
|
||||
* @param Version Outline Width
|
||||
* @desc Version text outline width. Use system color number, or leave blank
|
||||
* blank to use standard.
|
||||
* @default 8
|
||||
*
|
||||
* @param Title Italic
|
||||
* @desc Version font in Italics? YES: true NO: false
|
||||
* Default: false
|
||||
* @default false
|
||||
*
|
||||
* @param Version Text Max Width
|
||||
* @desc Max width for the game version number label. Can contain formulae!
|
||||
* Default Graphics.width / 3
|
||||
* @default Graphics.width / 3
|
||||
*
|
||||
* ============================================================================
|
||||
* Terms of Use
|
||||
* ============================================================================
|
||||
* - Free for use in non-commercial projects and commercial products with credits
|
||||
*
|
||||
* @help
|
||||
* ============================================================================
|
||||
* Description
|
||||
* ============================================================================
|
||||
*
|
||||
* Adds the display of a customized version number to the Title Scene. Exposes
|
||||
* a variable to get version number at any time in play.
|
||||
*
|
||||
* Use script: $gameSystem.getVersion();
|
||||
*
|
||||
* ============================================================================
|
||||
* Change Log
|
||||
* ============================================================================
|
||||
* 1.02 - Fixed display bug pointed out by Michael 'Ramza' Sweeney when using
|
||||
* different resolutions.
|
||||
* 1.01 - Plugin finished.
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
//=============================================================================
|
||||
var Imported = Imported || {};
|
||||
var BBS = BBS || {};
|
||||
Imported.VersionDisplay = 1;
|
||||
BBS.VersionDisplay = BBS.VersionDisplay || {};
|
||||
|
||||
(function () {
|
||||
//=============================================================================
|
||||
// Parameter Variables
|
||||
//=============================================================================
|
||||
var parameters = PluginManager.parameters("BBS_VersionDisplay");
|
||||
var pVersionNumber = String(parameters["Game Version Number"] || "1.0.0");
|
||||
var pVersionFont = String(parameters["Game Version Font"] || "").trim();
|
||||
var pFontSize = Number(parameters["Version Font Size"] || 20);
|
||||
var pShowVersionNumber = eval(
|
||||
String(parameters["Show Version Number?"] || "true")
|
||||
);
|
||||
|
||||
var pVersionTextColor = String(parameters["Version Text Color"] || "white");
|
||||
var pVersionOutlineColor = String(
|
||||
parameters["Version Outline Color"] || "black"
|
||||
);
|
||||
var pVersionOutlineWidth = Number(parameters["Version Outline Width"] || 8);
|
||||
var pVersionItalic = eval(String(parameters["Title Italic"] || "false"));
|
||||
var pVersionWidth = String(
|
||||
parameters["Version Text Max Width"] || "Graphics.width / 3"
|
||||
);
|
||||
|
||||
var _version = pVersionNumber; // Track the current version of the game.
|
||||
var _saveVersion = pVersionNumber; // Track the version of the game last saved. This can be different from current game version.
|
||||
var _defaultVersion = "version 1.0.0"; // Value to use when no _version is found.
|
||||
|
||||
//=============================================================================
|
||||
// Game_System
|
||||
//=============================================================================
|
||||
Game_System.prototype.getVersion = function () {
|
||||
return _version;
|
||||
};
|
||||
|
||||
Game_System.prototype.getSaveVersion = function () {
|
||||
return _saveVersion;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Title
|
||||
//=============================================================================
|
||||
var BBS_VD_Scene_Title_createForeground =
|
||||
Scene_Title.prototype.createForeground;
|
||||
Scene_Title.prototype.createForeground = function () {
|
||||
BBS_VD_Scene_Title_createForeground.call(this);
|
||||
if (pShowVersionNumber) {
|
||||
this.drawGameVersion();
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Title.prototype.drawGameVersion = function () {
|
||||
var x = Graphics.width - Graphics.width / 3 - 18;
|
||||
var y = Graphics.height - 50;
|
||||
var maxWidth = eval(pVersionWidth); //Graphics.width / 3;
|
||||
|
||||
// Handle customization options.
|
||||
this._gameTitleSprite.bitmap.fontSize = pFontSize;
|
||||
this._gameTitleSprite.bitmap.fontItalic = pVersionItalic;
|
||||
|
||||
if (pVersionFont !== "") {
|
||||
this._gameTitleSprite.bitmap.fontFace = pVersionFont;
|
||||
}
|
||||
if (pVersionTextColor !== "") {
|
||||
this._gameTitleSprite.bitmap.textColor = pVersionTextColor;
|
||||
}
|
||||
if (pVersionOutlineColor !== "") {
|
||||
this._gameTitleSprite.bitmap.outlineColor = pVersionOutlineColor;
|
||||
}
|
||||
if (pVersionOutlineWidth !== "") {
|
||||
this._gameTitleSprite.bitmap.outlineWidth = pVersionOutlineWidth;
|
||||
}
|
||||
|
||||
// And finally... draw
|
||||
this._gameTitleSprite.bitmap.drawText(
|
||||
pVersionNumber,
|
||||
x,
|
||||
y,
|
||||
maxWidth,
|
||||
48,
|
||||
"right"
|
||||
);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// ConfigManager
|
||||
//=============================================================================
|
||||
var bbs_vd_Configmanager_makeData = ConfigManager.makeData;
|
||||
ConfigManager.makeData = function () {
|
||||
var config = bbs_vd_Configmanager_makeData.call(this);
|
||||
config.saveVersion = _saveVersion;
|
||||
return config;
|
||||
};
|
||||
|
||||
var bbs_vd_Configmanager_applyData = ConfigManager.applyData;
|
||||
ConfigManager.applyData = function (config) {
|
||||
bbs_vd_Configmanager_applyData.call(this, config);
|
||||
_saveVersion = this.readSaveVersion(config, "saveVersion");
|
||||
};
|
||||
|
||||
ConfigManager.readSaveVersion = function (config, name) {
|
||||
var value = config[name];
|
||||
if (value !== undefined) {
|
||||
return value;
|
||||
} else {
|
||||
return _defaultVersion;
|
||||
}
|
||||
};
|
||||
})(BBS.VersionDisplay);
|
||||
//=============================================================================
|
||||
// End of File
|
||||
//=============================================================================
|
106
js/plugins/ButtonPicture.js
Normal file
106
js/plugins/ButtonPicture.js
Normal file
@ -0,0 +1,106 @@
|
||||
//=============================================================================
|
||||
// RPG Maker MZ - Button Picture
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @target MZ
|
||||
* @plugindesc Makes a picture clickable.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help ButtonPicture.js
|
||||
*
|
||||
* This plugin provides a command to call a common event when a picture is
|
||||
* clicked.
|
||||
*
|
||||
* Use it in the following procedure.
|
||||
* 1. Execute "Show Picture" to display your button image.
|
||||
* 2. Call the plugin command "Set Button Picture".
|
||||
*
|
||||
* @command set
|
||||
* @text Set Button Picture
|
||||
* @desc Makes the specified picture clickable.
|
||||
*
|
||||
* @arg pictureId
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 100
|
||||
* @default 1
|
||||
* @text Picture Number
|
||||
* @desc Control number of the picture.
|
||||
*
|
||||
* @arg commonEventId
|
||||
* @type common_event
|
||||
* @default 1
|
||||
* @text Common Event
|
||||
* @desc Common event to call when the picture is clicked.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @target MZ
|
||||
* @plugindesc ピクチャをクリック可能にします。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help ButtonPicture.js
|
||||
*
|
||||
* このプラグインは、ピクチャのクリック時にコモンイベントを呼び出すコマンドを
|
||||
* 提供します。
|
||||
*
|
||||
* 次の手順で使用してください。
|
||||
* 1. 「ピクチャの表示」を実行して、ボタン画像を表示します。
|
||||
* 2. プラグインコマンド「ボタンピクチャの設定」を呼び出します。
|
||||
*
|
||||
* @command set
|
||||
* @text ボタンピクチャの設定
|
||||
* @desc 指定したピクチャをクリック可能にします。
|
||||
*
|
||||
* @arg pictureId
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 100
|
||||
* @default 1
|
||||
* @text ピクチャ番号
|
||||
* @desc ピクチャの管理番号です。
|
||||
*
|
||||
* @arg commonEventId
|
||||
* @type common_event
|
||||
* @default 1
|
||||
* @text コモンイベント
|
||||
* @desc ピクチャがクリックされた時に呼び出すコモンイベントです。
|
||||
*/
|
||||
|
||||
(() => {
|
||||
const pluginName = "ButtonPicture";
|
||||
|
||||
PluginManager.registerCommand(pluginName, "set", args => {
|
||||
const pictureId = Number(args.pictureId);
|
||||
const commonEventId = Number(args.commonEventId);
|
||||
const picture = $gameScreen.picture(pictureId);
|
||||
if (picture) {
|
||||
picture.mzkp_commonEventId = commonEventId;
|
||||
}
|
||||
});
|
||||
|
||||
Sprite_Picture.prototype.isClickEnabled = function() {
|
||||
const picture = this.picture();
|
||||
return picture && picture.mzkp_commonEventId && !$gameMessage.isBusy();
|
||||
};
|
||||
|
||||
Sprite_Picture.prototype.onClick = function() {
|
||||
$gameTemp.reserveCommonEvent(this.picture().mzkp_commonEventId);
|
||||
};
|
||||
|
||||
Spriteset_Base.prototype.mzkp_isAnyPicturePressed = function() {
|
||||
return this._pictureContainer.children.some(sprite =>
|
||||
sprite.isPressed()
|
||||
);
|
||||
};
|
||||
|
||||
const _Scene_Map_isAnyButtonPressed =
|
||||
Scene_Map.prototype.isAnyButtonPressed;
|
||||
Scene_Map.prototype.isAnyButtonPressed = function() {
|
||||
return (
|
||||
_Scene_Map_isAnyButtonPressed.apply(this, arguments) ||
|
||||
this._spriteset.mzkp_isAnyPicturePressed()
|
||||
);
|
||||
};
|
||||
})();
|
57
js/plugins/HealOnLevelUp.js
Normal file
57
js/plugins/HealOnLevelUp.js
Normal file
@ -0,0 +1,57 @@
|
||||
//=============================================================================
|
||||
// Heal on Level Up
|
||||
// by Shaz
|
||||
// Last Update: 2015.10.25
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @plugindesc Allows you to heal actors on level up
|
||||
* @author Shaz
|
||||
*
|
||||
* @param All HP
|
||||
* @desc Heal HP for all party members (Y/N)
|
||||
* @default Y
|
||||
*
|
||||
* @param All MP
|
||||
* @desc Heal MP for all party members (Y/N)
|
||||
* @default Y
|
||||
*
|
||||
* @param All States
|
||||
* @desc Remove states for all party members (Y/N)
|
||||
* @default Y
|
||||
*
|
||||
* @help This plugin does not provide plugin commands
|
||||
*
|
||||
* If you only want to set SOME actors to have the above properties, add
|
||||
* the following tags to the actor notebox:
|
||||
* <LUHealHP>
|
||||
* <LUHealMP>
|
||||
* <LUHealStates>
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
||||
var parameters = PluginManager.parameters('HealOnLevelUp');
|
||||
var healHP = (parameters['All HP'].toUpperCase() || '') === 'Y';
|
||||
var healMP = (parameters['All MP'].toUpperCase() || '') === 'Y';
|
||||
var healStates = (parameters['All States'].toUpperCase() || '') === 'Y';
|
||||
|
||||
var _Game_Actor_levelUp = Game_Actor.prototype.levelUp;
|
||||
Game_Actor.prototype.levelUp = function() {
|
||||
_Game_Actor_levelUp.call(this);
|
||||
|
||||
if (healHP || this.actor().meta.LUHealHP) {
|
||||
this._hp = this.mhp;
|
||||
}
|
||||
|
||||
if (healMP || this.actor().meta.LUHealMP) {
|
||||
this._mp = this.mmp;
|
||||
}
|
||||
|
||||
if (healStates || this.actor().meta.LUHealStates) {
|
||||
this.clearStates();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
})();
|
116
js/plugins/TextPicture.js
Normal file
116
js/plugins/TextPicture.js
Normal file
@ -0,0 +1,116 @@
|
||||
//=============================================================================
|
||||
// RPG Maker MZ - Text Picture
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @target MZ
|
||||
* @plugindesc Displays text as a picture.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help TextPicture.js
|
||||
*
|
||||
* This plugin provides a command to show text as a picture.
|
||||
*
|
||||
* Use it in the following procedure.
|
||||
* 1. Call the plugin command "Set Text Picture".
|
||||
* 2. Execute "Show Picture" without specifying an image.
|
||||
*
|
||||
* @command set
|
||||
* @text Set Text Picture
|
||||
* @desc Sets text to display as a picture.
|
||||
* After this, execute "Show Picture" without specifying an image.
|
||||
*
|
||||
* @arg text
|
||||
* @type multiline_string
|
||||
* @text Text
|
||||
* @desc Text to display as a picture.
|
||||
* Control characters are allowed.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @target MZ
|
||||
* @plugindesc テキストをピクチャとして表示します。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help TextPicture.js
|
||||
*
|
||||
* このプラグインは、テキストをピクチャとして表示するコマンドを提供します。
|
||||
*
|
||||
* 次の手順で使用してください。
|
||||
* 1. プラグインコマンド「テキストピクチャの設定」を呼び出します。
|
||||
* 2. 画像を指定せずに「ピクチャの表示」を実行します。
|
||||
*
|
||||
* @command set
|
||||
* @text テキストピクチャの設定
|
||||
* @desc ピクチャとして表示するテキストを設定します。
|
||||
* この後、画像を指定せずに「ピクチャの表示」を実行してください。
|
||||
*
|
||||
* @arg text
|
||||
* @type multiline_string
|
||||
* @text テキスト
|
||||
* @desc ピクチャとして表示するテキストです。
|
||||
* 制御文字が使用可能です。
|
||||
*/
|
||||
|
||||
(() => {
|
||||
const pluginName = "TextPicture";
|
||||
let textPictureText = "";
|
||||
|
||||
PluginManager.registerCommand(pluginName, "set", args => {
|
||||
textPictureText = String(args.text);
|
||||
});
|
||||
|
||||
const _Game_Picture_show = Game_Picture.prototype.show;
|
||||
Game_Picture.prototype.show = function() {
|
||||
_Game_Picture_show.apply(this, arguments);
|
||||
if (this._name === "" && textPictureText) {
|
||||
this.mzkp_text = textPictureText;
|
||||
this.mzkp_textChanged = true;
|
||||
textPictureText = "";
|
||||
}
|
||||
};
|
||||
|
||||
const _Sprite_Picture_destroy = Sprite_Picture.prototype.destroy;
|
||||
Sprite_Picture.prototype.destroy = function() {
|
||||
destroyTextPictureBitmap(this.bitmap);
|
||||
_Sprite_Picture_destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
const _Sprite_Picture_updateBitmap = Sprite_Picture.prototype.updateBitmap;
|
||||
Sprite_Picture.prototype.updateBitmap = function() {
|
||||
_Sprite_Picture_updateBitmap.apply(this, arguments);
|
||||
if (this.visible && this._pictureName === "") {
|
||||
const picture = this.picture();
|
||||
const text = picture ? picture.mzkp_text || "" : "";
|
||||
const textChanged = picture && picture.mzkp_textChanged;
|
||||
if (this.mzkp_text !== text || textChanged) {
|
||||
this.mzkp_text = text;
|
||||
destroyTextPictureBitmap(this.bitmap);
|
||||
this.bitmap = createTextPictureBitmap(text);
|
||||
picture.mzkp_textChanged = false;
|
||||
}
|
||||
} else {
|
||||
this.mzkp_text = "";
|
||||
}
|
||||
};
|
||||
|
||||
function createTextPictureBitmap(text) {
|
||||
const tempWindow = new Window_Base(new Rectangle());
|
||||
const size = tempWindow.textSizeEx(text);
|
||||
tempWindow.padding = 0;
|
||||
tempWindow.move(0, 0, size.width, size.height);
|
||||
tempWindow.createContents();
|
||||
tempWindow.drawTextEx(text, 0, 0, 0);
|
||||
const bitmap = tempWindow.contents;
|
||||
tempWindow.contents = null;
|
||||
tempWindow.destroy();
|
||||
bitmap.mzkp_isTextPicture = true;
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
function destroyTextPictureBitmap(bitmap) {
|
||||
if (bitmap && bitmap.mzkp_isTextPicture) {
|
||||
bitmap.destroy();
|
||||
}
|
||||
}
|
||||
})();
|
7873
js/plugins/VisuMZ_0_CoreEngine.js
Normal file
7873
js/plugins/VisuMZ_0_CoreEngine.js
Normal file
File diff suppressed because one or more lines are too long
17276
js/plugins/VisuMZ_1_BattleCore.js
Normal file
17276
js/plugins/VisuMZ_1_BattleCore.js
Normal file
File diff suppressed because one or more lines are too long
1746
js/plugins/VisuMZ_2_BattleSystemSTB.js
Normal file
1746
js/plugins/VisuMZ_2_BattleSystemSTB.js
Normal file
File diff suppressed because one or more lines are too long
2418
js/plugins/VisuMZ_2_QuestSystem.js
Normal file
2418
js/plugins/VisuMZ_2_QuestSystem.js
Normal file
File diff suppressed because one or more lines are too long
1117
js/plugins/VisuMZ_3_SideviewBattleUI.js
Normal file
1117
js/plugins/VisuMZ_3_SideviewBattleUI.js
Normal file
File diff suppressed because one or more lines are too long
6421
js/rmmz_core.js
Normal file
6421
js/rmmz_core.js
Normal file
File diff suppressed because it is too large
Load Diff
3116
js/rmmz_managers.js
Normal file
3116
js/rmmz_managers.js
Normal file
File diff suppressed because it is too large
Load Diff
11307
js/rmmz_objects.js
Normal file
11307
js/rmmz_objects.js
Normal file
File diff suppressed because it is too large
Load Diff
3583
js/rmmz_scenes.js
Normal file
3583
js/rmmz_scenes.js
Normal file
File diff suppressed because it is too large
Load Diff
3699
js/rmmz_sprites.js
Normal file
3699
js/rmmz_sprites.js
Normal file
File diff suppressed because it is too large
Load Diff
6630
js/rmmz_windows.js
Normal file
6630
js/rmmz_windows.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user