Animated Tile Option (YEP)

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Download

System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.


Masterarbeit Writer

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.


Introduction

Some players may experience lag when walking near animated tiles. This is
due to the fact that animated tiles constantly draw, delete, and redraw the
tiles every few frames. Unfortunately, due to Pixi2's drawing method, there
exists some memory leaks when this kind of drawing occurs. On mobile devices
or weak computers with little memory to spare, this can potentially cause
some games to crash. The option to enable/disable animated tiles is now in
the options menu for players to toggle.

For those who decide to make the default settings for the plugin to 'auto',
any player who is playing on mobile or browser will default to having the
setting off while local players will have the setting default to on.

Options Core Integration

To integrate options from this plugin into Yanfly's Options Core, use the settings below:

If you are using YEP_OptionsCore.js, you can add a new Option using this
plugin. Here's the following code/parameter settings you can use with it.

---------
Settings:
---------

Name:
\i[302]Animated Tiles

Help Description:
Turns animated tiles ON or OFF.

Symbol:
animateTiles

Show/Hide:
show = Imported.YEP_StaticTilesOption;

Enable:
enabled = true;

Ext:
ext = 0;

----------
Functions:
----------

Make Option Code:
this.addCommand(name, symbol, enabled, ext);

Draw Option Code:
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
this.drawOptionsOnOff(index);

Process OK Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);

Cursor Right Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, true);

Cursor Left Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, false);

Default Config Code:
// Empty. Provided by this plugin.

Save Config Code:
// Empty. Provided by this plugin.

Load Config Code:
// Empty. Provided by this plugin.

Changelog

Version 1.03:
- Compatibility update with YEP_OptionsCore.js.

Version 1.02:
- Updated for RPG Maker MV version 1.5.0.

Version 1.01:
- Updated for RPG Maker MV version 1.3.0.

Version 1.00:
- Finished Plugin!