[Solved via Workaround]Tick-based Regen not working.

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
After having had a different issue yesterday, it was suggested to me to re-order my plugins, into the order seen on this page here: http://www.yanfly.moe/wiki/Category:Yanfly_Engine_Plugins

After doing so, however, I have now found that tick-based regen is not functioning correctly. Specifically, the tick-based regen plugin does not *seem* to be functioning at all, despite being loaded, into the correct place in the plugin list (according to the provided link), and turned on. What is happening instead is the effects are being applied at action end, EVEN THOUGH the states are set to turn end (which is how it must be set in order for tick-based regen to function), something somewhere seems to be changing the functionality of "turn end" to match that of "action end", or at least that is what it seems is happening.
During all tests of this, ALL non-Yanfly plugins were turned off to ensure no outside interference.
Anyone have any ideas or suggestions? I find it odd that the plugins would clash with each other.

*** Also, I feel it is worth noting that prior to re-arranging my plugin list order yesterday, it WAS working fine. but now that I re-arranged it to be in the order suggested by the author himself, they are not working. Of course, I could just keep moving things around until it works again, but them being in the order suggested by the author should mean they should work, and the fact that they don't means there is probably some bigger issue that could be resolved and prevented by others in the future.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,037
Reaction score
328
First Language
Dutch
Primarily Uses
RMMV
It is recommend to use that order to work the plugins correctly.
specially if you use other plugins.

action end and turn end can be different, but do you have any code in the state?
like turn end, action end, battle end etc on eval?

because if there is a tiny mistake in its code, this can happen as well.

while im not that good in those plugins, the code in there can help others to narrow down
the issue and re-correct the code so it will work again :)
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
the code within the state has never been changed, so the problem isn't the code. but I do suppose providing a screenshot of one of the states could be useful.
 

Attachments

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
just tested it in a new project with only the necessary plugins active (BattleCoreEngine, BuffStatesCore, Battlesys ATB, TickBasedRegen & ExtDoT), and nothing still. this is very odd, it's as if the tickbased regen plugin is somehow broken, or otherwise not interacting the way it's supposed to. However, if I move it around in the plugin list, it doesn't matter where to, it still does not work.
 
Last edited:

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
after a bit more testing of this issue, I have found the following:

the tick-based regeneration DOES work as intended if you set HP Regeneration on a state within the Traits section. furthermore, even with it set on Turn End, as it is supposed to be to make tick-based regen work to begin with,UNLESS you set regeneration within the traits of a state, it only functions during action end (even with turn end set, if you do a custom DoT formula in the notes section, that only happens at action end). I find this quite confusing, because this confirms that tick-based is working, as with a % regen set from Traits, it does correctly trigger over time, as it's supposed to. however, anything in the notes section seems to be ignored until action end, even though the state is set to turn end. this is a very odd issue; I've never seen anything like this before.

TL : DR; tick-based is working, but does not seem to be functioning correctly with ExtDot
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
while the issue at hand is still present, I have at least located a workaround. by using lunatic mode, I was able to write out code in the state note tags to get it to work.

In case anyone else is interested, I will post the code I found to work here:

<Custom Regenerate Effect>

// The formula for the regeneration effect.

var regen = Math.floor(origin.mhp / 20 * target.elementRate(12));

// Make the user gain HP.

user.gainHp(regen);

// Show the HP healed.

user.startDamagePopup();

// Clear the user's results.

user.clearResult();

</Custom Regenerate Effect>



Change the origin.mhp / 20 and the (12) to whatever number you want the element to be to suit your needs.

<Custom Apply Effect>

// Calculate the damage to be dealt by the formula.

target._mercuryPoison = Math.ceil(origin.atk * 0.50 * target.elementRate(13));

</Custom Apply Effect>

<Custom Remove Effect>

// Remove the damage effect.

target._mercuryPoison = undefined;

</Custom Remove Effect>

<Custom Regenerate Effect>

// Default the DoT formula.

target._mercuryPoison = target._mercuryPoison || Math.ceil(origin.atk * 0.50);

// Play an animation on the target.

// target.startAnimation(12);

// Reduce the target's HP

target.gainHp(-target._mercuryPoison);

// Start the damage popup.

target.startDamagePopup();

// Check if the target is dead.

if (target.isDead()) {

// Make the target collapse.

target.performCollapse();

}

// Clear the target's results.

target.clearResult();

</Custom Regenerate Effect>

Change the origin.atk * 0.50 and the (13) to whatever element number you need to suit your needs.
Also, remove the // before target.startAnimation if you wish to display an animation

Now, I just need to figure out how to attach an element to the healing done/damage dealt.
 
Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
104
Reaction score
24
First Language
English
Primarily Uses
RMMV
while the issue at hand is still present, I have at least located a workaround. by using lunatic mode, I was able to write out code in the state note tags to get it to work.

In case anyone else is interested, I will post the code I found to work here:

<Custom Regenerate Effect>

// The formula for the regeneration effect.

var regen = Math.floor(origin.mhp / 20);

// Make the user gain HP.

user.gainHp(regen);

// Show the HP healed.

user.startDamagePopup();

// Clear the user's results.

user.clearResult();

</Custom Regenerate Effect>



Change the origin.mhp / 20 to suit your needs.

<Custom Apply Effect>

// Calculate the damage to be dealt by the formula.

target._mercuryPoison = Math.ceil(origin.atk * 0.50);

</Custom Apply Effect>



<Custom Remove Effect>

// Remove the damage effect.

target._mercuryPoison = undefined;

</Custom Remove Effect>



<Custom Regenerate Effect>

// Default the DoT formula.

target._mercuryPoison = target._mercuryPoison || Math.ceil(origin.atk * 0.50);

// Play an animation on the target.

// target.startAnimation(12);

// Reduce the target's HP

target.gainHp(-target._mercuryPoison);

// Start the damage popup.

target.startDamagePopup();

// Check if the target is dead.

if (target.isDead()) {

// Make the target collapse.

target.performCollapse();

}

// Clear the target's results.

target.clearResult();

</Custom Regenerate Effect>

Change the origin.atk * 0.50 to suit your needs. Also, remove the // before target.startAnimation if you wish to display an animation

Now, I just need to figure out how to attach an element to the healing done/damage dealt.
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
123
Reaction score
13
First Language
English
Primarily Uses
tyvm sir! It works flawlessly now.I updated my previous post to now include the element.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Got MV on Steam during the Lunar New Year Sale! Happy Year of the Rat everyone!
Oh, stop with the Melodrama...

...Listen to it instead!

anybody else like getting baked whilst coding?

When you go to the beach watch out for coconuts. Coconuts are more dangerous than sharks. Fact.
Try to get into pixelart again, so far its a sucess.
Also finally found a useful pixeltutorial which helps a lot.

Forum statistics

Threads
93,617
Messages
914,001
Members
123,185
Latest member
Disaffect
Top