Full MP Damage?

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Currently, I’m using a skill that deals MP damage to the opponent. However, I’m running into a bit of the issue.

For instance, the enemy has 5 hp left. My hp attack is supposed to deal 50 damage. It deals 50 damage and the enemy hp drops to 0.

However in this instance, My enemy has 5 mp left. My mp attack is supposed to deal 50 mp damage. However the attack only deals 5 mp damage. I want the mp damage attack to behave like the Hp attack.

Is there a snippet that someone can whip up to make sure that the mp damage is always full? Like Hp is?

Thanks!
 

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Without an image of your damage formula is hard to tell, but if I understood what you want correctly the problem is you are usin b.mp instead of b.mmp.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Without an image of your damage formula is hard to tell, but if I understood what you want correctly the problem is you are usin b.mp instead of b.mmp.
I can send one later, but I’m using a basic formula:

A.atk * 2 - b.def

The setting is set for MP damage. What I notice is that the damage formula works correctly when the enemy has a large enough mp pool. For instance if the have 100 mp and the attack was supposed to do 50 mp damage it works correctly. But if the enemy has 40 mp and the attack does 50 damage it will only do 40 points.
 
Last edited:

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Wait, so what is the skill supposed to damage? Do you mean you want damage reduction based on mp? I think I dont quite grasp this mixing between Hp and mp.

Question Been: what is the skill supposed to do?
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Basically, I’m using MP as a “second health bar” I just want the MP Damage to function like the HP damage does.

Essentially, if the skill formula says it will do 50 points of MP damage, it will always do 50 points of MP damage no matter how much MP the target has.

Does that make sense? Sorry if I’m not explaining it well.

EDIT:

@gambitben
Here's a screen cap of the damage formula:
upload_2018-8-18_18-13-54.png

If the user has 10 attack and the enemy has 6 defense, the attack should roughly do about 14 MP damage.

However, it will only do 14 MP damage if the Enemy has 14 or more MP. If the enemy has 5 mp, the attack will only do 5 damage.

What I want is for the attack to always do 14 MP damage, not matter how much MP the enemy has left.
 
Last edited:

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Im starting to get it, so do you want the characters to die when they hit 0 mp? Or do you want the rest of the damage to carry over to HP? If not, i really dont see the problem of just depleting what's left of the mp.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
Im starting to get it, so do you want the characters to die when they hit 0 mp? Or do you want the rest of the damage to carry over to HP? If not, i really dont see the problem of just depleting what's left of the mp.
I have some other code that sets it up so that if the enemy has 0 mp, they enter a state where the take double damage to their HP. Basically, “mp” in my game is acting like Shield or barrier.

The reason I want full mp damage is because there is a drain affect on the mp damage skill (using yanfly lifesteal) and I always want the steal to be the full damage value (not the gimped value), even if they don’t have that number left.

EDIT: basically there are a lot in game reasons I want MP damage to be calculated like that, but i haven’t been able to figure it out :p
 
Last edited:

gambitben

Veteran
Veteran
Joined
Jun 8, 2013
Messages
161
Reaction score
127
First Language
Spanish English
Primarily Uses
RMMV
Oooh ok, sounds great! Really nice mechanic :rhappy:. You'll definitely need a .js snippet I'm afraid, I don't know why but you can't surpass mp as you can hp. I thought I could help you if it was via notetags or anything else but I'm no scripter; I wish you best of lucks my friend. I hope you find a soution and we learn something new :rwink:
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,704
Reaction score
2,208
First Language
English
Primarily Uses
RMMV
I haven't dug into the code to see why MP may cap at whatever is left. If I get a chance, I'll try to do that.

I'd like to offer up an alternative solution that may be easier to work with and/or open up more opportunities for your game. My Health plugin is not only specifically built to add in as many new HP attributes you want, it also has a ton of extra functionality that seems like it would be useful to you. For instance, you can set up damage to a Shield HP value that, when it goes into the negative, will drain from the main (or any other) HP attribute. The plugin just handles that for you if configured to do so. While my plugin is themed towards hunger, thirst, rest etc, you can make these extra HP values anything you want.

https://forums.rpgmakerweb.com/inde...tom-hp-in-your-game-demo-now-available.92623/
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
@gambitben thanks for the help! The conversation was helpful for me to get through my ideas!

@Frogboy firstly, let me say what an amazing plugin you have there! It’s incredivle. I’m going to look into how I can implement it, and thank you for looking into my issue.

One other thing I noticed was that when an enemy is hit by an MP damage skill, they don’t “flash” and the hit damage sound doesn’t play. I’d like that to happen for my MP damage skills as well!
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
you can check my edited script from original script
I hope it solve yr problem or give you any useful idea
 

Attachments

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
300
Reaction score
89
First Language
Enlish
you can check my edited script from original script
I hope it solve yr problem or give you any useful idea
Ill test this out and get back to you!

EDIT:

@mrcopra This looks like it works pretty well! The only issue I have currently is that it doesn't seem to work with Yanfly's Lifesteal plug in. I'm using that to drain specific % of MP based on damage

With your plugin off, It works as intended, but not with it on.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top