Adding flat stat bonuses instead of %

Discussion in 'JS Plugin Requests' started by Farr, Oct 16, 2016.

  1. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    Is there a way to add +flat parameters bonus on states instead of % based?
     
    #1
  2. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,793
    Likes Received:
    11,831
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Only with a plug-in. If you wish to find such a plug-in I can move you to plug-in requests.
     
    #2
  3. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese


    If this is the only then please do it. 


    Thanks.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,154
    Likes Received:
    6,375
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I've moved this thread to plugin request. Please be sure to post your threads in the correct forum next time. Thank you.



    search for a passive skill plugin that uses the weapon ID to determine bonuses - there are two passive skill plugins, one around weapon ID and one around state ID, and the one based on weapons can do what you want - just add that as a lvl 1 passive
     
    #4
  5. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    Hi @Farr!


    I was intrigued by the possibily of flat boosts so I made a quick plugin, It's working in my vanilla game, try it and tell me if it's working in yours.


    http://pastebin.com/excaUBh3


    It uses notetags in the states boxes: mhpB, mmpB, atkB, matkB, defB, mdefB, agiB, lckB.


    The parameters are evaled meaning if you input


    <mhpB: $gameVariables.value(1)>


    The state will boost mhp by the value inside variable 1.


    For anyone wondering: it's free to use commercially and non commercially, credits non required, edits and reposts as you wish just keep it under the same license.
     
    #5
  6. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,793
    Likes Received:
    11,831
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Astfgl66: That reminds me of a script I wrote for ACE to do the same thing, the problem was if anyone ever died and they had a state on them that reduced stats by a flat amount, the change became permanent! Does yours fix that problem?
     
    Last edited by a moderator: Oct 16, 2016
    #6
  7. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    It shouldn't, because it makes no modifications to the actual stats, it changes the param Plus calculations to include the value inside states notetags.


    I didn't test it however, so that's very much theory.


    Edit: @bgillisp confirmed, does not happen.


    I also couldn't alias it properly so in the end I rewrote the paramPlus function wich is likely to cause some problem in its own rights...


    It's very much subject to future improvements.
     
    Last edited by a moderator: Oct 16, 2016
    #7
  8. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    I used <mhpB: $gameVariables.value(10)> on the state notebox and I didnt see any change.


    Maybe its incompatible with some of Yanfly's plugin.


    But I appreciate the help anyway.
     
    #8
  9. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,793
    Likes Received:
    11,831
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Farr: Yanfly has their own version of how you do this, under their States and buff Core. You'll need to use whatever method Yanfly set up for that.


    @Astfgl66: Ok, good to know. I was worried as when I did it, when a character dies, it force removes the states, and if the stat increase or decrease was put in the wrong place, it was never removed when that happened. But I think I added it straight to the parameter, hence the difference.
     
    #9
  10. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    @Farr That's probably it. It's working alright in my blank project.


    Edit: Other dumb possibility: are you sure variable 10 is not 0?


    I'm not going to delve into Yanfly scripts I'm not at all near his level and it would take me a while to understand his damage flow or the way he calculates stat bonuses.


    Sorry I couldn't be of more help.
     
    Last edited by a moderator: Oct 16, 2016
    #10
  11. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese


    Yes, I tried with highter numbers and it didnt work aswell


    I really appreciate the help, Ill try to work around it somehow.


    Thanks again, santé!
     
    #11
  12. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    Hmmm... Sorry to be insistent, by the way my question and your answer are phrased I'm not sure:


    I should have phrased it like this: Are you sure the value inside variable 10 is not 0?


    Alternatively just try with a flat value (<mhpB: 1000> for example) and tell me what happens.


    The setup and result should look like this: Spoiler'd for size

    [​IMG]

    Again I'm sorry if I just misunderstood you and you already did everything right, I just want to be sure, I'm not a native speaker.
     
    Last edited by a moderator: Oct 17, 2016
    #12
  13. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese


    The  <mhpB: 1000> works perfectly! 
     


    Thanks so much!
     
    #13
  14. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    Then it makes no sense variable based increase doesn't work in your project.


    Please look at the image below spoiler'd for size, retrace the steps I made, and tell me if it works. If it doesn't please include screenshots.

    [​IMG]


    1- First event, setting the state on actor 1 and variable 10 to 0


    2- Setting variable 10 to 10


    3- Setting the state notebox


    4-Menu before speaking to event 1


    5-Menu after speaking to event 1 but before speaking to event 2


    6-Menu after speaking with event 1 and 2.


    My state 4 (poison) notebox is this:

    Code:
    
    <atkB: 5 * $gameVariables.value(10)>
    <mhpB: 100 * $gameVariables.value(10)>
     
    #14
  15. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese
    [​IMG]



    The Variable was 0 at the start so I didnt take a screenshot.


    But everything is working fine so far.
     
    Last edited by a moderator: Oct 17, 2016
    #15
  16. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    Ah, now that makes sense. Glad to hear everything is working. Thank you for going into troubleshooting with me.


    If you want I've uploaded an updated version on pastebin. It allows you to do this:


    <atkB: 5 * $gameVariables.value(10)> //Instead of writing this
    <atkB: 5 * v(10)> //you can now write this


    It's under the same link as before:  http://pastebin.com/excaUBh3
     
    #16
  17. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese


    That's a lot easier, the shorter the better. :)


    Thanks so much my friend, success on your scripts!
     
    #17
  18. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    649
    Likes Received:
    494
    First Language:
    French
    Just a heads up that I have updated the plugin still under the same pastebin link: http://pastebin.com/excaUBh3 .


    It doesn't change or add any functionality for the user, but should improve compatibilty.


    For those interested, I finally got around aliasing the original method properly.


    This should be the last time I update this plugin, unless you have a particular request.


    If you encounter any trouble using it, be sure to let me know!


    Have a nice day.
     
    #18
  19. Farr

    Farr Veteran Veteran

    Messages:
    247
    Likes Received:
    92
    Location:
    C-bus, Ohio
    First Language:
    Portuguese


    Maybe it will work for passive skills now. (Nope, I tried xD)

    I realized its not combatible with Yanfly`s Passive States, not that it`s a big thing for me, I`m just saying.


    You should create a topic about your script, I bet its really useful for some people like me.
     
    Last edited by a moderator: Oct 19, 2016
    #19
  20. Andar

    Andar Veteran Veteran

    Messages:
    28,154
    Likes Received:
    6,375
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Then I suggest you follow my suggestion above and use one of the two existing plugins for passive skills - you can try both for compatibility with yanfly's scripts, and that are two chances one of them is compatible.
     
    #20

Share This Page