[RMVXA] PARAMETERS AFFECTING STATUS AILMENTS?
Posts
Pages:
1
I apologize if there is already something like this in plain sight, but I couldn't find it or I misread it and thought of it as something else. I tend to make stupid mistakes like that. Anyways, like the title says, I am curious if there is a method or script to make it so that the chances of being inflicted with a status ailment decreases as a certain parameter increases. An example of this that comes to mind is the Vitality Parameter in Ragnarok Online. As you increase your vitality, the likelihood of you being stunned decreases.
What I am trying to accomplish with this idea is to see if a character's Magic Def is high enough, the chances of them being "Poisoned," or "Blinded," lowers, but is never gone.
What I am trying to accomplish with this idea is to see if a character's Magic Def is high enough, the chances of them being "Poisoned," or "Blinded," lowers, but is never gone.
This is already built-in via the LUK stat. However, changing it to MDF is simple enough!
Open up your script editor and ctrl-shift-f for def luk_effect_rate; it should be around line 728 in Game_Battler.
Change that to something like this, if you just want MDF to lower incoming ailment rates.
This will lower infliction rates by 10% of the target's MDF. For example, at 60 MDF, rates would be reduced by 6%; at 500 MDF, by 50%. So, at 500 MDF, incoming infliction rates would be halved.
If you changed the modifier to 0.002, at 250 MDF ailment rates would be halved (and they'd be nulled at 500 MDF). Your setting all depends on how you want stats to grow in your game.
Alternatively, you could have ailment rates be MAT vs. MDF for a more consistent edge; assuming both stats grow at roughly the same rate, there'd be a more noticeable effect throughout the entire game, not just the later levels.
The flat numbers even out early-game stats; otherwise, 5 MAT versus a mage with a new robe giving them 12 MDF would only be affected by ~40% of normal infliction rates. (30 over 47 instead sets the rate to ~63%.)
Tweak the numbers, use what you need, ask if you have questions/more specific needs.
Open up your script editor and ctrl-shift-f for def luk_effect_rate; it should be around line 728 in Game_Battler.
#-------------------------------------------------------------------------- # * Get Effect Change Rate by Luck #-------------------------------------------------------------------------- def luk_effect_rate(user) [1.0 + (user.luk - luk) * 0.001, 0.0].max end
Change that to something like this, if you just want MDF to lower incoming ailment rates.
#-------------------------------------------------------------------------- # * Get Effect Change Rate by Luck #-------------------------------------------------------------------------- def luk_effect_rate(user) [1.0 - mdf * 0.001, 0.0].max end
This will lower infliction rates by 10% of the target's MDF. For example, at 60 MDF, rates would be reduced by 6%; at 500 MDF, by 50%. So, at 500 MDF, incoming infliction rates would be halved.
If you changed the modifier to 0.002, at 250 MDF ailment rates would be halved (and they'd be nulled at 500 MDF). Your setting all depends on how you want stats to grow in your game.
Alternatively, you could have ailment rates be MAT vs. MDF for a more consistent edge; assuming both stats grow at roughly the same rate, there'd be a more noticeable effect throughout the entire game, not just the later levels.
#-------------------------------------------------------------------------- # * Get Effect Change Rate by Luck #-------------------------------------------------------------------------- def luk_effect_rate(user) [1.00 * (25 + user.mat) / (25 + user.mdf), 0.0].max end
The flat numbers even out early-game stats; otherwise, 5 MAT versus a mage with a new robe giving them 12 MDF would only be affected by ~40% of normal infliction rates. (30 over 47 instead sets the rate to ~63%.)
Tweak the numbers, use what you need, ask if you have questions/more specific needs.
Thank you very much. ^.^)b
But, I do have a small question. The parameter numbers in my game is quite low, not even breaking the 100 mark, which is the max. So, by using this (will be posted below), what numbers should it be at for when/if the player manages to reach 100 MDF to lower the infliction rate to 90%?
I would have it that each time the MDF Parameter goes up increases the percentage of resistance, but I didn't want the player to have 100% resistance to all status ailments.
But, I do have a small question. The parameter numbers in my game is quite low, not even breaking the 100 mark, which is the max. So, by using this (will be posted below), what numbers should it be at for when/if the player manages to reach 100 MDF to lower the infliction rate to 90%?
#-------------------------------------------------------------------------- # * Get Effect Change Rate by Luck #-------------------------------------------------------------------------- def luk_effect_rate(user) [1.0 - mdf * 0.001, 0.0].max end
I would have it that each time the MDF Parameter goes up increases the percentage of resistance, but I didn't want the player to have 100% resistance to all status ailments.
[1.0 - mdf * 0.01, 0.1].max
This would make it so that 1 point of MDF = +1% resistance; it caps at 90%.
[1.0 - mdf * 0.009, 0.1].max
This would make your resistance 90% at exactly 100 MDF. Just it case it does break, it's still capped at 90%.
Pages:
1















