How to change MP Regen Value

KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
286
Reaction score
342
First Language
English
Primarily Uses
RMMV
I was wondering how would I change my MP Regen from percents (default in MV) to a certain value. For example I want a certain state to regen 3 MP each turn that state is active. If this is something that requires a plugin feel free to move this elsewhere.
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
You sure can! You'll need this: http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/

Slap this code into your STATE notetag box and tweak as necessary:
<Custom Regenerate Effect>
var mpheal = (ENTER FORMULA HERE);
user.gainMp(+mpheal );
user.startDamagePopup();
user.clearResult();
</Custom Regenerate Effect>

Alternatively, you could use this plugin, which does it in a much simpler way, but you have way less control over what you can do with your states:
http://yanfly.moe/2017/04/07/yep-131-extended-damage-over-time-rpg-maker-mv/
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
'Tech Support' is for when you can't get the engine to run. "How do I...?" (implementation) questions belong in the support forum for the engine you are using. As you are in effect asking for a script/plugin, that goes in the appropriate Request forum.

[move]JS Plugin Requests[/move]
 

KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
286
Reaction score
342
First Language
English
Primarily Uses
RMMV
You sure can! You'll need this: http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/

Slap this code into your STATE notetag box and tweak as necessary:



Alternatively, you could use this plugin, which does it in a much simpler way, but you have way less control over what you can do with your states:
http://yanfly.moe/2017/04/07/yep-131-extended-damage-over-time-rpg-maker-mv/
I am not quite familiar with Javascript so could you put in an example for the code you quoted. Also I didn't see anything in the "Damage over time" plugin about MP regen.
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
818
First Language
English
Hmmmm, you're right, I could have sworn the 2nd one allowed MP regen as well. Oops.
Well, I guess we'll work with the first one then!
I will break down each step for you and explain what it's doing in orange font.

<Custom Regenerate Effect>
var = This is creating a "variable" and attaching a number to it based off the formula.
In the (ENTER FORMULA HERE) spot, you could put in whatever you want, for example, if you wanted it to be a flat 5, just put a 5.

You can do more complex things in the formula as well, such as: Math.round(user.mmp * 0.03 + 5); which takes 3% of the user's Maxmp and
adds +5 to it.
var mpheal = (ENTER FORMULA HERE);

This section here is what is actually healing the MP to the user. The stuff in the parenthesis is calling the "var" (variable) formula from above.
user.gainMp(+mpheal );

This starts the popup on the actor, that way the player can visually see that this actor got some MP.
user.startDamagePopup();

This clears the combat log (the little black box that says things like "Actor A took 5 damage!" etc)
user.clearResult();
</Custom Regenerate Effect>
I hope this helps.
 

KazukiT

Veteran
Veteran
Joined
Dec 7, 2014
Messages
286
Reaction score
342
First Language
English
Primarily Uses
RMMV
Hmmmm, you're right, I could have sworn the 2nd one allowed MP regen as well. Oops.
Well, I guess we'll work with the first one then!
I will break down each step for you and explain what it's doing in orange font.



I hope this helps.
Thanks for your help, I was able to understand and apply it to my game.

I have another question though is there a way to turn this effect off if an actor has a certain state?

I also wanted to ask do you have any experience with Yanfly's Steal and Snatch? I am having trouble with that too. I can provide a link to that thread: https://forums.rpgmakerweb.com/index.php?threads/yanfly-steal-and-snatch-problem.105780/

I apologize if I am asking alot of you.
 
Last edited:

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top