(Yanfly Plugins) Add element to DoT?

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Yanfly link is here:


My formula is here:

<Custom Apply Effect>
target._damageBurn = Math.ceil(origin.mat * 0.50);
</Custom Apply Effect>

<Custom Remove Effect>
target._damageBurn = undefined;
</Custom Remove Effect>

<Custom Regenerate Effect>
target._damageBurn = target._damageBurn || Math.ceil(origin.mat * 0.50);
target.startAnimation(12);
target.gainHp(-target._damageBurn);
target.startDamagePopup();
if (target.isDead()) {
target.performCollapse();
}
target.clearResult();
</Custom Regenerate Effect>

My question is how would I go about making this a specific element? Like element id 4 (Fire), for example.
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Code:
target.gainHp(-target._damageBurn * target.elementRate(X));
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
target.gainHp(-target._damageBurn * target.elementRate(X));
Would that change the element to fire or would that simply multiply the damage by the element rate? I was hoping to have it as the actual element for absorption purposes.


For example if an enemy casts burn on your party and they all absorb fire damage then it'll heal them instead of damage them.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Element rate is a %, so l can't guess how you design your absorb.
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Yanfly has an Absorption plugin. I used to use a different plugin to simply turn the DoTs into a specific element (Thus allowing Yanfly's plugin to absorb), but with updates to Yanfly's plugins I didn't want there to be any compatibility issues, so I wanted to just use Yanfly instead of the other plugin.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Had to check the plugin because what you told me doesn't help.


I checked quickly how it make the absorb and it seems to multiply the element rate by *-1 so


target._ea = target._ea || 1;


if (target.isStateAffected(State of absorb if necessary)) {


target._ea = target.elementRate(X) * -1 }


target.gainHp(-target._damageBurn * target._ea);




I have no idea what make a actor absorb an element though so l can't play seer.
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
That worked great!  Works as a DoT without the Absorb state and like a heal with the Absorb state! Tyvm
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top