- Joined
- Oct 3, 2017
- Messages
- 1
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
I'm working with Yanfly's Buff States Core and Extended DOT plugins.
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
http://yanfly.moe/2017/04/07/yep-131-extended-damage-over-time-rpg-maker-mv/
I'm trying to accomplish a Leech Seed affect, tried a few methods actually. Unfortunately, my Javascript knowledge is very limited.
Edit: I managed to get it working using Yanfly's Leech Seed lunatic code: http://yanfly.moe/2016/04/06/tips-tricks-leech-seed-rpg-maker-mv/
It seems YEP.50 and Ellye's State Damage aren't compatible or at least not when doing this.
<Custom Regenerate Effect>
// Check if the original caster isn't the target and that the original target is alive.
if (origin !== target && origin.isAlive()) {
// Determine the damage dealt.
var damage = target.hp / 8;
// Round up the damage.
damage = Math.ceil(damage);
// Play the healing animation on the original caster.
origin.startAnimation(46);
// Original caster gains HP.
origin.gainHp(damage);
// Show the HP gained.
origin.startDamagePopup();
// Clears the original caster's HP popup.
origin.clearResult();
// Play the poison animation on the target.
target.startAnimation(59);
// Damage the target's HP.
target.gainHp(-damage);
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
}
</Custom Regenerate Effect>
This deals percentage damage, however my goal is damage based on the stats of the user and target. I tried editing the code, but didn't get it to work at first (used "origin.mat * 3 - target.mdf" instead of "target.hp / 8"). Upon further investigating, the Leech Seed code unedited wasn't doing anything either, which means there was another issue. The next morning, I tried again, this time disabling Ellye's State Damage wondering if that could be causing interference. After disabling, the original code with "target.hp / 8" worked. I then substituted in the "origin.mat * 3 - target.mdf" and it also worked!
Methods that did not work...
The first method, I tried this...
<DoT Formula: a.mat * 3 - b.mdf>
<DoT Element: 12>
<DoT Variance: 5%>
using Yanfly's Extended DOT plugin and adding the HP Drain affect via Lunatic, but due to my limited Javascript knowledge, this method deadends here.
My third options was Ellye's State Damage plugin: https://forums.rpgmakerweb.com/index.php?threads/ellyes-state-damage.48631/
This one almost worked. This plugin is similar to Yanfly's Extended Dot plugin and comes with a <drain> notetag. Damage calculation worked fine, except the caster took the same damage as the target, rather than being healed by it. I didn't point this out in that plugin's thread as it's already been reported and that thread hasn't had a post in over a year. It doesn't seem that plugin receives updates anymore, so I abandoned this option.
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
http://yanfly.moe/2017/04/07/yep-131-extended-damage-over-time-rpg-maker-mv/
I'm trying to accomplish a Leech Seed affect, tried a few methods actually. Unfortunately, my Javascript knowledge is very limited.
Edit: I managed to get it working using Yanfly's Leech Seed lunatic code: http://yanfly.moe/2016/04/06/tips-tricks-leech-seed-rpg-maker-mv/
It seems YEP.50 and Ellye's State Damage aren't compatible or at least not when doing this.
<Custom Regenerate Effect>
// Check if the original caster isn't the target and that the original target is alive.
if (origin !== target && origin.isAlive()) {
// Determine the damage dealt.
var damage = target.hp / 8;
// Round up the damage.
damage = Math.ceil(damage);
// Play the healing animation on the original caster.
origin.startAnimation(46);
// Original caster gains HP.
origin.gainHp(damage);
// Show the HP gained.
origin.startDamagePopup();
// Clears the original caster's HP popup.
origin.clearResult();
// Play the poison animation on the target.
target.startAnimation(59);
// Damage the target's HP.
target.gainHp(-damage);
// Check if the target is dead.
if (target.isDead()) {
// If the target is dead, make it collapse.
target.performCollapse();
}
}
</Custom Regenerate Effect>
This deals percentage damage, however my goal is damage based on the stats of the user and target. I tried editing the code, but didn't get it to work at first (used "origin.mat * 3 - target.mdf" instead of "target.hp / 8"). Upon further investigating, the Leech Seed code unedited wasn't doing anything either, which means there was another issue. The next morning, I tried again, this time disabling Ellye's State Damage wondering if that could be causing interference. After disabling, the original code with "target.hp / 8" worked. I then substituted in the "origin.mat * 3 - target.mdf" and it also worked!
Methods that did not work...
The first method, I tried this...
<DoT Formula: a.mat * 3 - b.mdf>
<DoT Element: 12>
<DoT Variance: 5%>
using Yanfly's Extended DOT plugin and adding the HP Drain affect via Lunatic, but due to my limited Javascript knowledge, this method deadends here.
My third options was Ellye's State Damage plugin: https://forums.rpgmakerweb.com/index.php?threads/ellyes-state-damage.48631/
This one almost worked. This plugin is similar to Yanfly's Extended Dot plugin and comes with a <drain> notetag. Damage calculation worked fine, except the caster took the same damage as the target, rather than being healed by it. I didn't point this out in that plugin's thread as it's already been reported and that thread hasn't had a post in over a year. It doesn't seem that plugin receives updates anymore, so I abandoned this option.
Last edited: