Skip to content

Instantly share code, notes, and snippets.

@elleonard
elleonard / HotReloadPluginParameters.ts
Last active January 3, 2024 04:44
RPGツクールMZ プラグインパラメータのホットリロード (没案)
/// <reference path="./HotReloadPlugins.d.ts" />
import { pluginName } from '../../common/pluginName';
import { pluginParametersOf } from '../../common/pluginParametersOf';
import { command_hotReload } from './_build/DarkPlasma_HotReloadPlugins_commands';
PluginManager.registerCommand(pluginName, command_hotReload, function () {
reloadScript("js/plugins.js");
});
@elleonard
elleonard / DarkPlasma_FormationWithFace.js
Created December 9, 2023 14:53
RPGツクールMZ DarkPlasma_Formationで歩行グラフィックを顔グラフィックに差し替えるプラグインの実装例
/*:
* @target MZ
* @author DarkPlasma
* @plugindesc DarkPlasma_Formationで歩行グラフィックを顔グラフィックに差し替える
* @base DarkPlasma_Formation
* @orderAfter DarkPlasma_Formation
*
* @help
* DarkPlasma_Formationの歩行グラフィックを
* 顔グラフィックに差し替える実装例です。
@elleonard
elleonard / ItemWithPartyTraits_NRP_TraitsPlus.js
Last active December 2, 2023 06:55
RPGツクールMZ NRP_TraitsPlusの通常能力値加算とItemWithPartyTraitsを使う場合の補助プラグインの実装例
/*:
* @target MZ
* @author DarkPlasma
* @plugindesc NRP_TraitsPlusとItemWithPartyTraitsを使う
* @base DarkPlasma_ItemWithPartyTraits
* @base NRP_TraitsPlus
* @orderAfter NRP_TraitsPlus
*
* @help
* NRP_TraitsPlus(1.02)で通常能力値を加算設定をONにしている場合
@elleonard
elleonard / GlossaryPreloadImagesSample.js
Created November 2, 2023 13:00
RPGツクールMV 用語集シーンセットアップ時に何らか画像をロードするプラグインの例
/*:
* @plugindesc 用語集シーンセットアップ時に何らか画像をロードするプラグインの例
* @author DarkPlasma
* @license MIT
*
* @target MV
* @help
* SceneGlossary.jsの用語集シーンのセットアップ時に
* 何らかの画像をロードするプラグインの例です。
*
@elleonard
elleonard / FadeBugFix.js
Last active October 15, 2023 03:08
RPGツクールMV シーンチェンジ時のフェードイン・アウトが中途半端に止まるバグの修正プラグイン
/*:
* @plugindesc シーンチェンジ時のフェードイン・アウトが中途半端に止まるバグの修正
* @author DarkPlasma
* @license MIT
*
* @target MV
* @help
* シーンチェン時のフェードイン・アウトが中途半端に止まるバグを修正します。
*/
(() => {
@elleonard
elleonard / BlendModeAndFilter.js
Created October 5, 2023 17:49
RPGツクールMZ ピクチャの合成方法「乗算」と色調変更を併用すると真っ黒になるバグ対策プラグイン
/*:
* @target MZ
* @author DarkPlasma
* @plugindesc ピクチャの合成方法「乗算」と色調変更を使うと真っ黒になるバグ対策
*/
(() => {
'use strict';
function Sprite_Picture_BlendModeAndFilterMixIn(spritePicture) {
Object.defineProperty(spritePicture, "blendMode", {
@elleonard
elleonard / SaveProgress.js
Last active July 31, 2023 13:44
RPGツクールMZ セーブデータのメタ情報に特定の変数の値を追加するプラグインのサンプル
(() => {
'use strict';
const PROGRESS_VARIABLE_ID = 15;
const _makeSavefileInfo = DataManager.makeSavefileInfo;
DataManager.makeSavefileInfo = function () {
const info = _makeSavefileInfo.call(this);
info.savestring = $gameVariables.value(PROGRESS_VARIABLE_ID) || "";
return info;
@elleonard
elleonard / BuffValueByUser.js
Created July 30, 2023 06:48
RPGツクールMZ 強化・弱体の能力値増減を使用者の能力値依存固定値にするプラグインのサンプル
/*:
* @target MZ
* @plugindesc 強化・弱体の能力値増減を使用者の能力値依存固定値にする
*/
(() => {
'use strict';
const pluginName = document.currentScript.src.replace(/^.*\/(.*).js$/, function () {
return arguments[1];
});
@elleonard
elleonard / ExtendFormaion.js
Last active August 6, 2023 11:45
DarkPlasma_Formation で戦闘シーンの並び替え関連ウィンドウのレイアウトを変更したり、並び替えコマンドの有効条件を変更するサンプル
/*:
* @target MZ
* @plugindesc 並び替え画面レイアウトとコマンド無効条件
*
* @base DarkPlasma_Formation
* @base DarkPlasma_FormationInBattle
* @orderAfter DarkPlasma_Formation
* @orderAfter DarkPlasma_FormationInBattle
*
* @help
@elleonard
elleonard / TPdamageKAI2.js
Last active July 22, 2023 06:23
RPGツクールMV TPダメージプラグインのサンプル
/*:
* @plugindesc TPダメージプラグインのサンプル
*
* @param BonusRate
* @type number
* @decimals 1
* @default 1.3
*
* @target MV
* @help