This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fileName = 'TraitConditions.js'; // ダウンロードしたいプラグインのファイル名 | |
| var url = 'https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/' + fileName; | |
| var path = require('path'); | |
| var projectBase = path.dirname(process.mainModule.filename); | |
| var downloadPath = path.join(projectBase, 'js/plugins/') + fileName; | |
| var childProcess = require('child_process'); | |
| var command = 'bitsadmin.exe /TRANSFER PLUGIN_DOWNLOAD ' + url + ' ' + downloadPath; | |
| console.log('ExecuteCommand : ' + command); | |
| childProcess.exec(command, function(error, stdout, stderr) { | |
| console.log(stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (pluginParam) { | |
| var _Window_Message_processEscapeCharacter = Window_Message.prototype.processEscapeCharacter; | |
| Window_Message.prototype.processEscapeCharacter = function(code, textState) { | |
| _Window_Message_processEscapeCharacter.apply(this, arguments); | |
| console.log('aaaa'); | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var url = 'https://twitter.com/triacontane'; | |
| if (Utils.isNwjs()) { | |
| var exec = require('child_process').exec; | |
| switch (process.platform) { | |
| case 'win32': | |
| exec('rundll32.exe url.dll,FileProtocolHandler "' + url + '"'); | |
| break; | |
| default: | |
| exec('open "' + url + '"'); | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var path = require('path'); | |
| // base:実行中のプロジェクトのルートパス | |
| var base = path.dirname(process.mainModule.filename); | |
| // filePath:base + img/pictures | |
| var filePath = path.join(base, 'img/pictures/'); | |
| var fs = require('fs'); | |
| // img/pictures配下のファイルに対して繰り返し処理を実行 | |
| fs.readdirSync(filePath).forEach(function(fileName) { | |
| console.log(fileName); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // アイテム画面 | |
| SceneManager.push(Scene_Item); | |
| // スキル、ステータス、装備画面 | |
| var actor = $gameActors.actor(1); | |
| var bitmap = ImageManager.loadFace(actor.faceName(), 0); | |
| bitmap.addLoadListener(function() { | |
| $gameParty.setMenuActor(actor); | |
| SceneManager.push(Scene_Skill); | |
| // SceneManager.push(Scene_Status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var strJSON = undefined; | |
| (function() { | |
| 'use strict'; | |
| var strJSON = 'aaa'; | |
| var testFunc = function() { | |
| strJSON += 'bbb'; | |
| var testFunc2 = function() { | |
| strJSON += 'ccc'; | |
| }; | |
| testFunc2(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var min = $gameVariables.value(1); | |
| var max = $gameVariables.value(2); | |
| $gameVariables.setValue(3, min + Math.randomInt(max - min + 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pictName = 'ピクチャ名'; | |
| var bitmap = ImageManager.loadPicture(pictName); | |
| bitmap.addLoadListener(function() { | |
| $gameScreen.picture(ピクチャ番号)._name = pictName; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var getClassName = function(object) { | |
| return object.constructor.toString().replace(/function\s+(.*)\s*\([\s\S]*/m, '$1'); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* アイコンを表示するために変更した箇所 開始 */ | |
| var _Window_Options_drawItem = Window_Options.prototype.drawItem; | |
| Window_Options.prototype.drawItem = function(index) { | |
| _Window_Options_drawItem.apply(this, arguments); | |
| var rect = this.itemRectForText(index); | |
| this.drawIcon(this.statusIcon(index), rect.width - Window_Base._iconWidth, rect.y + 2); | |
| }; | |
| Window_Options.prototype.statusIcon = function(index) { | |
| var symbol = this.commandSymbol(index); |