Original Source
- Original title: resulting MP from formula displays too many decimal values
- Original author: jonthefox
- Original date: February 3, 2015
- Source thread: https://forums.rpgmakerweb.com/threads/resulting-mp-from-formula-displays-too-many-decimal-values.36563/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSSx Script Support
Summary
Hi, I am trying to make it so that whenever the player or enemy loses HP, they also lose an equal amount of MP. I have written a custom formula script which uses derived percentages i.e. (1 - (b.def * 0.01)) I have attached the script if you want to take a look, but basically I just put "b.mp -= formula that calculates hp damage; formula that calculates hp damage" It is kind of working, but the problem is that when my character gets attacked, it does the mp damage according to...
Archived First Post
I am trying to make it so that whenever the player or enemy loses HP, they also lose an equal amount of MP. I have written a custom formula script which uses derived percentages i.e. (1 - (b.def * 0.01))
I have attached the script if you want to take a look, but basically I just put "b.mp -= formula that calculates hp damage; formula that calculates hp damage"
It is kind of working, but the problem is that when my character gets attacked, it does the mp damage according to calculation, but it KEEPS all the decimal values such that my MP displayed is like 79.34545945094 and it looks smushed and bad. I've attached a screenshot as an example. Is there any way to make the resulting MP value only show digits to the left of the decimal point, like it does for HP?
Thanks so much in advance.
customformulascript.txt
Protected download
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...
