[ADDON] AP - Ability Distribution

Discussion in 'JS Plugin Releases (RMMV)' started by Alistair, Jul 12, 2016.

  1. CyBardo

    CyBardo Cyber Dino Member

    Messages:
    6
    Likes Received:
    2
    Location:
    Traversing through spacetime rifts?
    First Language:
    English


    By the way, you can use the simple in-built solution:


    //Damage Formulas
    (a.isActor() ? ActorFormula : EnemyFormula)
    //Param Formulas
    (user.isActor() ? ActorFormula : EnemyFormula)


    This solution evals "ActorFormula" code if the user (the one having their Params evaluated or casting the Skill, in other words "a" in damage formulas) is a Player Character/Actor, otherwise it evals "EnemyFormula", because the user is not an Actor. That way you can set-up entirely different formulas for Player Characters and Enemies


    I use this setting up my BaseParam formulas for now:


    (user.isActor() ? ((user.abilityLevel("Vitality") * 50) + plus) * paramRate * buffRate + flat : (base + plus) * paramRate * buffRate + flat)


    It's just an example, since I'm still setting up my custom stats system.
     
    #21
  2. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    Plugin Update:



    Link to the post on my blog.
     
    #22
  3. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    Very nice plugin, Alistar. I'm wondering if I can increase an ability with a variable.


    I tried this


    $gameActors.actor(1).increaseAbilityLevel("Test", v[88]); and it did not work. Is it possible?
     
    #23
  4. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @HasdrubalBarca


    You can't use the v[x] shortcut there.
    This should work: $gameActors.actor(1).increaseAbilityLevel("Test", $gameVariables.value(88));
     
    #24
  5. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @Alistair

    <Custom Class Parameters>
    maxhp = 85 + (level * 20) + (user.abilityLevel(“Health”) * 5);
    maxmp = 35 + ((level * 5) + 5);
    atk = 5 + (this.level * 0.5);
    def = 4 + (this.level * 0.5);
    mat = 3 + (this.level * 0.25);
    mdf = 4 + (this.level * 0.25);
    agi = 5 + (this.level * 0.5);
    luk = 5 + (this.level * 0.125);
    exp = level * 10;
    </Custom Class Parameters>



    When I use this formula, i get this error...


    [​IMG]


    I copied the example completely and still get that error.  This error appears before the title screen even appears.  The game doesn't crash, but the Param [MaxHP for this example] doesn't get calculated and is lowered to one.  I set up the script call for the "Health" Ability when the new game is selected, but even then the error just randomly appears throughout the game if you try to keep playing despite that.


    I really think RMMV hates me since it seems like none of my plugins work anymore...  :stare:


    Can you help out?
     
    Last edited by a moderator: Jan 16, 2017
    #25
  6. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @firestalker


    The quotation marks around the word Health are different from each other.


    Right now it is:


    “Health”


    It should be:

    Code:
    "Health"
     
    Last edited by a moderator: Jan 16, 2017
    #26
  7. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @AlistairThanks that worked.


    EDIT: @Alistair How could I use this Plugin Command: < AddPoints x y > to make an item that give an actor points.  Something like: Item calls Common Event when used and the Common Event has this in it -


    so that the target of the item get the points not just the actor assigned to the command.  Is there a way to do this?
     
    Last edited by a moderator: Jan 17, 2017
    #27
    Alistair likes this.
  8. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @firestalker


    Use this in the damage formula of the item:


    b.addDistributionPoints(x); 0


    Remember to replace x with the amount of points you want to add.
     
    #28
  9. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @Alistair That didn't work.  All it does is buzz at me.  Is there a certain way it's supposed to be set up?  This is my set-up for the item:

    [​IMG]
     
    #29
  10. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @firestalker


    I think using the Gain TP Effect should make the item usable on a character. Just use 0 so that the character does not actually gain any TP.
     
    #30
  11. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @AlistairThat worked thanks.


    @AlistairOkay...  one more thing.  I was wondering if you can add a script call to change the Growth of the Ability.


    Something like:


    $gameActors.actor(x).abilitySetGrowth("ability", value);


    something like that?
     
    Last edited by a moderator: Jan 18, 2017
    #31
  12. Yoshifull

    Yoshifull Veteran Veteran

    Messages:
    45
    Likes Received:
    4
    First Language:
    French
    Um, is it possible to use the parameters in the damage formulas?


    I have my doubts about that because I wouldn't be able to use them in a battle test, since we have to set them up in-game.
     
    #32
  13. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @YoshifullYou can try using this:


    a.abilityLevel("ability")


    change "Ability" to the name of your ability [KEEP THE QUOTES].  This script call is supposed to return a number and should be able to be used in the damage formula for a a skill or item.  You can also set up a new map, call it TEST MAP, and just copy the events to it.  you start on that map and add a battle you should be able to get the basic idea if it'll work.  That's what I do whenever I have to check something out in game and don't want to go through everything again.


    @AlistairI don't think the Level Up parameter of this plugin works.  I tried both false and true and nothing happens when an actor levels up.  Not a big deal, just fyi
     
    Last edited by a moderator: Jan 22, 2017
    #33
  14. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @firestalker



    I'll add that command with the next update.



    Which parameter do you exactly refer to?
     
    #34
  15. firestalker

    firestalker Veteran Veteran

    Messages:
    326
    Likes Received:
    37
    First Language:
    English
    Primarily Uses:
    RMMV
    @AlistairThe parameter that says...


    I have Victory Aftermath... but it doesn't seem to do anything.


    Nevermind....  found the problem!  I had the Stat Distribution Plugin above the Victory Aftermath. 
     
    Last edited by a moderator: Jan 22, 2017
    #35
    Alistair likes this.
  16. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    Plugin Update:

    The Ability Distribution plugin finally has its own seperate Distribution points!
    You can choose to either keep sharing the Distribution points between both Distribution plugins (the way it has been until now) or you can use the new seperate points OR Yanfly's Job Points.
     
    #36
    Knightmare likes this.
  17. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Awesome update Alistair thank you for doing this. Do you happen to know the syntax for checking if an actor has a certain ability level in a shop and graying out there name if they cannot equip something? I'm kind of stuck with this, I was using Yanfly Equip Requirements and it works mechanically but not visually. For instance I can use...

    <Custom Equip Requirement Condition>
    if (user.abilityLevel("Heavy Armor") > 0) {
    condition = true;
    } else {
    condition = false;
    };
    </Custom Equip Requirement Condition>

    ...and it works but doesn't show that in the shop status and is a little buggy in shop. I was trying to see if there was a way to do it without that plugin by doing something like...

    if (user.abilityLevel("Heavy Armor") > 0)
    then can equip
    else
    then cannot equip

    I just don't know the proper way to say the can equip/cannot equip part. I'm trying to see if it will work visually in shop this way instead of using Yanfly Equip Requirements. Big thanks if there is a way to do this.
     
    #37
  18. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    @Knightmare

    Hi,

    do you use Yanfly's Shop Core plugin?
    Everything seems to work :confused:. I used the Notetag you posted and here in the shop it says Aldo can't equip this sword.
    1.PNG

    Did I misunderstand your question? Can you elaborate a bit?
     
    #38
    Knightmare likes this.
  19. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks for the reply. Allow me to elaborate more. Yes I'm using Yanfly Shop and played with it so much to try and get it to work right that I may just give up on it. I experimented using as few scripts as possible. I've been working on this issue for about a month. I got it to where I was just using your Stat and Ability Distribution, Yanfly Shop, Yanfly Equip Core and Yanfly Equip Requirements. Basically if I use this...

    <Custom Equip Requirement Condition>
    if (user.abilityLevel("Heavy Armor") > 0) {
    condition = true;
    } else {
    condition = false;
    };
    </Custom Equip Requirement Condition>

    It seems to only work for the first actor and completely ignores the other actors for some reason in shop (visually, it still works mechanically.) For instance let's say that all actors have Heavy Armor at 1 point which means they can all equip Basic Heavy Armor, it will only show that Actor 1 can equip it in shop and the other actors will be greyed out like they can't use it for some reason even if they all have the associated Armor Trait.

    What I'm trying to do is have a classless type system and using your ability distribution so players can basically create their own character with a lot of customization. So I have only one class in database that have all Equip Traits by default but in order to actually equip the item then they will need to have enough points in the respective ability. For example in order to use a Basic Sword then the character will need at least 1 point in the Sword Ability. For some reason it ignores the other 3 actors visually.

    Alternatively if everyone has all Equip Traits and Actor 1 has let's say Swords at 1, and Actor 2 has Spears at 1, Actor 3 has Bows at 1, and Actor 4 has Staves at 1 then for some reason it shows that Actor 1 can equip everything (but he shouldn't be able to because he only has a point in swords so theoretically they should all be greyed out EXCEPT the sword but it shows he can equip them all. It also greys out the other actors completely and shows they can't equip anything at all even though mechanically they can still equip what they have ability points in.

    If I try to do it without traits and have them learned as a passive skill then it works better but will still show they can equip something even if they don't have enough ability points. I'm trying to get it where it only shows what can equipped if enough Ability Points are in the proper Ability. Hence why I was asking how to do it without Yanfly Equip Requirement dependability because if I take that plugin out then it works quite a bit better (but still not perfect.)

    Sorry if it's long winded, I'm just trying to get the syntax for "can equip" and "cannot equip" to see if it works without Yanfly Equip Requirements, because I'm 90% sure that plugin is causing the visual issues. Thanks for your time Alistair, if you would rather not mess with it then if you know the proper syntax that I could use then that would be more than enough. To restate I'm trying to make an IF, ELSE statement that does this independently of using Yanfly Equip Requirement...

    So like...

    if (user.abilityLevel("Heavy Armor") > 0)
    then can equip
    else
    then cannot equip

    I just don't know the proper way to type out the bolded. I know I could theoretically do a bunch of passive states and a bunch of Weapon and Armor Types and Traits to get what I want to happen but I'm trying not to resort to that so there are no lag issues and it will take a very long time to do properly but I'm more worried about the lag that it will cause than anything else. I don't expect you to be able to fix this issue but if you know the syntax for the bolded then I can do the rest and if it doesn't work then well hey I might come up with another system. Thanks for your time, I appreciate it.
     
    #39
  20. forteller

    forteller Veteran Veteran

    Messages:
    105
    Likes Received:
    17
    First Language:
    English
    hmm id like to see the ability to create Symbols for new stats that would let us shorten what we have to type to access the new stats, and something akin to
    Bobstah Custom Stats, also if you were to do such a thing maybe consider compatibly with JahwsUF's StatusMenuCore letting user view the stats outside of the distribution menu.
     
    #40

Share This Page