The RPG Maker Resource Kit

RMRK RPG Maker Creation => MV => MV Scripts Database => Topic started by: modern algebra on October 31, 2015, 03:51:22 PM

Title: [MV] Global Text Codes 1.0.1
Post by: modern algebra on October 31, 2015, 03:51:22 PM
Global Text Codes
Version: 1.0.1
Author: modern algebra
Date: 31 October 2015

Version History




Description



Use basic escape codes in any text on any window. Be aware that drawing text with escape codes is slow, so it is possible that some computers will experience lag if this is used too much in any one frame.

Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs28.postimg.org%2Fn9qy1o1fh%2FGlobal_Text_Codes.png&hash=152e9cb18cec223cd8b9c2dee50a0a3ac5d0d3c3) (http://postimg.org/image/u07fb3ol5/)
Example showing \i[n] codes used for the options, \c[n] codes used on the names, and \{ and \} used for the class names.

Features


Instructions

Save the script in your plugins folder and import it through the Plugin Manager.

This plugin allows you to use basic escape codes in any text field, so long as you include \* in the text field. By default, the options are limited to \c[n]; \i[n]; \v
Title: Re: [MV] Global Text Codes 1.0.1
Post by: yuyu! on October 31, 2015, 07:07:30 PM
Definitely one of my favorite scripts to use in the past makers. ;___;

Thanks for writing it, modern! ^_^
Title: Re: [MV] Global Text Codes 1.0.1
Post by: Wiimeiser on October 31, 2015, 10:45:53 PM
Help text is missing.
Title: Re: [MV] Global Text Codes 1.0.1
Post by: modern algebra on October 31, 2015, 10:53:24 PM
Do you mean the text that shows up in the Plugin Manager when you press the help button? Or do you mean the text that would show up in a help window in-game (like the description of an item)? Or do you mean something else.

In any case, I have been unable to detect an error when I've tested the script, so please let me know some more details so that I can hopefully find and fix the problem.
Title: Re: [MV] Global Text Codes 1.0.1
Post by: &&&&&&&&&&&&& on October 31, 2015, 11:20:35 PM
Loved the VXA version.
Kicks the UI up another notch.
Title: Re: [MV] Global Text Codes 1.0.1
Post by: Wiimeiser on November 02, 2015, 03:31:49 AM
The Plugin Manager help text and description is what's blank.
Title: Re: [MV] Global Text Codes 1.0.1
Post by: modern algebra on November 02, 2015, 03:57:59 AM
OK, it has to do with how Pastebin is naming the file when you download it from there. I will change the name to avoid that problem in the future, but you can just rename the .js file to "GlobalTextCodes.js" and everything should come back.
Title: Re: [MV] Global Text Codes 1.0.1
Post by: Nessiah on November 19, 2015, 12:09:43 AM
Aaa MA is back! I can't wait for your animated parallax and pictures <3
Title: Re: [MV] Global Text Codes 1.0.1
Post by: estriole on November 23, 2015, 11:04:13 AM
first of all... thanks for this amazing plugin...
some sugestion though...
can you make this plugin doesn't have to add \*  to activate it...?
i try modifying your plugin

ModernAlgebra.GTC.window_Base_drawText =
            Window_Base.prototype.drawText;
Window_Base.prototype.drawText = function() {
               // if it's window message... then call old method
if (this.constructor == Window_Message)
return ModernAlgebra.GTC.window_Base_drawText.apply(this, arguments);
                           
var text = arguments[0];
if ((typeof text === 'string' || text instanceof String)) {
var tx = this.magtcCalculateAlignmentExX.apply(this, arguments);
// Draw Special Text if the \* code is present
this.drawTextEx(text, tx, arguments[2]);
} else {
// Draw Normal Text otherwise
    ModernAlgebra.GTC.window_Base_drawText.apply(this, arguments);
}
};

removing the match inside the if. and it work. can i request you to implement this changes to your script?
or there's a problem about the edit i done which i don't know?
and any particular reason why we should add \* if we want to use escape code

since i have autocolor plugins which will auto convert certain text to \c
Title: Re: [MV] Global Text Codes 1.0.1
Post by: estriole on November 27, 2015, 09:29:04 AM
ignore my post above...
apparently it caused lag when using it with yanfly battle engine core's visual selection.
so using \* to only draw what needed to be colored is fine approach.