Namespace: Utils

Utils

The static class that defines utility methods.

Members

Utils.RPGMAKER_NAME string staticconstant

The name of the RPG Maker. "MZ" in the current version.

Utils.RPGMAKER_VERSION string staticconstant

The version of the RPG Maker.

Methods

Utils.canPlayOgg ()boolean static

Checks whether the browser can play ogg files.

Returns:
Type Description
boolean True if the browser can play ogg files.

Utils.canPlayWebm ()boolean static

Checks whether the browser can play webm files.

Returns:
Type Description
boolean True if the browser can play webm files.

Utils.canUseCssFontLoading ()boolean static

Checks whether the browser supports CSS Font Loading.

Returns:
Type Description
boolean True if the browser supports CSS Font Loading.

Utils.canUseIndexedDB ()boolean static

Checks whether the browser supports IndexedDB.

Returns:
Type Description
boolean True if the browser supports IndexedDB.

Utils.canUseWebAudioAPI ()boolean static

Checks whether the browser supports Web Audio API.

Returns:
Type Description
boolean True if the browser supports Web Audio API.

Utils.canUseWebGL ()boolean static

Checks whether the browser supports WebGL.

Returns:
Type Description
boolean True if the browser supports WebGL.

Utils.checkRMVersion (version)boolean static

Checks whether the current RPG Maker version is greater than or equal to the given version.

Name Type Description
version string

The "x.x.x" format string to compare.

Returns:
Type Description
boolean True if the current version is greater than or equal to the given version.

Utils.containsArabic ()boolean static

Checks whether the string contains any Arabic characters.

Returns:
Type Description
boolean True if the string contains any Arabic characters.

Utils.decryptArrayBuffer (source)ArrayBuffer static

Decrypts encrypted data.

Name Type Description
source ArrayBuffer

The data to be decrypted.

Returns:
Type Description
ArrayBuffer The decrypted data.

Utils.encodeURI (str)string static

Encodes a URI component without escaping slash characters.

Name Type Description
str string

The input string.

Returns:
Type Description
string Encoded string.

Utils.escapeHtml (str)string static

Escapes special characters for HTML.

Name Type Description
str string

The input string.

Returns:
Type Description
string Escaped string.

Utils.extractFileName (filename)string static

Gets the filename that does not include subfolders.

Name Type Description
filename string

The filename with subfolders.

Returns:
Type Description
string The filename without subfolders.

Utils.hasEncryptedAudio ()boolean static

Checks whether the audio files in the game are encrypted.

Returns:
Type Description
boolean True if the audio files are encrypted.

Utils.hasEncryptedImages ()boolean static

Checks whether the image files in the game are encrypted.

Returns:
Type Description
boolean True if the image files are encrypted.

Utils.isAndroidChrome ()boolean static

Checks whether the browser is Android Chrome.

Returns:
Type Description
boolean True if the browser is Android Chrome.

Utils.isLocal ()boolean static

Checks whether the browser is accessing local files.

Returns:
Type Description
boolean True if the browser is accessing local files.

Utils.isMobileDevice ()boolean static

Checks whether the platform is a mobile device.

Returns:
Type Description
boolean True if the platform is a mobile device.

Utils.isMobileSafari ()boolean static

Checks whether the browser is Mobile Safari.

Returns:
Type Description
boolean True if the browser is Mobile Safari.

Utils.isNwjs ()boolean static

Checks whether the platform is NW.js.

Returns:
Type Description
boolean True if the platform is NW.js.

Utils.isOptionValid (name)boolean static

Checks whether the option is in the query string.

Name Type Description
name string

The option name.

Returns:
Type Description
boolean True if the option is in the query string.

Utils.setEncryptionInfo (hasImages, hasAudio, key) static

Sets information related to encryption.

Name Type Description
hasImages boolean

Whether the image files are encrypted.

hasAudio boolean

Whether the audio files are encrypted.

key string

The encryption key.