TSR

The Northern Frog
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
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
Regular
Joined
Oct 8, 2018
Messages
7,819
Reaction score
3,202
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
20
Reaction score
4
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: 25

TSR

The Northern Frog
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
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

Regular
Regular
Joined
Sep 16, 2020
Messages
38
Reaction score
13
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: 22

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,819
Reaction score
3,202
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
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
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!
 

gambitben

Regular
Regular
Joined
Jun 8, 2013
Messages
184
Reaction score
151
First Language
Spanish English
Primarily Uses
RMMV
hey, when painting it with yanfly's equip core I get this error when trying to unequip an equipment in a duplicate slot (<Equip Slot: 1, 5, 5, 5> for example).

it says cannot read properties of null (reading '4').

go the pic to upload:

1651255059973.png

1651255082353.png
 
Last edited:
  • Like
Reactions: TSR

TSR

The Northern Frog
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
First Language
French
Primarily Uses
RMMZ
Hello @gambitben
Thanks for reporting :thumbsup-right:

I will give it a look later today, but I can't guarantee anything because MV isn't very stable anymore on my Mac, so testing stuff can be rather anoying.

Regards
 

Mr_Von_Grimmsy

Old-School Enthusiast
Regular
Joined
Apr 20, 2021
Messages
40
Reaction score
14
First Language
English
Primarily Uses
RMMV
@TSR Hey there, and thanks for providing the community with this attractive re-assembly of the equip page!

I just had a few questions regarding functionality:
  • Using QParams - can custom parameters be plugged into this new equip scene somehow?
  • Is there any way to display the 'info top/bottom' notetag fields added with some of the Yanfly plugins?
  • Besides base params, is there a way to have sparams or xparams show up?
I think that was it for the time being.

I just randomly stumbled on this gem so haven't messed around with it much to be honest... I just figured that I should ask the plugin creator themself if there were perhaps options I had overlooked, before I run off trying to reinvent the wheel. Thanks again! :rhappy:

EDIT: AH, I just knew I had forgotten something; functionality for Yanfly's ItemUpgradeSlots and AttachAugments is cut off of the equip menu; all I have are Remove, Optimize, and Clear.
 
Last edited:

TSR

The Northern Frog
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
First Language
French
Primarily Uses
RMMZ
Hello @Mr_Von_Grimmsy and thanks for your comments.

I made this plugin 2 years ago for my MV project. Of course I didn't includes everythings Yanlfy, only those I was using in that specific project.
If I remember correctly, YEP_ItemDurability and YEP_attachAugments are includes in the plugins (but need some tweeks in the parameters to make them appear (see instructions)).
But code is open and edits are permitted, so adding additionnal Yanlfy functionnality shouldn't be that hard if you can code a bit.

Main problem might be the space available in the windows. Ex: showing xparam would be quite easy. but where would you display them? Unless you remove some basic param to give more space, you'll have to reorganize the layout which can be painful...

While I can provide some coding guidance on my discord, I won't do these changes myself cause I'm far to busy with other stuff, beside I don't use MV anymore...

Regards
TSR :rock-right:
 

Mr_Von_Grimmsy

Old-School Enthusiast
Regular
Joined
Apr 20, 2021
Messages
40
Reaction score
14
First Language
English
Primarily Uses
RMMV
Great, thanks for getting back to me!

Well I'll fiddle around with it then, and see if I can figure things out - I'll surely give a holler, if not. :)
 
  • Like
Reactions: TSR

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
7,819
Reaction score
3,202
First Language
Dutch
Primarily Uses
RMMV
@Mr_Von_Grimmsy a tiny tip if you want to show xParam/sParam might
be to toggle from base params that already existed.

so with the enter key, or another button, you toggle between base params
and the xParams/sParams if you need more space.

another way instead of "toggle" if you want to show more params that
could fit is to create "pages" for those.

I dont know how to add them nicely, but it should be doable.
 

Mr_Von_Grimmsy

Old-School Enthusiast
Regular
Joined
Apr 20, 2021
Messages
40
Reaction score
14
First Language
English
Primarily Uses
RMMV
@ShadowDragon @TSR

Just to expand on my intentions a bit: I'm using the basic params/xparams as secondary stats that are derived off of custom params. If I can suss out how to...

A ) get those custom params plugged into the fields to the side of the actor portrait, and...

B ) have the numbers derived from those custom stats (i.e. params & xparams) in the fields right under the weapon/help display, I'll pretty much be golden.

I'd also love to figure out adding in support for using ItemUpgradeSlots from the equip scene as well, but would be just as content with relegating its functionality to a separate facet of the game (like a blacksmith, or something).

I should have time to muck about with it over the weekend, possibly. I'll give you a shout if I run into any dead ends, @TSR. Thanks! :rhappy:
 

ZCSully

Regular
Regular
Joined
Nov 28, 2021
Messages
147
Reaction score
47
First Language
English
Primarily Uses
RMMV
Hi TSR! I am using Equip Slots and I absolutely love it! The issue I am getting is when I click Equip and than choose a party member that is not in the active party, which in my game is anything past the 4th member, it throws me this error after I click weapons armor etc:

1680197078119.png
 

TSR

The Northern Frog
Regular
Joined
Nov 14, 2019
Messages
531
Reaction score
890
First Language
French
Primarily Uses
RMMZ
1680197078119.png
*Solved on discord

If anybody else is experiencing this bug, the fix is simple:
Find the 4 instances of $gameParty.battleMembers() in my plugin and replace them by $gameParty.members().
*if your game never have more than 4 members at the same time, this modification is uneccessary.

Regards
 

Latest Threads

Latest Posts

Latest Profile Posts

The site's random slowdowns are making cruising around the forums rather painful. Any word on what's going on?
making ship for my RPG game 8 Directions... it will be animated
https://prnt.sc/uTgV9yEUCqEx
I can do forest maps all day long, but creating towns is my arch nemesis. Although, I think I maybe onto something here.

Castle_Crashers-1.gif
People have got all these, so good luck!
8f0fc97cb2c3f133afb9c8ce0ba385218001cd6fr1-986-773v2_uhq.jpg

Who is ready for Halloween?

Forum statistics

Threads
135,003
Messages
1,252,824
Members
177,917
Latest member
LilaHazel
Top