Slip Damage EX v1.06
by AdiktuzMiko
#=============================================================================
Features
– Now you can have slip damages or regeneration that are of exact value or follows a formula that you want instead of RMVXAce’s default method which uses a rate and the max hp/mp
– Can make slip damages for HP, TP and MP
– Can have different damage values for battle and map slip damages
– Slip damages can now have Elements (requires Element EX)
– You can now use the caster’s stats for the slip damage calculations
– You can now set two types of slip damage behavior: damage is calculated only when the state is added or damage is calculated everytime that it will be dealt.
– Battle HP slip damages now show correct element color + weakness/resistance pop-ups when you have Element EX and Yanfly’s battle engine (+elements pop-up I think)
#=============================================================================
*Enemy battler was made by PVGames
#=============================================================================
Script:
Direct Link: http://pastebin.com/raw.php?i=Swr8zyQi
#=============================================================================
Terms and Conditions
#=============================================================================
Pingback: Slip Damage EX | Lanthanum Entertainment
Pingback: Slip Damage EX v1.05 | Lanthanum Entertainment
Is it possible to prevent K.O by Slip damage using a formula in this script? I’d really like to see my test actors stop dying from the slip damage I’m dealing on this script. it only deals 1 damage every step. I tried if b.hp
You should be able to use something like
if b.hp == 1
0
else
1
end
During a particular fight, I’ve been getting the following error message:
Script ‘Slip Damage’ line 536: TypeError occured.
nil can’t be coerced into Fixnum
I copied and pasted the script again just to make sure I didn’t change it, but it’s still giving me the same error.
Is this a mistake in the script or is it something I can fix?
I’ll take a look when I get the time, do you have other scripts in that project? Can you test it out on a fresh one without other scripts and see if the error still happens? and are you using an already saved game or a new game run? The line where it errors is pretty weird as it’s the last line of a kind of setup and the lines above it are basically of the same composition so it should have errored above or something…
Just to be sure also, what’s line 536 on you?
I tested it with other scripts and it didn’t give me the error. But that’s not saying much, as most of my battle skills are coded in Lunatic Scripts. I might have to take away one of the enemy’s skills at a time and see which is causing the problem.
Line 536 is:
damage += @slip_hp_damage[state.id]
Did you test on a saved game or a new one? and when does the error happen (during start, before battle, during battle etc)?
If it’s on a saved game, that explains the problem since those things are only initialized upon new game so they don’t exist in an already saved game, it was a pretty old script I made back when I didn’t know how to stop such errors (much like most of yanfly’s scripts).
If it’s a new game and still giving errors, might be some incompatibility with one of your scripts.
PS: I probably won’t be able to check things until tomorrow evening, pretty busy in RL.
It happens both in a saved game and in troop testing, but only for one particular battle. It’s also the only battle I have where an enemy transforms into another enemy. Would that have something to do with it?
Ah I see. Thats a possible cause, the method ur using to replace the enemy might be doing something else which conflicts with the script. How are you transforming the enemy? The most probable thing that happened is that the transformation didn’t initialize the “new” enemy and as such the variables of this script wasn’t initialized.
Just in case, can you also test it on new game (rather than battle test)?
EDIT: Can you try to add this one (put it below the Slip Damage script) and see if it fixes the problem? http://pastebin.com/raw/u8ErLKMa
After testing a few more times, it seems like the bug is no longer cropping up. I don’t understand why, but that’s how it is. I added your fix anyway, just in case.
By the way, is it normal for not to work? I’ve only ever been able to make it work with
If you have a script that modifies the battlers in battle in a way that will cause the variables to not initialize then it’s possible to error
All I’ve got is Slip Damage, Yanfly Lunatic Damage, Yanfly Follow-Up Skill, Yanfly Base Troop Events, Random Repeats, and Stacking States.
How are you making the transformation? Does it still error? If yes, you could also try to toy with the arrangement of the scripts.
In any case, this script might possibly have a problem with stacking states since I used the state_id to save the values so if those stacking states still use the same state_id for the stacks, it might cause some problems (most probably it just won’t work correctly). I’m not sure though as I never worked with that script before.
The transformation is in a troop event. Anyhow, as I said, I’ve tested it some more and the error is not reoccuring, but I installed your new script as well just in case.
That’s good to hear, I hope you don’t get the error again