Ability that Restores MP based on how much TP is used

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
Hi! I'm in the process of balancing my mage character by having small dry periods that are filled in by restoring mana with an ability that consumes TP.


High amounts of TP are gained from using spells, and the TP goes towards a self target spell that restores mana.


I've been attempting to think of ways to balance self restoring mana without the use of too many plugins. But unfortunately, on its own. The TP system has too many variables


to allow consistent mana regeneration. Especially in between random encounters since TP is set low at the beginning of a new encounter.


I figured the best way to work around this would be to make the mana restore ability to restore a base percentage, plus all of your TP that you had at the time of casting.


Example:


Character has 2/50 MP and 25TP


Fireball costs 15MP


Restore Mana has variable TP cost based on current TP. So for this turn, it would cost 25TP


Using Restore Mana at this point would restore 5% of Mana, and consume the 25TP to restore an additional 25MP


And in the same example, if you had 40TP and used the ability. Using Restore Mana would recover 5% of your Mana, and consume the 40TP for an additional flat 40 mana.


Is there either a script/common event/ or a plugin that could make this ability possible?
 
Last edited by a moderator:

Basileus

Veteran
Veteran
Joined
Oct 18, 2013
Messages
311
Reaction score
446
First Language
English
Primarily Uses
This seems more like a script request for a specific project than a general discussion of the mechanics, so this is probably not the right area to post this request.


Were there any questions you had about the use of TP and Mana in general? It sounds like you have the ideas you want worked out already and are just asking for the execution, so I'm not sure how much there is to actually talk about mechanics-wise.
 

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
Oh my bad, I suppose this isn't the board for this then?


And no thank you. I understand how the functions of TP work, and I know that there are plugins that can help affect the rate at which TP is gained and how much stays or decays after battle. So I'll just try and relocate this question.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
???


Oh just read the 2 other posts, you didn't read the question and went straight ahead moving the thread.


For your question, it is easily doable using Yanfly Skill Core


<After Eval>


user.gainMp((user.mmp * 0.05) + user.tp)


user.setTp(0)


<After Eval>


No TP cost, just make it that you can't do it below a certain amount of TP


<Custom Requirement>


value = false


if (user.tp > 0) {


value = true; }


</Custom Requirement>


Yanfly TP Core or whatever it is called easily fix your TP in battles problem
 
Last edited by a moderator:

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
Would this be something I'd put into the Notes section of the skill? Or would I make it perform a common event that calls it in?
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Yes, those are notes that you put inside the skill.
 

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
After making a dummy move to test it out in the Troops battle test, this error shows up whenever attempting to use the ability. Something to do with some plugins that I have in my folder. Could this be an error with the positioning of the plugins on my list? Something outdated? Or did I do something wrong?


The base RPG Maker MP/TP cost sections are set to 0

error.png

Notes.png
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Sorry, the last After Eval should be


</After Eval>
 

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
Thanks! It works perfectly after that. I noticed that it gives me decimals in the display of mana, is it possibly because of the (user.mmp * 0.05)  portion?


Should I be putting a % sign somewhere in there?


Edit: Also sometimes on top of the decimals. Sometime it does this weird jumble. I'm assuming a setting to turn off display of decimals would stop this from


happening


Untitled.png
 
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
user.gainMp((Math.floor(user.mmp * 0.05)) + user.tp)
 

Clanes

Villager
Member
Joined
Nov 26, 2016
Messages
12
Reaction score
2
First Language
English
Primarily Uses
Thanks! I'll give this a run now. Thanks for all the help!


Edit: Everything is working perfectly! No decimals or jumbled up words! Thank you so much for the help!
 
Last edited by a moderator:

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,549
Members
137,837
Latest member
Dabi
Top