TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
427
Reaction score
495
First Language
French
Primarily Uses
RMMZ
1612363084448.png
download:
TSR_EquipSlots
Author:
TSR

This Plugin revamp the Equip Scene and provides a few options to customize some aspects of the scene.

This is a 'scene' Plugin. It does not alter the game equipement behavior, but is made to work with Yanfly Equip Core and Item Core, along with their extensions Plugins. Place it bellow YEP_EquipCore if you're using it.

It can also be used as a stand-alone Plugin.


Code:
 * =======================================================================================
 * == About this Plugin ==================================================================
 * =======================================================================================
 * This is a 'scene' Plugin. It does not alter the game equipement behavior, but
 * is made to work with Yanfly Equip Core and Item Core, along with their extensions
 * Plugins. It can also be used as a stand-alone Plugin.
 *
 *
 * The Plugin rearrange the Equip scene windows as such:
 *
 *       -----------------------------------------------------------------------
 *      |                                                                       |
 *      |                         SLOTS WINDOW                                  |
 *      |-----------------------------------------------------------------------|
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |      STATUS WINDOW          |            HELP WINDOW                  |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |-----------------------------|-----------------------------------------|
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |      DISPLAY WINDOW         |            ITEM WINDOW                  |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *      |                             |                                         |
 *       -----------------------------------------------------------------------
 *
 * The main features of each windows are described bellow.
 *
 *      -SLOTS WINDOW
 *            This is an horizontal menu that shows the current actor
 *            equipment slots. You can toggle between slots by scrolling
 *            left and right, or switch between party members using the
 *            up and down arrow keys.
 *
 *      -STATUS WINDOW
 *            This window shows the current actor status. The parameters
 *            changes when hovering over equipment pieces are indicated
 *            by color changes: green = param increase, orange = param
 *            decrease, white = no changes.
 *
 *      -HELP WINDOW
 *            The new Help window display the info about the equipment
 *            pieces. When switching between an actor equip slots, the
 *            Help window will show the currently equipped gear (if any)
 *            for the corresponding slot. When selecting items in the
 *            Item window, the Help window show the infos of the selected
 *            item.
 *
 *            By default, the Help window display the following infos:
 *
 *                  1) Item name and icon
 *                  2) Item 2 lines description from database
 *                  3) Item 8 params
 *
 *            Using Plugin parameters, you can add additional infos in
 *            the order you wish:
 *
 *                  * Item Attack Elements and Elements rates traits
 *                  * Item Attack States and State rates/resist traits
 *                  * Item durability (require YEP_X_ItemDurability)
 *                  * Item Attach Augments (require YEP_X_AttachAugments)
 *
 *            Infos slidding:
 *                 Whenever the item infos are too large to fit in one
 *                 line of the Help window, the line will automatically
 *                 glide from right to left to show the info that is cut
 *                 off by the window borders. The line will keep moving
 *                 back and forth so all the infos can be seen.
 *
 *
 *       -DISPLAY WINDOW
 *             The display window show the current actor battler image,
 *             surrounded by its equipment slots. You can use a custom
 *             image instead of the battler image, by using the following
 *             actor notetag:
 *
 *                 <Display Image: filename>
 *
 *                   *filename is your image file name wihout the extension.
 *
 *
 *       -ITEM WINDOW
 *             The item window show the available equipments for the currently
 *             selected slot of the current actor. It also display the item
 *             that is currently equipped by the current actor, as well as the
 *             items that the current actor can equip, but are actually equipped
 *             by another party member.
 *
 *             The Item Window is compatible with the independant items from
 *             Yanfly ItemCore.       
 *
 *
 *
 * PARAMETERS
 * =======================================================================================
 *
 * General
 * =======
 *
 *   Windows Layout
 *     This parameter allow to reverse the left/right position of the windows
 *     in the Equip Scene.
 *
 *   Background Rectangle Color1
 *     This set the first gradient color of the background rectangles in the
 *     Status, Help, Item and Display windows.
 *
 *   Background Rectangle Color2
 *     This set the second gradient color of the background rectangles in the
 *     Equip Scene.
 *
 *
 * Category Window
 * ===============
 *
 *   Category Max Columns
 *     This set the maximal number of visible columns in the category window.
 *
 *
 * Status Window
 * =============
 *
 *   Enable Status Back Rect
 *     Enable the backround rectangle in the status window.
 *
 *
 * Help Window
 * ===========
 *
 *   Item Info
 *     This notebox can be use to display additional informations in the
 *     Help window. Each lines in the notebox has to be filled specifically,
 *     according to the explanation bellow. Each properties (lines) must be
 *     separated by a semicolon and have the following structure:
 *
 *             label : keyword, specific infos, ;(end semicolon)
 *
 *              Label = This is the label that will appear before the datas.
 *                      It must be followed by a colon.
 *
 *            keyword = Each information types have its own predefine keyword
 *                      that the Plugin can recognize.
 *
 *     Specific infos = Some information type require additional data (this
 *                      is specified bellow)
 *
 *   ;(end semicolon) = This should close each lines in the Item Info notebox.
 *     
 *
 *     Item Info (ELEMENTAL ATTACKS and RATES)
 *         This shows the elemental rates and elements attack traits of the
 *         equipment piece.
 *
 *         Keyword: 'elements'
 *
 *         Specific infos: elementID(iconIndex), elementID(iconIndex), ...
 *
 *         HOW TO USE:
 *            Write the label that will appear on screen, followed by a colon.
 *            Add the keyword 'elements' followed by a comma. Then add the
 *            element Id of each elements you wish to be shown, followed by
 *            the element icon index between brackets. Separate each by commas
 *            and don't forget the semicolon at the end of the line.
 *
 *            Example:
 *                Elements: elements, 1(100), 2(101), 3(102), 4(103);
 *
 *                This will show the elemental rates of elements Id 1 to 4
 *                with their associated icons, preceded by the label 'Elements' 
 *
 *
 *      Item Info (STATES ATTACKS and RATES)
 *         This shows the states rates and states attack traits of the
 *         equipment piece.
 *
 *         Keyword: 'states'
 *
 *         Specific infos: none
 *
 *         HOW TO USE:
 *            Write the label that will appear on screen, followed by a colon.
 *            Add the keyword 'states' followed by the end semicolon.
 *
 *            Example:
 *                Afflictions: states;
 *
 *                This will show all the states rates of the equipment piece,
 *                preceded by the label 'Affliction'
 *           
 *
 *       Item Info (Yanfly item DURABILITY)
 *          You can display the equipment durability assuming you have Yanfly
 *          ItemCore and X_ItemDurability.
 * 
 *          Keyword: durability
 *
 *          Specific infos: none
 *
 *          HOW TO USE:
 *            Write a label, followed by a colon. How you name the label doesn't
 *            matter as it is only used for reference. The label that will appear
 *            on screen is the name you gave to durability in Yanfly Plugin. Add
 *            Add the keyword 'durability' followed by the end semicolon.
 *           
 *            Example:
 *               1: durability;
 *
 *
 *       Item Info (Yanfly item ATTACH AUGMENTS)
 *          You can display the equipment Augments assuming you have Yanfly
 *          ItemCore and X_AttachAugments.
 * 
 *          Keyword: augments
 *
 *          Specific infos: none
 *
 *          HOW TO USE:
 *            Write the label that will appear on screen, followed by a colon.
 *            Add the keyword 'augments' followed by the end semicolon.
 *           
 *            Example:
 *               Crystals: augments;
 *
 *
 *   Params Name Acronyms
 *     This notebox serves to define the acronyms for the 8 main parameters,
 *     as they will appears in the Status window. Define a 3 letters acronym
 *     for each params and associate it with its param Id. The params Id are
 *     as follow:
 *
 *     0: Max HP         1: MMP             2: Attack     3: Defense
 *     4: Magic Atttack  5: Magic defense   6: Agility    7: Luck
 *
 *     The notebox is already filled with the acronyms of the default param
 *     names. Change it to your liking. Separate each with a SEMICOLON.
 *
 *
 *   Enable Help Back Rect
 *     Enable the backround rectangle in the help window.
 *
 *
 *
 * Item Window
 * ===========
 *
 *   Items Sorting Method
 *     This notebox let you define different sorting method for each equip
 *     slots categories. Associate each equip slots to one of the following
 *     sorting method:
 *
 *            -1 : no sort, the items will appears in their database entries
 *                 order. Not inluding an equip slot in the notebox will
 *                 give the same result.
 *
 *         'name': Items will be sorted alphabetically according to their
 *                 name define in the database.
 *
 *          0 - 7: Items will be sorted numerically according to the param
 *                 id (0 to 7) specified in the notebox.
 *
 *         'best': Items will be sorted according to the highest params
 *                 combinattion (similar to optimize command).
 *
 *
 *                 Example:
 *                   1: 2; 2: 'name'; 3: 3; 4: 'best'
 *
 *         Filling the notebox as above will sort the weapons (slotId 1)
 *         according to the attack parameter (paramId 2). SlotId 2 will
 *         be sorted according to their names, slotId 3 will be sorted
 *         by their defense parameter (paramId 3), and slotId 4 will be
 *         sorted according to 'best' param optimization. Note that each
 *         properties are separated by a SEMICOLON.
 *
 *
 *   Actors Equipment Sort
 *     With this parameter, you can decide wether or not the currently equipped
 *     items will be included in the sorting method. If not, the currently
 *     equipped items will appears at the top of the item list.     
 *
 *   Enable Item Back Rect
 *     Enable the backround rectangle in the item window.
 *
 *
 *
 * Display Window
 * ==============
 *
 *   Display Icons Positions
 *     This notebox allow you to define specific screen positions for the icons
 *     in the display window. Enter X and Y coordinates for each slotId. Separate
 *     X and Y values by a COMMA, and each properties by a SEMICOLON.
 *
 *     Example:
 *        1: 50, 50; 2: 50, 100; 3: 200, 50; 4: 200, 100
 *
 *     In the example above, slotId 1 will appears at x50, y50 in the Display
 *     window. If you omit to include some slotId, they will stack up in the
 *     top left corner of the window. If you leave the whole parameter blank,
 *     the Plugin will automatically dispose the icons arround the battler
 *     image (default setting).
 *   
 *
 *   Display Icons Size
 *     This set the iconSize of the icons in the display window. If this parameter
 *     is left empty, the Plugin will refer to default icon width.
 *
 *

Code:
 * =======================================================================================
 * == Terms of usage =====================================================================
 * =======================================================================================
 * Use in any independant RPG Maker MV projects, including commercials.
 *
 * Credit is required for using this Plugin.
 * For crediting, use 'TSR' along with one of
 * the following terms:
 *      'The Northern Frog' or 'A frog from the north'
 *
 * Do not change the Header or the Terms of usage.
 *
 * Do not change the main object name.
 *
 * Editing of the script is allowed, but it won't relieve from crediting
 * obligations. Remember that changing the name of functions and variables,
 * or even manually retyping the entire script, doesn't make you the author
 * of the Plugin.
 *
 * DO NOT REDISTRIBUTE!
 * If you want to share it, share the link to my itchi.io account:
 * https://the-northern-frog.itch.io/
 *
 *

Regards!
TSR
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,880
Reaction score
1,872
First Language
Dutch
Primarily Uses
RMMV
what a bunch of text, video looks awesome, nice features as well =)
this can help many dev's hopefully, and it's unique.
 
  • Like
Reactions: TSR

Yukkito

Villager
Member
Joined
Jan 10, 2020
Messages
8
Reaction score
2
First Language
Italiano
Primarily Uses
RMMV
Hi, I just discovered your plugins, and it looks really cool!
Just...one little problem.

I state that I am a Javascript novice, I know very little (the basics) but I am learning.

I went through all the plugin documentation, customized everything I needed (using Yanfly plugins too), but the result is something that ... I don't understand very well. :kaocry:

I would like to understand what I'm doing wrong, and also why so many things are so messy.

Thanks in advance for your reply! :kaopride:
If you need, I can take other screenshots.
 

Attachments

  • Screenshot (410).png
    Screenshot (410).png
    1.5 MB · Views: 6

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
427
Reaction score
495
First Language
French
Primarily Uses
RMMZ
Hello @Yukkito
Your scene might need some adjustments, either through the plugin parameters, or by a few change to the code. Join my discord and I'll guide you through these.
Also, when you'll ask for support, try to focus on one problem at a time: ask for stuff like "how can I center the actor face in the status section" or "how can I reduce the font size in that section..."

Regards.
 

Bryanh

Villager
Member
Joined
Sep 16, 2020
Messages
14
Reaction score
3
First Language
english
Primarily Uses
RMMV
hi how i could i move these numbers slightly to the right so they're mot overlapping?

Thanks
 

Attachments

  • Untitled.png
    Untitled.png
    84.1 KB · Views: 7

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,880
Reaction score
1,872
First Language
Dutch
Primarily Uses
RMMV
@Bryanh you might want to edit the plugin on line 1097 and 1107
if not mistaken, you see "0000" add 1 "0" to it so you get 5 of it.

otherwise, if it has to do with the x offset, try with

let textWidth = this.textWidth('0000') + 4; to see what effect it has.

if it doesn't work, @TSR can guide you how to do it.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
427
Reaction score
495
First Language
French
Primarily Uses
RMMZ
@Bryanh you might want to edit the plugin on line 1097 and 1107
if not mistaken, you see "0000" add 1 "0" to it so you get 5 of it.
Line 1097 and 1107 are in the Window_EquipStatus prototype. That's actually for drawing the actor params... :p
The item params are drawn within the drawItemParams prototype of the Window_EquipHelp, starting at line 1221.
Change the x arguments of the last drawText method (line 1246) to move the values slightly to the right.
Code:
Window_EquipHelp.prototype.drawItemParams = function(item, x, y, maxWidth) {
    if (item) {
        let params = item.params;
        let paramNameList = [];
        let paramList = [];
        x += this.standardPadding() * 2;
        for (let i = 0; i < 8; i++) {
            paramList.push(params[i]);
            paramNameList.push(TSR.equipSlots._paramsName[i] || '???')
        }
        for (let j in paramList) {
            let py = (j < 4)? y : y + this.lineHeight();
            let p = (j < 4)? j : j - 4;
            let textWidth = this.textWidth('---') + this.textPadding();
            let paramWidth = maxWidth / 4 - this.standardPadding() * 2;
            let paramSpacing = paramWidth + this.textPadding() * 2;
            let param = '-';
            this.changeTextColor(this.systemColor());
            this.drawText(paramNameList[j], x + (paramSpacing * p), py, paramWidth);
            if (paramList[j] > 0) {
                this.resetTextColor();
                param = '+' + paramList[j];
            } else {
                this.changeTextColor(this.textColor(8));
            }
            this.drawText(param, x + (paramSpacing * p) + textWidth, py, paramWidth);
        }
    }
};

Regards!
 

Latest Threads

Latest Posts

Latest Profile Posts

SF_People3_5 added!
index.php

Marketing seems to be about reducing dependence on luck to sell a product, as well as expanding the number of avenues in which luck can play a role in selling a product.
So, I've been wanting to do this randomized logic puzzle in my game for years now. I finally figured out how to do it by using arrays and a few small script calls. It's based on the Einstein Fish Puzzle! :D Though, I have no idea how to actually have the player put in answers.... might start a thread about it.

The projectiles shown in this video are as follows:
1, Basic Triple
2, 30-Degree Arc
3, Randomized Blast Wave
4, 8-way
5, 8-way Double
6, 8-way Slowness
7, 120-Degree Arc Repetitive
8, Projective Triple
9, Split 8-way
10, 2-way Split Randomized Arc
11, HP-MP Split Arc
12, Split Laser
13, Shock
14, Cosine
Drop shadows and water reflections tests in RPG Maker VX Ace


BgI3F80.png

Forum statistics

Threads
118,628
Messages
1,117,423
Members
155,717
Latest member
dess
Top