Schala, mana consumption never half

if you have an item that cuts mana cost to half when equiped, say "mana ring" or something, it cuts mana cost to half like normally with [mcr] *50 tag however in Schala battle it's always the full mana cost. How to fix this?

https://atelierrgss.wordpress.com/rgss3-schala-battle-system/
Still need help with this.
Bump.
Bump.
Bump
Bump.
I'm using Schala too, and I am actually right in the process of trying to fix this same bug!

So far, I have figured out how to fix the mana consumption, but not how to fix the resultant display. 

I changed this line in the main Schala script (on line 8547 for me), under "Enough MP Cost"

from this:

         self.battler.mp -= skill.mp_cost

to this:

         self.battler.mp -= (skill.mp_cost * self.battler.mcr)

and this makes Schala take mana cost rate into account!

However, when used in battle, this turns the number on your MP bar funny, from an integer to a float. So if the mana cost * MCR ended up as 25, then the battler will go from having 100 MP to 7500, because Schala is trying to show 75.00 now. And then, in the status menu, the MP is still shown as a float (as 75.0) when it didn't before.

If anyone can help with this graphical aspect it would be appreciated! I'll continue trying to suss it out.
I'm using Schala too, and I am actually right in the process of trying to fix this same bug!

So far, I have figured out how to fix the mana consumption, but not how to fix the resultant display. 

I changed this line in the main Schala script (on line 8547 for me), under "Enough MP Cost"

from this:

         self.battler.mp -= skill.mp_cost

to this:

         self.battler.mp -= (skill.mp_cost * self.battler.mcr)

and this makes Schala take mana cost rate into account!

However, when used in battle, this turns the number on your MP bar funny, from an integer to a float. So if the mana cost * MCR ended up as 25, then the battler will go from having 100 MP to 7500, because Schala is trying to show 75.00 now. And then, in the status menu, the MP is still shown as a float (as 75.0) when it didn't before.

If anyone can help with this graphical aspect it would be appreciated! I'll continue trying to suss it out.
What if as a temporary sollution I'd have 50*MCR  and make the MP costs divisable by 2?  Such as 20, 50, 100, etc.
What if as a temporary sollution I'd have 50*MCR  and make the MP costs divisable by 2?  Such as 20, 50, 100, etc.
EDIT: i've solved it!!!

replace this line (still on line 8547)

from this:

      self.battler.mp -= skill.mp_cost

to this:

      self.battler.mp -= (skill.mp_cost * self.battler.mcr).to_i

that little bit ".to_i" there at the end, that makes the game treat it as an integer!! i tested it with three different MCRs as well as the default and they all work perfectly, just replace that one line and youre good to go!
EDIT: i've solved it!!!

replace this line (still on line 8547)

from this:

      self.battler.mp -= skill.mp_cost

to this:

      self.battler.mp -= (skill.mp_cost * self.battler.mcr).to_i

that little bit ".to_i" there at the end, that makes the game treat it as an integer!! i tested it with three different MCRs as well as the default and they all work perfectly, just replace that one line and youre good to go!
Thank you so much, this was a nice belated Christmas gift! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/schala-mana-consumption-never-half.52140/