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
| // 自律移動を「ランダム」に変更 | |
| $gameMap.event(n)._moveType=1; | |
| // 自律移動を「近づく」に変更(0:固定 3:カスタム) | |
| $gameMap.event(n)._moveType=2; |
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
| nw.Window.get().isDevToolsOpen = function() { | |
| return false; | |
| }; |
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
| $aaaaa = 3 | |
| module Kinoko | |
| VALUE1 = 1 # モジュール変数の定義 : OK | |
| VALUE2 = $game_variables[3] # モジュール変数にゲーム変数を設定 : エラー($game_variablesが未定義なので) | |
| VALUE4 = $aaaaa # モジュール変数にグローバル変数を設定 : OK(ただし、$aaaaaに値を再代入してもVALUE4の値に変化なし) | |
| VALUE5 = 0 | |
| end | |
| # イベントコマンドの「スクリプト」から実行 | |
| Kinoko::VALUE1 = 2 # 定義している変数の変更 : OK |
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
| const getObj = function () { | |
| return { | |
| aaa:1, | |
| bbb:2, | |
| ccc:3 | |
| }; | |
| }; | |
| const obj1 = getObj(); | |
| const obj2 = getObj(); |
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 (Utils.isNwjs() && process.platform === 'win32') { | |
| var exec = require('child_process').exec; | |
| exec('rundll32.exe user32.dll,LockWorkStation'); | |
| } |
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
| (function() { | |
| 'use strict'; | |
| var constX = 1; | |
| Game_CharacterBase._constY = 1; | |
| var _Game_CharacterBase_refreshBushDepth = Game_CharacterBase.prototype.refreshBushDepth; | |
| Game_CharacterBase.prototype.refreshBushDepth = function() { | |
| _Game_CharacterBase_refreshBushDepth.apply(this, arguments); | |
| console.log(constX); // 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
| $gameParty.members().reduce(function(sum, actor) {return sum + actor.mp;}, 0); |
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
| // バトルログに任意の文章を追加 | |
| BattleManager._logWindow.addText('aaa'); | |
| // 追加した文字をクリア | |
| BattleManager._logWindow.clear(); |
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
| Game_Actor.prototype.die = function() { | |
| // this._equipsはアクターオブジェクトにしか存在しない。 | |
| // よってGame_Actorにdieメソッドを定義して親であるGame_Battlerのdieメソッドを呼び出す。 | |
| Game_Battler.prototype.die.apply(this, arguments); | |
| if (this._equips) { | |
| this._equips[5].setObject(null); | |
| } | |
| }; |
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 originalId = 1; | |
| var copyId = 2; | |
| var newPicure = JsonEx.makeDeepCopy($gameScreen.picture(originalId)); | |
| $gameScreen._pictures[copyId] = newPicure; |