[ADDON] AP – Ability Distribution

The Ability Distribution plugin is an addon to my Stat Distribution plugin: It will thus not work on its own. Make sure that both plugins are always equally up to date.

This plugin will extend the stat distribution plugin with a toggle that allows you to switch between increasing your parameters and Abilities.


What are abilities?

Every hero can have his own set of abilities or you could have the actors share the same abilities. It’s up to you.
Abilities don’t do anything on their own. It will be your job to integrate abilities into wherever you want them. A few examples for the use of abilities:

  • You want to open this magicly sparking magic chest of Magic? You better have a high ability level in Perception then!
  • You can make a skill’s damage/healing/absorb scale with ability levels instead of the usual and boring default params.
  • You use Yanfly’s Class Params? Great, why not make a param scale with an ability level? Your actors could get extra HP for having a high Tenacity ability level. Example formula would be:
    maxhp = 200 + (level * 30) + (user.abilityLevel("Tenacity") * 60)

    This formula means: Base HP value of 200 and the actor gains 30 HP per level. For each point in tenacity, their HP increases by another 60. You can of course make the values vary for every different class! You could have Tenacity have a bigger effect for Warriors and a smaller effect for mages!

These are just some examples of usage that come to my mind. You can use these abilities basically anywhere!



This plugin doesn’t really require any adjustments. There’s one thing that you might wanna change though: The key binding for switching between the Stat and Ability windows. You can do so in the plugin parameters.

Now onto the most important part of this plugin: The script commands.

$gameActors.actor(x).addAbility(“name”, startValue, maxValue, requiredPoints, growth, color1, color2)

color1 and color2 are optional – they will default to text color 10.

I know this looks extremely overwhelming at first but it loses its scary look if you inspect it close enough. In the paragraph above, I mentioned that you have to add abilities to your actors. There are no pre-defined abilities or anything of the sort. You have to add each ability that you want in the game manually to the actors you want to have this ability.

Let’s take an actor from my game: Dean. His actor ID is 4 in the database. So I replace the x above with 4, since I want to add an ability to him. Let’s add the Tenacity ability I’ve mentioned above. That means I replace “name” with “Tenacity”. I want Dean to start with 0 Tenacity and I want him to be able to increase it up to 30. For this reason I replace startValue with 0 and maxValue with 30. I need Dean to be able to get this ability up rather quick so I give this ability a cost of 1. To do this I replace requiredPoints with 1. Since I have a low cost for the ability I’ll give it a slow growth: Hence I replace growth with 1. I want to use the default colours so I just leave those parameters blank. The final command looks like this:

$gameActors.actor(4).addAbility("Tenacity", 0, 30, 1, 1)

These commands are best used in Conditional Branches, since they return either true or false:

  • $gameActor.actor(x).hasAbility(“abilityName”)

Returns true if actor x has ability “abilityName”. Returns false otherwise.


  • $gameActor.actor(x).checkAbilityLevel(“abilityName”, level)

Returns true if the ability level of “abilityName” for actor x is bigger than or equal to level. Returns false otherwise.

This one returns an integer:

  • $gameActors.actor(x).abilityLevel(“ability”)

Returns the level of “ability” of actor x.


With these commands existing abilities can be altered:

  • $gameActors.actor(x).increaseAbilityLevel(“ability”, amount)

Increases “ability”‘s level by amount.


  • $gameActor.actor(x).abilitySetName(“oldName”, “newName”)

Sets ability “oldName”‘s name to “newName” for actor x.


  • $gameActor.actor(x).abilitySetMaxValue(“ability”, value)

Sets “ability”‘s maximum value to value for actor x.


  • $gameActor.actor(x).abilitySetReqPoints(“ability”, value)

Sets “ability”‘s required points to be upped once to value for actor x.


  • $gameActor.actor(x).abilitySetCurrentValue(“ability”, value)

Sets “ability”‘s current value to value for actor x.


  • $gameActor.actor(x).abilitySetColor1(“ability”, newColor)

Sets “ability”‘s color 1 to newColor for actor x.


  • $gameActor.actor(x).abilitySetColor2(“ability”, newColor)

Sets “ability”‘s color 2 to newColor for actor x.


  • $gameActor.actor(x).abilityDelete(“ability”)

Removes “ability” from the list of actor x’s abilities. This is permanent and no trace of this ability will be left over so be sure to use this with caution.



Default Window: Determines which of the both windows will be open when the scene is called. Possibilites: stat ability

Switch Key: The key number for switching windows. See below for more information on this.

Key Name: The name of the Key on the keyboard.

Lower Help Window Text 1: This text will be shown in the lower help window when the stat window is active.

Lower Help Window Text 2: This text will be shown in the lower help window when the ability window is active.

Help Window Text: This text will be shown in the upper help window when selecting an ability.

Return Text: This text will be shown in the upper help window when the Finish command is selected.

About the key parameters: You can either use a pre-defined key by the Maker Engine (for a list of these look in the plugins help file) or you can use a key that you want (I chose “S” for this). To find out the number that refers to the key of your liking follow this link: http://www.theasciicode.com.ar/


Get it at my Dropbox


54 thoughts on “[ADDON] AP – Ability Distribution

      1. Until then I tried to store the value of an ability, then using $gameActor.actor(x).abilitySetCurrentValue(“ability”, 0) to reset that ability.

        It does work for now, except because I don’t know how to give attribute points (that’s the reason of the stored value).


      2. By attribute points you mean what exactly? The ability value?

        If that’s it than that’s my fault because I forgot to document some script commands (which I’ll do right now).

        The command for increasing an ability’s level is $gameActors.actor(x).increaseAbilityLevel(“ability”, amount);


  1. Hi Alistair, is there an easy way to check the value of all party members or all members in the active party without an eventing triathalon?


    1. Hi 🙂 ,
      It really depends on what you want to do.
      Am I getting this right: You’re looking for a faster way than having to use the script command “actor.abilityLevel(x)” over and over?


      1. Something like this should work:

        for (var i = 0; i < $gameParty.members().length; i++) {
        var actor = $gameParty.members()[i];
        var level = actor.abilityLevel("ability");
        // Do Stuff

        This snippet loops through the actors in the party and enables you to use the variables “actor” and “level”. Actor refers to the party member and level refers to the level of the specific ability.
        You’ll need to replace “ability” in Line 3 with the actual ability name.

        It really depends on what you want to do with the information you get.
        You’ll need to replace “// Do Stuff” with whatever you want to do with the information you gathered.

        I may be able to modify that snippet to do what you want it to do. You’ll need to tell me what exactly that is, though.


  2. This plugin is almost making it to an essential plugin in my games!

    For instance it works almost flawlessly with YEP_BaseParamControl, the only issue is if you setup Base Params to factor any Ability it won’t refresh MaxHP/MaxMP values through AddAbility/SetAbilityLevel, you have force the game to re-check it through unequipping something or upgrading the value through the Distribution scene, for example (my tricky method is to use Event: Change HP to force the game to re-check stealthily, once I setup the Abilities).

    Another detail is it sadly doesn’t add Abilities to enemies, it just fake-checks enemies’ Abilities and returns 0 value, which doesn’t allow to set up BaseParams and Skills for enemies depending solely on Abilities. It would be extremely useful if you could upgrade this plugin for Enemies as well, especially if you could attach the abilities to the Battlers (the enemies in-battle), as the Abilities wouldn’t be useful for enemies out of battle, I suppose, unless ActionBattleSystems were a thing in MV yet.


    1. Hi!

      The refresh thing should be easy to fix! I’ll get it done very soon.

      Back when I made this plugin I saw no reason for enemies to have abilities since you as a developer can set Base param/ EX param/ SP param values as you like for them. Same goes for almost anything else concerning enemies. Sure, this applies to actors too but unlike enemies actors actually “exist” outside of battle and can potentially change their stats on the map.
      However, I can add this functionality. I’m just not sure when I’ll get around to it.

      Liked by 1 person

      1. Woo! Excellent! Currently this plugin, even without enemy support, works better than any other Custom Stats plugin I’ve tried out so far, and most importantly, it doesn’t insta-crash the game for no apparent reason. Bonus points it even comes with neato Stat Distribution system. ❤

        Also, yeah, I understand your reasons to drop the enemy support, and sorry if I pressed you about the matter, take your time and do it only if you want.


  3. This plugin is wonderful !!
    Congratulations on it!
    I wanted to know if there is a way to add it to the YEP Status Core, as it is possible in your APBlocking plugin.



  4. Hello,

    Cracking plugin!

    I’m going to see if I can figure it out but I was wondering if there was a way that you know of to use a different pool of points for stats and abilities – for example, being rewarded with 5 stat points and 10 ability points to spend on their respective areas?



    1. Having a look through the script it looks like it’d take some lengthy editing so probably isn’t feasible/worthwhile.
      I wonder then, with the OpenStatDistribution plugin command – is there any way to limit this to only show the stat distribution (At character creation for example) and then show only the AP distribution thereafter?



      1. Hi!

        I think I answered this somewhere but as you already found out I won’t split Distribution Points up in the near future. It’s too much of a hassle for me right now.

        I updated the Ability Distribution plugin. It now contains the plugin command “ToggleWindow” which will toggle the default window that’s shown upon entering the distribution scene.


  5. Thanks Alistair.

    Regarding the toggling, I had intended for the initial window during character creation to allow you to edit your stats and then once you enter the game, only your abilities can be increased, so would have liked to disable the stat page completely. I’ll look into eventing this though.

    I did have another question regarding caps – is it possible to set a cap on a stat or ability on a per actor or per class basis? For example, warrior class attack capped at 100 whereas mage class attack capped at 50? I see it is possible for abilities using the maxValue parameter but I don’t see a similar one for stats.



    1. Hey,

      I was thinking that you could set the default window to be the stat window so that when you start the game you’ll be taken to the Stat Distribution scene. After closing the scene you could use the new plugin command to have the Ability Distribution scene appear from there on.

      About the caps: That is not possible right now. I was already planning to add notetags for this but I haven’t gotten around to it yet. Looks like I won’t get to it within the next weeks either since I’m super busy these days! I’m sorry about that!


      1. Ah, I get you now. I’ve set that up and it works perfectly – opening the stat distribution during character creation with the plugin command OpenStatDistribution and removing the toggle option allows the menu to have the ability distribution once the character creation is done using the ToggleWindow command.

        Thanks for explaining. This actually negates the need for caps per class as my concern was with the player raising their stats after character creation which is now no longer an issue. 🙂

        Liked by 1 person

  6. Hi Alistair, would it be possible to add multiple pages or the ability to have a shorter ‘bar’ if using numbers to the ability window to allow for a greater number visible? Thank you!


    1. Hi Tevak!

      I’ve gotten a lot of requests concerning this.

      I’ll just quote my own post from the RPG Maker Forums here since everything I said back then still applies:

      “Unfortunately scrolling won’t be a thing. If you need more space you need to enlarge your resolution.
      Just for reference: With 1024×768 you can have up to 16 abilities and with 1680×1050 32 abilities have space.
      Perhaps in the future I’ll change the plugin to create a third column so that even more abilities fit. I just don’t have the time to do this right now. Sorry about that!”

      It has a very high priority for me too and I’m trying to get it done sometime soon. I’m just genuinely super busy right now and I barely have time for scripting. Sorry!


    1. It’s not working because if you look closely those are two different quotation marks around the word Tenacity. WordPress is to be blamed for that. Just replace the quotation marks in the Maker.


  7. Hi Alistair, thanks for adding the expanding rows, it works great! I’m wondering if there’s a way already in the plugin to change the description of specific abilities?


    1. Hi Tevak!

      I think you’re looking for the command I added in V1.03.
      I forgot to add it to the list at the top of the plugin, sorry!

      Here’s what it says in the V1.03 notes:

      – You may now use the new function actor.setAbilityDescription(abilityName, descriptionText)
      to have a specific ability display a custom text in addition to the default text in the help

      There’s another update coming soon and I will make sure to add this command to the list of commands.


      1. Amazing Plug-In, I’m able to make my stats similar to “Pillars of Eternity” with your plug-in like having the ability Might Increase Dmg, and a little HP. Works really well!

        I was wondering where exactly do you place the –

        -“actor.setAbilityDescription(abilityName, descriptionText)?”

        I’m quite lost at this point, not sure whether to place it under the event/script, it seems to be causing an error. Sorry, I’m still learning, and new at this stuff. May I have some assistance >.> just a little bit more specific? Also is it possible to disable the ability to add to the PARAMS making this plug-in the only choice?

        Again thanks very much for the plug-in.


  8. Hi!

    The command you mentioned needs to be placed in a script call but you need to replace actor with the long version e.g. $gameActors.actor(x) with x being the ID of your actor.

    So you want to only use the Ability Distribution plugin? In that case just set the Plugin Params “Default Window” to “ability” and “Switch Key” to something that is not used by the keyboard. I haven’t fiddled with the keyboard settings too much but maybe use something like -1 or leave it completely blank? That should prevent the player from being able to switch to the Stat Window.


  9. Quick request i wanna be able to do something like this
    $gameActors.actor(1).addAbility(“BlackMagic”, 0, 10, 1, 1)
    $gameActors.actor(1).abilitySetReqPoints(“BlackMagic”, $gameActors.actor(1).abilityLevel(“BlackMagic”)+1)

    id like to make the cost scale with the level of the ability but with this code the cost doesnt update any way to make that happen?


    1. I updated the plugin, grab the new version.

      You need to use quotes around the expression that you want to set as the cost. Like so:

      $gameActors.actor(1).abilitySetReqPoints(“BlackMagic”, “$gameActors.actor(1).abilityLevel(‘BlackMagic’)+1″)

      For the word BlackMagic you use single quotes ‘ instead of ” or otherwise the code thinks the expression stops there which it does not.


  10. say… two things? 1. how could i include an “Abilities” value inside a damage formula?
    2. how can i have an actor auto learn a skill as soon as an ability reaches a certain value?



    1. Use “a.abilityLevel(“x”)” in your formula.

      Example formula:
      “50 + a.abilityLevel(“Fishing”) * 20″

      This formula means: Base damage of 50 + 20 damage for each point in the Fishing ability.

      For your second question: That is not possible. You will have to do this manually.


  11. Hey Alistair, the new version seems to be bugged with the set required points? The description cost will dynamically update but the actual cost remains the same. Also thanks for adding custom descriptions!


      1. Yes, sorry it was my fault i was using a global variable to add abilities en masse and it was reading it as the last actor i added them to. Sorry for the confusion OTL


  12. Sorry for spammin your page today.
    I’m wondering if there’s some method by which a consumable item could be created which, when used upon an actor, increases a single ability by a set amount of points?


    1. Haha, that’s fine. 🙂

      That is possible. Set the item to HP or MP Recover and use the following in the formula:
      “b.increaseAbilityLevel(“ability”, amount);0″
      Replace ability with the name of the ability and amount with the amount of levels you want to grant.

      The item probably won’t be usable if the actor is at 100% HP or MP (whichever you used) so you’ll need to add the TP Gain Effect. Just use the value 0 so that the actor doesn’t actually get any TP. It’s just necessary so that the Maker allows you to use the item even when the Actor has no missing HP/MP.


      1. Dude, that is an ingenious way of doing it. I need to keep remembering that damage formulas can do more than just calculate damage. : D
        … now there’s an idea for a dick-move of a final boss; with this idea in mind, it should be entirely possible to have attacks that can decrease abilities. xD Then again, I guess stackable states could have pretty much the same effect.

        Liked by 1 person

  13. Hi Alistair! I’m trying to finagle something and I’m wondering how much i’d have to do in order to modify abilities dynamically based on a rate? Thanks!!


  14. Hi Alistair!
    Nice plugin man, really love it 😀

    But there’s only one problem for me… I don’t want to use the status distribuition system, only the ability distribuition… so, can I disable the status distribuition In menu and use only the Ability Distribuition?

    (Sorry my bad english D: )


  15. The Ability Distribution plugin has a plugin parameter called “Default Window”.
    Set it to “ability” (without quotes).

    You’ll have to fiddle with the parameters “Switch Key”, “Lower Help Window Text 1” and “Lower Help Window Text 2” as well.
    Just empty those three out and you should be fine.


  16. Nice script! Works flawlessly for my purposes.
    But I was wondering…

    I’m using this script as requirements to learn skills (Yanfly’s Learn Skills script). So I need a way to check if the currently selected actor has enough points in a skill for it to show up and be learned.

    For example: Actor X levels up. They get some Stat Points (your other script), Ability Points (this script) and some Job Points (Yanfly JP). One of the Abilities (using this script) is called “Fire Magic” and Actor X wishes to learn the skill Fire I. In order for it to show up in the learn skills menu and acquired with JP, Actor X must have “Fire Magic” equal to or greater than (n).
    I need some way for the engine to know who is currently selected in the Learn Skill menu and then check that Actor’s Ability level to display which skills they can learn. That way Actor Y can’t learn something because Actor X has enough points invested in an Ability.


    1. That’s possible of course and I have no idea why I didn’t alter the code for all properties back when I made that change. I’ve noted this down on my to-do list.


  17. Hello i realy realy like this system! but i have a question about it.
    like you use many of yanfly scrips compadibilty. i wanted to ask is it possible to make this here Compatible with yanf Class-change-core system ?


    the problem what i have atm is, if i “change” my main class it is counted as a lvl up and i get extra Stat points / ability points. with that you could have infinity points to distribute…
    is it somehow possible to “not gain points from class change from yanf script” ?
    if yes would be nice if you could help me thanks !


    1. also, is it possible to make a “help” menü ? like a descreption of this “ability” what it exacly do ? maybe im just stupid but i cant find where i could writte a descretion of ability A and and for ability B


    2. For the description use this: actor.setAbilityDescription(“abilityName”, “descriptionText”)

      About the class change problem: I thought I had already fixed that… I will take care of it.


Write a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s