Skills use health instead of mana when mana is depleted

Gargoyle77

Veteran
Veteran
Joined
Dec 4, 2017
Messages
69
Reaction score
9
First Language
English
Primarily Uses
RMMV
Hello, everyone! Well, I'd like a plugin that does what the title says. I've searched many rpg maker websites and couldn't find one. Thanks for reading!
 

Udhe

Villager
Member
Joined
Apr 11, 2020
Messages
7
Reaction score
0
First Language
Indonesia
Primarily Uses
RMMV
Hello, everyone! Well, I'd like a plugin that does what the title says. I've searched many rpg maker websites and couldn't find one. Thanks for reading!
actually its easy just do this no need plugins just do this or you can use it for other thinks like use spell that uses mana this pict is example just add recover -(minus HP) then u good to go also if u have CD plugin use it cuz doing so without CD is broken the balancebandicam 2020-04-12 23-03-37-152.jpg
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
697
Reaction score
216
First Language
Vietnamese
Primarily Uses
RMMV
I think you can user Yanfly's Skill Core plugin and use lunatic mode if you are familiar with basic JS to customize your HP/MP cost.
 

Gargoyle77

Veteran
Veteran
Joined
Dec 4, 2017
Messages
69
Reaction score
9
First Language
English
Primarily Uses
RMMV
actually its easy just do this no need plugins just do this or you can use it for other thinks like use spell that uses mana this pict is example just add recover -(minus HP) then u good to go also if u have CD plugin use it cuz doing so without CD is broken the balanceView attachment 139570
I'm sorry, but I can't understand if what you explained to me. Will that allow me to make skills that user health instead of mana when the caster doesn't have mana? Thanks for your reply!



I think you can user Yanfly's Skill Core plugin and use lunatic mode if you are familiar with basic JS to customize your HP/MP cost.
Yeah, that's probably what I need to do. Now I'll have to see how the correct code is. Thanks for your reply!
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
781
Reaction score
492
First Language
English
Primarily Uses
RMMV
I'm sorry, but I can't understand if what you explained to me. Will that allow me to make skills that user health instead of mana when the caster doesn't have mana? Thanks for your reply!




Yeah, that's probably what I need to do. Now I'll have to see how the correct code is. Thanks for your reply!
Try this one:
JavaScript:
<Custom HP Cost>
    if (user.mp < X){
        cost = Y
    } else {
        cost = 0
    }
</Custom HP Cost>
<Custom MP Cost>
    if (user.mp > X){
        cost = X
    } else {
        cost = 0
    }
</Custom MP Cost>
Change X to the Mp Cost of the skill. Set Y to the Hp Cost of the skill (for if the user doesn't have enough Mp. I'm not sure it will work, because I'm not sure if a skill can have both a custom hp cost and a custom mp cost. Give it a shot though.
 

Gargoyle77

Veteran
Veteran
Joined
Dec 4, 2017
Messages
69
Reaction score
9
First Language
English
Primarily Uses
RMMV
Try this one:
JavaScript:
<Custom HP Cost>
    if (user.mp < X){
        cost = Y
    } else {
        cost = 0
    }
</Custom HP Cost>
<Custom MP Cost>
    if (user.mp > X){
        cost = X
    } else {
        cost = 0
    }
</Custom MP Cost>
Change X to the Mp Cost of the skill. Set Y to the Hp Cost of the skill (for if the user doesn't have enough Mp. I'm not sure it will work, because I'm not sure if a skill can have both a custom hp cost and a custom mp cost. Give it a shot though.
Worked perfectly fine. Thank you very much! I really appreciate it.
 

Gargoyle77

Veteran
Veteran
Joined
Dec 4, 2017
Messages
69
Reaction score
9
First Language
English
Primarily Uses
RMMV
Try this one:
JavaScript:
<Custom HP Cost>
    if (user.mp < X){
        cost = Y
    } else {
        cost = 0
    }
</Custom HP Cost>
<Custom MP Cost>
    if (user.mp > X){
        cost = X
    } else {
        cost = 0
    }
</Custom MP Cost>
Change X to the Mp Cost of the skill. Set Y to the Hp Cost of the skill (for if the user doesn't have enough Mp. I'm not sure it will work, because I'm not sure if a skill can have both a custom hp cost and a custom mp cost. Give it a shot though.
Update: I've found a little bug. If the caster's remaining mp is equal to the cost of the skill, the skill will cost 0 mana and health. I think that it could be solved by adding an equal to the part of the code that checks if the user mp is greater than X (the mana cost of the skill), so it says that the user mp should be bigger or equal to x. Sadly I can't test it because I don't know how to write that in javascript. Can you help me again, please?
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
781
Reaction score
492
First Language
English
Primarily Uses
RMMV
Update: I've found a little bug. If the caster's remaining mp is equal to the cost of the skill, the skill will cost 0 mana and health. I think that it could be solved by adding an equal to the part of the code that checks if the user mp is greater than X (the mana cost of the skill), so it says that the user mp should be bigger or equal to x. Sadly I can't test it because I don't know how to write that in javascript. Can you help me again, please?
Code:
<Custom HP Cost>
    if (user.mp < X){
        cost = Y
    } else {
        cost = 0
    }
</Custom HP Cost>
<Custom MP Cost>
    if (user.mp >= X){
        cost = X
    } else {
        cost = 0
    }
</Custom MP Cost>
This should do it.
 

Gargoyle77

Veteran
Veteran
Joined
Dec 4, 2017
Messages
69
Reaction score
9
First Language
English
Primarily Uses
RMMV
Code:
<Custom HP Cost>
    if (user.mp < X){
        cost = Y
    } else {
        cost = 0
    }
</Custom HP Cost>
<Custom MP Cost>
    if (user.mp >= X){
        cost = X
    } else {
        cost = 0
    }
</Custom MP Cost>
This should do it.
Now it works perfectly fine! Thank you and the others as well. Really hope you have a nice day!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top