Original Source
- Original title: [MZ] Stat Distribution Panel (SDP) System
- Original author: Jragyn
- Original date: March 17, 2021
- Source thread: https://forums.rpgmakerweb.com/threads/mz-stat-distribution-panel-sdp-system.134497/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMZ)
Summary
Stat Distribution Panel (SDP) System J/JE/Jragyn Introduction In RPGs, there can be a wide variety of different means to power up your character. Sometimes its via basic level ups, sometimes you consume items, sometimes it is purely from equipment, and the list goes on. This system is the "Stat Distribution" system, where the player gains points from whatever means, and then spends them to power up various parameters. In most the stat distribution systems I've seen, it was always purely points typically gained by leveling up, and then spent on...
Archived First Post
Stat Distribution Panel (SDP) System
J/JE/Jragyn
Introduction
In RPGs, there can be a wide variety of different means to power up your character. Sometimes its via basic level ups, sometimes you consume items, sometimes it is purely from equipment, and the list goes on. This system is the "Stat Distribution" system, where the player gains points from whatever means, and then spends them to power up various parameters. In most the stat distribution systems I've seen, it was always purely points typically gained by leveling up, and then spent on single parameters one at a time, always up. The term "panels" seen in the title comes from the quirk of this system, where the RM dev can group up a collection of parameters that all will be powered up at the same time (or powered down if you want) when leveling up your "panels". This gives the power to the RM dev to allow for some creative spins on how their players level up.
Features
- Create "panels" that contain one or more parameters that affect the player on a per-actor basis.
- Parameters can be any of the 27 parameters, be it the base (MHP/ATK/MAT) or ex (HIT/EVA/CRI) or sp (GRD/REC/EXR).
- Parameters can increase flat or by percent (use caution with percent, especially when working with ex/sp params!)
- "Panels" have a basic cost formula that is largely adjustable to be flat or multiplicative based on the rank.
- "Panels" can be ranked up one or a thousand times if you felt the need to allow the player such versatility.
- "Panels" have an open space for javascript to execute upon maxing out the rank (such as learning a new skill or unlocking another panel).
Screenshots
How to Use
Because I built it to work with JABS, it is designed to hook into the JABS quick menu. However, it should work fine without, and live happily in your main menu, or just from plugin command scene call.
// The following notes go into an enemy's note box:
<sdpPoints:NUM>
// Where NUM is the number of points you want this enemy to reward the player with.
// The following enemy note is optional; I built them for my project, but you can use it too:
<sdpPanel:KEY:ITEM_ID:DROP_CHANCE>
// Where KEY is the unique string identifier for the panel.
// Where ITEM_ID is the id of the item in the database that maps to an item.
// Where DROP_CHANCE is the integer percent chance of the item dropping.
/*
The design concept behind having an enemy directly drop the panel was that panels would
uniquely be dropped by enemies, which activated a common event, which had some party
conversation and unlocked the panel. This is not required. You can just as easily use
the plugin command however you wish to unlock a panel at any time.
*/
All configuration for SDPs to be unlocked by the player are found within the plugin settings. See the demo project for samples.
Plugin Commands / Script Calls / Plugin Settings
From top to bottom depicted in the screenshot of plugin commands above:
- Access the SDP Menu:
- Unlock Panel(s):Immediately brings up the SDP menu.
- Lock Panel(s):Unlock one or more panels by their key that is configured within the plugin settings.
Unlocked panels are available in the SDP menu for all actors to rank up with SDP points.
If the key does not match any in the plugin settings, nothing will happen.
If the panel is already unlocked, nothing will happen.
- Add/Remove SDP points:Lock one or more panels by their key that is configured within the plugin settings.
Locked panels are absent from the SDP menu for all actors, and any ranks in a locked panel will not affect the actor's parameters.
If the key does not match any in the plugin settings, nothing will happen.
If the panel is already unlocked, nothing will happen.
- Add/Remove party's SDP points:Modify any one actor's SDP points by a given amount.
Negative amounts will result in reducing an actor's points instead.
Modify all actors in the current party's SDP points.
Negative amounts will result in reducing all actor's points instead.
From top to bottom depicted in the screenshot of plugin settings above:
- SDP Switch:
- SDP Icon:If this switch is ON/true, then this system will available in the main menu (or JABS quick menu if using JABS).
Turning this switch to OFF/false does not disable panels that may have been ranked up.
- Stat Distribution Panels:The id/index of the icon that you want to represent SDP points.
- SDP JABS Menu Icon:See the next spoiler for details.
- Show In Both:The id/index of the icon that you want to represent the command in the JABS quick menu.
Not applicable if not using JABS.
If this is set to true, then the command to access the SDP menu will be present in both the JABS quick menu and also the main menu. If set to false, then this will only show up in the JABS quick menu.
Not applicable if not using JABS.
When you enter the "Stat Distribution Panels" setting, it'll bring you to a list view of all panels that you've created (or that were predefined by me). All panels must be defined here that you want to include in your project. Panels can be created/adjusted here, and it'll affect existing save files. Though you can adjust parameters that will allow balance adjustments on existing save files, if the player has maxed a panel, the reward cannot be re-earned or changed.
Click into the below spoiler to learn more about panel configuration.
Name:
Key:The name that represents this panel.
This is what shows up in the list of SDPs as depicted in the screenshot in the "Screenshots" section of this post.
IconIndex:This is a unique identifier for this specific stat distribution panel.
This key MUST be unique, or it will lead to problems with the plugin.
It can only be letters, numbers, and underscores.
Is Unlocked:The id/index of the icon you want to sit to the left of the panel name as seen in the screenshot in the "Screenshots" section of this post.
Description:Whether or not you want the game to begin with this panel unlocked.
Unlocked panels are available for the player to rank up.
MaxRank:The text that shows up in the bottom help window.
The next three config options are related to cost.The maximum rank that the player can rank up this panel.
The formula is:
baseCost + (multGrowthCost * (flatGrowthCost * rank))
PanelParameters:
MaxReward:See the next spoiler for details.
MaxDescription: (not pictured in the screenshot above)This is an open text space where you can write freeform JavaScript/EcmaScript.
The letterais a shorthand to the current actor (leader) that is ranking up the panel.
The default that populates this field is something likea.learnSkill(123), as an example for teaching the actor who maxed the panel a new skill, but you can put any javascript in here your heart desires.
Some flavor text that shows up in the details window above the parameter details.
When you enter the "Panel Parameters" setting, it'll bring you to a list view of all parameters that you've created (or that were predefined by me). Here you will define all parameters that this particular panel affects.
Parameter Id:
Growth per Rank:Though it appears as a number here, when you open it up it will give you a friendly dropdown to show all available parameters to modify.
It is important to note that I renamed the following: ATK >> "Power", DEF >> "Endurance", MAT >> "Force", MDF >> "Resist", AGI >> "Speed".
Growth Type:The amount that you want to grow (or reduce) per rank of this panel.
If this is negative, it will reduce the parameter instead.
If the Growth Type is "false" (percent), then this number will represent the percent that it affects it's parameter instead of flat affecting it.
If this is set to "true", then it will be flat growth. If it is set to "false", it will be percent growth.
Be careful about using percent growth with the sp/ex parameters!
I also built this to work in tandem with enemies as mentioned before. If you opted to follow the concept I described where enemies can provide SDPs, then the following script call may also be useful to know:
// where KEY is the key of the panel you want to know if is unlocked:
$gameSystem.getSdp(KEY).isUnlocked();
Demo
A demo showcasing the primary functionalities can be found at the download link below.
Download
The SDP system lives in my test-bed project, so this should be the same link as the one you find in my JABS thread.
- JABS Demo
Final Note
I deliberately left all code open for the public to view and edit as they see fit (please be kind and give credit where credit is due!).
Additionally, if you have questions about the code, I'd be happy to explain most anything you'd see in the J-SDP.js file (or any of my plugins).
Thank you, and happy RM-ing!
- I believe it was Avy's work that created the icons in the iconset. It is a bit patchworky because I wanted more things, but still, credit is due where credit is due.
- The characters/faces that are named with the pattern: "chara_*" are just characters I made using the built-in character generator. You are free to use them if you want, but know that with a little bit of time you could probably make your own! (and a bit of paint.net efforts)
Features Mentioned
- Create "panels" that contain one or more parameters that affect the player on a per-actor basis.
- Parameters can be any of the 27 parameters, be it the base (MHP/ATK/MAT) or ex (HIT/EVA/CRI) or sp (GRD/REC/EXR).
- Parameters can increase flat or by percent (use caution with percent, especially when working with ex/sp params!)
- "Panels" have a basic cost formula that is largely adjustable to be flat or multiplicative based on the rank.
- "Panels" can be ranked up one or a thousand times if you felt the need to allow the player such versatility.
- "Panels" have an open space for javascript to execute upon maxing out the rank (such as learning a new skill or unlocking another panel).
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
I deliberately left all code open for the public to view and edit as they see fit (please be kind and give credit where credit is due!). Additionally, if you have questions about the code, I'd be happy to explain most anything you'd see in the J-SDP.js file (or any of my plugins). Thank you, and happy RM-ing! Spoiler: Credits
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...