[ADDON] AP - Ability Distribution

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

  1. Alistair

    Alistair Treasure Hunter Veteran

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

    ~ Ability Distribution ~



     


    For the latest updates please visit my blog. This is merely an introduction topic.


     


    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 can be found on my blog post.


    [​IMG]


     


    Terms of Use, Download and some more words on Usage can all be found on my blog.
     
    #1
    Garge and kovak like this.
  2. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    Looks like I get thrown a syntax error when using  $gameActors.actor(1).addAbility(“Tenacity”, 0, 30, 1, 1)  as a Script call. Was trying to use it as an example.


    I also tried removing the s in Actors to make it  $gameActor.actor(1).addAbility(“Tenacity”, 0, 30, 1, 1)


    No change. Tried adding semi-colons, also no change. Using RPG Maker MV 1.3.1, the error is:


    SyntaxError: Unexpected token ILLEGAL


    EDIT: Found the culprit. If you directly copy and paste from your blog, one of the quotation marks is non-traditional (I noticed the difference more clearly when posting on this forum). The difference is extremely subtle and practically undetectable in the RPG Maker client, but it's enough to throw this error. Using $gameActors.actor(1).addAbility("Tenacity", 0, 30, 1, 1) works.


    EDIT 2: Okay, I've been trying to wrap my head around how to actually use this plugin for 2 hours and finally just gave up altogether. It doesn't really make any sense. It's not explained how one actually applies the bonuses. I have it so the actors all have the abilities, and they have point requirements and it all seems to do something, but under the hood they do absolutely nothing because there's no feasible way to attach anything to them.


    It looked like the only solution was to create 1000++ conditional branches per actor to check through abilities and their levels and then apply bonuses?? From the comments I read on your blog, that seems about right and it makes the plugin impractical.


    I was excited about the plugin, but the actual execution is borderline absurd. I'm not trying to come off as mean, but I just can't believe that that's actually how it works.


    I have absolutely no idea how to make it so the game checks to see if the player put points into a particular ability and to boost their stats accordingly. I have no clue about how to do this in a way that's not extremely bloated and happens automatically without severely impacting the games performance.


    Any enlightenment on this would be great, because after much research, the plugin feels oddly incomplete.
     
    Last edited by a moderator: Sep 28, 2016
    #2
  3. Alistair

    Alistair Treasure Hunter Veteran

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


    It is not explained because it is up to you how to use this. I can't give you directions for something that you have to decide.


    It explicitly says



    in my blog post. That should be comprehensible.


    I take from your "rant" that you were trying to have abilities like Tenacity increase certain stats, is that right?


    I can't read your mind and if you need help with something I need to know what exactly it is.


    The following can be found in the introduction of this plugin on my blog:



    This even literally gives an example on how to use this plugin to have an ability boost a stat.
     


    Not sure what your understanding of "borderline absurd" and "impractical" is but adding that one bold line into Yanfly's Class Params Notetags sure does not fit my definition of the terms you used.


    Here is an example just to show you that I did not need 1000+++++++ conditional branches to do anything with this plugin:


    <Custom Class Parameters>
    maxhp = 400 + (level * 67.94) + (user.abilityLevel(“Tenacity”) * 60)
    maxmp = 20 + (level * 4.95) + (user.abilityLevel(“Resolve”) * 30)
    atk = 22 + (level * 2.15) + (user.abilityLevel(“Might”) * 2)
    def = 18 + (level * 3.35) + (user.abilityLevel(“Tenacity”) * 2)
    mat = 9 + (level * 0.76) + (user.abilityLevel(“Resolve”) * 1.5)
    mdf = 15 + (level * 0.89) + (user.abilityLevel(“Resolve”) * 2)
    agi = 25 + (level * 2.5) + (user.abilityLevel(“Dexterity”) * 4.25)
    luk = 24 + (level * 2) + (user.abilityLevel(“Perception”) * 1.5)
    </Custom Class Parameters>




    ---


    And beyond that you might need some Conditional Branches if you're eventing and you want to check an actor's ability level.


    That is correct.


    But it isn't any different from checking an actor's regular stats.


    Next time you have trouble with one of my plugins and you can't wrap your head around it, simply come here and ask for help in a normal way.


    I can understand that it must be frustrating to deal with a "not working" plugin for 2 hours but why spend 2 hours on it in the first place? If you're stuck, look for help! Easy as that.


    Thanks for bringing the quotation mark issue to my attention, I will take care of it.
     
    Last edited by a moderator: Sep 28, 2016
    #3
    Crysillion likes this.
  4. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    Thanks for the response. I apologize for my rant. The comments I were reading were definitely leading me into a very different direction. While what you said was included in bold, I did not put together where exactly it would be placed or how it would be implemented at all.


    You did mention using the custom class parameters plugin, but I suppose I was dumb in a sense that I didn't figure to use the <Custom Class Parameter> code snippets to accomplish my goals.


    Thank you for your assistance on the matter, despite my bitter words.
     
    Last edited by a moderator: Sep 28, 2016
    #4
    Alistair likes this.
  5. Alistair

    Alistair Treasure Hunter Veteran

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


    No worries!


    If you have more questions, feel free to ask me.
     
    #5
  6. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    This isn't entirely related to your plugin, but one big reason I was opting to use your Ability Distribution system over just the Stat Distribution system is because I was hoping to be able to utilize some EX and SP parameters. I'm seeing that with Yanfly's Class Parameters, they only include the base parameters.


    Any idea what kind of JS magic I could put, perhaps into the Class notetags, to have a system where Critical Rate, Hit Rate, Evasion, etc. are also increased with certain Abilities?


    I am using Yanfly's Extra Parameters plugin ( http://yanfly.moe/2016/02/12/yep-69-extra-parameter-formula/ ) as well, and figured the best place to start would be there, but I'm not sure how I could go about making this click.
     
    Last edited by a moderator: Sep 30, 2016
    #6
  7. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    You could use Yanfly's Extra Param Formula & his Special Param Formula  plugins for that.


    The only downside is that you won't be able to set different EX/SP Param Growths per actor.


    Example:


    In the Extra Param Formula plugin I change the CEV Formula to look like this:


    (base + plus) * rate + flat + user.abilityLevel("Tenacity") * 0.01


    This means that the Critical Evasion Rate (CEV) will rise by 1% for each point in the Tenacity ability.
     
    Last edited by a moderator: Sep 30, 2016
    #7
    Crysillion likes this.
  8. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    That's fine. I don't need it to be per actor. Really appreciate you being so helpful, man. You definitely need more love from the community.
     
    #8
    Alistair likes this.
  9. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey Alistair.  This is a great plugin unfortunately I'm having a hard time figuring out how to do something with it.  What I am trying to do is have a few abilities that distinguish what equipment and skills are able to be used.  For example I have an ability for each weapon and armor type (Swords, Axes, Spears, etc.) and (Hvy Armor, Med Armor, Lt Armor, etc.) and an ability for skill types (Fighter, Rogue, Elemental, Healing, etc.) and I am trying to make it where an actor will need a certain amount of those abilities to use certain Weapons, Armors and Skills. 


    Example...An actor will need 10 pts in Battle Arts to learn the skill Bonebreak.  Or an actor will need 10 pts in Healing to learn Cure Poison.  Or an actor will need 10 pts in Swords to be able to equip a 2-Handed Sword, etc. 


    I know how to make the abilities but what would I put in the weapon, skill, and armor notetags to get something like this going or alternately how would I go about implementing this any other way to get this working.  I feel like I can grasp the concept with a little guidance.  Any help would be appreciated.  Thanks for your contributions to the community. 
     
    #9
  10. Alistair

    Alistair Treasure Hunter Veteran

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


    Hi!


    I'm assuming you're using Yanfly's Skill Learn System. In that case you will need the notetag


    <Learn Require Eval>. Here's one of my examples:


    <Learn Require Eval>


    value = user.abilityLevel("Tenacity") > 1


    </Learn Require Eval>


    This basically means the skill with this notetag will be learnable as soon as the ability level of "Tenacity" is bigger than 1.


    --------------------------------------------------------------------------------------------------------------------------------------------------------


    For equipment you'll need Yanfly's Equip Requirements Plugin.


    Here's an example notetag:


    <Custom Equip Requirement Condition>


    if (user.abilityLevel("Tenacity") > 1) {


    condition = true;


    } else {


    condition = false;


    };


    </Custom Equip Requirement Condition>


    By using this, the weapon/armour will only be equipable if the actor's ability level of "Tenacity" is bigger than 1.
    --------------------------------------------------------------------------------------------------------------------------------------------------------


    You may want to actually "show" the requirements or the player won't have a clue.


    For skills you'd use this notetag:


    <Learn Custom Text>


    Requires: Tenacity Level > 1


    </Learn Custom Text>


    And for equipment this one:


    <Custom Equip Requirement Text>


    text = "Requires: Tenacity Level > 1"


    </Custom Equip Requirement Text>
     
    #10
    Garge and Knightmare like this.
  11. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Wow!  Thank you!  Yes your assumptions were correct.  It's actually much simpler than I thought it was going to be.  But now I feel like an idiot because I was about to do a bunch of crazy workarounds that would have took a very long time.  Thank you very much Alistair!   Best wishes.  
     
    #11
    Alistair likes this.
  12. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    You're very welcome :)!
     
    #12
  13. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    Ah, looks like that's not going to work. Whenever an enemy attacks, the game crashes. I can definitely pinpoint it down to the damage formula running the check for those abilities, but the enemies don't have those abilities, so it just crashes.


    Any idea what I can do to try and resolve this?


    I was thinking a workaround would involve attaching an invisible passive state to all enemies. I really would not mind doing this in order to get this to work. Something like using State 123, and the damage line running a check where if isAffected State 123, then just do the normal formula, but if the state isn't applied, do the formula with the ability check involved. I think that'd fix it, but I'm not sure what the code could be.


    We discussed this as the code:


    (base + plus) * rate + flat + user.abilityLevel("Tenacity") * 0.01


    Is there any way, perhaps, we can put in a state check? I really do think that might fix it. It's a bit of a roundabout solution, but I think it'd be the easiest thing to do.


    Something like if State 123 then (base + plus) * rate + flat else (base + plus) * rate + flat + user.abilityLevel("Tenacity") * 0.01


    You get what I'm trying to say? This would make it so when an enemy attacks, because I'd have this state attached as a passive to all enemies, that it wouldn't run this ability check and thus not crash the program (ideally).
     
    Last edited by a moderator: Oct 1, 2016
    #13
  14. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    Last edited by a moderator: Oct 1, 2016
    #14
    Crysillion likes this.
  15. Crysillion

    Crysillion Veteran Veteran

    Messages:
    137
    Likes Received:
    20
    Top work, Alistair. I can confirm it works. Did not realize the fix would be so easy on your end. Always good when workarounds aren't necessary!
     
    #15
    Alistair likes this.
  16. Alistair

    Alistair Treasure Hunter Veteran

    Messages:
    269
    Likes Received:
    171
    Location:
    Munich, Germany
    First Language:
    English
    Primarily Uses:
    RMMV
    Glad to hear it's working!
     
    #16
  17. Knightmare

    Knightmare Knight of the Night Veteran

    Messages:
    1,057
    Likes Received:
    107
    Location:
    Central USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Is there any way to have 2 different pools for distribution points for each script?  For instance having one set of distribution points for stats and another separate pool for abilities?  I couldn't seem to find out how. 


    Also is there a way that we can have more than 8 abilities show up "cleaner" in the ability distribution screen?  If there are more than 8 abilities it will create another row but they will overlap and the bars overlap as well.  I modified it to be able to show 12 by removing the actor name, face, and stat, and moving the Distribution Points text line up but was wondering if there could be a way to fit more, like have it scroll somehow or something. 


    Sorry if it's a lot to ask but I do really like this plugin.  If there's not a way to do these things then I'll just stick with what's there and work with it.  Thank you for your time.  Have a great day. 
     
    #17
  18. Alistair

    Alistair Treasure Hunter Veteran

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


    Right now, there isn't.



    I thought I fixed the overlapping gauges a while ago :unsure: .
    Well I just fixed them *again*. You can go and grab the update on my blog (make sure to update the Stat Distribution plugin as well).


    Unfortunately scrolling won't be a thing. If you need more space you need to enlarge your resolution.


    Just for reference: With 1024x768 you can have up to 16 abilities and with 1680x1050 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!
     
    #18
    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
    OK.  Thank you for the fix sir!  The overlap issue is gone and with my 1024x768 resolution I can fit 16 abilities instead of 8 because of the overlap, I might experiment with 1680x1050 as well.  Nice work, I appreciate your help again.  And it's ok this thing is your baby so you can do whatever you feel the desire to do with it.  Thanks again for a great plugin.  Best wishes and good day. 
     
    #19
    Alistair likes this.
  20. Alistair

    Alistair Treasure Hunter Veteran

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


    It's not because I don't want to but rather because I lack the time to do it properly. Sorry!


    Good day to you too! :)
     
    #20

Share This Page