An open library of RPG Maker MV plugins, powered by the community.

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

FTKR Add Routine Move Commands - FTKR_AddRoutineMoveCommands.js

Plugin desc : v1.0.1 Add processing such as IF statements using the script for setting the travel route

License : MIT License

Author : Futokoro

Desc page : https://github.com/munokura/futokoro-MV-plugins

Download Page : https://raw.githubusercontent.com/munokura/futokoro-MV-plugins/refs/heads/master/FTKR_AddRoutineMoveCommands.js

File name : FTKR_AddRoutineMoveCommands.js

Help of plugin :

@plugindesc v1.0.1 Add processing such as IF statements using the script for setting the travel route
@author Futokoro
@url https://github.com/munokura/futokoro-MV-plugins
@license MIT License

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/futokoro-MV-plugins ).
Original plugin by Futokoro.
Please check the URL below for the latest version of the plugin.
URL https://github.com/futokoro/RPGMaker
-----
-----------------------------------------------------------------------------
Overview
-----------------------------------------------------------------------------
When setting a travel route, you can use scripts to perform the following operations.

- IF statement: Executes a set operation only while a specified condition is met.
- LOOP statement: Repeats a set operation a specified number of times.

-----------------------------------------------------------------------------
Setup Method
-----------------------------------------------------------------------------
1. Add this plugin to the "Plugin Manager."

2. When combining with the following plugins, register the plugins in the following order:

FTKR_AddRoutineMoveCommands.js
FTKR_ConvertEscapeCharactersInScript.js

-----------------------------------------------------------------------------
IF Statement
-----------------------------------------------------------------------------
START_IF: Condition 1
Processing when Condition 1 is met
ELSE_IF: Condition 2
Processing when Condition 2 is met
ELSE
Processing when Conditions 1 and 2 are not met
END_IF

By entering the above commands and conditional expressions in a script,
the processing part between them will be executed only if the condition is met.
You can set any number of commands in the processing part.
This is the same as a JavaScript if statement.
ELSE_IF and its processing part, and ELSE and its processing part, are not required.
Note that you cannot include another IF statement within the processing part of this IF statement.

Example)
◆ Set Movement Route: This event (wait)
: ◇ Turn toward the player
: ◇ Script: START_IF : this.distanceEvent(-1) > 2
: ◇ Take one step forward
: ◇ Script: END_IF
: ◇ Turn direction randomly

In this example, this event:
1. Executes "Turn toward the player"
2. Evaluates the condition (this.distanceEvent(-1) > 2)
3. Executes "Take one step forward" only if the above condition is met
4. Executes "Turn direction randomly" regardless of the condition.

----------------------------------------------------------------------------
LOOP Statement
----------------------------------------------------------------------------
START_LOOP : Count
Process to be executed repeatedly the specified number of times
END_LOOP

The process set between commands is executed the specified number of times.
The count can be written in script format.
A count of 0 will not execute the process.
You can assign any number of commands to the processing section.

Example)
◆ Set Movement Route: This event (wait)
: ◇ Turn toward the player
: ◇ Script: START_LOOP : 5
: ◇ Take one step forward
: ◇ Script: END_LOOP
: ◇ Turn 180 degrees

In this example, this event
1. Executes "Turn toward the player"
2. Executes the "Turn one step forward" process between START_LOOP and END_LOOP five times
3. Then executes "Turn 180 degrees"

-----------------------------------------------------------------------------
Script (Movement Route)
-----------------------------------------------------------------------------
By installing this plugin, the following scripts can be used in the movement route.

this.distanceEvent(n)
Gets the distance between this event and the specified event or player.
For players, specify n = -1. For events, specify n = the event ID.

-----------------------------------------------------------------------------
License for this plugin
-----------------------------------------------------------------------------
This plugin is released under the MIT License.

Copyright (c) 2018 Futokoro
http://opensource.org/licenses/mit-license.php

Plugin source
https://github.com/futokoro/RPGMaker/blob/master/README.md

-----------------------------------------------------------------------------
Change History
-----------------------------------------------------------------------------

v1.0.1 - 2018/08/15: Fixed an issue where ELSE_IF processing was not performed correctly.
v1.0.0 - 2018/08/15: First version created.

-----------------------------------------------------------------------------

スポンサードリンク

-MV plugins

Copyright© PGMV - The Community-Driven Plugin Library for RPG Maker MV , 2026 All Rights Reserved.