[MZ] Stat Distribution Panel (SDP) System

● ARCHIVED · READ-ONLY
Started by Jragyn 36 posts Page 1 of 2 View original ↗

  1. 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
    Screenshots
    1615941731572.png

    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.

    Plugin Commands & Script Calls
    There are also a couple of note tags that come into play with this plugin, let us go over them:
    JavaScript:
    // 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
    1615942333647.png

    From top to bottom depicted in the screenshot of plugin commands above:
    - Access the SDP Menu:
    Immediately brings up the SDP menu.
    - Unlock 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.
    - Lock Panel(s):
    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 SDP points:
    Modify any one actor's SDP points by a given amount.
    Negative amounts will result in reducing an actor's points instead.
    - Add/Remove party's SDP points:
    Modify all actors in the current party's SDP points.
    Negative amounts will result in reducing all actor's points instead.


    1615987688461.png
    From top to bottom depicted in the screenshot of plugin settings above:
    - SDP Switch:
    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.
    - SDP Icon:
    The id/index of the icon that you want to represent SDP points.
    - Stat Distribution Panels:
    See the next spoiler for details.
    - SDP JABS Menu Icon:
    The id/index of the icon that you want to represent the command in the JABS quick menu.
    Not applicable if not using JABS.
    - Show In Both:
    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.
    1615988031163.png

    Name:
    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.
    Key:
    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.
    IconIndex:
    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.
    Is Unlocked:
    Whether or not you want the game to begin with this panel unlocked.
    Unlocked panels are available for the player to rank up.
    Description:
    The text that shows up in the bottom help window.
    MaxRank:
    The maximum rank that the player can rank up this panel.
    The next three config options are related to cost.
    The formula is:
    Code:
    baseCost + (multGrowthCost * (flatGrowthCost * rank))

    PanelParameters:
    See the next spoiler for details.
    MaxReward:
    This is an open text space where you can write freeform JavaScript/EcmaScript.
    The letter a is a shorthand to the current actor (leader) that is ranking up the panel.
    The default that populates this field is something like a.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.
    MaxDescription: (not pictured in the screenshot above)
    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.

    1615989020479.png

    Parameter Id:
    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 per Rank:
    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.
    Growth Type:
    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:
    JavaScript:
    // 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.

    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!



    Credits
    - The tilesets and some characters/faces (and the obvious core plugin at the top) are not mine, they were from VisuStella and co., so... thank you for making even other devs lives like my own easier to just pick up and get started doing actual content creation!

    - 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)
  2. Coming:
    v1.2 SDP System now lets you know what your reward is!
    • I don't know how I'll accomplish this since the rewards are open-ended javascript, so tbd.

    Released:
    v1.1 SDP System now plays nice with non-JABS-users!
    • Fixed a bug where I forgot to accommodate non-JABS users (oops!).
    • Added some text in the post-battle rewards log to display earned SDP points.
    • Added new rewards functionality per @lokirafael 's request:
      • Any number of rewards can be gained at any rank.
      • Added shortcut for "repeat rewards" (rewards that occur at every rank up of a SDP):
        • use rank -1 in the plugin settings when defining a rankup reward.
      • Added a shortcut for "max rewards" (rewards that occur when a SDP reaches max rank):
        • use rank 0 in the plugin settings when defining a rankup reward.
      • Allow for a SDP to grant a javascript-defined reward for any rank.
        • a couple examples of some easy javascript rewards are in the demo.
    • Provided a sample of how the "enemies drop panels exactly once" works in the demo.
      • This doesn't work quite as intended for non-JABS users, it will deposit an item in your inventory instead of auto-collecting as was intended in JABS.
    v1.0 SDP System is initially released~
    • The system was initially released: enter Stat Distribution Panel System!
  3. That's really useful. I have 2 question about the system:

    1 - Can I check the rank of a specific panel? (to eventing purposes)
    2 - It's possible to run a JS every level up as to let's say: Unarmed school lv 5 will apply the passive effect of using your full Str stats. It would be really dynamic if we could run a small code in specific ranks.

    Thanks.
  4. lokirafael said:
    That's really useful. I have 2 question about the system:

    1 - Can I check the rank of a specific panel? (to eventing purposes)
    2 - It's possible to run a JS every level up as to let's say: Unarmed school lv 5 will apply the passive effect of using your full Str stats. It would be really dynamic if we could run a small code in specific ranks.

    Thanks.

    1 - You can, though it isn't the most user-friendly because I didn't think people would want that :aswt::
    JavaScript:
    // where KEY is the unique key for the panel you want to know the rank of.
    // the "rankByParty" variable will contain the current rank.
    const rankByParty = $gameParty.leader().getSdpByKey(KEY).currentRank;
    
    // where ACTOR_ID is the id of the actor from the database.
    // where KEY is the unique key for the panel you want to know the rank of.
    // the "rankByActor" variable will contain the current rank.
    const rankByActor = $dataActors[ACTOR_ID].getSdpByKey(KEY).currentRank;

    2 - The current state of the plugin does not allow for exactly what you're asking for... however, to accomplish what you're describing, you can also consider: Creating multiple low-rank panels that each have max rewards of the increments you're describing.
    When I was initially creating this plugin, I was debating adding such functionality to grant greater flexibility, but at the time I was like "who would want that? haha noooo onnneeee", and then I only added the max rewards.

    Both of those asks are things I will likely add in the future, but I needed to get this out there first to see what people want. What I want may not always include what everyone wants at first (since I just about every plugin I make was for a need I had in a project first, then I release it to the public later).

    Thanks for your swift feedback!
  5. Thanks.

    I'll check the 1st solution when I get home tomorrow. It's a little convolute but should do the work xD

    The second one I think multiple painel will make it extremely painful to keep track so I will wait for a update or I can make a evented system to make a check every time the system is called. (Not sure it will work but I'll give a try later)


    The plugin has a lot of applications, it's sort like common event menu from yanfly where you can adapt it to many needs. If you manage to implement theses 2 things will be ever mode dynamic.

    (The is always one oddball that will use these functions haha)
  6. lokirafael said:
    Thanks.

    I'll check the 1st solution when I get home tomorrow. It's a little convolute but should do the work xD

    The second one I think multiple painel will make it extremely painful to keep track so I will wait for a update or I can make a evented system to make a check every time the system is called. (Not sure it will work but I'll give a try later)


    The plugin has a lot of applications, it's sort like common event menu from yanfly where you can adapt it to many needs. If you manage to implement theses 2 things will be ever mode dynamic.

    (The is always one oddball that will use these functions haha)

    I've updated the master branch with the updated features you've mentioned (not in the formal release that is on the right side of the github page):
    JavaScript:
    // where ACTOR_ID is the actor's id you want to check the rank of.
    // where KEY is the panel you want to check.
    const rank = $gameSystem.getRankByActorAndKey(ACTOR_ID, KEY);
    
    // you can then assign it to a variable if you want, to use for other things.
    $gameVariables.setValue(VAR_ID, rank);
    // where VAR_ID is the variable id you want to store the value in.

    Additionally, there are now "repeated rank up effects", "specific rank rankup effects", and "max rank rankup effects".
    - "repeated rankup effects" set rank to -1 in plugin settings.
    - "specific rank rankup effects" set rank to the rank you desire in plugin settings.
    - "max rank rankup effects" set rank to 0 in the plugin settings.
    then define the effects in the box.
    You can have multiples of any of these, repeated, max, or specific levels, if you need multiple slots.

    Also the overall plugin setup looks cleaner, I think.

    See the post that contains the changelog for details.
  7. quick questions, what are the dependencies for the plugin, can I use it with visustella menu manager and victory aftermath?
  8. blade911 said:
    quick questions, what are the dependencies for the plugin, can I use it with visustella menu manager and victory aftermath?
    This plugin relies on J-Base which also lives inside the demo project (should be placed above J-SDP).

    It should work fine with VisuStella's Menu Manager Core (though I haven't taken the time to determine what precisely it takes to add it to their menu).

    It is untested with the aftermath, but considering the amount of overhauling done on the aftermath screen, I suspect it may require additional coding to make it work.
  9. It seen the plugin has a dependency I wasn't aware of. It don't work outside of J-ABS.
  10. lokirafael said:
    It seen the plugin has a dependency I wasn't aware of. It don't work outside of J-ABS.
    I'm fairly certain it works without it, but I'll test it again to doublecheck. I explicitly designed it for JABS and non-JABS folks. Perhaps I overlooked something. Thank you for your diligence :aswt:

    edit1:
    Seems you were right. However, I'm positive I wrote all this code before... I must've clobbered these adjustments and uploaded that. Sorry about that. I'll fix it and get it updated. I do want to be clear it will still require J-Base as a plugin (it contains many helper functions being used throughout the system), but it won't require anything else as far as I can tell.

    edit2:
    @lokirafael this has been fixed. You can either redownload the whole demo, or just go into the repository's master branch and grab the latest J-SDP.js plugin and overwrite your own with it. It should just work either way.
  11. Jragyn said:
    I'm fairly certain it works without it, but I'll test it again to doublecheck. I explicitly designed it for JABS and non-JABS folks. Perhaps I overlooked something. Thank you for your diligence :aswt:
    I tried to deactivate all the plugins in the demo just to make sure it was not incompatible with one of my plugins and still gave the error.

    Just to speed things up . That was the error I got in the demo with only J-Base and this plugin active. Sorry, I should be more clear in the bug report. :X1616595793688.png
  12. lokirafael said:
    I tried to deactivate all the plugins in the demo just to make sure it was not incompatible with one of my plugins and still gave the error.

    Just to speed things up . That was the error I got in the demo with only J-Base and this plugin active. Sorry, I should be more clear in the bug report. :XView attachment 183889
    I just finished fixign that. Sorry again. If you peek at the code in the latest, I surrounded it with a conditional to check to see if JABS is even a thing before trying to work with that code. (see edited post above)
  13. Nice Work! How can I open the Distribute Panel off another Actor? It only works on the Leader, if I whant to open for another actor I need to set that actor as leader them open the panel.
  14. Edadinum said:
    Nice Work! How can I open the Distribute Panel off another Actor? It only works on the Leader, if I whant to open for another actor I need to set that actor as leader them open the panel.
    In this plugin's current state, it is exclusively designed to work only with the leader.

    After using it in my own project, I've determined that it should probably actually follow suit with most other menu systems allowing L/R as an actor toggle, but I haven't built that functionality out yet.
  15. Howdy @Jragyn ! Curious if this plugin is still being maintained? Sounds like a really sweet, unique system, and I'd love to use it in my game.
  16. tonymichaelhead said:
    Howdy @Jragyn ! Curious if this plugin is still being maintained? Sounds like a really sweet, unique system, and I'd love to use it in my game.
    It is, though I am lazy and have not updated this particular thread with anything exciting or new despite new functionality becoming available. Instead, the most up to date version lives in my JABS demo, because managing multiple demos and stuff is more work than I'm willing to put forth lol.

    You can find a link to JABS in my signature for downloading to see the latest etc.
  17. Jragyn said:
    It is, though I am lazy and have not updated this particular thread with anything exciting or new despite new functionality becoming available. Instead, the most up to date version lives in my JABS demo, because managing multiple demos and stuff is more work than I'm willing to put forth lol.

    You can find a link to JABS in my signature for downloading to see the latest etc.
    Awesome, thanks for the info! I tried pulling in the SDP plugin from the latest demo. Unfortunately I'm encountering errors with Visustella plugins I'm using (I'm using several battle related plugins). Looks like I might not be able to use this after all. But definitely appreciate your hardwork/contribution to the community with this, and will keep it in mind for future projects as well
  18. tonymichaelhead said:
    Awesome, thanks for the info! I tried pulling in the SDP plugin from the latest demo. Unfortunately I'm encountering errors with Visustella plugins I'm using (I'm using several battle related plugins). Looks like I might not be able to use this after all.
    Yeah, unfortunately, even if I wanted to, I could not troubleshoot issues with their various plugins due to obfuscation. Though I'm sure if you could capture one of their dev's attention, the effort required to extend/implement their code would likely be trivial.
  19. Jragyn said:
    Yeah, unfortunately, even if I wanted to, I could not troubleshoot issues with their various plugins due to obfuscation. Though I'm sure if you could capture one of their dev's attention, the effort required to extend/implement their code would likely be trivial.
    Yeah, really a shame about the code obfuscation when it comes to trying to work out compatibility issues like this. Thanks anyway!
  20. Great plugin! Just one question. Can this be used with custom parameters from say Eli Custom Parameters?