DoubleX RMVXA Dynamic Cost

● ARCHIVED · READ-ONLY
Started by DoubleX 3 posts View original ↗

  1. DoubleX RMVXA Dynamic Cost  v1.00a


    by DoubleX




    Introduction


    Lets users alter the skill's mp or tp cost via custom formulae

    Spoiler
     



    Note: Error will occur if you use def instead of self.def due to how this script works.



    #------------------------------------------------------------------------------|
    # * Notetag <dynamic mp: string> for skills: |
    # To add numerical values evaluated from string to its skill's mp cost, put |
    # the above notetag into that skill's notebox in the database. This notetag |
    # only takes effects on users having states with <dynamic mp> notetag. |
    # string supports numeric constants and (needs scripting knowledge)methods |
    # currently applicable to the current user trying to use this skill. |
    #------------------------------------------------------------------------------|
    # * Notetag <dynamic tp: string> for skills: |
    # To add numerical values evaluated from string to its skill's tp cost, put |
    # the above notetag into that skill's notebox in the database. This notetag |
    # only takes effects on users having states with <dynamic tp> notetag. |
    # string supports numeric constants and (needs scripting knowledge)methods |
    # currently applicable to the current user trying to use this skill. |
    #------------------------------------------------------------------------------|
    # * Notetag <dynamic mp> for states: |
    # To make dynamic mp costs applicable to a battler, add a state with this |
    # notetag added to its notebox in the database to that battler. |
    #------------------------------------------------------------------------------|
    # * Notetag <dynamic tp> for states: |
    # To make dynamic tp costs applicable to a battler, add a state with this |
    # notetag added to its notebox in the database to that battler. |
    #------------------------------------------------------------------------------|

    #==============================================================================|
    # ** You only need to edit this part as it's about what this script does |
    #------------------------------------------------------------------------------|

    module DoubleX_RMVXA
    module Dynamic_Cost

    #------------------------------------------------------------------------------|
    # * Multiply_MCR, default = true |
    # The numerical values evaluated from string in skills' dynamic mp notetags |
    # will be multiplied by user's mcr before being added to their mp costs. |
    #------------------------------------------------------------------------------|
    Multiply_MCR = true

    end # Dynamic_Cost
    end # DoubleX_RMVXA



    Video










    Features


    Use of notetags(requires knowledge of notetag usage) to set specific skills to have custom mp and tp costs for users having dynamic mp and tp states respectively


    Some custom damage formula and scripting knowledge is needed to use this script to its full potential


    How to use


    Open the script editor and put this script into an open slot between Materials and Main. Save to take effect.


    FAQ


    None


    Credit and Thanks


    DoubleX(Giving me credit is completely optional)


    No terms of use other than not claiming this script as created by anyone except DoubleX or his alias


    Compatibility


    Scripts aliasing or rewriting method:


    - self.load_database under module DataManager
    - skill_mp_cost or skill_tp_cost under class Game_BattlerBase


    may have compatibility issues with this script


    Place this script above those aliasing any of these methods if possible


    Changelog


    v1.00a (GMT 0900 9-8-2014):
     - 1st version of this script finished


    (DoubleX)Dynamic Cost v1.00a.txt
  2. Hmm, I'm not sure what kind of use this script would have since you can easily change TP and MP costs but I suppose this script would be useful for people who use other scripts which alter what MP and TP is used for or something.
  3. deathsia said:
    Hmm, I'm not sure what kind of use this script would have since you can easily change TP and MP costs but I suppose this script would be useful for people who use other scripts which alter what MP and TP is used for or something.
    The prototype behind this is to do something like FF's "Use MP to Inflict Mortal Blow", i.e., under some conditions, you can pay an extra mp cost to inflict more damage.

    Of course this could be easily done by just making a state with mcr * 200% or something like that and then use custom damage formula to inflict more damage if the user has this state, but it seems to me that this only applies to skills costing mp to begin with and other skills may need scripts to make them have dynamic mp costs.

    Moreover, I want the mp cost altered by some of the user's stats like def or mdf or something like that. For example, for the below custom damage formula:

    a.atk * 2 - (a.state?(x) ? 0 : b.def)where x is a state with dynamic mp notetag. Then I add <dynamic mp: self.def> to this skill. Of course it uses user's def instead of target's def as the mp cost is displayed before target's even picked, but I still feel that this can be an enough approximation for paying extra mp costs depending on targets' def to ignore them in the damage formulae. This approximation is far from ideal of course but that's the best way I've come up uptil now :)