The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: josemanupagon on July 04, 2013, 09:45:00 PM

Title: [VX] Try to answer this
Post by: josemanupagon on July 04, 2013, 09:45:00 PM
I want to change the mp cost of all skills ingame, like a state or other stuff like that.
e.g : Divine Faith: Reduces all mp cost by 5. It lasts for three turns.
If anyone knows a script or whatever, please, post it here, it would be helpful.

I hope this is clear enough.
Thanks in advance!

Please, for Rpg Maker Vx, not Ace!  :blizj:
Title: Re: Try to answer this
Post by: &&&&&&&&&&&&& on July 04, 2013, 09:56:03 PM
The name of that Anime is Boku no pico.

http://www.rpgmakervxace.net/topic/8457-element-cost-rate/

Title: Re: [VX] Try to answer this
Post by: josemanupagon on July 05, 2013, 05:09:14 PM
 :rmvx: I only use Rpg Maker Vx! So RMVXA scripts aren't useful for me.

Thanks in advance!
Title: Re: [VX] Try to answer this
Post by: Acolyte on July 05, 2013, 06:59:05 PM
I'm not sure, but I think Yanfly's Melody engine has something like that.
http://yanflychannel.wordpress.com/rmvx/melody/
Title: Re: [VX] Try to answer this
Post by: josemanupagon on July 05, 2013, 08:03:23 PM
But Yanfly's skill scripts...

are them compatible with Tankentai's Battle System?

I don't think so, but I have no idea about scripting, so I don't know!
Title: Re: [VX] Try to answer this
Post by: modern algebra on July 06, 2013, 11:54:37 AM
Well, some of his scripts definitely are compatible, and some aren't. You should probably try it and then we can deal with any incompatibility that arises.

In most cases, it is less work to make two existing scripts compatible than it is to write a brand new script.
Title: Re: [VX] Try to answer this
Post by: josemanupagon on July 06, 2013, 04:35:17 PM
Credits: Orochii
I've been answered, and the script is fully compatible with Tankentai's SBS.
I want to share it with you.

Code: [Select]
class RPG::State
  def cost_change
    (/<AUMENTO_COSTO\s+(\d+)>/ =~ @note) ? $1.to_i : 0
  end
  def cost_less_change
    (/<DISMINUIR_COSTO\s+(\d+)>/ =~ @note) ? $1.to_i : 0
  end
  def cost_change_p
    (/<PORCENTAJE_COSTO\s+(\d+)>/ =~ @note) ? $1.to_i : 100
  end
end

class Game_Battler
  def calc_mp_cost(skill)
    cost = skill.mp_cost
    cost /= 2 if half_mp_cost
    @states.each{|i|
      cost = (cost * $data_states[i].cost_change_p)/100
      cost += $data_states[i].cost_change
      cost -= $data_states[i].cost_less_change
    }
    cost = 0 if cost<0
    cost
  end
end

<AUMENTO_COSTO número> Where número is a number at your choice, it will raise the mp cost by x.
<DISMINUIR_COSTO número> Where número is a number at your choice, it will lower the mp price by x.
<PORCENTAJE_COSTO número> Where número is a number at your choice, it will multiply the mp cost by x%.

e.g : <AUMENTO_COSTO 5> All skills will cost 5 extra mp.
<PORCENTAJE_COSTO 40> All skills will cost 60% less mp.
<PORCENTAJE_COSTO 120> All skills will cost 20% more mp.
<DISMINUIR_COSTO 10> All skills will cost 10 less mp.
Title: Re: [VX] Try to answer this
Post by: modern algebra on July 06, 2013, 04:41:42 PM
I edited your post to add code tags, so that people can copy the code directly. Thank Orochii for us!