Eli's Book

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,093
First Language
Portuguese - Br
Primarily Uses
RMMZ

Author: Hakuen Studio

Introduction

This plugin optimizes all of my other plugins, making them less code and easier to maintain and implement improvements. It is not a core plugin, it does not overwrite any function of the standard codes of the RPG maker MZ.

Features

Provide methods and code that add a better performance on all Eli plugins.

How to use

Put above all other Eli plugins.

You can use it in script calls. You can also copy and paste these's functions to your own plugins. Just give me the credits ^^


● Eli_Book
• eli.scene() → Returns the current scene.
• eli.ruleOf3(a, b, c) → Realize a simple rule of 3.
• eli.isScene(My_Scene) → Returns true if you are in the specified scene.
• eli.needEval(String) → If the string is not a number, it will eval. Otherwise, it will return the String.
• eli.nameToRGB(htmlColorName) → Convert an html color name to RGB color.
• eli.hexToRgb(hexColor) → Convert a hex color to RGB color.
• eli.convertEscapeVariablesOnly(text) → It will return a text with the \v[ID] converted.
• eli.convertEscapeCharacters(text) → Returns a text with all escape characters converted.
• eli.toLowerCaseArray(array) → Will return a new array with all string elements to lower case.
• eli.centerX(objWidth, baseWidth) → Returns the centered position of X.
• eli.centerY(objHeight, baseHeight) → Returns the centered position of Y.
• eli.centerPos(objWidth, objHeight, baseWidth, baseHeight) → Returns the centered position of X and Y.
• eli.divideByTheLargest(num1, num2) → Divides the largest number by the smallest.

● Game Player
• $gamePlayer.meta() → Return the meta of the actor Id that is the party leader.

● Game Event
• $gameMap.event(ID).meta() → Return the meta of the event id specified.
• $gameMap.event(ID).note() → Return the note of the event id specified.

● Image Manager
• ImageManager.saveOldCache() → It has to be used on the start method of a
scene. It will save the current cache state.
• ImageManager.restoreOldCache() → It has to be used on the terminate method of a scene. It will set the cache to the saved one.
With these functions, you simulate a clear cache, but only clear the cache generated for the current scene, and restore it to the old one, before entering this scene.

● Sprite
• mySprite.scaledBitmapWidth() → Returns the sprite dimension value considering the scale.
• mySprite.scaledBitmapWidth() → Returns the sprite dimension value considering the scale.
• mySprite.stretchToScreen(aspectRatio, baseWidth, baseHeight) → Stretch the sprite bitmap to the screen. You can choose to keep or not the aspect ratio. The other parameters are set by the Screen size by default.

Terms of Use

https://www.hakuenstudio.com/rpg-maker/terms-of-use

DOWNLOAD - Current Version 2.2.0
Eli's_Book.js

Update Log
Version 2.2.0 - 11/11/2020
• Fixed a bug when evaluating some expressions with eli.needEval().
• Adds a custom scene base.
• Adds log e log table functions.
• Add easing functions from Robert Penner.
• Add method to get the next and previous event commands on the game interpreter.
Version 2.1.0 - 20/10/2020
• Method to read map data that are not loaded.
• Some methods to convert specific plugin parameters that define blend mode, picture origin, and easing type.
Version 2.0.0 - 10/16/2020
• Add UI parameter on setPresetPos.
• Add a new method to check the type of a $dataObject.
• Add new classes to cover MV animations in any sprite.
• Add new method to processEscapeCharacters or formula(eval).
• Add a new method to convert escape characters on plugin command/arguments.
• Add a new method to process plugin parameters.
• Add a new method to register plugin commands.
Version 1.3.0 - 09/26/2020
• Created my own button class
Version 1.2.0 - 09/23/2020
• Changed the convert colors function.
Version 1.1 - 16/09/2020
• Add new methods(see more on help file):
• eli.ruleOf3 (don't laugh... xD)
• eli.centerX
• eli.centerY
• eli.centerPos
• eli.divideByTheLargest
• Sprite.prototype.scaledBitmapWidth
• Sprite.prototype.scaledBitmapHeight
• Sprite.prototype.stretchToScreen
• ImageManager.saveOldCache
• ImageManager.restoreOldCache
Version 1.0 - 10/09/2020
• Plugin release!
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,093
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated first post.
Version 1.1 - 09/16/2020

• Add new methods(see more on help file):
• eli.ruleOf3 (don't laugh... xD)
• eli.centerX
• eli.centerY
• eli.centerPos
• eli.divideByTheLargest
• Sprite.prototype.scaledBitmapWidth
• Sprite.prototype.scaledBitmapHeight
• Sprite.prototype.stretchToScreen
• ImageManager.saveOldCache
• ImageManager.restoreOldCache
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,093
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated first post!
Version 2.0.0 - 10/16/2020
• Add UI parameter on setPresetPos.
• Add a new method to check the type of a $dataObject.
• Add new classes to cover MV animations in any sprite.
• Add new method to processEscapeCharacters or formula(eval).
• Add a new method to convert escape characters on plugin command/arguments.
• Add a new method to process plugin parameters.
• Add a new method to register plugin commands.
Version 1.3.0 - 09/26/2020
• Created my own button class
Version 1.2.0 - 09/23/2020
• Changed the convert colors function.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,093
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 2.1.0 - 20/10/2020
• Method to read map data that are not loaded.
• Some methods to convert specific plugin parameters that define blend mode, picture origin, and easing type.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,678
Reaction score
1,093
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 2.2.0 - 11/11/2020
- Fixed a bug when evaluating some expressions with eli.needEval().
- Adds a custom scene base.
- Adds log e log table functions.
- Add easing functions from Robert Penner.
- Add method to get the next and previous event commands on the game interpreter.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Tomorrow is Thanksgiving, and I'm so excited! I've been exploring MZ a little, and I just downloaded Effekseer to make new animations. I have experience in 3D animation software, so I'll be pretty good at the whole "particle" thing. My first game on MZ will be Fantasy Force--starring a griffin, a dragon, and a pegasus fighting against the Dragon of Darkness.
currently listening to Driftwood Gaming streaming some MZ dev time and it's delightful! had no idea they were this entertaining, love it
In quarantine, will be tested soon. This year is really something... special.
I was at another orientation yesterday and I realized I'll be working with an old friend! We met at the local water park a few years back and it was so nice to see her again! We had a chat, and next week when I officially start, I'll see if maybe we can trade our Zoom IDs so we can talk!
I made some sideview closets for MV!
You can find them in my MV resource thread.

Forum statistics

Threads
105,512
Messages
1,014,340
Members
137,198
Latest member
mmc1980
Top