このページをGitHubで編集する

Class: Game_Interpreter

Game_Interpreter (depth)

new Game_Interpreter (depth)

イベントコマンドを実行するクラス。 プラグインコマンドを処理するpluginCommandなどを含む。

イベントコマンドの[スクリプト]を実行する際は、このオブジェクトのインスタンスが this になるので、少々乱暴だが拡張コマンドをメソッドとして追加すると便利。

Parameters:
Name Type Description
depth Number  
Properties:
Name Type Description
_depth Number  
_branch Object  
_params Array.<*>  
_indent Number  
_frameCount Number  
_freezeChecker Number  
_mapId Number  
_eventId Number  
_list Array.<RPG.EventCommand>  
_index Number  
_waitCount Number  
_waitMode String  
_comments String  
_character Game_Event  
_childInterpreter Game_Interpreter  

Methods

(static) requestImages (list, commonList opt)

コマンドに含まれる画像を用意する。

Parameters:
Name Type Attributes Description
list Array.<RPG.EventCommand>   コマンドの配列
commonList Array.<*> <optional>  

changeHp (target, value, allowDeath)

[HP]を指定値により増減する。

Parameters:
Name Type Description
target Game_Battler 対象アクターまたは敵
value Number 変更するHPの量
allowDeath Boolean 死亡していても適用するか

character (param) → {Game_Character}

Parameters:
Name Type Description
param Number  
Returns:
Type
Game_Character

checkFreeze () → {Boolean}

Checks if the interpreter has frozen.

Returns:
Type
Boolean

checkOverflow ()

clear ()

Clears the interpreter.

command101 () → {Boolean}

Show Text

Returns:
Type
Boolean

command102 () → {Boolean}

Show Choices

Returns:
Type
Boolean

command103 () → {Boolean}

Input Number

Returns:
Type
Boolean

command104 () → {Boolean}

Select Item

Returns:
Type
Boolean

command105 () → {Boolean}

Show Scrolling Text

Returns:
Type
Boolean

command108 () → {Boolean}

Comment

Returns:
Type
Boolean

command111 () → {Boolean}

Conditional Branch

Returns:
Type
Boolean

command112 () → {Boolean}

Loop

Returns:
Type
Boolean

command113 () → {Boolean}

Break Loop

Returns:
Type
Boolean

command115 () → {Boolean}

Exit Event Processing

Returns:
Type
Boolean

command117 () → {Boolean}

Common Event

Returns:
Type
Boolean

command118 () → {Boolean}

Label

Returns:
Type
Boolean

command119 () → {Boolean}

Jump to Label

Returns:
Type
Boolean

command121 () → {Boolean}

Control Switches

Returns:
Type
Boolean

command122 () → {Boolean}

Control Variables

Returns:
Type
Boolean

command123 () → {Boolean}

Control Self Switch

Returns:
Type
Boolean

command124 () → {Boolean}

Control Timer

Returns:
Type
Boolean

command125 () → {Boolean}

Change Gold

Returns:
Type
Boolean

command126 () → {Boolean}

Change Items

Returns:
Type
Boolean

command127 () → {Boolean}

Change Weapons

Returns:
Type
Boolean

command128 () → {Boolean}

Change Armors

Returns:
Type
Boolean

command129 () → {Boolean}

Change Party Member

Returns:
Type
Boolean

command132 () → {Boolean}

Change Battle BGM

Returns:
Type
Boolean

command133 () → {Boolean}

Change Victory ME

Returns:
Type
Boolean

command134 () → {Boolean}

Change Save Access

Returns:
Type
Boolean

command135 () → {Boolean}

Change Menu Access

Returns:
Type
Boolean

command136 () → {Boolean}

Change Encounter Disable

Returns:
Type
Boolean

command137 () → {Boolean}

Change Formation Access

Returns:
Type
Boolean

command138 () → {Boolean}

Change Window Color

Returns:
Type
Boolean

command139 () → {Boolean}

Change Defeat ME

Returns:
Type
Boolean

command140 () → {Boolean}

Change Vehicle BGM

Returns:
Type
Boolean

command201 () → {Boolean}

Transfer Player

Returns:
Type
Boolean

command202 () → {Boolean}

Set Vehicle Location

Returns:
Type
Boolean

command203 () → {Boolean}

Set Event Location

Returns:
Type
Boolean

command204 () → {Boolean}

Set Scroll Map

Returns:
Type
Boolean

command205 () → {Boolean}

Set Movement Route

Returns:
Type
Boolean

command206 () → {Boolean}

Getting On and Off Vehicles

Returns:
Type
Boolean

command211 () → {Boolean}

Change Transparency

Returns:
Type
Boolean

command212 () → {Boolean}

Show Animation

Returns:
Type
Boolean

command213 () → {Boolean}

Show Balloon Icon

Returns:
Type
Boolean

command214 () → {Boolean}

Erase Event

Returns:
Type
Boolean

command216 () → {Boolean}

Change Player Followers

Returns:
Type
Boolean

command217 () → {Boolean}

Gather Followers

Returns:
Type
Boolean

command221 () → {Boolean}

Fadeout Screen

Returns:
Type
Boolean

command222 () → {Boolean}

Fadein Screen

Returns:
Type
Boolean

command223 () → {Boolean}

Tint Screen

Returns:
Type
Boolean

command224 () → {Boolean}

Flash Screen

Returns:
Type
Boolean

command225 () → {Boolean}

Shake Screen

Returns:
Type
Boolean

command230 () → {Boolean}

Wait

Returns:
Type
Boolean

command231 () → {Boolean}

Show Picture

Returns:
Type
Boolean

command232 () → {Boolean}

Move Picture

Returns:
Type
Boolean

command233 () → {Boolean}

Rotate Picture

Returns:
Type
Boolean

command234 () → {Boolean}

Tint Picture

Returns:
Type
Boolean

command235 () → {Boolean}

Erase Picture

Returns:
Type
Boolean

command236 () → {Boolean}

Set Weather Effect

Returns:
Type
Boolean

command241 () → {Boolean}

Play BGM

Returns:
Type
Boolean

command242 () → {Boolean}

Fadeout BGM

Returns:
Type
Boolean

command243 () → {Boolean}

Save BGM

Returns:
Type
Boolean

command244 () → {Boolean}

Resume BGM

Returns:
Type
Boolean

command245 () → {Boolean}

Play BGS

Returns:
Type
Boolean

command246 () → {Boolean}

Fadeout BGS

Returns:
Type
Boolean

command249 () → {Boolean}

Play ME

Returns:
Type
Boolean

command250 () → {Boolean}

Play SE

Returns:
Type
Boolean

command251 () → {Boolean}

Stop SE

Returns:
Type
Boolean

command261 () → {Boolean}

Play Movie

Returns:
Type
Boolean

command281 () → {Boolean}

Change Map Name Display

Returns:
Type
Boolean

command282 () → {Boolean}

Change Tileset

Returns:
Type
Boolean

command283 () → {Boolean}

Change Battle Back

Returns:
Type
Boolean

command284 () → {Boolean}

Change Parallax

Returns:
Type
Boolean

command285 () → {Boolean}

Get Location Info

Returns:
Type
Boolean

command301 () → {Boolean}

Battle Processing

Returns:
Type
Boolean

command302 () → {Boolean}

Shop Processing

Returns:
Type
Boolean

command303 () → {Boolean}

Name Input Processing

Returns:
Type
Boolean

command311 () → {Boolean}

Change HP

Returns:
Type
Boolean

command312 () → {Boolean}

Change MP

Returns:
Type
Boolean

command313 () → {Boolean}

Change State

Returns:
Type
Boolean

command314 () → {Boolean}

Recover All

Returns:
Type
Boolean

command315 () → {Boolean}

Change EXP

Returns:
Type
Boolean

command316 () → {Boolean}

Change Level

Returns:
Type
Boolean

command317 () → {Boolean}

Change Parameter

Returns:
Type
Boolean

command318 () → {Boolean}

Change Skill

Returns:
Type
Boolean

command319 () → {Boolean}

Change Equipment

Returns:
Type
Boolean

command320 () → {Boolean}

Change Name

Returns:
Type
Boolean

command321 () → {Boolean}

Change Class

Returns:
Type
Boolean

command322 () → {Boolean}

Change Actor Images

Returns:
Type
Boolean

command323 () → {Boolean}

Change Vehicle Image

Returns:
Type
Boolean

command324 () → {Boolean}

Change Nickname

Returns:
Type
Boolean

command325 () → {Boolean}

Change Profile

Returns:
Type
Boolean

command326 () → {Boolean}

Change TP

Returns:
Type
Boolean

command331 () → {Boolean}

Change Enemy HP

Returns:
Type
Boolean

command332 () → {Boolean}

Change Enemy MP

Returns:
Type
Boolean

command333 () → {Boolean}

Change Enemy State

Returns:
Type
Boolean

command334 () → {Boolean}

Enemy Recover All

Returns:
Type
Boolean

command335 () → {Boolean}

Enemy Appear

Returns:
Type
Boolean

command336 () → {Boolean}

Enemy Transform

Returns:
Type
Boolean

command337 () → {Boolean}

Show Battle Animation

Returns:
Type
Boolean

command339 () → {Boolean}

Force Action

Returns:
Type
Boolean

command340 () → {Boolean}

Abort Battle

Returns:
Type
Boolean

command342 () → {Boolean}

Change Enemy TP

Returns:
Type
Boolean

command351 () → {Boolean}

Open Menu Screen

Returns:
Type
Boolean

command352 () → {Boolean}

Open Save Screen

Returns:
Type
Boolean

command353 () → {Boolean}

Game Over

Returns:
Type
Boolean

command354 () → {Boolean}

Return to Title Screen

Returns:
Type
Boolean

command355 () → {Boolean}

Script

Returns:
Type
Boolean

command356 () → {Boolean}

[プラグインコマンド]の処理。

Returns:
Type
Boolean

command402 () → {Boolean}

When [**]

Returns:
Type
Boolean

command403 () → {Boolean}

When Cancel

Returns:
Type
Boolean

command411 () → {Boolean}

Else

Returns:
Type
Boolean

command413 () → {Boolean}

Repeat Above

Returns:
Type
Boolean

command601 () → {Boolean}

If Win

Returns:
Type
Boolean

command602 () → {Boolean}

If Escape

Returns:
Type
Boolean

command603 () → {Boolean}

If Lose

Returns:
Type
Boolean

currentCommand () → {RPG.EventCommand}

Returns the current event command.

Returns:
Type
RPG.EventCommand

eventId () → {Number}

Returns the currrent eventId.

Returns:
Type
Number

executeCommand () → {Boolean}

Executes the event command; returns true or false based on execution.

Returns:
Type
Boolean

fadeSpeed () → {Number}

Returns:
Type
Number

gameDataOperand (type, param1, param2) → {Number}

Parameters:
Name Type Description
type Number  
param1 Number  
param2 Number  
Returns:
Type
Number

initialize ()

オブジェクト生成時の初期化。

isRunning () → {Boolean}

Returns true if the interpreter is running.

Returns:
Type
Boolean

iterateActorEx (param1, param2, callback)

Parameters:
Name Type Description
param1 Number  
param2 Number  
callback function  

iterateActorId (param, callback)

Parameters:
Name Type Description
param Number  
callback function  

iterateActorIndex (param, callback)

Parameters:
Name Type Description
param Number  
callback function  

iterateBattler (param1, param2, callback)

Parameters:
Name Type Description
param1 Number  
param2 Number  
callback function  

iterateEnemyIndex (param, callback)

Parameters:
Name Type Description
param Number  
callback function  

jumpTo (index)

Parameters:
Name Type Description
index Number  

nextEventCode () → {Number}

Returns the next event code.

Returns:
Type
Number

operateValue (operation, operandType, operand) → {Number}

Parameters:
Name Type Description
operation Number  
operandType Number  
operand Number  
Returns:
Type
Number

operateVariable (variableId, operationType, value)

Parameters:
Name Type Description
variableId Number  
operationType Number  
value Number  

pluginCommand (command, args)

プラグインコマンドを受け取るメソッド。 このメソッドにプラグイン毎の処理を追加。 Example のような書き方が定番。

Parameters:
Name Type Description
command String コマンド名
args Array.<String> 引数の配列
Example
const _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function ( command, args ){
   _Game_Interpreter_pluginCommand.call( this, command, args );
  // ここにプラグインごとのコマンド名の判定と実行内容を書く

setup (list, eventId)

Sets up the interpreter with the list of event commands, and the given event Id.

Parameters:
Name Type Description
list Array.<RPG.EventCommand>  
eventId Number  

setupChild (list, eventId)

Parameters:
Name Type Description
list Array.<RPG.EventCommand>  
eventId Number  

setupChoices (params)

Parameters:
Name Type Description
params Array.<*>  

setupItemChoice (params)

Parameters:
Name Type Description
params Array.<Number>  

setupNumInput (params)

Parameters:
Name Type Description
params Array.<Number>  

setupReservedCommonEvent () → {Boolean}

Returns true if the event is on the current map.

Returns:
Type
Boolean

setWaitMode (waitMode)

Sets the wait mode of the interpreter.

Parameters:
Name Type Description
waitMode String  

skipBranch ()

Skips a conditional branch on the interpreter.

terminate ()

Terminates the game interpreter.

update ()

updateChild () → {Boolean}

Updates the child game interpreter.

Returns:
Type
Boolean

updateWait () → {Boolean}

Updates the wait of the game interpreter.

Returns:
Type
Boolean

updateWaitCount () → {Boolean}

Returns:
Type
Boolean

updateWaitMode () → {Boolean}

Returns:
Type
Boolean

videoFileExt () → {String}

Returns:
Type
String

wait (duration)

sets a specified wait duration for the interpreter.

Parameters:
Name Type Description
duration Number  


Documentation generated by JSDoc 3.5.5

Menu

  • RPGツクールMV JavaScript 非公式リファレンス
  • Class: Array
  • Class: AudioManager
  • Class: BattleManager
  • Class: Bitmap
  • Class: CacheEntry
  • Class: CacheMap
  • Class: ConfigManager
  • Class: DataManager
  • Class: Decrypter
  • Class: Game_Action
  • Class: Game_ActionResult
  • Class: Game_Actor
  • Class: Game_Actors
  • Class: Game_Battler
  • Class: Game_BattlerBase
  • Class: Game_Character
  • Class: Game_CharacterBase
  • Class: Game_CommonEvent
  • Class: Game_Enemy
  • Class: Game_Event
  • Class: Game_Follower
  • Class: Game_Followers
  • Class: Game_Interpreter
  • Class: Game_Item
  • Class: Game_Map
  • Class: Game_Message
  • Class: Game_Party
  • Class: Game_Picture
  • Class: Game_Player
  • Class: Game_Screen
  • Class: Game_SelfSwitches
  • Class: Game_Switches
  • Class: Game_System
  • Class: Game_Temp
  • Class: Game_Timer
  • Class: Game_Troop
  • Class: Game_Unit
  • Class: Game_Variables
  • Class: Game_Vehicle
  • Class: Graphics
  • Class: Html5Audio
  • Class: ImageCache
  • Class: ImageManager
  • Class: Input
  • Class: JsonEx
  • Class: AudioParameters
  • Class: BattleLogMethod
  • Class: BattleRewards
  • Class: BattlerAnimation
  • Class: CommandItem
  • Class: ConfigData
  • Class: DatabaseFile
  • Class: Matrix
  • Class: Motion
  • Class: PluginSettings
  • Class: SaveContents
  • Class: SaveFileInfo
  • Class: TextState
  • Class: TouchInputEvents
  • Namespace: MV
  • Class: Math
  • Class: Number
  • Class: PIXI.Container
  • Class: PIXI.DisplayObject
  • Class: PIXI.Graphics
  • Class: PIXI.Sprite
  • Class: PluginManager
  • Class: Point
  • Class: Actor
  • Class: Timing
  • Class: Animation
  • Class: Armor
  • Class: AudioFile
  • Class: BaseItem
  • Class: Conditions
  • Class: BattleEventPage
  • Class: Learning
  • Class: Class
  • Class: CommonEvent
  • Class: Damage
  • Class: Effect
  • Class: Action
  • Class: DropItem
  • Class: Enemy
  • Class: EquipItem
  • Class: Event
  • Class: EventCommand
  • Class: Conditions
  • Class: Image
  • Class: EventPage
  • Class: Item
  • Class: Encounter
  • Class: Map
  • Class: MapInfo
  • Class: MetaData
  • Class: MoveCommand
  • Class: MoveRoute
  • Class: Skill
  • Class: State
  • Class: AttackMotion
  • Class: Terms
  • Class: TestBattler
  • Class: Vehicle
  • Class: System
  • Class: Tileset
  • Class: Trait
  • Class: Troop
  • Class: UsableItem
  • Class: Weapon
  • Namespace: RPG
  • Class: Rectangle
  • Class: RequestQueue
  • Class: ResourceHandler
  • Class: SceneManager
  • Class: Scene_Base
  • Class: Scene_Battle
  • Class: Scene_Boot
  • Class: Scene_Debug
  • Class: Scene_Equip
  • Class: Scene_File
  • Class: Scene_GameEnd
  • Class: Scene_Gameover
  • Class: Scene_Item
  • Class: Scene_ItemBase
  • Class: Scene_Load
  • Class: Scene_Map
  • Class: Scene_Menu
  • Class: Scene_MenuBase
  • Class: Scene_Name
  • Class: Scene_Options
  • Class: Scene_Save
  • Class: Scene_Shop
  • Class: Scene_Skill
  • Class: Scene_Status
  • Class: Scene_Title
  • Class: ScreenSprite
  • Class: ShaderTilemap
  • Class: SoundManager
  • Class: Sprite
  • Class: Sprite_Actor
  • Class: Sprite_Animation
  • Class: Sprite_Balloon
  • Class: Sprite_Base
  • Class: Sprite_Battler
  • Class: Sprite_Button
  • Class: Sprite_Character
  • Class: Sprite_Damage
  • Class: Sprite_Destination
  • Class: Sprite_Enemy
  • Class: Sprite_Picture
  • Class: Sprite_StateIcon
  • Class: Sprite_StateOverlay
  • Class: Sprite_Timer
  • Class: Sprite_Weapon
  • Class: Spriteset_Base
  • Class: Spriteset_Battle
  • Class: Spriteset_Map
  • Class: Stage
  • Class: StorageManager
  • Class: String
  • Class: TextManager
  • Class: Tilemap
  • Class: TilingSprite
  • Class: ToneFilter
  • Class: ToneSprite
  • Class: TouchInput
  • Class: Member
  • Class: Utils
  • Class: Weather
  • Class: WebAudio
  • Class: Window
  • Class: WindowLayer
  • Class: Window_ActorCommand
  • Class: Window_Base
  • Class: Window_BattleActor
  • Class: Window_BattleEnemy
  • Class: Window_BattleItem
  • Class: Window_BattleLog
  • Class: Window_BattleSkill
  • Class: Window_BattleStatus
  • Class: Window_ChoiceList
  • Class: Window_Command
  • Class: Window_DebugEdit
  • Class: Window_DebugRange
  • Class: Window_EquipCommand
  • Class: Window_EquipItem
  • Class: Window_EquipSlot
  • Class: Window_EquipStatus
  • Class: Window_EventItem
  • Class: Window_GameEnd
  • Class: Window_Gold
  • Class: Window_Help
  • Class: Window_HorzCommand
  • Class: Window_ItemCategory
  • Class: Window_ItemList
  • Class: Window_MapName
  • Class: Window_MenuActor
  • Class: Window_MenuCommand
  • Class: Window_MenuStatus
  • Class: Window_Message
  • Class: Window_NameEdit
  • Class: Window_NameInput
  • Class: Window_NumberInput
  • Class: Window_Options
  • Class: Window_PartyCommand
  • Class: Window_SavefileList
  • Class: Window_ScrollText
  • Class: Window_Selectable
  • Class: Window_ShopBuy
  • Class: Window_ShopCommand
  • Class: Window_ShopNumber
  • Class: Window_ShopSell
  • Class: Window_ShopStatus
  • Class: Window_SkillList
  • Class: Window_SkillStatus
  • Class: Window_SkillType
  • Class: Window_Status
  • Class: Window_TitleCommand
  • Global
  • クラスツリー