public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

resulting MP from formula displays too many decimal values

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

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

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 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 to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

scripterror.jpg
scripterror.jpg
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.

#rpg-maker-archive#rgss-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar