[VisuStella MZ addon] Custom Parameters with leveling and gearing

● ARCHIVED · READ-ONLY
Started by JJMENET 15 posts View original ↗
  1. Motivation:
    Deviating from built-in system from RM is always my thing. Team VisuStella have had a great job making nice plugins, in this time especially custom parameter in core engine.

    Unfortunately, my greed turns out to be greater than what it provides: I wanted those custom parameters to grow along leveling up and to be affected by equipment. I couldn't find how to do those, so I just made those myself.

    ============================================================================

    Introduction

    ============================================================================



    This Script will be managed only while VisuStella MZ not implementing this.



    What this plugin does:

    * Add per-level base parameter configuration by Classes

    * Add base parameter configuration by Enemies

    * Enables equips to affect your custom parameters flat

    * Enables custom traits to affect your custom parameters in Actor, Class, Equip



    so that we can design some 'progress' on these parameters.



    ============================================================================

    How to Use

    ============================================================================



    Requirement: VisuStella MZ Core Engine. Place this plugin below that.



    ① Set your custom parameters in VisuMZ_0_CoreEngine.

    Then you decide and write somewhere down the relation between some number and

    your custom parameter. Just use 1, 2, 3, not 42, 1000000 or such.

    i.e.,

    STR ↔ 1

    DEX ↔ 2

    CON ↔ 3 and so on.(we will use this example onward)



    ② In each custom parameter setting, replace Value Javascript with following:



    // Declare Constants

    const user = this;

    // Calculations

    return user.customParam(1);



    number is 1 if it is for STR, 2 for DEX, and such. Done with VisuMz_0_CoreEngine.



    ③ In this plugin, set Parameter with your largest number of your custom parameters.

    Make a miss here and you see your game cannot even start.

    Done here with this window.



    ④ This plugin is for classes and equips, and enemies. for class, this plugin gives

    a level curve to the classes. More precisely just a level straight line.



    You want your Swordsman's CON to be 18 on level 1 and 300 on level 99, you add notetag

    <cp[3]: [18, 300]> to your Swordman class. you can change 18 and 300 as you want,

    but not levels because I have no time. Growth is just linear because I have no time.



    ⑤ Then Equip flats. Say you want your Skimpy Swimsuit to give your character

    +300 DEX. then just add <cp[2]: +300> notetag to that item. Negative stats are

    also possible.



    ⑥ Enemies. Add enemy notetag <cp[1]: 18> for 18 STR of that enemy.

    For now, this plugin do not cover Enemy Levels Plugin.



    ⑦ Last, custom traits with % inc/decs. this works on actor, class, equips.

    If you want your Hero to be have 50% increased STR(that's 150%),

    write <cpr[1]: 1.5> in Hero's notetag.



    ============================================================================

    What this plugin cannot do (for now)

    ============================================================================



    * No custom parameter buff.

    Maybe I can add them later if I can.



    * Limitation on how to make parameter curve.

    I guess you can edit this plugin to suit your needs. That part is in the

    'Game_Actor.prototype.customParamBase' function. I can also work on this sometime,

    but priority is low.



    ============================================================================

    Terms of Use

    ============================================================================



    Use freely. No Credit needed but appreciated.

    In case of credit just put 'JJMENET' somewhere.



    ============================================================================

    Note

    ============================================================================



    * This plugin will be no more maintained if Team VisuStella cover this feature.

    I just made a working sample, not a maintainable software and making

    such a software should be appreciated.



    * Thank you whole RM community including Team VisuStella for ongoing great work.



    ============================================================================

    Version History

    ============================================================================



    1.01

    Added support for enemies.



    1.00

    Initial and unnoted updates.



    ============================================================================

    End of Helpfile

    ============================================================================

    It's my first plugin and posting. Any comment constructive will be appreciated. Thank you.
  2. [move]MZ Plugin Releases[/move]
  3. Excellent plugin. Great job.

    But I do have a question. Would the notetag <cp[1]: [x,y]> work for enemies as well?
    Basically, could assign the custom parameters (or even parameter growth, in case we make enemies that can change level using the Visustella Enemy Levels Plugin) to enemies?

    Also will, in the future, this plugin would support the option to alter the custom parameters using States?
    (i.e., adding <cpr[1]: 0.5> to a State's notes to temporary cut the target's custom parameter 1 in half.)
  4. CrocPirate said:
    Excellent plugin. Great job.

    But I do have a question. Would the notetag <cp[1]: [x,y]> work for enemies as well?
    Basically, could assign the custom parameters (or even parameter growth, in case we make enemies that can change level using the Visustella Enemy Levels Plugin) to enemies?

    Also will, in the future, this plugin would support the option to alter the custom parameters using States?
    (i.e., adding <cpr[1]: 0.5> to a State's notes to temporary cut the target's custom parameter 1 in half.)

    Thank you for the comment. my bad, I almost forgot to set enemy parameter. I just added the functionality now. You can <cp[1]: 18> on enemies now with updated file. Unfortunately, I haven't checked the Enemy Level plugin by now, so implementing that will be difficult for now, so not <cp[1]: [10, 100]>. Sorry for that.

    Custom parameter rate change using States is in my plan, though! It's just matter of time. Keep watching. Thanks!
  5. Cool. Thanks for your hard work!
  6. How do I call this param in a variable? I want it to show up in my custom menu but not sure how?
  7. Etarxer said:
    How do I call this param in a variable? I want it to show up in my custom menu but not sure how?
    @Etarxer You set the value of a variable to a script. So:

    $gameActors.actor(x).customParam(y)

    x = Actor's place in the Actor Database, y = what custom parameter you want to track.
    So if you want a variable to have the value your 1st custom parameter of the 1st Actor in your database, then it will look something like this:
    custom1.png

    I hope this helps.
  8. CrocPirate said:
    @Etarxer You set the value of a variable to a script. So:

    $gameActors.actor(x).customParam(y)

    x = Actor's place in the Actor Database, y = what custom parameter you want to track.
    So if you want a variable to have the value your 1st custom parameter of the 1st Actor in your database, then it will look something like this:
    View attachment 195407

    I hope this helps.
    It does! Thank you so much!
  9. Would it be possible to introduce a new feature? I am hoping to have consumable items that increase custom stats defined in VisuMZ, like how RPG Makers already allow you to create items that for example permanently increases a designated stat by x points when the appropiate item is used/consumed.
  10. Kaimi said:
    I am hoping to have consumable items that increase custom stats defined in VisuMZ, like how RPG Makers already allow you to create items that for example permanently increases a designated stat by x points when the appropiate item is used/consumed.
    @Kaimi You already do this with this plugin. I've tested this out months ago. There's how to do it.
    1. Create a consumable item that calls a Common Event like this:
    Custom1.png

    2. Create a Common Event that will look something like this:
    Custom2.png

    The "$gameParty._targetActorId === x" is there to make sure that only the Actor you're using the item on will have their custom parameter(s) altered.

    Finally: $gameActors.actor(x).addCustomParam(y, z);
    x = the actor's number in the Actor Database.
    y = the custom parameter you want to alter.
    z = the value you want to add or subtract from the custom parameter.


    I hope this helps you.
  11. Oh, thank you! Didn't know about that!
  12. Greetings, I'm here to say I absolutely love your plugin, downloaded it ages ago and only now trying it out and I have a few questions:

    1. can I make it so the classes earn stats per level instead of making a linear growth (from my understanding the plugin makes a growth line similiar to the database, but you can set the parameters as high as you want? what if I want to give a certain class +1 strength upon leveling up for every level? this would make it easier to increase the cap to the user's liking or did I get it all wrong and the plugin makes it so actors earn example: 18 strength from level 1 to 99 and past 99 it earns 300?

    talking about this note tag here

    <cp[1]: [18, 300]>

    2. how do I know what my custom parameters affect whch base stats and how do I manipulate that?
    you say we have to replace the java script value to this

    // Declare Constants

    const user = this;

    // Calculations

    return user.customParam(1);

    for strength, but like, how do I customize what the values do then since I deleted the original values that specified everything? I'm a noob ;v;
  13. So, I am trying to make a custom Parameter start off as 0, but then get additions from equipment, but it still says 0.

    Any recommendations on how I can fix that?
    1736288401695.png
  14. Hello!
    I am testing this and i keep getting an error that once I open the equip menu, i get that 1 is not defined. What would cause this issue?

    Zsloth24 said:
    Hello!
    I am testing this and i keep getting an error that once I open the equip menu, i get that 1 is not defined. What would cause this issue?
    Im sorry it says Cannot read property '1' of undefined
    Screenshot 2025-02-12 152222.png
  15. tsurugikage said:
    So, I am trying to make a custom Parameter start off as 0, but then get additions from equipment, but it still says 0.

    Any recommendations on how I can fix that?
    View attachment 328251
    When you're specifying the amount in the notetag, you would set it to 0 there. You're setting it to 0 in the js value and not checking the actual notetag's value. Awesome your parameter is 1, you'd want the 0 to be here: <cp[1]: [18, 300]> <-- So, if you want it to start at 0, that first value there would be 0. If you want a max of 0, set the second value as 0 as well. Though, you wouldn't need this script for that, as you can just set that value as-is in VS' custom parameters to begin with. It'd look something like: <cp[1]: [0, 0]> Meanwhile, the return would be: return user.customParam(1);
    Zsloth24 said:
    Im sorry it says Cannot read property '1' of undefined
    View attachment 331358
    You likely are not setting up the custom parameter in VisuStella first. You'd need to open the config for the CoreEngine and go to the "Custom Parameters" section. If that's empty, then you don't have any parameters. You'll want to add the parameter there first (with the first one in the list being the one that this script will see as "1"), then run the notetag on the character.