Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
In FFVI, there was an accessory called the celestriad. It reduced the MP cost of all spells to 1. Could anyone make me a script that would allow me to include an accessory like that in my game? Thanks.
Here's how such an item can be implemented. Put the script below in a new script section, under "Insert here", in the script editor. Change the "29" shown here to the armor ID for the celestriad.
Code:
class Game_Battler
CELESTRIAD_ID = 29 # Change 29 to the armor ID for the celestriad
alias :petero_celestriad_Game_Battler_calc_mp_cost :calc_mp_cost
def calc_mp_cost(skill)
if self.is_a?(Game_Actor) && self.equips.include?($data_armors[CELESTRIAD_ID])
return skill.mp_cost>1 ? 1 : skill.mp_cost
end
return petero_celestriad_Game_Battler_calc_mp_cost(skill)
end
end
Thank you so much for your quick reply! I tried several sites but you're the only one who responded. I'll be sure to credit you in my game. :thumb: Also, is there any way to have 2 or more celestriad items? I want one to be character-specific, and the other to be equippable by everyone.
EDIT: Never mind. I figured it out.