Sujet: // Yanfly Engine Message Core System Sam 23 Jan 2016 - 9:51
Alors comme tout plugin MV à mettre dans le dossier js. Copier un fichier javascript sur votre bureau, changer le nom. Le remettre dans votre dossier js. L'ouvrir avec bloc note, changez le plugin puis enregistrez et c'est bon.
//============================================================================= /*: * @plugindesc v1.08 Adds more features to the Message Window to customized * the way your messages appear and functions. * @author Yanfly Engine Plugins * * @param ---General--- * @default * * @param Default Rows * @desc This is default amount of rows the message box will have. * Default: 4 * @default 4 * * @param Default Width * @desc This is default width for the message box in pixels. * Default: Graphics.boxWidth * @default Graphics.boxWidth * * @param Face Indent * @desc If using a face graphic, this is how much text indents by. * Default: Window_Base._faceWidth + 24 * @default Window_Base._faceWidth + 24 * * @param Fast Forward * @desc Using this will enable a fast forward button to skip forward * quickly. If you don't wish to use this, use 'false' instead. * @default Input.isPressed('pagedown') * * @param Word Wrapping * @desc Use this to enable or disable word wrapping by default. * OFF - false ON - true * @default false * * @param Description Wrap * @desc Use this to enable or disable word wrapping for descriptions. * OFF - false ON - true * @default false * * @param Word Wrap Space * @desc Insert a space with manual line breaks? * NO - false YES - true * @default false * * @param ---Font--- * @default * * @param Font Name * @desc This is the default font used for the Message Window. * Default: GameFont * @default GameFont * * @param Font Size * @desc This is the default font size used for the Message Window. * Default: 28 * @default 28 * * @param Font Size Change * @desc Whenever \{ and \} are used, they adjust by this value. * Default: 12 * @default 12 * * @param Font Changed Max * @desc This is the maximum size achieved by \{. * Default: 96 * @default 96 * * @param Font Changed Min * @desc This is the minimum size achieved by \{. * Default: 12 * @default 12 * * @param ---Name Box--- * @default * * @param Name Box Buffer X * @desc This is the buffer for the x location of the Name Box. * @default -28 * * @param Name Box Buffer Y * @desc This is the buffer for the y location of the Name Box. * @default 0 * * @param Name Box Padding * @desc This is the value for the padding of the Name Box. * @default this.standardPadding() * 4 * * @param Name Box Color * @desc This is the text color used for the Name Box. * @default 0 * * @param Name Box Clear * @desc Do you wish for the Name Box window to be clear? * NO - false YES - true * @default false * * @param Name Box Added Text * @desc This text is always added whenever the name box is used. * This can be used to automatically set up colors. * @default \c[6] * * @help * ============================================================================ * Introduction * ============================================================================ * * While RPG Maker MV Ace certainly improved the message system a whole lot, it * wouldn't hurt to add in a few more features, such as name windows, * converting textcodes to write out the icons and/or names of items, weapons, * armours, and* more in quicker fashion. This script also gives the developer * the ability to adjust the size of the message window during the game, give * it a separate font, and to give the player a text fast-forward feature. * * ============================================================================ * Word Wrapping * ============================================================================ * * Word wrapping is now possible through the message system. You can enable and * disable Word wrap using Plugin Commands. While using word wrap, if the word * is to extend past the message window's area, it will automatically go to the * following line. That said, word wrap will disable the editor's line breaks * and will require you to use the ones provided by the plugin: * * <br> or <line break> is text code to apply a line break. Use this before or * after a part in which you wish to start a new line. * * Keep in mind word wrapping is mostly for message windows. However, in other * places that you'd like to see word wrapping, such as item descriptions, * insert <WordWrap> at the beginning of the text to enable it. * * ============================================================================ * Text Codes * ============================================================================ * * By using certain text codes in your messages, you can have the game replace * them with the following: * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Text Code Function * \V[n] Replaced by the value of the nth variable. * \N[n] Replaced by the name of the nth actor. * \P[n] Replaced by the name of the nth party member. * \G Replaced by the currency unit. * \C[n] Draw the subsequent text in the nth color. * \I[n] Draw the nth icon. * \{ Increases the text size by one step. * \} Decreases the text size by one step. * \\ Replaced with the backslash character. * \$ Opens the gold window. * \. Waits 1/4th seconds. * \| Waits 1 second. * \! Waits for button input. * \> Display remaining text on same line all at once. * \< Cancel the effect that displays text all at once. * \^ Do not wait for input after displaying text. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Wait: Effect: * \w[x] - Waits x frames (60 frames = 1 second). Message window only. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * NameWindow: Effect: * \n<x> - Creates a name box with x string. Left side. *Note * \nc<x> - Creates a name box with x string. Centered. *Note * \nr<x> - Creates a name box with x string. Right side. *Note * * *Note: Works for message window only. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Line Break Effect: * <br> - If using word wrap mode, this will cause a line break. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Position: Effect: * \px[x] - Sets x position of text to x. * \py[x] - Sets y position of text to y. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Outline: Effect: * \oc[x] - Sets outline colour to x. * \ow[x] - Sets outline width to x. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Font: Effect: * \fr - Resets all font changes. * \fs[x] - Changes font size to x. * \fn<x> - Changes font name to x. * \fb - Toggles font boldness. * \fi - Toggles font italic. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Actor: Effect: * \af[x] - Shows face of actor x. *Note * \ac[x] - Writes out actor's class name. * \an[x] - Writes out actor's nickname. * * *Note: Works for message window only. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Party: Effect: * \pf[x] - Shows face of party member x. *Note * \pc[x] - Writes out party member x's class name. * \pn[x] - Writes out party member x's nickname. * * *Note: Works for message window only. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Names: Effect: * \nc[x] - Writes out class x's name. * \ni[x] - Writes out item x's name. * \nw[x] - Writes out weapon x's name. * \na[x] - Writes out armour x's name. * \ns[x] - Writes out skill x's name. * \nt[x] - Writes out state x's name. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * Icon Names: Effect: * \ii[x] - Writes out item x's name including icon. * \iw[x] - Writes out weapon x's name including icon. * \ia[x] - Writes out armour x's name including icon. * \is[x] - Writes out skill x's name including icon. * \it[x] - Writes out state x's name including icon. * * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * * And those are the text codes added with this script. Keep in mind that some * of these text codes only work for the Message Window. Otherwise, they'll * work for help descriptions, actor biographies, and others. * * ============================================================================ * Plugin Commands * ============================================================================ * * The following are some plugin commands you can use through the Event Editor * to change various aspects about the Message system. * * Plugin Comand * MessageRows 6 = Changes the Message Rows displayed to 6. If you * are using continuous Show Text events, this will * continue displaying the following lines's texts * until it hits the row limit. Anything after that * is cut off until the next message starts to avoid * accidental overlap. * * MessageWidth 400 = Changes the Message Window Width to 400 pixels. * This will cut off any words that are shown too * far to the right so adjust accordingly! * * EnableWordWrap = Enables wordwrapping. If a word extends past the * window size, it will automatically move onto the * next line. Keep in mind, you will need to use * \br to perform line breaks. * * DisableWordWrap = This disables wordwrapping. Line breaks will be * automatic at points where a new line is started * in the editor. * * ============================================================================ * Changelog * ============================================================================ * * Version 1.08: * - Fixed a bug regarding Input Number positioning when the Message Window's * position was middle. * * Version 1.07: * - Added 'Word Wrap Space' for word wrap users. This parameter will leave a * space behind for those who want a space left behind. * * Version 1.06: * - Fixed a bug that would cause masking problems with mobile devices. * * Version 1.05: * - Fixed a bug that would cause the namebox window to appear distorted. * * Version 1.04: * - Fixed a bug that captured too many text codes with the namebox window. * - Timed Name Window's closing speed with main window's closing speed. * * Verison 1.03: * - Fixed a bug with textcodes that messed up wordwrapping. * - Fixed a bug with font reset, italic, and bold textcodes. * * Version 1.02: * - Namebox Window's overlap feature that's in every MV window is now disabled * to allow for overlapping with main message window. * - Updated window positioning for Branch Choices, Number Input, and Item * Selection windows. * * Version 1.01: * - Added 'Description Wrap' into the parameters to allow for all item * descriptions to be automatically processed with word wrapping. * * Version 1.00: * - Finished plugin! */ //=============================================================================
Yanfly.Message.Window_Base_processEscapeCharacter = Window_Base.prototype.processEscapeCharacter; Window_Base.prototype.processEscapeCharacter = function(code, textState) { switch (code) { case 'MSGCORE': var id = this.obtainEscapeParam(textState); if (id === 0) this.resetFontSettings(); if (id === 1) this.contents.fontBold = !this.contents.fontBold; if (id === 2) this.contents.fontItalic = !this.contents.fontItalic; break; case 'FS': this.contents.fontSize = this.obtainEscapeParam(textState); break; case 'FN': var name = this.obtainEscapeString(textState); this.contents.fontFace = name; break; case 'OC': var id = this.obtainEscapeParam(textState); this.contents.outlineColor = this.textColor(id); break; case 'OW': this.contents.outlineWidth = this.obtainEscapeParam(textState); break; case 'PX': textState.x = this.obtainEscapeParam(textState); break; case 'PY': textState.y = this.obtainEscapeParam(textState); break; break; default: Yanfly.Message.Window_Base_processEscapeCharacter.call(this, code, textState); break; } };
Yanfly.Message.Window_Message_processEscapeCharacter = Window_Message.prototype.processEscapeCharacter; Window_Message.prototype.processEscapeCharacter = function(code, textState) { switch (code) { case '!': if (!this.isFastForward()) this.startPause(); break; case 'W': this.startWait(this.obtainEscapeParam(textState)); default: Yanfly.Message.Window_Message_processEscapeCharacter.call(this, code, textState); break; } };
//============================================================================= // End of File //=============================================================================
Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.
The Message Core plugin adds more functionality to the default RPG Maker MV message system, enabling more text codes, a name box, and adjustable message window sizes!
Introduction
While RPG Maker MV Ace certainly improved the message system a whole lot, it wouldn’t hurt to add in a few more features, such as name windows, converting textcodes to write out the icons and/or names of items, weapons, armours, and* more in quicker fashion. This script also gives the developer the ability to adjust the size of the message window during the game, give it a separate font, and to give the player a text fast-forward feature.
Word Wrapping
Word wrapping is now possible through the message system. You can enable and disable Word wrap using Plugin Commands. While using word wrap, if the word is to extend past the message window’s area, it will automatically go to the following line. That said, word wrap will disable the editor’s line breaks and will require you to use the ones provided by the plugin:
or is text code to apply a line break. Use this before or after a part in which you wish to start a new line.
Text Codes
By using certain text codes in your messages, you can have the game replace them with the following:
Text Code Function \V[n] Replaced by the value of the nth variable. Valeur de la variable \N[n] Replaced by the name of the nth actor. Nom du héros \P[n] Replaced by the name of the nth party member. Nom de l'équipier N° \G Replaced by the currency unit. \C[n] Draw the subsequent text in the nth color. colorer le texte \I[n] Draw the nth icon. Aficher l'icone \{ Increases the text size by one step. Augmenter la taille du texte \} Decreases the text size by one step. diminuer la taille du texte \\ Replaced with the backslash character. \$ Opens the gold window. Ouvrir la fenêtre argent \. Waits 1/4th seconds. Attendre \| Waits 1 second. \! Waits for button input. \> Display remaining text on same line all at once. \< Cancel the effect that displays text all at once. \^ Do not wait for input after displaying text.
NameWindow: Effect: Pour créer une petite fenêtre avec le nom du héros. Remplacer x par le nom du héros. \n – Creates a name box with x string. Left side. *Note Fenêtre Nom à gauche \nc – Creates a name box with x string. Centered. *Note Fenêtre nom au centre \nr – Creates a name box with x string. Right side. *Note Fenêtre nom à droite *Note: Works for message window only.
Font: Effect: \fr – Resets all font changes. \fs[x] – Changes font size to x. \fn – Changes font name to x. \fb – Toggles font boldness. \fi – Toggles font italic.
Actor: Effect: \af[x] – Shows face of actor x. *Note \ac[x] – Writes out actor’s class name. \an[x] – Writes out actor’s nickname. *Note: Works for message window only.
Party: Effect: \pf[x] – Shows face of party member x. *Note \pc[x] – Writes out party member x’s class name. \pn[x] – Writes out party member x’s nickname.
Icon Names: Effect: \ii[x] – Writes out item x’s name including icon. \iw[x] – Writes out weapon x’s name including icon. \ia[x] – Writes out armour x’s name including icon. \is[x] – Writes out skill x’s name including icon. \it[x] – Writes out state x’s name including icon.
And those are the text codes added with this script. Keep in mind that some of these text codes only work for the Message Window. Otherwise, they’ll work for help descriptions, actor biographies, and others.
Plugin Commands
The following are some plugin commands you can use through the Event Editor to change various aspects about the Message system.
Plugin Comand
MessageRows 6 Changes the Message Rows displayed to 6. If you are using continuous Show Text events, this will continue displaying the following lines’s texts until it hits the row limit. Anything after that is cut off until the next message starts to avoid accidental overlap.
MessageWidth 400 Changes the Message Window Width to 400 pixels. This will cut off any words that are shown too far to the right so adjust accordingly!
Happy RPG Making!
Dernière édition par Delta le Sam 23 Jan 2016 - 13:06, édité 1 fois